代码之家  ›  专栏  ›  技术社区  ›  Polaris

WebRTC/RTC多连接->Chrome到Firefox->无视频

  •  1
  • Polaris  · 技术社区  · 7 年前

    我对以下情况有一个问题:

    数据通道已经打开,我还可以通过套接字发送自定义消息。但主要的问题是,我无法在Firefox接收器中看到chrome视频。

    Chrome显示以下错误:

    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,但没有任何更改。

    Firefox 1: 远程对等方的sdp:v=0

    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:

    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
    

    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}
    

    这个问题已经众所周知好几年了,但似乎没有合适的解决方案。提前感谢!

    2 回复  |  直到 7 年前
        1
  •  2
  •   Muaz Khan    7 年前

    确保RTCMultiConnection不会 modify the SDP :

    // in your HTML file
    connection.processSdp = function(sdp) {
        return sdp; // return unchanged SDP
    };
    

    // in your HTML file
    connection.optionalArgument = {}; // ignore all DTLS/ipv6 parameters
    

    您可以修改 dist/RTCMultiConnection.js

    // in dist/RTCMultiConnection.js
    bundlePolicy: 'max-bundle',
    iceCandidatePoolSize: 0
    

    现在确保您正在使用

        2
  •  1
  •   jib    7 年前

    你正在使用旧的非标准Chrome材质。删除所有提及 DtlsSrtpKeyAgreement .