HTML and CSS Reference
In-Depth Information
Figure16.The video element with custom media controls in IE9
Many libraries that provide custom controls have only a play button that is clicked to play or pause
the video. The advantage of this simplified controls is we don't have to worry about all the disabling
and enabling of buttons.
One other change we could add to the application is to check whether the video can be
successfully played the entire way through before enabling the play button. The HTMLMe-
diaElement has a property, readyState , that can be tested to see if it has a value of
HAVE_ENOUGH_DATA (numerical value of 4), which indicates a sufficient amount of data has
been loaded so that playback should not trigger a video buffering during playback. Other
available states are:
No information and no data is available
Search WWH ::

Custom Search