IAudioFrameObserver constructor

IAudioFrameObserver([
  1. NativeClassOptions? options
])

Implementation

IAudioFrameObserver([NativeClassOptions? options])
    : super(options == null
          ? const NativeClassOptions([],
              className: _$namespace,
              instanceType: InstanceType.manual,
              bridgeKey: 'com.volcengine.rtc.hybrid_runtime',
              methodMap: {
                r"onRecordAudioFrame": r"onRecordAudioFrame",
                r"onPlaybackAudioFrame": r"onPlaybackAudioFrame",
                r"onRemoteUserAudioFrame": r"onRemoteUserAudioFrame",
                r"onMixedAudioFrame": r"onMixedAudioFrame",
                r"onCaptureMixedAudioFrame": r"onCaptureMixedAudioFrame"
              })
          : NativeClassOptions.fromMap({
              ...options.toMap(),
              'bridgeKey': 'com.volcengine.rtc.hybrid_runtime',
            })) {
  registerEvent(r"onRecordAudioFrame", onRecordAudioFrame);

  registerEvent(r"onPlaybackAudioFrame", onPlaybackAudioFrame);

  registerEvent(r"onRemoteUserAudioFrame", onRemoteUserAudioFrame);

  registerEvent(r"onMixedAudioFrame", onMixedAudioFrame);

  registerEvent(r"onCaptureMixedAudioFrame", onCaptureMixedAudioFrame);
}