enableExtension abstract method

Future<void> enableExtension({
  1. required String provider,
  2. required String extension,
  3. bool enable = true,
  4. MediaSourceType type = MediaSourceType.unknownMediaSource,
})

Enables or disables extensions.

To call this method, call it immediately after initializing the RtcEngine object. If you want to enable multiple extensions, you need to call this method multiple times. The data processing order of different extensions in the SDK is determined by the order in which the extensions are enabled. That is, the extension that is enabled first will process the data first.

  • provider The name of the extension provider.
  • extension The name of the extension.
  • enable Whether to enable the extension: true : Enable the extension. false : Disable the extension.
  • type Source type of the extension. See MediaSourceType.

Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly.

Implementation

Future<void> enableExtension(
    {required String provider,
    required String extension,
    bool enable = true,
    MediaSourceType type = MediaSourceType.unknownMediaSource});