【问题标题】:Two devices on different places connected with different network is not working IOS ( Swift ) through Webrtc通过Webrtc连接到不同网络的不同地方的两台设备无法运行IOS(Swift)
【发布时间】:2020-11-19 00:55:24
【问题描述】:

哪些步骤会重现问题?

  1. 当我在本地测试 2 个或多个设备(都连接到同一个网络)时,它对我来说工作正常
  2. 当我测试 2 个或多个设备(都连接到不同的网络)时,它对我有用
  3. 当我将一台设备连接到一个地方的网络而另一台设备连接到另一个地方的不同网络时,就会出现问题。然后我得到了一切设置正确,如 sdps(提供/回答/icecandidates)。但状态是“检查”,几秒钟后状态变为“关闭”。

预期的结果是什么?

(Two devices on different places connected with different network should work)

我看到了什么?

Black screen and its state is "checking" instead of "connected"

您使用的是什么版本的产品?在什么操作系统上?

我正在使用:

 GoogleWebRTC (1.1.21820)  
 xcode (11.5)  
 Iphone 7 (13.5.1)

I have done my best need help please.

【问题讨论】:

    标签: ios swift swift3 webrtc webrtc-ios


    【解决方案1】:

    出现问题是因为您只使用 STUN 服务器....所以当设备连接到不同的网络时,STUN 服务器无法将私有 IP 转换为公共 IP....在这种情况下,您将使用 TURN 服务器。 ..! 这是一个链接,我希望这有助于理解您的问题。

    查看这篇精彩的文章:https://andrewjprokop.wordpress.com/2014/07/21/understanding-webrtc-media-connections-ice-stun-and-turn/

    【讨论】:

    • 我使用了眩晕和转向服务器。我只使用过服务器,但对我不起作用。
    猜你喜欢
    • 2013-05-02
    • 2014-06-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多