selectAudioTrack method

FutureOr<int> selectAudioTrack(
  1. int index
)

@detail api @brief Specifies the playback track of the current media file. @param index The specified playback audio track, starting from 0, and the range is [0, getAudioTrackCount()-1]. The value must be less than the return value of getAudioTrackCount{@link #ByteRTCMediaPlayer#getAudioTrackCount}. @return - 0: Success. - < 0 : Fail. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for more details. @note - Call this API only when audio is mixing. - This API is valid for audio file, not PCM data.

Implementation

FutureOr<int> selectAudioTrack(int index) async {
  return await nativeCall('selectAudioTrack:', [index]);
}