[whatwg] <video> element proposal

On Fri, 16 Mar 2007 23:49:04 -0000, Bjoern Hoehrmann <derhoermi at gmx.net>  
wrote:

>   +----------------+-----------------+-----------------+---------------+
>   | SMIL           | SVG             | IE              | "WHATWG"      |
>   +----------------+-----------------+-----------------+---------------+
>     beginElement() | beginElement()  | beginElement()  | play()
>     endElement()   | endElement()    | endElement()    | stop()
>     -              | pauseElement()  | pauseElement()  | pause()
>     -              | resumeElement() | resumeElement() | togglePause()
>     -              | isPaused        | isPaused        | state == PAUSED
>    ...

I think that nomenclature in WHATWG's API is much simpler and  
straightforward and that outweights benefit of appealing to authors  
experienced with SMIL/SVG.

beginElement() may sound strange and confusing to authors, especially ones  
familiar only with W3C DOM (where names like getElementById or  
createElement are often used). OTOH anyone can guess what play() and  
stop() do.

>   +----------------------------------+---------------------------------+
>   | Flash/ActionScript               | "WHATWG"                        |
>   +----------------------------------+---------------------------------+
>     pause()                          | togglePause()
>     pause(true)                      | pause()
>     pause(false)                     | togglePause()
>     seek(s)                          | seek(1000 * s)
>     time                             | position / 1000

This however is a good point - since Flash became de-facto standard for  
publishing video on the web, authors are likely to know Flash's API  
already. Having similar, but not exactly the same API may be source of  
mistakes.

-- 
regards, Kornel Lesi?ski

Received on Saturday, 17 March 2007 08:57:34 UTC