selectAudioTrack method

  1. @override
Future<void> selectAudioTrack(
  1. int index
)

Specifies the playback track index of the current music file.

Since v4.2.0

After getting the audio track index of the current music file, call this method to specify any audio track to play. For example, if different tracks of a multitrack file store songs in different languages, you can call this method to set the language of the music file to play.

Parameter index The specified playback track. This parameter must be less than or equal to the return value of getAudioTrackCount.

Note:

Implementation

@override
Future<void> selectAudioTrack(int index) {
  return _invokeMethod('selectAudioTrack', {
    'index': index,
  });
}