首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >WebRTC:冰在火狐中失败,但在MS中工作

WebRTC:冰在火狐中失败,但在MS中工作
EN

Stack Overflow用户
提问于 2022-07-04 21:15:17
回答 1查看 140关注 0票数 0

我想开发一个基于WebRTC的流应用程序,我从基础开始学习协议。特别是,我遵循了这个非常简单的GitHub上的实例 (也显示在这个YouTube视频中),它只是在两个浏览器选项卡之间打开一个WebRTC通道,并且能够在我的本地机器上运行它。但是,如果我在火狐中使用相同的JavaScript代码(Windows11上的版本为102.0 ),我在发送方和接收方选项卡上都会收到一个错误WebRTC: ICE failed, add a STUN server and see about:webrtc for more details

因此,我尝试在配置中包含开式继电器提供的眩晕、转和转服务器,但是始终会出现相同的错误消息。

我希望我的应用程序能在最常用的互联网浏览器上工作,所以在深入挖掘之前,我想知道如何解决这个问题。类似的问题似乎有点过时,或与不同的错误有关。

预先感谢大家的帮助和建议。

考虑到最简单的情况,没有眩晕或转向服务器(应该在本地网络或至少在同一本地主机上工作),WebRTC的连接注册表包含以下内容:

代码语言:javascript
运行
复制
+++++++ BEGIN (process id 21692) ++++++++
(generic/CRIT) PR_Connect failed: -5980
(ice/WARNING) /builds/worker/checkouts/gecko/dom/media/webrtc/transport/third_party/nICEr/src/net/nr_socket_multi_tcp.c:639 function nr_socket_multi_tcp_listen failed with error 3
(ice/WARNING) ICE-STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf): failed to create passive TCP host candidate: 3
(ice/INFO) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home)): All candidates initialized
(generic/CRIT) PR_Connect failed: -5980
(ice/WARNING) /builds/worker/checkouts/gecko/dom/media/webrtc/transport/third_party/nICEr/src/net/nr_socket_multi_tcp.c:639 function nr_socket_multi_tcp_listen failed with error 3
(ice/WARNING) ICE-STREAM(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home) transport-id=transport_0 - c71730bb:54ae3990a18fe7c5e8e67bddb6f56bbb): failed to create passive TCP host candidate: 3
(ice/INFO) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): peer (PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default) starting grace period timer for 5000 ms
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): peer (PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default) no streams with non-empty check lists
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): peer (PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default) no streams with pre-answer requests
(ice/INFO) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): peer (PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default) no checks to start, but gathering is not done yet, cancelling grace period timer
(ice/ERR) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): peer (PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default) pairing local trickle ICE candidate host(IP4:192.168.1.28:56443/UDP)
(ice/INFO) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): peer (PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default) starting grace period timer for 5000 ms
(ice/ERR) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): peer (PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default) pairing local trickle ICE candidate host(IP4:192.168.1.28:63946/TCP) active
(ice/INFO) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): All candidates initialized
(ice/INFO) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): peer (PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default) Trickle grace period is over; marking every component with only failed pairs as failed.
(ice/INFO) ICE-PEER(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default)/STREAM(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home) transport-id=transport_0 - c71730bb:54ae3990a18fe7c5e8e67bddb6f56bbb)/COMP(1): All pairs are failed, and grace period has elapsed. Marking component as failed.
(ice/ERR) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home))/STREAM(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home) transport-id=transport_0 - c71730bb:54ae3990a18fe7c5e8e67bddb6f56bbb): state dump
(ice/ERR) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home))/ICE-STREAM(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home) transport-id=transport_0 - c71730bb:54ae3990a18fe7c5e8e67bddb6f56bbb): Local component 1 - dumping candidates
(ice/ERR) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home))/ICE-STREAM(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home) transport-id=transport_0 - c71730bb:54ae3990a18fe7c5e8e67bddb6f56bbb)/CAND(5fk0): host(IP4:192.168.1.28:56443/UDP)
(ice/ERR) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home))/ICE-STREAM(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home) transport-id=transport_0 - c71730bb:54ae3990a18fe7c5e8e67bddb6f56bbb)/CAND(vE/5): host(IP4:192.168.1.28:63946/TCP) active
(ice/ERR) ICE-PEER(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default)/STREAM(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home) transport-id=transport_0 - c71730bb:54ae3990a18fe7c5e8e67bddb6f56bbb): state dump
(ice/ERR) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home))/ICE-STREAM(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home) transport-id=transport_0 - c71730bb:54ae3990a18fe7c5e8e67bddb6f56bbb): Remote component 1 in state 3 - dumping candidates
(ice/INFO) ICE-PEER(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home):default): all checks completed success=0 fail=1
(ice/INFO) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home)): peer (PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default) starting grace period timer for 5000 ms
(ice/NOTICE) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home)): peer (PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default) no streams with non-empty check lists
(ice/NOTICE) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home)): peer (PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default) no streams with pre-answer requests
(ice/INFO) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default)/CAND-PAIR(S2jI): setting pair to state FROZEN: S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)
(ice/INFO) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home))/CAND-PAIR(S2jI): Pairing candidate IP4:192.168.1.28:56005/UDP (7e7f00ff):IP4:192.168.1.28:56443/UDP (7e7f00ff) priority=9115005270282338815 (7e7f00fffcfe01ff)
(ice/INFO) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default)/ICE-STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf): Starting check timer for stream.
(ice/INFO) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default)/CAND-PAIR(S2jI): setting pair to state WAITING: S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)
(ice/INFO) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default)/CAND-PAIR(S2jI): setting pair to state IN_PROGRESS: S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)
(ice/NOTICE) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home)): peer (PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default) is now checking
(stun/INFO) Responding with error 400: ICE Failure
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): Message does not correspond to any registered stun ctx
(stun/INFO) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Received response; processing
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): nr_stun_process_error_response failed
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Error processing response: Retry may be possible, stun error code 400.
(ice/INFO) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default): no FROZEN/WAITING pairs for PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf
(stun/INFO) Responding with error 400: ICE Failure
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): Message does not correspond to any registered stun ctx
(stun/INFO) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Received response; processing
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): nr_stun_process_error_response failed
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Error processing response: Retry may be possible, stun error code 400.
(stun/INFO) Responding with error 400: ICE Failure
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): Message does not correspond to any registered stun ctx
(stun/INFO) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Received response; processing
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): nr_stun_process_error_response failed
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Error processing response: Retry may be possible, stun error code 400.
(stun/INFO) Responding with error 400: ICE Failure
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): Message does not correspond to any registered stun ctx
(stun/INFO) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Received response; processing
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): nr_stun_process_error_response failed
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Error processing response: Retry may be possible, stun error code 400.
(stun/INFO) Responding with error 400: ICE Failure
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): Message does not correspond to any registered stun ctx
(stun/INFO) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Received response; processing
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): nr_stun_process_error_response failed
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Error processing response: Retry may be possible, stun error code 400.
(stun/INFO) Responding with error 400: ICE Failure
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): Message does not correspond to any registered stun ctx
(stun/INFO) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Received response; processing
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): nr_stun_process_error_response failed
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Error processing response: Retry may be possible, stun error code 400.
(ice/INFO) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home)): peer (PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default) Trickle grace period is over; marking every component with only failed pairs as failed.
(stun/INFO) Responding with error 400: ICE Failure
(ice/NOTICE) ICE(PC:{f1eb3850-ea2c-4c5d-8699-1bd8bcdbe09b} 1656968377394000 (id=2147483690 url=about:home)): Message does not correspond to any registered stun ctx
(stun/INFO) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Received response; processing
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): nr_stun_process_error_response failed
(stun/WARNING) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Error processing response: Retry may be possible, stun error code 400.
(stun/INFO) STUN-CLIENT(S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)): Timed out
(ice/INFO) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default)/CAND-PAIR(S2jI): setting pair to state FAILED: S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host)
(ice/INFO) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default)/STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf)/COMP(1): All pairs are failed, and grace period has elapsed. Marking component as failed.
(ice/ERR) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home))/STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf): state dump
(ice/ERR) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home))/ICE-STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf): Local component 1 - dumping candidates
(ice/ERR) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home))/ICE-STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf)/CAND(R6E4): host(IP4:192.168.1.28:56005/UDP)
(ice/ERR) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home))/ICE-STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf)/CAND(xSO3): host(IP4:192.168.1.28:60680/TCP) active
(ice/ERR) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default)/STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf): state dump
(ice/ERR) CAND-PAIR(S2jI): pair S2jI|IP4:192.168.1.28:56005/UDP|IP4:192.168.1.28:56443/UDP(host(IP4:192.168.1.28:56005/UDP)|candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host): state=FAILED, priority=0x7e7f00fffcfe01ff
(ice/ERR) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home))/ICE-STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf): Remote component 1 in state 3 - dumping candidates
(ice/ERR) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home))/ICE-STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf)/CAND(giJB): candidate:0 1 UDP 2122252543 192.168.1.28 56443 typ host
(ice/ERR) ICE(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home))/ICE-STREAM(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home) transport-id=transport_0 - a9c7cadd:7ce62f845d4f5b83df2a70e1bac037bf)/CAND(eRB0): candidate:1 1 TCP 2105524479 192.168.1.28 9 typ host tcptype active
(ice/INFO) ICE-PEER(PC:{a3e94488-2d82-4739-9c98-ce3de577714b} 1656968349764000 (id=2147483688 url=about:home):default): all checks completed success=0 fail=1
+++++++ END (process id 21692) ++++++++

