Return to Snippet

Revision: 51141
at September 15, 2011 21:32 by weidel


Initial Code
// Check if the browser understands the video element.
function understands_video() {
return !!document.createElement('video').canPlayType; // boolean
}
 
if ( !understands_video() ) {
// Must be older browser or IE.
// Maybe do something like hide custom
// HTML5 controls. Or whatever...
videoControls.style.display = 'none';
}

Initial URL

                                

Initial Description

                                

Initial Title
Check browser for <video> support

Initial Tags
javascript, textmate, video

Initial Language
Other