[whatwg] Html 5 video element's poster attribute
chris at pearce.org.nz
Tue Sep 21 22:22:32 PDT 2010
On 22/09/2010 4:26 p.m., Shiv Kumar wrote:
> >What I suggested was to use a call to the load()
> So in your mind calling load() implies showing the poster?
I think we should change to this. Then every call to load() would have
the same effect.
We should also tighten up the language so that the poster /must/ be
shown up until playback begins or a seek completes, rather than /can/ be
shown though. That would (hopefully!) ensure cross browser consistency.
> The other reason (that I've mentioned repeatedly) for not wanting to
> use the load method is this:
> 1. The load method has way too many side effects including events no
> less, oh and did I mention have the player now go to pause and have
> the readyState switch to HAVE_NOTHING, when there is meta data and to
> Network state go to empty when it's really idle? Gosh, I could take
> almost every other step in the media element load algorithm stated
> 2. These side (I've only listed small number above) effects are not
> desireable when all we want to do is turn on/off the poster.
I agree, you don't want all those side effects just to show the poster.
If you want to change when the poster appears, you're better off
creating your own poster as an image element.
The "just show the poster until I play or seek" case is the common case.
If you want to customize your player, you can still do that.
> 3. Alter the load alogorithm to now fiddle with the poster will impact
> the other use case I've mentioned and that is, the ability to be able
> to switch media in mid play. We call the load() method to be able to
> do this (because of the things it does do listed above). So now we'll
> have the poster become visible while we're trying to switch video streams?
You can implement "media switching in mid play" by loading the new
resource in a new video element, seeking to the switch over point, and
then swapping the new video element in place of the old one. When you
call load(), the poster will be shown, but when the seek completes, the
poster image will be replaced by the frame at the seek target location.
This would be quicker than stopping playback of the existing resource,
starting a new load in the existing media element, waiting for the new
load to initialize, waiting for the seek to the change over point to
complete, and then resuming playback. Unlike your proposed method, it
can be done without needing to stop playback.
Given that this better alternative method exists to achieve what you
want, I don't think your case 3 is a strong argument against displaying
the poster every time we call load().
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the whatwg