constructor(video, player, appDataCallback, contentIdCallback) {
    super();

    /** @private {HTMLMediaElement} */
    this.video_ = video;

    /** @private {shaka.Player} */
    this.player_ = player;

    /** @private {shaka.util.EventManager} */
    this.eventManager_ = new shaka.util.EventManager();

    /** @private {Object} */
    this.targets_ = {
      'video': video,
      'player': player,
    };

    /** @private {?function(Object)} */
    this.appDataCallback_ = appDataCallback || (() => {});

    /** @private {?function(string):string} */
    this.contentIdCallback_ = contentIdCallback ||
                          /**
                           * @param {string} contentId
                           * @return {string}
                           */
                          ((contentId) => contentId);

    /**
     * A Cast metadata object, one of:
     *  - https://developers.google.com/cast/docs/reference/messages#GenericMediaMetadata
     *  - https://developers.google.com/cast/docs/reference/messages#MovieMediaMetadata
     *  - https://developers.google.com/cast/docs/reference/messages#TvShowMediaMetadata
     *  - https://developers.google.com/cast/docs/reference/messages#MusicTrackMediaMetadata
     * @private {Object}
     */
    this.metadata_ = null;

    /** @private {boolean} */
    this.isConnected_ = false;

    /** @private {boolean} */
    this.isIdle_ = true;

    /** @private {number} */
    this.updateNumber_ = 0;

    /** @private {boolean} */
    this.startUpdatingUpdateNumber_ = false;

    /** @private {boolean} */
    this.initialStatusUpdatePending_ = true;

    /** @private {cast.receiver.CastMessageBus} */
    this.shakaBus_ = null;

    /** @private {cast.receiver.CastMessageBus} */
    this.genericBus_ = null;

    /** @private {shaka.util.Timer} */
    this.pollTimer_ = new shaka.util.Timer(() => {
      this.pollAttributes_();
    });

    this.init_();
  }
@param {!HTMLMediaElement} video The local video element associated with
  the local Player instance.
@param {!shaka.Player} player A local Player instance.
@param {function(Object)=} appDataCallback A callback to handle
  application-specific data passed from the sender.  This can come either
  from a Shaka-based sender through CastProxy.setAppData, or from a
  sender using the customData field of the LOAD message of the standard
  Cast message namespace.  It can also be null if no such data is sent.
@param {function(string):string=} contentIdCallback A callback to
  retrieve manifest URI from the provided content id.