我正在尝试H264
使用 Janus WebRTC Gateway 在 Web 浏览器中运行编码的实时流。使用 进行测试时Chrome
,流工作正常,但firefox
显示ICE failed, add a TURN server and see about:webrtc for more details
.
以下是我about:webrtc
的 Firefox 日志。
[ 6442450983 ] http://192.168.2.194:5000/ 15:18:19 GMT+0530 (IST)
PeerConnection ID: 1515491295667117 (id=6442450983 url=http://192.168.2.194:5000/)
ICE Stats
Local Candidate Remote Candidate ICE State Priority Nominated Selected Bytes sent Bytes received
ICE restarts:
ICE rollbacks:
SDP
Local SDP
v=0
o=mozilla...THIS_IS_SDPARTA-57.0.4 3500649212029345392 0 IN IP4 0.0.0.0
s=-
t=0 0
a=sendrecv
a=fingerprint:sha-256 11:44:F1:BD:D1:69:8E:17:E0:9A:AA:89:8E:76:9F:4E:09:E1:94:D0:37:34:EE:FE:DF:5E:FC:77:B0:4D:F7:53
a=ice-options:trickle
a=msid-semantic:WMS *
m=video 0 RTP/SAVPF 120
c=IN IP4 0.0.0.0
a=inactive
a=end-of-candidates
a=mid:video
a=rtpmap:120 VP8/90000
Remote SDP
v=0
o=- 1515491295396595 1515491295396595 IN IP4 106.51.68.195
s=-
t=0 0
a=sendrecv
a=group:BUNDLE video
a=msid-semantic:WMS janus
m=video 9 RTP/SAVPF 126
c=IN IP4 106.51.68.195
a=candidate:1 1 udp 2013266431 192.168.2.194 45887 typ host
a=candidate:2 1 udp 1677722111 106.51.68.195 45887 typ srflx raddr 192.168.2.194 rport 45887
a=sendonly
a=end-of-candidates
a=fingerprint:sha-256 D2:B9:31:8F:DF:24:D8:0E:ED:D2:EF:25:9E:AF:6F:B8:34:AE:53:9C:E6:F3:8F:F2:64:15:FA:E8:7F:53:2D:38
a=ice-options:trickle
a=ice-pwd:KsS99rsAZXj9lFd7psCT61
a=ice-ufrag:3tcw
a=mid:video
a=rtcp-fb:126 nack
a=rtcp-fb:126 goog-remb
a=rtcp-mux
a=rtpmap:126 H264/90000
a=setup:actpass
a=ssrc:3973486276 cname:janusvideo
a=ssrc:3973486276 msid:janus janusv0
a=ssrc:3973486276 mslabel:janus
a=ssrc:3973486276 label:janusv0
RTP Stats
我什至尝试添加以下 TURN 服务器
{urls: "turn:numb.viagenie.ca",
username: "l1787875@mvrht.com",
credential: "test"}
但是控制台错误变为ICE failed, your TURN server appears to be broken, see about:webrtc for more details
,保持about:webrtc
日志与以前相同。
我发现 Firefox 无法为 Janus 生成的 SDP 报价生成有效答案。Firefox 创建的答案具有属性rtpmap: 120 VP8/90000
,而 Janus 提供的 SDP 提供具有属性rtpmap: 127 H264/90000
,这会阻止 Firefox 与 Janus 建立 SDP 会话。Chrome 可以生成有效的答案,rtpmap: 127 H264/90000
因此它可以完美地显示流。
我正在使用Mozilla firefox-57.0.4
. 有没有办法,我可以获取/生成从 JanusSDP answer
传入的有效值?SDP offer