HTML and CSS Reference
In-Depth Information
var
var videoType = supportedVideoFormat ( videoElement );
iif ( videoType == "" ) {
alert ( "no video support" );
return
return ;
}
videoElement . addEventListener ( "canplaythrough" , videoLoaded , false
false );
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 () {
Search WWH ::




Custom Search