[whatwg] Html 5 video element's poster attribute

Shiv Kumar skumar at exposureroom.com
Tue Sep 21 23:00:46 PDT 2010


>We should also tighten up the language so that the poster must be shown up
until playback begins

 

Yes, please

 

>or a seek completes, rather than can be shown though.

 

No, this won't work. I don't want the poster to be shown during a seek so
the question of showing it until seek completes is moot.

 

>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. 



So really, what you're saying is simply forget about using the poster
attribute altogether.  Which is exactly what a few others have done
including us, so this whole dialog has been futile. In that case you don't
need to tihghten up the spec either.

 

 

>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().


Chris, this is awesome dude! Why didn't I think of this. This is a far
better solution for a very typical use case. So now I need to sync events
across multiple payers, keep playing player 1 and leave the user wondering
why her choice hasn't taken effect while I silently load the other video in
the background and then ..hmm I get now. That's a much better solution to my
need for turning a poster on/off.

 

Ok, serious now..

 

Chris, it seems to me that you agree that the load() method is not the right
method to turn on the poster. Is that correct?

 

Shiv

 <http://exposureroom.com/> http://exposureroom.com

 

From: whatwg-bounces at lists.whatwg.org
[mailto:whatwg-bounces at lists.whatwg.org] On Behalf Of Chris Pearce
Sent: Wednesday, September 22, 2010 1:23 AM
To: whatwg at lists.whatwg.org
Subject: Re: [whatwg] Html 5 video element's poster attribute

 

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:

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 procedure.

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.




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().


Regards,
Chris P.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100922/18c7bd92/attachment-0002.htm>


More information about the whatwg mailing list