constructor(receiverAppId, onStatusChanged, onFirstCastStateUpdate,
      onRemoteEvent, onResumeLocal, onInitStateRequired,
      androidReceiverCompatible) {
    /** @private {string} */
    this.receiverAppId_ = receiverAppId;

    /** @private {boolean} */
    this.androidReceiverCompatible_ = androidReceiverCompatible;

    /** @private {shaka.util.Timer} */
    this.statusChangeTimer_ = new shaka.util.Timer(onStatusChanged);

    /** @private {?function()} */
    this.onFirstCastStateUpdate_ = onFirstCastStateUpdate;

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

    /** @private {?function(string, !shaka.util.FakeEvent)} */
    this.onRemoteEvent_ = onRemoteEvent;

    /** @private {?function()} */
    this.onResumeLocal_ = onResumeLocal;

    /** @private {?function()} */
    this.onInitStateRequired_ = onInitStateRequired;

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

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

    /** @private {string} */
    this.receiverName_ = '';

    /** @private {Object} */
    this.appData_ = null;

    /** @private {?function()} */
    this.onConnectionStatusChangedBound_ =
        () => this.onConnectionStatusChanged_();

    /** @private {?function(string, string)} */
    this.onMessageReceivedBound_ = (namespace, serialized) =>
      this.onMessageReceived_(namespace, serialized);

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

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

    /** @private {Map<string, !shaka.util.PublicPromise>} */
    this.asyncCallPromises_ = new Map();

    /** @private {shaka.util.PublicPromise} */
    this.castPromise_ = null;

    shaka.cast.CastSender.instances_.add(this);
  }
@param {string} receiverAppId The ID of the cast receiver application.
@param {function()} onStatusChanged A callback invoked when the cast status
  changes.
@param {function()} onFirstCastStateUpdate A callback invoked when an
  "update" event has been received for the first time.
@param {function(string, !shaka.util.FakeEvent)} onRemoteEvent A callback
  invoked with target name and event when a remote event is received.
@param {function()} onResumeLocal A callback invoked when the local player
  should resume playback.  Called before the cached remote state is wiped.
@param {function()} onInitStateRequired A callback to get local player's.
  state.  Invoked when casting is initiated from Chrome's cast button.
@param {boolean} androidReceiverCompatible Indicates if the app is
  compatible with an Android Receiver.