createCustomAudioSource method

Future<ZegoCustomAudioSource?> createCustomAudioSource()

Create custom audio source instance.

Available since: 3.25.0 Description: Create custom audio source instance. Use cases: Typically used to create an independent custom audio source and mix it into the publish stream as a mix source. When to call: After the engine is created createEngine. Restrictions: None. Caution:

  1. ZegoCustomAudioSource can only be used as a mix source, not as the main capture source.
  2. Currently, up to 2 custom audio source instances are supported, with the screen sharing audio source occupying one instance.
  • Returns Custom audio source instance.

Implementation

Future<ZegoCustomAudioSource?> createCustomAudioSource() async {
  return await ZegoExpressImpl.instance.createCustomAudioSource();
}