Re: re-thinking "cue ranges"

On Thu, 22 May 2008 20:53:38 +0200, Dave Singer <singer@apple.com> wrote:
> First of all, it is hard to use. The ranges must be added by script,
> can't be supplied with the media, and the callbacks are awkward to
> handle. The only way to identify the range a received callback
> applies to is by creating not one but two separate functions for each
> range: one for enter, one for exit. While creating functions
> on-demand is easy in JavaScript it does fall under advanced
> techniques that most authors will be unfamiliar with. This kind of
> feature is also not available in all languages that might provide
> access to the DOM API.

The new solution also requires JavaScript or something equivalent and  
seems to be more verbose. The main advantage the new proposal has is that  
you get state information in the event callback. As seen in the SQL API we  
could add something similar to the existing proposal.


> Secondly this mechanism is not very powerful. You can't do anything
> else with the ranges besides receiving callbacks and removing them.
> You can't modify them. They are not visible to scripts or CSS. You
> can't link to them. You can't link out from them.

It's not really clear what scenarios you're thinking of here. The current  
range proposal does have an identifier so it should be possible in theory  
to address them with CSS.

   video:range(classname) { border:solid red }

(Assuming you meant something like that.)


> Thirdly, a script is somewhat strange place to define the ranges. A
> set of ranges usually relates closely to some particular piece of
> media content. The same set of ranges rarely makes much sense in the
> context of some other content. It seems that ranges should be defined
> or supplied along with the media content.
>
> Fourth, this kind of callback API is pretty strange creature in the
> HTML specification. The only other callback APIs are things like
> setTimeout() and the new SQL API which don't have associated
> elements. Events are the callback mechanism for everything else.

Other than <datagrid> this seems true, indeed.


I don't really care too much either way I suppose though I'd like to avoid  
adding more elements :-)


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Thursday, 22 May 2008 21:25:20 UTC