HTML and CSS Reference
Figure19.Trying out version four of the custom control, with seekability
Other options you can add are support for a volume control and fullscreenmode. Volume con-
trol is simple: add a range input element or other slider-like control to adjust the volume using
the HTMLMediaElement's volume property—from 0 (silent) to 1 (loudest).
Unfortunately, there is no simple support for fullscreen mode. It isn't part of any of the
HTML5 media element interfaces, nor is it supported in most browsers. Webkit does offer a
vendor-specific method, webkitEnterFullscreen :
This method currently only works in Safari 5 and the Webkit Nightly. When the video is in
fullscreen mode, the default fullscreen video control is displayed, regardless of whether the
video element's controls attribute is present or not.
Other browsers don't provide anything so simple to use. What you have to do is get window
measurements and resize the video to go fullscreen, making sure to store previous video ele-