async onTextTrackSelected_(track) {
    // setTextTrackVisibility should be called after selectTextTrack.
    // selectTextTrack sets a text stream, and setTextTrackVisibility(true)
    // will set a text stream if it isn't already set. Consequently, reversing
    // the order of these calls makes two languages display simultaneously
    // if captions are turned off -> on in a different language.
    this.player.selectTextTrack(track);
    await this.player.setTextTrackVisibility(true);

    // Set text preference for when reloading the stream (e.g. casting), keep
    // this selection.
    this.player.configure('preferredTextLanguage', track.language);
    this.player.configure('preferForcedSubs', track.forced);
  }
@param {!shaka.extern.TextTrack} track
@return {!Promise}
@private