aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/static/js/av-merge.js
diff options
context:
space:
mode:
Diffstat (limited to 'youtube/static/js/av-merge.js')
-rw-r--r--youtube/static/js/av-merge.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube/static/js/av-merge.js b/youtube/static/js/av-merge.js
index d05d2c1..13551fb 100644
--- a/youtube/static/js/av-merge.js
+++ b/youtube/static/js/av-merge.js
@@ -37,6 +37,7 @@ function AVMerge(video, srcPair, startTime){
this.startTime = startTime;
this.video = video;
this.mediaSource = null;
+ this.closed = false;
this.setup();
}
AVMerge.prototype.setup = function() {
@@ -67,6 +68,9 @@ AVMerge.prototype.sourceOpen = function(_) {
//this.video.onseeked = function() {console.log('seeked')};
}
AVMerge.prototype.close = function() {
+ if (this.closed)
+ return;
+ this.closed = true;
this.videoStream.close();
this.audioStream.close();
this.timeUpdateEvt.remove();