W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2008

[whatwg] Some media element details

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 12 Jun 2008 00:46:16 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0806120042350.8559@hixie.dreamhostps.com>
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.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 11 June 2008 17:46:16 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:03 UTC