HTML5 Video Test


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function understands_video() {
  2. return !!document.createElement('video').canPlayType; // boolean
  3. }
  4. if ( !understands_video() ) {
  5. // Must be older browser or IE.
  6. // Maybe do something like hide custom
  7. // HTML5 controls. Or whatever...
  8. videoControls.style.display = 'none';
  9. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.