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. You need to call this method after calling getStreamInfo to get the audio stream index value.

  • index The index of the audio track.

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);