首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >WebRTC / rtcmulticonnection -> Chrome to Firefox ->无视频

WebRTC / rtcmulticonnection -> Chrome to Firefox ->无视频
EN

Stack Overflow用户
提问于 2017-09-19 10:29:11
回答 2查看 1.3K关注 0票数 1

我有一个问题,以下情况的问题:在我的WebRTC-应用程序(基于rtcmulticonnection),我希望Chrome (发件人)连接到Firefox (接收者)。

Datachannel是打开的,我也可以通过套接字发送自定义消息。但主要的问题是,我无法在我的火狐接收器中看到彩色视频。

Chrome显示了以下错误:

代码语言:javascript
复制
setRemoteDescription failed 
 DOMException: Failed to set remote answer sdp: Failed to push down transport description: Failed to set SSL role for the channel. 

我已经尝试将DtlsSrtpKeyAgreement设置为false,但是没有什么改变。

以下是两个sdp: Firefox 1: Remote peer的sdp: v=0

代码语言:javascript
复制
o=- 274606574180189315 2 IN IP4 127.0.0.1

s=-

t=0 0

a=group:BUNDLE sdparta_0

a=msid-semantic: WMS

m=application 9 DTLS/SCTP 5000

c=IN IP4 0.0.0.0

a=ice-ufrag:74Y5

a=ice-pwd:A8LqsLwstXZXz80HVY0rEexZ

a=ice-options:trickle

a=fingerprint:sha-256 EE:B8:F5:67:92:4C:14:15:34:2C:7C:90:3D:3F:0A:D1:0C:6B:43:E3:A1:DA:1C:29:DC:43:B3:75:0C:70:20:E0

a=setup:active

a=mid:sdparta_0

a=sctpmap:5000 webrtc-datachannel 1024

和Firefox 2:

代码语言:javascript
复制
12:11:11.560 Remote peer's sdp: "v=0
o=- 274606574180189315 3 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE sdparta_0 video
a=msid-semantic: WMS ZyYYGy4wOXFxay7ZeNkKR0YSjxXGvhwHSwZe
m=application 42300 DTLS/SCTP 5000
c=IN IP4 192.168.1.121
a=candidate:1910078557 1 udp 2122260223 192.168.1.121 42300 typ host generation 0 network-id 1
a=ice-ufrag:74Y5
a=ice-pwd:A8LqsLwstXZXz80HVY0rEexZ
a=ice-options:trickle
a=fingerprint:sha-256 EE:B8:F5:67:92:4C:14:15:34:2C:7C:90:3D:3F:0A:D1:0C:6B:43:E3:A1:DA:1C:29:DC:43:B3:75:0C:70:20:E0
a=setup:actpass
a=mid:sdparta_0
a=sctpmap:5000 webrtc-datachannel 1024
m=video 9 UDP/TLS/RTP/SAVPF 98 96 100 102 127 97 99 101 125
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:74Y5
a=ice-pwd:A8LqsLwstXZXz80HVY0rEexZ
a=ice-options:trickle
a=fingerprint:sha-256 EE:B8:F5:67:92:4C:14:15:34:2C:7C:90:3D:3F:0A:D1:0C:6B:43:E3:A1:DA:1C:29:DC:43:B3:75:0C:70:20:E0
a=setup:actpass
a=mid:video
b=AS:600
a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:4 urn:3gpp:video-orientation
a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=sendonly
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtpmap:98 VP9/90000
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtpmap:100 H264/90000
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=rtcp-fb:100 goog-remb
a=rtcp-fb:100 transport-cc
a=fmtp:100 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
a=rtpmap:102 red/90000
a=rtpmap:127 ulpfec/90000
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=fmtp:96 x-google-min-bitrate=1474560; x-google-max-bitrate=1474560
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:101 rtx/90000
a=fmtp:101 apt=100
a=rtpmap:125 rtx/90000
a=fmtp:125 apt=102
a=ssrc-group:FID 3581008081 2076245827
a=ssrc:3581008081 cname:1t2rQehCkf48QVIU
a=ssrc:3581008081 msid:ZyYYGy4wOXFxay7ZeNkKR0YSjxXGvhwHSwZe 15ecfda4-75b7-4355-a3d0-fa371d630364
a=ssrc:3581008081 mslabel:ZyYYGy4wOXFxay7ZeNkKR0YSjxXGvhwHSwZe
a=ssrc:3581008081 label:15ecfda4-75b7-4355-a3d0-fa371d630364
a=ssrc:2076245827 cname:1t2rQehCkf48QVIU
a=ssrc:2076245827 msid:ZyYYGy4wOXFxay7ZeNkKR0YSjxXGvhwHSwZe 15ecfda4-75b7-4355-a3d0-fa371d630364
a=ssrc:2076245827 mslabel:ZyYYGy4wOXFxay7ZeNkKR0YSjxXGvhwHSwZe
a=ssrc:2076245827 label:15ecfda4-75b7-4355-a3d0-fa371d630364
" 1 index.php:681:21

