HTML and CSS Reference
In-Depth Information
document.getElementById("playVideo").value="Play";
document.getElementById("videoSeek").value=0;
document.getElementById("durationVideo").innerHTML="0/"
+ Math.round(video.duration);
}
function seekVideo() {
var seek=document.getElementById("videoSeek");
video.currentTime=seek.value;
}
function updateSeekVideo() {
var seek=document.getElementById("videoSeek");
seek.value=video.currentTime;
var duration=document.getElementById("durationVideo");
duration.innerHTML=Math.round(video.currentTime) + "/"
+ Math.round(video.duration);
}
function toggleMuteVideo() {
video.muted=!video.muted;
}
function updateMuteVideo() {
var mute=document.getElementById("muteVideo");
if (video.muted) {
mute.value="Unmute";
}
else {
mute.value="Mute";
}
}
function setVolumeVideo() {
var volume=document.getElementById("volumeVideo");
video.volume=volume.value;
}
</script>
4.
Save your changes and select opera as the debug browser. Press F5 to debug the
application. Try out the video controls which should look like Figure 8-19 .
 
Search WWH ::




Custom Search