[whatwg] Some media element details
Bonner, Matt (IPG)
matt.bonner at hp.com
Fri May 23 11:29:33 PDT 2008
Ian 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?
Matt
--
Matt Bonner
Hewlett-Packard Company
> -----Original Message-----
> From: whatwg-bounces at lists.whatwg.org
> [mailto:whatwg-bounces at lists.whatwg.org] On Behalf Of Ian Hickson
> Sent: Friday, May 16, 2008 3:20 PM
> To: Bonner, Matt (IPG)
> Cc: whatwg at whatwg.org; Antti Koivisto
> Subject: Re: [whatwg] Some media element details
>
> On Fri, 16 May 2008, Bonner, Matt (IPG) wrote:
> > On Mon, 14 Jan 2008, Ian Hickson wrote:
> > > On Mon, 14 Jan 2008, Antti Koivisto wrote:
> > >
> > > > It would be nice to have a read-only attribute (called
> "playing" for
> > > > example) that would be true when the element is
> "actively playing".
> > > > 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.
>
> --
> Ian Hickson U+1047E
> )\._.,--....,'``. fL
> http://ln.hixie.ch/ U+263A /, _.. \
> _\ ;`._ ,.
> Things that are impossible just take longer.
> `._.-(,_..'--(,_..'`-.;.'
>
-------------- 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/20080523/ab2b5a50/attachment-0001.bin>
More information about the whatwg
mailing list