Skip to content

Add cue end time representing end of media #8

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

Open
rjksmith opened this issue Jun 1, 2019 · 1 comment
Open

Add cue end time representing end of media #8

rjksmith opened this issue Jun 1, 2019 · 1 comment

Comments

@rjksmith
Copy link
Collaborator

rjksmith commented Jun 1, 2019

Use Case
A user wants to display content which is synchronised to a web media object and remains visible from the cue start time until the media finishes playing. For example, a common use case for WebVMT is to add a map annotation cue which persists for the media duration. In the case of live streaming, the end of media time is unknown and there is no value of TextTrackCue.endTime that can represent this.

Proposal
It is proposed that a TextTrackCue.endTime value of Infinity could be used to represent the end of media time. This is a simple extension of the existing HTML 5.2 standard where media.duration equal to Infinity represents the duration of an unbounded stream.

Example

function addCueToEnd(textTrack, startTime, cueType, cueValue) {
  // display cue from startTime to end of media
  var cue = new DataCue(startTime, Infinity);
  cue.type = cueType;
  cue.value = cueValue;
  textTrack.addCue(cue);
}

Related Issues

@rjksmith
Copy link
Collaborator Author

rjksmith commented Jul 1, 2020

Revised Proposal
I've revised this proposal to represent an unbounded time, i.e. unspecified future time, rather than the end of media time.

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

No branches or pull requests

1 participant