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

Rick Waldron waldron.rick at gmail.com
Wed Aug 21 07:43:54 PDT 2013


On Wednesday, August 21, 2013, Simon Pieters wrote:

> On Wed, 21 Aug 2013 15:19:51 +0200, Rick Waldron <waldron.rick at gmail.com>
> wrote:
>
>  Are you suggesting that Silvia's earlier description of the
>> implications was wrong?
>>
>
> No, I was correcting misconceptions in the stuff I quoted.
>
>
Thank you for clarifying.


>
>  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>


Yes.

Ideally the event.target is defined more specifically, eg. if event objects
from clicks (and others) on controls had an event.target that was the
actual controls element.

Rick



>
> --
> Simon Pieters
> Opera Software
>



More information about the whatwg mailing list