W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2013

Re: [whatwg] Should <video controls> generate click events?

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 26 Nov 2013 22:46:09 +0000 (UTC)
To: Glenn Maynard <glenn@zewt.org>, Simon Pieters <simonp@opera.com>, Philip Jägenstedt <philipj@opera.com>
Message-ID: <alpine.DEB.2.00.1311262204060.27766@ps20323.dreamhostps.com>
Cc: WHAT Working Group <whatwg@whatwg.org>
On Tue, 10 Sep 2013, Glenn Maynard wrote:
> 
> the activation behavior for videos should be to toggle play/pause.  If 
> only some browsers do it, it's an interop problem, and it seems like the 
> right default behavior.
> 
> I'm not sure whether this should only be when browser controls are 
> enabled or not.  It might be best to keep them orthogonal, so browser 
> controls are always UI controls that don't generate click events at all.

On Wed, 11 Sep 2013, Simon Pieters wrote:
> On Wed, 11 Sep 2013 01:35:00 +0200, Ian Hickson <ian@hixie.ch> wrote:
> > 
> > True, but there _is_ something now that says that if the browser 
> > considers it the user interacting with a control, that there shouldn't 
> > be events sent to the page. It's either a control (no events), or an 
> > activation behaviour (click events, can be canceled by 
> > preventDefault()).
> 
> Saying that Firefox's "click anywhere to play" isn't a control but 
> rather activation behavior for the element makes sense. If other 
> browsers want to implement that behavior, it would be good if the spec 
> called out this difference.
> 
> > Should we make this an explicit activation behaviour for the <video> 
> > element if it has a controls="" attribute?
> 
> That might be good so that the behavior is consistent between browsers. 
> However, I think it should be conditional on whether the controls are 
> visible rather than whether the controls attribute is present.

Done.

(As a side-effect, this means that if you put an accesskey="" attribute on 
a <video> element, you can trigger the pause/play behaviour from the 
keyboard, and you can use such a <video> as a master command for a 
<menuitem> with a command="" attribute.)

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 26 November 2013 22:46:32 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:14 UTC