铬显示:

代码语言:javascript
复制
setRemoteDescription failed 
 DOMException: Failed to set remote answer sdp: Failed to push down transport description: Failed to set SSL role for the channel. 
 v=0
o=mozilla...THIS_IS_SDPARTA-55.0.3 2654848822326037754 1 IN IP4 0.0.0.0
s=-
t=0 0
a=fingerprint:sha-256 F5:B7:C9:E8:9D:F4:E3:05:E6:20:31:C7:91:2A:DA:02:70:12:1A:D4:F1:A9:A5:0B:7B:CA:04:A2:96:4E:DA:B0
a=group:BUNDLE sdparta_0 video
a=ice-options:trickle
a=msid-semantic:WMS *
m=application 54696 DTLS/SCTP 5000
c=IN IP4 5.189.131.23
a=candidate:0 1 UDP 2122252543 192.168.1.121 55554 typ host
a=candidate:2 1 TCP 2105508095 192.168.1.121 52341 typ host tcptype passive
a=candidate:2 1 TCP 2105524479 192.168.1.121 9 typ host tcptype active
a=candidate:1 1 UDP 1686052863 xx.xxx.xxx.xx 59602 typ srflx raddr 192.168.1.121 rport 55554
a=candidate:3 1 TCP 1669292031 77.244.108.51 56741 typ srflx raddr 192.168.1.121 rport 52341 tcptype passive
a=candidate:4 1 UDP 8331263 x.xxx.xxx.xx xxxxx typ relay raddr x.xxx.xxx.xx rport 54696
a=sendrecv
a=ice-pwd:529f56ca1ad4e65862fe4c8885cba1b7
a=ice-ufrag:5f58ee5e
a=mid:sdparta_0
a=sctpmap:5000 webrtc-datachannel 256
a=setup:active
m=video 9 UDP/TLS/RTP/SAVPF 98
c=IN IP4 0.0.0.0
a=recvonly
a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=fmtp:98 max-fs=12288;max-fr=60
a=ice-pwd:529f56ca1ad4e65862fe4c8885cba1b7
a=ice-ufrag:5f58ee5e
a=mid:video
b=AS:600
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 goog-remb
a=rtcp-mux
a=rtpmap:98 VP9/90000
a=setup:active
a=ssrc:3597408388 cname:{7124bea1-2004-4f4a-91bc-2fb05d225669}

有人知道怎么解决这个问题吗?这个问题多年来是众所周知的,但似乎没有适当的解决办法。提前感谢!

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2017-09-21 04:40:38

以确保RTCMultiConnection不修改SDP

代码语言:javascript
复制
// in your HTML file
connection.processSdp = function(sdp) {
    return sdp; // return unchanged SDP
};

要确保RTCMultiConnection不传递DtlsSrtpKeyAgreement或ipv6属性,请执行以下操作:

代码语言:javascript
复制
// in your HTML file
connection.optionalArgument = {}; // ignore all DTLS/ipv6 parameters

您可以修改dist/RTCMultiConnection.js并删除以下两行:

代码语言:javascript
复制
// in dist/RTCMultiConnection.js
bundlePolicy: 'max-bundle',
iceCandidatePoolSize: 0

现在,请确保您使用的是dist/RTCMultiConnection.js而不是缩小的文件。默认情况下,所有演示程序都在使用小型化文件。

现在Chrome和Fireox将共享未经修改的SDP,并使用类似的API。

票数 2
EN

Stack Overflow用户

发布于 2017-09-20 01:57:23

你用的是旧的非标准铬材料。删除所有提及DtlsSrtpKeyAgreement的内容。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46298132

复制
相关文章

相似问题

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