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

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

From: Simon Pieters <simonp@opera.com>
Date: Wed, 21 Aug 2013 16:00:45 +0200
To: "Rick Waldron" <waldron.rick@gmail.com>
Message-ID: <op.w156jjzqidj3kv@simons-macbook-pro.local>
Cc: "whatwg@lists.whatwg.org" <whatwg@lists.whatwg.org>, Brian Chirls <brian.chirls@gmail.com>
On Wed, 21 Aug 2013 15:19:51 +0200, Rick Waldron <waldron.rick@gmail.com>  

> Are you suggesting that Silvia's earlier description of the
> implications was wrong?

No, I was correcting misconceptions in the stuff I quoted.

> Ok, I appreciate this correction, but this is still a poor solution. How  
> do
> get notified of clicks on the controls?

You don't, except when clicks on the controls have an effect (e.g. 'play'  
for play).

It may be the case that the change is suboptimal especially now that some  
browsers make the whole video a big play/pause button. I'm open to  
alternative solutions that would make Philip's example trivial to  
implement correctly for authors and still allow authors to be notified of  
clicks on the controls.

For instance, I can imagine exposing a property on the click event that  
tells whether the user clicked on the controls, and maybe even what was  
being clicked (as a string).

<video onclick="if (controlsTarget == null) { if (paused) play(); else  
pause(); }" ...></video>

Simon Pieters
Opera Software
Received on Wednesday, 21 August 2013 13:55:18 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:23 UTC