demos/video/index.js
function waitForReadyState(element, readyState, interval, done) {
  var timer = setInterval(function() {
    if (element.readyState >= readyState) {
      clearInterval(timer);
      done(null, true);
    }
  }, interval);
}
function waitForReadyState(element, readyState, interval, done) {
  var timer = setInterval(function() {
    if (element.readyState >= readyState) {
      clearInterval(timer);
      done(null, true);
    }
  }, interval);
}
function waitForReadyState ( element , readyState , interval , done ) { var timer = setInterval ( function ( ) { if ( element . readyState >= readyState ) { clearInterval ( timer ) ; done ( null , true ) ; } } , interval ) ; }
Wait for an element to reach the given readyState by polling. The HTML5 video element exposes a `readystatechange` event that could be listened for instead, but it seems to be unreliable on some browsers.
Wait for an element to reach the given readyState by polling . The HTML5 video element exposes a readystatechange event that could be listened for instead but it seems to be unreliable on some browsers .