[whatwg] HTML5 Video - Issue and Request for improvment

Lubomir Toshev lubo_toshev at dir.bg
Sun Jan 30 00:58:41 PST 2011

To elaborate a bit, I'm a control developer and I have my own custom
controls. But we want to allow for the customer to use the default browser
controls if they want to. This can be done by switching an option in my
jQuery widget - browserControls - true/false. Or through browser context
menu shown by default on right click. So I'm trying to be flexible enough
for the customer.

I was thinking about this
1) that adding a transparent overlay over the browser controls 
2) to detect the click position and if it is some pixels away from the
bottom of the video tag 

will fix this, but every browser has different height for its embedded
controls and I should hardcode this height in my code, which is just not

I can always add a limitation when using browser controls, toggle play/pause
on video area click will be turned off, but I want to achieve similar
behavior in all the browsers no matter whether they use embedded controls or

So I think this tiny click.target thing will be very useful.

-----Original Message-----
From: Monty Montgomery [mailto:xiphmont at gmail.com] 
Sent: Sunday, January 30, 2011 3:20 AM
To: Lubomir Toshev
Cc: whatwg at whatwg.org
Subject: Re: [whatwg] HTML5 Video - Issue and Request for improvment

> If I want to toggle play/pause
> on video area click, then I cannot do this, because clicking on the play
> control button, fires play, then click event fires for video tag and when
> toggle It pauses. So this behavior that every popular flash player has
> cannot be achieved. There is no way to understand that the click.target is
> the embedded browser controls area.

You can do it by writing your own controls for an overlay div.

It's not as involved as it sounds. One of the demos at OVC this past
fall was a ten-minute demo of writing full custom controls from
scratch, including drawing the buttons, etc.


More information about the whatwg mailing list