Fix bug where video stream continued fetching on player close.

This commit is contained in:
Dolf Starreveld
2018-03-12 21:11:27 -07:00
parent 5854b31b76
commit 10e736dd63
2 changed files with 725 additions and 1 deletions

View File

@@ -127,7 +127,12 @@ function onSelectVideo(camera, range, recording) {
dialog.dialog({
title: camera.shortName + ", " + formattedStart + " to " + formattedEnd,
width: recording.videoSampleEntryWidth / 4,
close: function() { dialog.remove(); },
close: () => {
const videoDOMElement = video[0];
videoDOMElement.pause();
videoDOMElement.src = ''; // Remove current source to stop loading
dialog.remove();
},
});
video.attr("src", url);
}