selectAudioTrack abstract method

Future<void> selectAudioTrack(
  1. int index
)

Specifies the audio track for the current audio file.

After obtaining the audio track index of the audio file, you can call this method to select any track for playback. If different tracks in a multi-track file contain 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.

  • index 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. See Error Codes for details and resolution suggestions.

Implementation

Future<void> selectAudioTrack(int index);