createAudioEffectPlayer method

Future<ZegoAudioEffectPlayer?> createAudioEffectPlayer()

Creates a audio effect player instance.

Available since: 1.16.0 Description: Creates a audio effect player instance. Use cases: When you need to play short sound effects, such as applause, cheers, etc., you can use audioEffectPlayer to achieve. When to call: It can be called after createEngine. Restrictions: Currently, a maximum of 1 instances can be created, after which it will return null. Related APIs: destroyAudioEffectPlayer.

  • Returns audio effect player instance, null will be returned when the maximum number is exceeded.

Implementation

Future<ZegoAudioEffectPlayer?> createAudioEffectPlayer() async {
  return await ZegoExpressImpl.instance.createAudioEffectPlayer();
}