static waitForReadyState(mediaElement, readyState, eventManager, callback) {
    if (readyState == HTMLMediaElement.HAVE_NOTHING ||
      mediaElement.readyState >= readyState) {
      callback();
    } else {
      const MediaReadyState = shaka.util.MediaReadyState;
      const eventName =
          MediaReadyState.READY_STATES_TO_EVENT_NAMES_.value().get(readyState);
      eventManager.listenOnce(mediaElement, eventName, callback);
    }
  }
@param {!HTMLMediaElement} mediaElement
@param {number} readyState
@param {shaka.util.EventManager} eventManager
@param {function()} callback