[whatwg] Some media element details

Ok I totally lost this thread, sorry.

Ian Hickson wrote:
> On Fri, 23 May 2008, Bonner, Matt (IPG) wrote:
>>>>>> 
>>>>>> Knowing if the playback is progressing is necessary for
>>>>>> implementing basic playback UIs with JS. It is clumsy and not
>>>>>> very obvious that you need to do "var playing = !video.paused &&
>>>>>> !video.ended && video.readyState >= HTMLMediaElement.CAN_PLAY"
>>>>>> to get this information.
>>>>> 
>>>>> What's the use case?
>>>> 
>>>> Wouldn't you want something like that to know, for example, whether
>>>> to display a "play" or a "pause" button?
>>> 
>>> We have that -- the "paused" attribute. When it's true, show play,
>>> and when it's paused, show false. You don't want to show play when
>>> the reason you aren't playing is that you're buffered or seeking for
>>> instance. The client is trying to play. It can't.
>> 
>> Well I said "for example," so let's pick another example. Wouldn't
>> you need the state described to figure out whether enabling the
>> pause/fast-forward/rewind buttons makes sense?
> 
> Why would you disable the pause button when playing? Or when seeking?
> The pause button's disable state, as far as I can tell, need only be
> related to whether there is any media at all and whether the media
> playback is paused, not whether it is actively playing.
> 
> Similarly for fast-forward. You can fast-forward from the paused
> state and from the playing state. It doesn't matter whether the media
> is actually playing or not.

the original proposal said:

>>>>>> "var playing = !video.paused &&
>>>>>> !video.ended && video.readyState >= HTMLMediaElement.CAN_PLAY"

you appear to be proposing:

> var playing = !video.paused && video.readyState >=
HTMLMediaElement.CAN_PLAY

which only leaves the "video.ended" state in question.

If video.ended is true, what happens to video.readyState ?  Because if the
video ends, I think most page authors would want buttons like "pause" to
be disabled.  No?

Matt 
-- 
Matt Bonner
Hewlett-Packard Company
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4798 bytes
Desc: not available
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20081006/b32fa27d/attachment.bin>

Received on Monday, 6 October 2008 16:50:57 UTC