shaka-player
Advanced tools
Comparing version 2.1.8 to 2.1.9
@@ -90,10 +90,21 @@ /** | ||
var SegmentBase = shaka.dash.SegmentBase; | ||
var XmlUtils = shaka.util.XmlUtils; | ||
var presentationTimeOffset = MpdUtils.inheritAttribute( | ||
context, SegmentBase.fromInheritance_, 'presentationTimeOffset'); | ||
var unscaledPresentationTimeOffset = Number(MpdUtils.inheritAttribute( | ||
context, SegmentBase.fromInheritance_, 'presentationTimeOffset')) || 0; | ||
var timescaleStr = MpdUtils.inheritAttribute( | ||
context, SegmentBase.fromInheritance_, 'timescale'); | ||
var timescale = 1; | ||
if (timescaleStr) { | ||
timescale = XmlUtils.parsePositiveInt(timescaleStr) || 1; | ||
} | ||
var scaledPresentationTimeOffset = | ||
(unscaledPresentationTimeOffset / timescale) || 0; | ||
var init = | ||
SegmentBase.createInitSegment(context, SegmentBase.fromInheritance_); | ||
var index = SegmentBase.createSegmentIndex_( | ||
context, requestInitSegment, init, Number(presentationTimeOffset)); | ||
context, requestInitSegment, init, unscaledPresentationTimeOffset); | ||
@@ -105,3 +116,3 @@ return { | ||
initSegmentReference: init, | ||
presentationTimeOffset: Number(presentationTimeOffset) || 0 | ||
presentationTimeOffset: scaledPresentationTimeOffset | ||
}; | ||
@@ -108,0 +119,0 @@ }; |
{ | ||
"name": "shaka-player", | ||
"description": "DASH/EME video player library", | ||
"version": "2.1.8", | ||
"version": "2.1.9", | ||
"homepage": "https://github.com/google/shaka-player", | ||
@@ -6,0 +6,0 @@ "author": "Google", |
@@ -184,3 +184,3 @@ /** | ||
' <AdaptationSet mimeType="video/mp4">', | ||
' <SegmentBase presentationTimeOffset="10">', | ||
' <SegmentBase presentationTimeOffset="90000">', | ||
' <Initialization sourceURL="init.mp4" range="201-300" />', | ||
@@ -229,3 +229,4 @@ ' </SegmentBase>', | ||
' <Representation bandwidth="1">', | ||
' <SegmentBase indexRange="30-900" presentationTimeOffset="20" />', | ||
' <SegmentBase indexRange="30-900" ', | ||
' presentationTimeOffset="200" />', | ||
' </Representation>', | ||
@@ -232,0 +233,0 @@ ' </AdaptationSet>', |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
17139463
81254