selectAudioTrack method
@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 #IMediaPlayer#getAudioTrackCount}.
@return
- 0: Success.
- < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details.
@note
- Call this API only when audio is mixing.
- This API is valid for audio file, not PCM data.
- After calling this API, you will receive onMediaPlayerEvent{@link #IMediaPlayerEventHandler#onMediaPlayerEvent} callback.
Implementation
FutureOr<int> selectAudioTrack(int index) async {
return await nativeCall('selectAudioTrack', [index]);
}