ByteRTCWTNStreamDelegate constructor

ByteRTCWTNStreamDelegate([
  1. NativeClassOptions? options
])

Implementation

ByteRTCWTNStreamDelegate([NativeClassOptions? options])
    : super(options == null
          ? const NativeClassOptions([],
              className: _$namespace,
              instanceType: InstanceType.manual,
              bridgeKey: 'com.volcengine.rtc.hybrid_runtime',
              methodMap: {
                r"onWTNRemoteVideoStats$videoStats":
                    r"onWTNRemoteVideoStats:videoStats:",
                r"onWTNRemoteAudioStats$audioStats":
                    r"onWTNRemoteAudioStats:audioStats:",
                r"onWTNVideoSubscribeStateChanged$state$reason":
                    r"onWTNVideoSubscribeStateChanged:state:reason:",
                r"onWTNAudioSubscribeStateChanged$state$reason":
                    r"onWTNAudioSubscribeStateChanged:state:reason:",
                r"onWTNFirstRemoteVideoFrameDecoded$withFrameInfo":
                    r"onWTNFirstRemoteVideoFrameDecoded:withFrameInfo:",
                r"onWTNFirstRemoteAudioFrame": r"onWTNFirstRemoteAudioFrame:",
                r"onWTNSEIMessageReceived$andChannelId$andMessage":
                    r"onWTNSEIMessageReceived:andChannelId:andMessage:",
                r"onWTNDataMessageReceived$andMessage$andSourceType":
                    r"onWTNDataMessageReceived:andMessage:andSourceType:"
              })
          : NativeClassOptions.fromMap({
              ...options.toMap(),
              'bridgeKey': 'com.volcengine.rtc.hybrid_runtime',
            })) {
  registerEvent(
      r"onWTNRemoteVideoStats:videoStats:", onWTNRemoteVideoStats$videoStats);

  registerEvent(
      r"onWTNRemoteAudioStats:audioStats:", onWTNRemoteAudioStats$audioStats);

  registerEvent(r"onWTNVideoSubscribeStateChanged:state:reason:",
      onWTNVideoSubscribeStateChanged$state$reason);

  registerEvent(r"onWTNAudioSubscribeStateChanged:state:reason:",
      onWTNAudioSubscribeStateChanged$state$reason);

  registerEvent(r"onWTNFirstRemoteVideoFrameDecoded:withFrameInfo:",
      onWTNFirstRemoteVideoFrameDecoded$withFrameInfo);

  registerEvent(r"onWTNFirstRemoteAudioFrame:", onWTNFirstRemoteAudioFrame);

  registerEvent(r"onWTNSEIMessageReceived:andChannelId:andMessage:",
      onWTNSEIMessageReceived$andChannelId$andMessage);

  registerEvent(r"onWTNDataMessageReceived:andMessage:andSourceType:",
      onWTNDataMessageReceived$andMessage$andSourceType);
}