WebRTC flutter app 和 web 之间的调用

问题描述 投票:0回答:0

我有一个项目包含依赖于 webRTC 的呼叫功能(语音和视频)。 当我从我的移动应用程序(由 flutter 设计)向第二个同行(由 js 设计的网络平台)发送报价时的问题第二个同行无法接听电话并抛出这个问题

我的优惠码

  Future<void> createOffer({
    required CallType callType,
    required BuildContext context,
  }) async {
    AppCubit appCubit = AppCubit.get(context);

    RTCSessionDescription description =
        await peerConnection!.createOffer({'offerToReceiveVideo': 1});
    var session = parse(description.sdp.toString());
    peerConnection!.setLocalDescription(description);
    //create offer
    channel!.sink.add(
      jsonEncode(
        {
          "type": "offer",
          "offer": description.toMap(),
          "offerType": callType == CallType.video ? "video" : "voice",
          "name": socketID,
          "current_name": appCubit.userModel!.tableData!.first.fName,
        },
      ),
    );
  }

问题是

The issue is

我希望第二个同行能够接受我来自移动应用程序的报价,我也尝试从网络到网络进行呼叫并且它工作正常

flutter webrtc calling-convention
© www.soinside.com 2019 - 2024. All rights reserved.