createRangeAudio method
Creates a range audio instance.
Available since: 2.11.0
Description: Creates a range audio instance.
Use case: Often used in game voice scenarios, users can use related functions by creating range audio instance objects.
When to call: It can be called after the engine by createEngine has been initialized.
Restrictions: Currently, a maximum of 1 instances can be created, after which it will return null.
Impacts on other APIs: If you use the range audio module, you cannot use the basic push-pull stream startPublishingStream
, startPlayingStream
interfaces and related callbacks.
- Returns range audio instance, null will be returned when the maximum number is exceeded.
Implementation
Future<ZegoRangeAudio?> createRangeAudio() async {
return await ZegoExpressImpl.instance.createRangeAudio();
}