0

我在janus.plugin.videoroom使用 swift 从 iOS 设备连接到 janus 插件时遇到问题。尽管每个步骤都正确执行,但 janus 服务器发送以下消息:

{
   "janus": "hangup",
   "session_id": 3201104494179497,
   "sender": 7759980289270843,
   "reason": "ICE failed"
}

并断开连接。

调试连接到 janus 的消息导致我如下:

1- RTCIceGatheringState 永远不会更改为 Completed

2-生成的候选人如下:

candidate:3215141415 1 udp 1686052607 w.x.y.z 57168 typ srflx raddr w.x.y.z rport 57168 generation 0 ufrag 340a network-id 1 network-cost 10

如您所见,在生成的候选词中,视频和音频词分别被 1 和 0 替换。

你对这两个观察有什么想法吗!

为什么janus发送"ICE failed"消息?

4

1 回答 1

1

我发现收到"hang up"消息的原因是因为我没有将收到的jsep(来自janus)设置为我的peerconnection。在 setAnswer 之后,jsep“挂断”消息消失了!

1- RTCIceGatheringState 永远不会更改为 Completed

对于没有"Completed"状态 For的问题RTCIceGatheringState是因为"continualGatheringPolicy"配置 peerConnection 的选项在将其设置为看到的 Completed 状态"gatherContinually"之后设置为!"gatherOnce":)

2-生成的候选人如下:

似乎有音频/视频或 0/1 是正常的

于 2019-04-04T07:47:57.613 回答