On Sun, 18 Sep 2016 18:45:51 +0200, Melvin Carvalho <melvincarva...@gmail.com> wrote:

The pauseOnExit attribute on VTTCue can be used for this purpose. See
#text-track-api:the-audio-element for an example.

Thank you for both answers!

I found pauseOnExit to work very well for my use case.  I ended up with.

cue = new VTTCue(start, end, '')
cue.pauseOnExit = true
v.currentTime = start


var cue = new VTTCue(start, end, '');

As best I could tell that last parameter is a 'message', tho Im not sure I got any message when the video stopped, even when I populated it. Maybe I
wasnt supposed to.

It's not a message, it's the cue's text. For a metadata track, you can use it for anything you want, and access it with `cue.text`. For caption or subtitle tracks, it's text that gets rendered on top of the video.

I'm quite happy to use this solution.  My slight concert is whether there
are any side effects from adding a TextTrack to a video.

Should this be considered best practice, or would there perhaps still be
room in future for (start, end) parameters?

There is always room for adding convenience APIs, it's a matter of demonstrating that it's a common enough need to make it worth the cost of adding it.


Simon Pieters
Opera Software

Reply via email to