On Tue, Jun 18, 2013 at 12:57 PM, Brendan Long <[email protected]> wrote: > On 06/17/2013 12:41 AM, Silvia Pfeiffer wrote: >>> Why VTTCaptionCue and not just HTMLCue? It seems like any cue that can >>> be rendered needs to be able to provide its content as HTML, and once we >>> have that, the browser shouldn't care where we got that HTML from. >> That could indeed be a different way to approach caption cues. >> However, authoring caption text on video with only the formatting >> markup that a caption may need and limiting HTML functionality to >> features that captions need was one of the motivations for creating >> WebVTT. > > I don't think it's necessary to use the same language for authoring as > display though. Since we already have rules for rendering HTML, and > WebVTT seems to be a subset of HTML (with some special CSS rules, and > some shorthand tags), I think the easiest way to handle it would be to > translate WebVTT cues into HTML+CSS, then rely on the existing rendering > engine.
That's exactly what the WebVTT rendering algorithm does and HTMLCue is not necessary for this. However, you should be able to author WebVTT cues in JavaScript - that's what WebVTTCue was created for. HTH, Silvia.
