HTML and CSS Reference
In-Depth Information
Figure 6-12. Canvas video player buttons
Example 6-11
shows the full source code for this application.
Example 6-11. Canvas video with controls
<!doctype html>
<html
<html lang=
"en"
>
<head>
<head>
<meta
<meta charset=
"UTF-8"
>
<title>
<title>
CH6EX11: Canvas Video With Controls
</title>
</title>
<
script src
=
"modernizr.js"
><
/script>
<
script type
=
"text/javascript"
>
window
.
addEventListener
(
'load'
,
eventWindowLoaded
,
false
false
);
var
var
loadCount
=
0
;
var
var
itemsToLoad
=
2
;
var
var
videoElement
;
var
var
videoDiv
;
var
var
buttonSheet
;
var
var
buttonWait
=
5
;
var
var
timeWaited
=
buttonWait
;