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 support for SegmentTemplate padding format string and SegmentTimeline #16

Merged
merged 5 commits into from
Jan 19, 2018

Conversation

mjneil
Copy link
Contributor

@mjneil mjneil commented Jan 9, 2018

This adds support for the following SegmentTemplate features

  • template string identifier replacement with padding format tag support
    • $$
    • $RepresentationID$
    • $Number%0{x}d$
    • $Bandwidth%0{x}d$
    • $Time%0{x}d$
  • build segments from SegmentTimeline element

@forbesjo forbesjo self-assigned this Jan 9, 2018
@forbesjo
Copy link
Contributor

forbesjo commented Jan 9, 2018

Could you add jsdocs for the new functions? We'll get to the other functions later

* Value of the Representation@bandwidth attribute.
* @param {number} values.Time
* Timestamp value of the corresponding segment
* @return {(match: string, identifier: string, format: string, width: string) => string}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Following this format jsdoc/jsdoc#1286 (comment)

Our linter isn't too happy with it warning JSDoc syntax error valid-jsdoc. Not sure of a better way of expressing this. It won't prevent builds from passing at least

if (segmentTime && segmentTime > time) {
// discontinuity

// TODO: How to handle this type of discontinuity
Copy link
Contributor Author

Choose a reason for hiding this comment

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

any thoughts on this TODO @forbesjo @gesinger ?

relevant spec text 5.3.9.6

the signalling of discontinuities of the Media Presentation timeline for which no Segment data are present in a specific Representation.

If the value of the attribute is greater than what is expressed by the previous S element, it expresses discontinuities in the timeline.

I also found this blog post that mentioned the discontinuities briefly http://www.unified-streaming.com/blog/stop-numbering-underappreciated-power-dashs-segmenttimeline

Based on the wording of the spec and that blog post, this form of discontinuity signaling appears to be the DASH equivalent of EXT-X-GAP

Copy link
Contributor

Choose a reason for hiding this comment

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

Talked about this in chat, we'll leave this as is.

@forbesjo forbesjo merged commit 87933f6 into videojs:master Jan 19, 2018
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.

2 participants