Comparing version 1.3.0 to 1.3.1
@@ -54,3 +54,3 @@ /** | ||
this.setEarliestDts = function (earliestDts) { | ||
earliestAllowedDts = earliestDts; | ||
earliestAllowedDts = earliestDts - track.timelineStartInfo.baseMediaDecodeTime; | ||
}; | ||
@@ -422,3 +422,2 @@ | ||
timelineStartPts = 0, | ||
baseMediaDecodeTime = 0, | ||
i; | ||
@@ -434,6 +433,4 @@ | ||
timelineStartPts = this.videoTrack.timelineStartInfo.pts; | ||
baseMediaDecodeTime = this.videoTrack.timelineStartInfo.baseMediaDecodeTime; | ||
} else if (this.audioTrack) { | ||
timelineStartPts = this.audioTrack.timelineStartInfo.pts; | ||
baseMediaDecodeTime = this.audioTrack.timelineStartInfo.baseMediaDecodeTime; | ||
} | ||
@@ -470,5 +467,5 @@ | ||
caption = this.pendingCaptions[i]; | ||
caption.startTime = (caption.startPts - timelineStartPts) + baseMediaDecodeTime; | ||
caption.startTime = (caption.startPts - timelineStartPts); | ||
caption.startTime /= 90e3; | ||
caption.endTime = (caption.endPts - timelineStartPts) + baseMediaDecodeTime; | ||
caption.endTime = (caption.endPts - timelineStartPts); | ||
caption.endTime /= 90e3; | ||
@@ -482,3 +479,3 @@ event.captions.push(caption); | ||
id3 = this.pendingMetadata[i]; | ||
id3.cueTime = (id3.pts - timelineStartPts) + baseMediaDecodeTime; | ||
id3.cueTime = (id3.pts - timelineStartPts); | ||
id3.cueTime /= 90e3; | ||
@@ -664,4 +661,5 @@ event.metadata.push(id3); | ||
muxjs.mp4.VideoSegmentStream = VideoSegmentStream; | ||
muxjs.mp4.AudioSegmentStream = AudioSegmentStream; | ||
muxjs.mp4.Transmuxer = Transmuxer; | ||
})(this, this.muxjs); |
{ | ||
"name": "mux.js", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "A collection of lightweight utilities for inspecting and manipulating video container formats.", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -78,2 +78,7 @@ (function(window, muxjs, undefined) { | ||
// Setting the BMDT to ensure that captions and id3 tags are not | ||
// time-shifted by this value when they are output and instead are | ||
// zero-based | ||
transmuxer.setBaseMediaDecodeTime(100000); | ||
transmuxer.on('data', function(data) { | ||
@@ -80,0 +85,0 @@ if (data.captions) { |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3544308
55687