selectAudioTrack abstract method

Future<void> selectAudioTrack(
  1. int index
)

Selects the audio track used during playback.

After getting the track index of the audio file, you can call this method to specify any track to play. For example, if different tracks of a multi-track file store songs in different languages, you can call this method to set the playback language. For the supported formats of audio files, see. You need to call this method after calling startAudioMixing and receiving the onAudioMixingStateChanged (audioMixingStatePlaying) callback.

  • index The audio track you want to specify. The value range is 0, getAudioTrackCount ().

Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly.

Implementation

Future<void> selectAudioTrack(int index);