getAudioTrackCount method
Gets the audio track index of the current music file.
Since v4.2.0
Note:
- Call this method after calling startAudioMixing and receiving the RtcEngineEventHandler.audioMixingStateChanged event callback with state code AudioMixingStateCode.Playing.
- For the audio file formats supported by this method, see What formats of audio files does the Agora RTC SDK support.
Returns
- ≥ 0: The audio track index of the current music file, if this method call succeeds.
- < 0: Failure.
Implementation
@override
Future<int?> getAudioTrackCount() {
return _invokeMethod('getAudioTrackCount');
}