onPlayerReady() {
    this.ready = true;

    // Restoring the current time if saved
    if (this.currentTime) {
      this.player.seekTo(this.currentTime, true);
      this.player.pauseVideo();
      this.currentTime = null;
    }

    if (this.timeout && this.player.getPlayerState() !== 1) {
      this.play();
    }

    if (this.onReadyCb) {
      this.onReadyCb();
      this.onReadyCb = null;
    }
  }
Player ready callback. Will play the video if it was intended to be played
and will also call any pending callbacks.