ochojoneso
10/6/2018 - 12:59 PM

Prevent Video

Prevents the browser from playing video if it is not supported.


<script type="text/javascript">

    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’;
    }

  </script>