[whatwg] Html 5 video element's poster attribute

Chris Pearce chris at pearce.org.nz
Sun Sep 19 20:10:03 PDT 2010


  On 20/09/2010 12:50 p.m., Aryeh Gregor wrote:
> On Sun, Sep 19, 2010 at 4:53 PM, Shiv Kumar<skumar at exposureroom.com>  wrote:
>> The poster frame should remain visible until the video is played.
> I agree with Silvia, this should be required by the spec.

This makes sense, we should spec this so that the poster /must/ be 
visible until its played, otherwise the poster attribute can't be relied 
upon by authors.

>
>> The poster should show again after the video has ended.
> I'm ambivalent about this.  I could go either way.

Aesthetically, I feel we shouldn't show the poster once the video has 
finished. Authors could script this behaviour if they wanted it. The 
spec as it's written forbids showing the poster after a video frame has 
been shown.


>> The visibility of the poster should be scriptable and/or controllable using
>> an attribute. Meaning that one should be able to turn on/off the poster
>> (without changing the poster attrbute’s value)
> I don't see why this is necessary.

I also don't see why this is necessary. The poster attribute is only 
useful if it's enabled, it's not useful if it isn't. Having an attribute 
to denote whether the poster attribute is enabled seems like duplication 
of state to me.

>    You can just do
>
> video.dataset.poster = video.poster;
> video.removeAttribute("poster");
>
> to remove it, and
>
> video.poster = video.dataset.poster;
>
> to restore, if you like.  (In browsers that implement dataset, which
> is apparently only WebKit so far.  But you can easily store the
> original value someplace else, although not quite as elegantly.)
>

The specification for poster [1] implies that we should handle dynamic 
changes to the poster attribute. I can imagine authors may want to cycle 
through a chain of poster images for a given video, and this can 
(theoretically) be easily implemented by changing the poster attribute 
in a timer.

Chris P.

[1] 
http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#attr-video-poster
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100920/b2504c0c/attachment-0002.htm>


More information about the whatwg mailing list