本地和远程SDP分别如下所示:

代码语言:javascript
运行
复制
v=0
o=mozilla...THIS_IS_SDPARTA-99.0 1501128418895448605 0 IN IP4 0.0.0.0
s=-
t=0 0
a=fingerprint:sha-256 26:27:49:F1:75:8E:96:56:D6:A9:3F:E9:28:A9:D8:3A:E3:99:CA:52:4B:22:3C:6C:9D:02:FD:C7:AE:21:17:3F
a=group:BUNDLE 0
a=ice-options:trickle
a=msid-semantic:WMS *
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=sendrecv
a=ice-pwd:7ce62f845d4f5b83df2a70e1bac037bf
a=ice-ufrag:a9c7cadd
a=mid:0
a=setup:actpass
a=sctp-port:5000
a=max-message-size:1073741823
代码语言:javascript
运行
复制
v=0
o=mozilla...THIS_IS_SDPARTA-99.0 5475832728403267594 0 IN IP4 0.0.0.0
s=-
t=0 0
a=sendrecv
a=fingerprint:sha-256 DC:E2:A0:CE:08:9B:25:D6:63:E0:6A:D8:94:05:82:1A:9B:27:47:4B:83:30:95:72:B4:BD:0B:62:2F:44:7C:9D
a=group:BUNDLE 0
a=ice-options:trickle
a=msid-semantic:WMS *
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=candidate:0 1 UDP 2122252543 eb5fb3b1-f3d1-4add-afff-e9cde1bf07a2.local 56443 typ host
a=candidate:1 1 TCP 2105524479 eb5fb3b1-f3d1-4add-afff-e9cde1bf07a2.local 9 typ host tcptype active
a=sendrecv
a=end-of-candidates
a=ice-pwd:54ae3990a18fe7c5e8e67bddb6f56bbb
a=ice-ufrag:c71730bb
a=mid:0
a=setup:active
a=sctp-port:5000
a=max-message-size:1073741823

