startAudioMixing abstract method
- @Deprecated('Deprecated since v3.54.1, use RTCAudioEffectPlayer.start, RTCMediaPlayer.open and RTCMediaPlayer.start instead')
- required int mixId,
- required String filePath,
- required AudioMixingConfig config,
Starts mixing audio files.
mixId
is used for identifying the mixing task.
If you have already preloaded the file in memory with RTCAudioMixingManager.preloadAudioMixing, please ensure that the mixID is the same.
If this API is repeatedly called with the same ID, the previous mixing task will be stopped and a new task will start. When the previous task is stopped, you will receive RTCVideoEventHandler.onAudioMixingStateChanged.
filePath
is the path of the mixing audio file.
You can use the URL of the online file, and the absolute path of the local file. For the URL of the online file, only https protocol is supported.
Recommended audio sample rates: 8KHz, 16KHz, 22.05KHz, 44.1KHz, 48KHz.
Local audio file formats supported by different platforms are as follows:
mp3 | mp4 | aac | m4a | 3gp | wav | ogg | ts | wma | |
---|---|---|---|---|---|---|---|---|---|
Android | Y | Y | Y | Y | Y | Y | Y | ||
iOS | Y | Y | Y | Y | Y | Y |
mp3 | mp4 | aac | m4a | 3gp | wav | ogg | ts | wma | |
---|---|---|---|---|---|---|---|---|---|
Android | Y | Y | Y | Y | Y | ||||
iOS | Y | Y | Y | Y |
Notes:
- You can call this API with different mixIDs and filePaths to mix multiple audio files at the same time.
- After calling this API, you will receive RTCVideoEventHandler.onAudioMixingStateChanged about the current mixing status.
- Call RTCAudioMixingManager.stopAudioMixing to stop the mixing task.
Implementation
@Deprecated(
'Deprecated since v3.54.1, use RTCAudioEffectPlayer.start, RTCMediaPlayer.open and RTCMediaPlayer.start instead')
Future<void> startAudioMixing({
required int mixId,
required String filePath,
required AudioMixingConfig config,
});