[whatwg] Tracks and cues

Cyril Concolato cyril.concolato at telecom-paristech.fr
Wed Oct 24 00:23:00 PDT 2012


Hi Ian,

Le 10/18/2012 9:59 PM, Ian Hickson a écrit :
> On Wed, 25 Jul 2012, Silvia Pfeiffer wrote:
>> If we are very clear about what will be in the cues and that it will
>> always be just SVG, we could just create a @kind="svg".
> IMHO the idea of putting SVG in cues seems to somewhat miss the point. SVG
> already has a timeline, it already supports synchronisation with videos,
> it should just be used that way.
Originally my request was to be able to use plain SVG content in a track 
(not embedded in WebVTT) and let the browser handle rendering, 
synchronization... This has many advantages, see the end of this post:
http://lists.w3.org/Archives/Public/public-whatwg-archive/2012Jul/0196.html
It was suggested to me to embed it in VTT as a workaround. It kind of 
works but I agree this is not the solution for all cases (complex 
authoring, redundant data in cues, no progressive rendering). I'd be 
happy if @kind=graphics would allow pointing to an SVG file directly (or 
to any animated graphics like HTML+CSS, ... identified by the MIME type).

> On Wed, 26 Sep 2012, Cyril Concolato wrote:
>> Has it been considered adding another method to add cues to a track?
>> Something like addCues(DOMString text) where the text is not only one
>> cue (like in the TextTrackCue ctor) but where the text would be multiple
>> cues as written in a WebVTT file?
> Just use a <track> element to point to the file.
>
Yes, that's what suggested Philip Jägenstedt, to have a dummy track 
element to parse the cues and then transfer it to the real element. I've 
been doing that so far but I consider it a hack.

My use case is live (possibly adaptive) video streaming with subtitles. 
The video content is fetched dynamically based on the time, the current 
video program (movie vs. ad), and possibly adaptively depending on the 
available bandwidth (see HLS, DASH, SmoothStreaming...). In that use 
case, the subtitles also need to be fetched dynamically and spliced. You 
can't change the <track> src attribute on the fly (just like you can't 
for the <video> element) as this would reset all cues. You need to 
append cues. It would be good to either have MSE cover that or as I 
suggested above have a method to parse cue segments.

Cyril

-- 
Cyril Concolato
Maître de Conférences/Associate Professor
Groupe Multimedia/Multimedia Group
Telecom ParisTech
46 rue Barrault
75 013 Paris, France
http://concolato.wp.mines-telecom.fr/




More information about the whatwg mailing list