[whatwg] (X)HTML + SMIL?

On 27/12/08 16:15, Giovanni Campagna wrote:
> 1) the video HTML5 element can be replaced by SMIL video into XHTML2
> documents, alongside with the SMIL DOM, quite similar to HTML5 media
> DOM. It also solves accessibility problems such as how to put subtitles
> into video (use the SMIL Text Module)

You can of course create compound documents mixing SMIL with XHTML 1.x 
or with (the proposed) XHTML2 or with (the proposed) XML serialization 
of HTML5. Because of the XML serialization, this isn't a replacement for 
a text/html video solution.

Equally, you can use - and always have been able to use - a SMIL object 
embedded in a text/html document with the OBJECT element. This suffers 
both from poor implementations of OBJECT and dependence on plugins that 
makes life more complicated for developers and end-users. Note browser 
vendor feedback was that overloading OBJECT to make native video APIs 
would be hard for implementers:

* http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-March/010160.html

Likewise, you can embed SMIL as a source for an HTML5 VIDEO element 
which (hopefully) will have compatible implementations and be played 
natively in the browser, making life simpler for developers and end-users.

To replace HTML5's VIDEO with a SMIL DOM, you'd need to port SMIL to a 
text/html serialization. This porting process would be very contentious 
and complicated, just as the same process with MathML and SVG is proving 
to be.

It's also debatable whether replacing VIDEO with the SMIL DOM would be 
desirable in the first place. There has been some criticism of SMIL's 
heavy use of namespaces from within WHATWG circles:

    * http://annevankesteren.nl/2005/12/smil
    * http://annevankesteren.nl/2006/03/smil
    * http://www.w3.org/2004/04/webapps-cdf-ws/papers/opera.html

I'd suggest you review the rationale for VIDEO before presenting a case 
for replacing it:

* Original video element proposal from Opera (March 2007):
http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-February/009702.html 


* Additional proposal from Apple (March 2007):
http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-March/010386.html

Initial discussion, if you'd chosen to read it, included both questions 
about using SMIL video instead -

    * 
http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-February/009703.html
    * 
http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-March/009739.html
    * 
http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-March/010416.html
    * 
http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-March/010432.html

- and reasons to prefer VIDEO over SMIL:

* Compatibility with IE's existing text/html implementation of SMIL 
would require some sort of namespace support in text/html (WHATWG is 
basically namespace-hostile):

http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-March/009729.html

http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-October/012715.html

* "'mediacomplete' seems to require that the video is completely loaded 
first which is (a) not always something you want and (b) we have a 
'load' event for that"

http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-March/009729.html

* proposed VIDEO API has allegedly clearer names than the SMIL API, more 
similar to the Flash familiar to web video developers today:

http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-March/010204.html

http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-March/010217.html

* t:video is not widely used (which may suggest it needs to be improved):

http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-March/010419.html

* the W3C XHTML+SMIL proposal 
"http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-October/012719.html 
"doesn't seem to define error handling, nor does it have a corresponding 
DOM API... and it is far more complex than the <video> element currently 
in the HTML5 draft"

http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-October/012719.html

* "We got strong feedback from existing producers of video on the Web 
that their experience with SMIL had been universally disappointing."

http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-October/012715.html

* "SMIL's conceptual model wasn't a good fit for the requirements we had 
in mind for <video>." (I'm not entirely sure what was meant there; I 
think it's a reference to the opposition to introducing a large 
featureset for timed presentations with multiple elements, where HTML5 
just wants a way to embed a video simply.)

http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-October/012715.html

http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-October/012718.html

http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2008-October/016674.html

I don't know enough about SMIL to have a strong position on this stuff 
myself (I was one of the people initially wondering why WHATWG wasn't 
using SMIL).

But at this late stage, I suppose your best bet would be to present a 
detailed proposal for SMIL integration that tries to actually address 
these issues.

> 2) CSS Transitions, that currently are WebKit propietary extensions, can
> be implemented using SMIL Animation Module. What is more important, many
> browsers already implement SMIL Animations on SVG elements, so they
> could easilily port them to XHTML2 (or 5 if they prefer)

CSS is for presentation and thus serves a different purpose from SMIL 
animations on SVG elements that are presumably part of the content. So 
these technologies have different use-cases.

This has also been discussed in the WHATWG archives:

http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-April/010763.html

--
Benjamin Hawkes-Lewis

Received on Saturday, 27 December 2008 10:16:00 UTC