Skip to content
This repository has been archived by the owner on Jan 29, 2019. It is now read-only.

Commit

Permalink
fix duplicate caption processing
Browse files Browse the repository at this point in the history
  • Loading branch information
squarebracket committed Aug 14, 2017
1 parent 9e6a1d9 commit b257de6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/transmuxer-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ class MessageHandlers {
flush(data) {
this.transmuxer.flush();
}

seeked(data) {
this.transmuxer.seeked();
}
}

/**
Expand Down
4 changes: 4 additions & 0 deletions src/virtual-source-buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ export default class VirtualSourceBuffer extends videojs.EventTarget {
}
};

this.mediaSource_.player_.on('seeked', () => {
this.transmuxer_.postMessage({action: 'seeked'});
});

// this timestampOffset is a property with the side-effect of resetting
// baseMediaDecodeTime in the transmuxer on the setter
Object.defineProperty(this, 'timestampOffset', {
Expand Down

0 comments on commit b257de6

Please sign in to comment.