-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add presentationTime as an attribute on each SegmentList segment (
#142) Now that presentationTime is included on segment objects, and is already adjusted by the presentationTimeOffset, the presentationTimeOffset attribute has been removed from the output to make the segment output more understandable (without any qualifications of whether offset times are already accounted for). BREAKING CHANGE: the presentationTimeOffset attribute has been removed from output
- Loading branch information
Showing
11 changed files
with
215 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
export const parsedManifest = { | ||
allowCache: true, | ||
discontinuityStarts: [], | ||
duration: 12, | ||
endList: true, | ||
mediaGroups: { | ||
'AUDIO': {}, | ||
'CLOSED-CAPTIONS': {}, | ||
'SUBTITLES': {}, | ||
'VIDEO': {} | ||
}, | ||
playlists: [ | ||
{ | ||
attributes: { | ||
'AUDIO': 'audio', | ||
'BANDWIDTH': 449000, | ||
'CODECS': 'avc1.420015', | ||
'NAME': '482', | ||
'PROGRAM-ID': 1, | ||
'RESOLUTION': { | ||
height: 270, | ||
width: 482 | ||
}, | ||
'SUBTITLES': 'subs' | ||
}, | ||
endList: true, | ||
mediaSequence: 1, | ||
targetDuration: 3, | ||
resolvedUri: '', | ||
segments: [ | ||
{ | ||
duration: 3, | ||
map: { | ||
uri: '', | ||
resolvedUri: 'https://www.example.com/base' | ||
}, | ||
resolvedUri: 'https://www.example.com/low/segment-1.ts', | ||
timeline: 0, | ||
presentationTime: 0, | ||
uri: 'low/segment-1.ts', | ||
number: 1 | ||
}, | ||
{ | ||
duration: 3, | ||
map: { | ||
uri: '', | ||
resolvedUri: 'https://www.example.com/base' | ||
}, | ||
resolvedUri: 'https://www.example.com/low/segment-2.ts', | ||
timeline: 0, | ||
presentationTime: 3, | ||
uri: 'low/segment-2.ts', | ||
number: 2 | ||
}, | ||
{ | ||
discontinuity: true, | ||
duration: 3, | ||
map: { | ||
uri: '', | ||
resolvedUri: 'https://www.example.com/base' | ||
}, | ||
resolvedUri: 'https://www.example.com/low/segment-1.ts', | ||
timeline: 1, | ||
presentationTime: 6, | ||
uri: 'low/segment-1.ts', | ||
number: 1 | ||
}, | ||
{ | ||
duration: 3, | ||
map: { | ||
uri: '', | ||
resolvedUri: 'https://www.example.com/base' | ||
}, | ||
resolvedUri: 'https://www.example.com/low/segment-2.ts', | ||
timeline: 1, | ||
presentationTime: 9, | ||
uri: 'low/segment-2.ts', | ||
number: 2 | ||
} | ||
], | ||
timeline: 0, | ||
uri: '' | ||
} | ||
], | ||
segments: [], | ||
uri: '' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<MPD | ||
xmlns="urn:mpeg:dash:schema:mpd:2011" | ||
profiles="urn:mpeg:dash:profile:isoff-live:2011" | ||
type="static" | ||
mediaPresentationDuration="PT12S" | ||
minBufferTime="PT3.000S"> | ||
<BaseURL>https://www.example.com/base</BaseURL> | ||
<Period duration="PT6S"> | ||
<AdaptationSet mimeType="video/mp4" scanType="progressive" segmentAlignment="true" startWithSAP="1"> | ||
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"></Role> | ||
<Representation bandwidth="449000" codecs="avc1.420015" frameRate="2997/125" height="270" id="482" width="482" > | ||
</Representation> | ||
<SegmentList timescale="1000" duration="3000"> | ||
<RepresentationIndex sourceURL="representation-index-low"/> | ||
<SegmentURL media="low/segment-1.ts"/> | ||
<SegmentURL media="low/segment-2.ts"/> | ||
</SegmentList> | ||
</AdaptationSet> | ||
</Period> | ||
<Period> | ||
<AdaptationSet mimeType="video/mp4" scanType="progressive" segmentAlignment="true" startWithSAP="1"> | ||
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"></Role> | ||
<Representation bandwidth="449000" codecs="avc1.420015" frameRate="2997/125" height="270" id="482" width="482" > | ||
</Representation> | ||
<SegmentList timescale="1000" duration="3000"> | ||
<RepresentationIndex sourceURL="representation-index-low"/> | ||
<SegmentURL media="low/segment-1.ts"/> | ||
<SegmentURL media="low/segment-2.ts"/> | ||
</SegmentList> | ||
</AdaptationSet> | ||
</Period> | ||
</MPD> |
Oops, something went wrong.