function getActiveTextTrack() {
    const activeTracks = player.getTextTracks().filter((track) => {
      return track.active;
    });

    return activeTracks[0] || null;
  }
Gets the currently active text track.
@return {?shaka.extern.TextTrack}