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

Peter Occil poccil14 at gmail.com
Tue Aug 20 18:11:49 PDT 2013


On Tue, Aug 20, 2013 at 3:28 PM, Silvia Pfeiffer
<silviapfeiffer1 at gmail.com> wrote:
> IMHO, the example that Philip provided in http://people.opera.com/~**
> philipj/click.html <http://people.opera.com/~philipj/click.html> is not a
> realistic example of something a JS dev would do.

I'm afraid this example doesn't work well in Firefox and Google Chrome.  It 
affects not only the video itself but also the browser-provided controls, 
and in Firefox it seems to interfere with those controls.  I think that at 
most the click-to-play behavior should only affect the video itself, not the 
buttons or other controls (for this to work, this would require hit-testing 
to see if the video or a control was clicked, and only override the default 
behavior if the video itself was clicked; the hit-testing, though, will be 
browser-specific and may require defining a new method in the spec).  In 
this way, the video controls would remain unaffected or be specially handled 
in a different way.  Another -- less realistic --solution may be to define 
new event handlers ("videoclick"? "videopauseclick"?) that only affect parts 
of the video element and not the entire video element.

--Peter 




More information about the whatwg mailing list