奇怪的是,可以在不同浏览器的选项卡之间建立连接(边缘中的发送方和Firefox中的接收方,反之亦然)。Firefox客户端的远程SDP(因此描述边缘会话)如下所示:

代码语言:javascript
运行
复制
v=0
o=- 6799550255512083034 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0
a=extmap-allow-mixed
a=msid-semantic: WMS
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=candidate:2606571665 1 udp 2113937151 5b5fd4e1-64b5-421c-b103-ca4a29c106dc.local 62776 typ host generation 0 network-cost 999
a=ice-ufrag:Gc38
a=ice-pwd:zxGRR6Dlm+usOA+Xx4BmuN2x
a=ice-options:trickle
a=fingerprint:sha-256 6C:23:49:63:D3:60:78:D2:AF:1E:68:4F:7C:EC:19:1C:29:5C:64:A0:5B:29:7B:D3:5B:5F:CC:81:7E:EA:56:97
a=setup:actpass
a=mid:0
a=sctp-port:5000
a=max-message-size:262144
EN

回答 1

Stack Overflow用户

发布于 2022-07-04 21:24:34

对我来说,仅仅使用google服务器就可以工作OOTB。

代码语言:javascript
运行
复制
var configuration = {
    "iceServers": [{ "url": "stun:stun2.1.google.com:19302" }]
};

var pc = new RTCPeerConnection(configuration);
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72862092

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档