[whatwg] Html 5 video element's poster attribute
Silvia Pfeiffer
silviapfeiffer1 at gmail.com
Mon Sep 20 21:03:18 PDT 2010
On Tue, Sep 21, 2010 at 1:36 PM, Shiv Kumar <skumar at exposureroom.com> wrote:
> Rob,
>
>
>
> >Do you have use-cases where calling "load()" after the video stream ends
> would not be a reasonable solution?
>
> As you can imagine, getting an Html 5 video player to work as expected is
> a delicate balance, especially when having to deal with nuances between
> browser implementations. I don’t have a specific use case per-se, but I don
> know that calling load() is not a solution here because one has to use load
> to be able to switch the video from say a medium quality version to an HD
> version without glitches such that the user experience is seamless (that is
> the new version plays exactly where the low quality version left off. Of
> course during this switch I wouldn’t want the poster to re-appear.
>
I don't think you understand what load() does. It certainly does not replace
a currently playing resource with a new one without glitches. When you load
a new resource, you set the currentSrc to a new resource URL, then call
load() and it will reset the player controls to start at the beginning, it
will reset the currentTime to 0 and basically do a whole reset. In fact, it
will even start playing back the element, even if it was set to pause before
(this happens in all browsers and I find that kinda strange actually). So,
all we would need is to also reset the player to pause if it was paused
before or it had reached the end before and also reload the poster.
All you would need to do then for your player is to register a callback that
calls load() when the ended event is raised.
Cheers,
Silvia.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100921/ce41a274/attachment-0002.htm>
More information about the whatwg
mailing list