HTML and CSS Reference
In-Depth Information
videoElement
.
setAttribute
(
"src"
,
"muirbeach."
+
videoType
);
}
function
function
supportedVideoFormat
(
video
) {
var
var
returnExtension
=
""
;
iif
(
video
.
canPlayType
(
"video/webm"
)
==
"probably"
||
video
.
canPlayType
(
"video/webm"
)
==
"maybe"
) {
returnExtension
=
"webm"
;
}
else
else iif
(
video
.
canPlayType
(
"video/mp4"
)
==
"probably"
||
video
.
canPlayType
(
"video/mp4"
)
==
"maybe"
) {
returnExtension
=
"mp4"
;
}
else
else iif
(
video
.
canPlayType
(
"video/ogg"
)
==
"probably"
||
video
.
canPlayType
(
"video/ogg"
)
==
"maybe"
) {
returnExtension
=
"ogg"
;
}
return
return
returnExtension
;
}
function
function
canvasSupport
() {
return
return
Modernizr
.
canvas
;
}
function
function
videoLoaded
() {
canvasApp
();
}
function
function
canvasApp
() {
iif
(
!
canvasSupport
()) {
return
return
;
}
function
function
drawScreen
() {
//Background
context
.
fillStyle
=
'#303030'
;
context
.
fillRect
(
0
,
0
,
theCanvas
.
width
,
theCanvas
.
height
);
//Box
context
.
strokeStyle
=
'#FFFFFF'
;
context
.
strokeRect
(
5
,
5
,
theCanvas
.
width
-
10
,
theCanvas
.
height
-
10
);