datacue icon indicating copy to clipboard operation
datacue copied to clipboard

Add cue end time representing end of media

Open rjksmith opened this issue 5 years ago • 1 comments

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 avatar Jun 01 '19 11:06 rjksmith

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

rjksmith avatar Jul 01 '20 17:07 rjksmith