start abstract method

Future<void> start(
  1. int audioEffectID,
  2. {String? path,
  3. ZegoAudioEffectPlayConfig? config}
)

Start playing audio effect.

Available since: 1.16.0 Description: Start playing audio effect. The default is only played once and is not mixed into the publishing stream, if you want to change this please modify config param. Use cases: When you need to play short sound effects, such as applause, cheers, etc., you can use this interface to achieve, and further configure the number of plays through the config parameter, and mix the sound effects into the push stream. When to call: It can be called after createAudioEffectPlayer. Restrictions: None.

  • audioEffectID Description: ID for the audio effect. The SDK uses audioEffectID to control the playback of sound effects. The SDK does not force the user to pass in this parameter as a fixed value. It is best to ensure that each sound effect can have a unique ID. The recommended methods are static self-incrementing ID or the hash of the incoming sound effect file path.
  • path The absolute path of the local resource or "assets://" .
    Value range: "ipod-library://" and network url are not supported. Set path as null or "" if resource is loaded already using loadResource.
  • config Audio effect playback configuration.
    Default value: Set null will only be played once, and will not be mixed into the publishing stream.

Implementation

Future<void> start(int audioEffectID,
    {String? path, ZegoAudioEffectPlayConfig? config});