HTML and CSS Reference
In-Depth Information
If the browser supports the HTML5 video element, it doesn't show the fallback. In this
case, make sure that you have the valid <source> element specified for that browser. If you
don't, the video container shows an error in place of the control bar, saying that an invalid
link or file is specified.
Sometimes having more control over things is nice, or perhaps you just don't like the look
and feel of the default controls. This is where JavaScript comes in. You can create your own
control bar and substitute your own control buttons to enable users to control the video.
The following example adds a few custom image elements to the page and wires up some
JavaScript to control the video:
img:hover {
cursor: pointer;
var video;
window.onload = function () {
video = document.getElementById("sampleVideo");
function play() {;
function pause() {
function back() {
video.currentTime -= 10;
<video height="400" width="600" id="sampleVideo">
<source src="samplevideo.mp4" type="audio/mp4"/>
<img id="backButton" src="backword.png" onclick="back();"/><br/>
<img id="playButton" src="forward.png" onclick="play();"/><br/>
<img id="PauseButton" src="pause.png" onclick="pause();"/><br/>
Search WWH ::

Custom Search