fix HLS streaming

pull/59/merge
mpromonet 7 years ago
parent 4fe9de8630
commit 11a3d9c2a2

15407
hls.js

File diff suppressed because it is too large Load Diff

@ -5,7 +5,7 @@
<script src="/getStreamList?streamList" ></script>
<h3>HLS</h3>
<video controls id="hlsvideo"></video>
<script src="https://cdn.jsdelivr.net/hls.js/latest/hls.min.js" ></script>
<script src="hls.js" ></script>
<script>
if (Hls.isSupported()) {
var video = document.getElementById("hlsvideo");
@ -23,7 +23,7 @@
<script>
var player = new dashjs.MediaPlayer().create();
player.initialize(document.getElementById("dashvideo"),streamList[0]+".mpd",true);
</script>
</script>
</body>
</html>

@ -309,25 +309,22 @@ void HTTPServer::HTTPClientConnection::handleCmd_notFound() {
}
void HTTPServer::HTTPClientConnection::afterStreaming(void* clientData)
{
{
HTTPServer::HTTPClientConnection* clientConnection = (HTTPServer::HTTPClientConnection*)clientData;
clientConnection->streamSource(NULL);
// Arrange to delete the 'client connection' object:
if (clientConnection->fRecursionCount > 0) {
// We're still in the midst of handling a request
clientConnection->fIsActive = False; // will cause the object to get deleted at the end of handling the request
} else {
// We're no longer handling a request; delete the object now:
// delete clientConnection;
delete clientConnection;
}
}
HTTPServer::HTTPClientConnection::~HTTPClientConnection()
{
if (fTCPSink != NULL)
{
FramedSource* oldSource = fTCPSink->source();
fTCPSink->stopPlaying();
Medium::close(fTCPSink);
Medium::close(oldSource);
}
}

Loading…
Cancel
Save