Skip to content

Commit

Permalink
more code from virtual source buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonocasey committed Jul 17, 2019
1 parent 42508d1 commit 29c4ccc
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/transmuxer-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,22 @@ const wireFullTransmuxerEvents = function(self, transmuxer) {
});
});

transmuxer.on('videoSegmentTimingInfo', function(videoSegmentTimingInfo) {
transmuxer.on('videoSegmentTimingInfo', function(timingInfo) {
const videoSegmentTimingInfo = {
start: {
decode: videoTsToSeconds(timingInfo.start.dts),
presentation: videoTsToSeconds(timingInfo.start.pts)
},
end: {
decode: videoTsToSeconds(timingInfo.end.dts),
presentation: videoTsToSeconds(timingInfo.end.pts)
},
baseMediaDecodeTime: videoTsToSeconds(timingInfo.baseMediaDecodeTime)
};

if (timingInfo.prependedContentDuration) {
videoSegmentTimingInfo.prependedContentDuration = videoTsToSeconds(timingInfo.prependedContentDuration);
}
self.postMessage({
action: 'videoSegmentTimingInfo',
videoSegmentTimingInfo
Expand Down

0 comments on commit 29c4ccc

Please sign in to comment.