enableExtension abstract method

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

启用/禁用插件。

如果要开启多个插件,需要多次调用该方法。 该方法调用成功后,无法再加载其他插件。

  • provider 提供插件的服务商名称。
  • extension 插件的名称。
  • enable 是否启用插件: true : 启用插件。 false : 禁用插件。
  • type 插件的媒体源类型。详见 MediaSourceType 。

Returns 方法成功调用时,无返回值;方法调用失败时,会抛出 AgoraRtcException 异常,你需要捕获异常并进行处理。详见错误码了解详情和解决建议。

Implementation

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