selectTrack method

Future<void> selectTrack(
  1. int trackIndex
)

This interface is only supported by the premium version of the player (Player_Premium), and you need to purchase the premium version of the player mobile license. Select track @param trackIndex track index, obtained through trackIndex of TXTrackInfo

此接口仅播放器高级版本(Player_Premium)支持,需要购买播放器移动端高级版 License 选择轨道 @param trackIndex 轨道index,通过TXTrackInfo的trackIndex获取

Implementation

Future<void> selectTrack(int trackIndex) async {
  if (_isNeedDisposed) return;
  await _initPlayer.future;
  await _vodPlayerApi.selectTrack(IntPlayerMsg()
    ..playerId = _playerId
    ..value = trackIndex);
}