W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2007

[whatwg] <video> element proposal

From: Kornel Lesinski <kornel@osiolki.net>
Date: Sat, 17 Mar 2007 15:57:34 -0000
Message-ID: <op.tpcbx8pl4suneb@g5.local>
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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:53 UTC