Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add program-date-time tag info to parsed segments #27

Merged
merged 2 commits into from
Feb 23, 2018

Conversation

mjneil
Copy link
Contributor

@mjneil mjneil commented Jul 5, 2017

See #26

This adds program date time info onto the parsed segment objects as well as the manifest since it is meant to be a segment tag

@mjneil mjneil requested a review from gesinger July 10, 2017 19:22
src/parser.js Outdated
// to the manifest object
this.manifest.dateTimeString = entry.dateTimeString;
this.manifest.dateTimeObject = entry.dateTimeObject;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed for calculating stream time from currentTime, so is more important than "for backwards compatibility" implies.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could still calculate stream time from currentTime by looking at the dateTimeString attached to the individual segment objects, the backwards compatibility is so updating to a version including this change wont break code that is expecting that information to be on the playlist object

src/parser.js Outdated
this.manifest.dateTimeObject = entry.dateTimeObject;
if (typeof this.manifest.dateTimeString === 'undefined') {
// PROGRAM-DATE-TIME is a media-segment tag, but for backwards
// compatibility, we add the first occurance of the PROGRAM-DATE-TIME tag
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

occurence

this.manifest.dateTimeString = entry.dateTimeString;
this.manifest.dateTimeObject = entry.dateTimeObject;
if (typeof this.manifest.dateTimeString === 'undefined') {
// PROGRAM-DATE-TIME is a media-segment tag, but for backwards
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add a TODO notice for the next major version to remove this

@mjneil mjneil merged commit c878d2f into videojs:master Feb 23, 2018
miadabdi pushed a commit to miadabdi/m3u8-parser that referenced this pull request Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants