-
Notifications
You must be signed in to change notification settings - Fork 6
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
Allow cue end time to be updated #9
Comments
I believe that the existing API can support this as follows: a. The b. The c. Hence, cues can be updated by removing, updating and then adding them back to the list. For example: function updateCueEnd(textTrack, cueIndex, endTime) {
// read cue to update
var cue = textTrack.cues[cueIndex];
// remove cue
textTrack.removeCue(cue);
// update end time
cue.endTime = endTime;
// add updated cue
textTrack.addCue(cue);
} Best practices for metadata text tracks describes a recommendation for handling scoring for a sports event and considers the live streaming case, which offers another good use case for updating media timed events. At the start of the match the score is '0-0', which could change to either '1-0' or '0-1' at an unknown time in the future. |
@rjksmith If removing a cue from the text track after its begin time means that its |
I have done some experiments with this, will post the results here soon. |
Actually, once we have #8, where We just need to encourage a best practice that any
|
@mavgit A slight variation on those scenarios you describe, but if those programs are followed by some other program, then we would need to update the cue end time, to ensure the cue doesn't overlap the following program. |
@chrisn The resource selection algorithm destroys all text track cues when the |
@nigelmegitt Firstly, there is no stated requirement that the cue is active, although that case should certainly be included. For an active cue, I would expect that If there are additional use cases which you think should be covered, please add them to this issue for discussion. |
@rjksmith calling @mavgit a single player in a |
@mavgit @chrisn I agree with your comments. I think it depends on whether the programmes are treated as separate files/streams or whether the channel broadcasts a single never-ending stream to which files/streams are appended. Both are possible, but perhaps that should be an issue addressed in best practice. |
@nigelmegitt Thanks for adding these new use cases. I acknowledge the issue you've highlighted, but I disagree with your conclusion. There are a number of ways in which the requirements can be interpreted and we should be careful to guard against adding unnecessary requirements which do not address the cause of the problem. Flicker, layout change and re-reading text are implementation issues, and could also occur as a result of a cue end time update. For example, a request is made (asynchronously) to update an active cue's end time just as it is about to expire. Before the update can be executed, the cue end time passes and it becomes inactive, calling |
Following further discussion of the events issue in the Media Timed Events telecon on 16 March 2020, I've raised it as a separate item as promised. |
Use Case
A user wants to display content synchronised to a web media object which is streaming live, and adds a suitable cue. After the cue has been added, a change occurs in real time which affects the content displayed and could not have been known beforehand.
A number of possible changes have been identified (thanks to @mavgit):
Proposal
It is proposed that the API should allow
TextTrackCue.endTime
to be changed after a cue has been added.Related Issues
The text was updated successfully, but these errors were encountered: