如何在Chrome上解决WebRTC视频中的SDP错误

时间:2013-11-21 07:38:16

标签: google-chrome webrtc

自从我升级到最新的Chrome 31.0.1650.57m后,我有一个视频聊天应用程序。

对等方A发送提供sdp而对等方B发送回应答sdp并发生sdp错误。 sdp错误说

“SetRemoteDescription失败:无法更新会话状态:ERROR_CONTENT”

我的优惠SPD看起来像这样

v=0 
o=- 1768855259715688796 2 IN IP4 127.0.0.1 
s=- 
t=0 0 
a=group:BUNDLE audio video 
a=msid-semantic: WMS B857Mhr7tR0B5AHMokH939BgLLQLr1i06lPZ 
m=audio 1 RTP/SAVPF 111 103 104 0 8 106 105 13 126 
c=IN IP4 0.0.0.0 
a=rtcp:1 IN IP4 0.0.0.0 
a=ice-ufrag:kMe68YGD6wA/W3gh 
a=ice-pwd:ypGmGa5tBZxopxiZB4dtAYxh 
a=ice-options:google-ice 
a=fingerprint:sha-256         A5:20:56:7C:4E:63:4D:3D:11:77:22:FD:0C:BB:B0:5C:6C:FF:75:78:C1:83:39:31:0C:8A:9A:EB:15:91:3   0:7A
a=setup:actpass 
a=mid:audio 
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level 
a=sendrecv 
a=rtcp-mux 
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:OhFYzSAk6czZwm8hEQNDMfKWyRFaLee2wbKS2jSL 
a=rtpmap:111 opus/48000/2 
a=fmtp:111 minptime=10 
a=rtpmap:103 ISAC/16000 
a=rtpmap:104 ISAC/32000 
a=rtpmap:0 PCMU/8000 
a=rtpmap:8 PCMA/8000 
a=rtpmap:106 CN/32000 
a=rtpmap:105 CN/16000 
a=rtpmap:13 CN/8000 
a=rtpmap:126 telephone-event/8000 
a=maxptime:60 
a=ssrc:1187225734 cname:IpuUg1fZr7ZEMRux 
a=ssrc:1187225734 msid:B857Mhr7tR0B5AHMokH939BgLLQLr1i06lPZ B857Mhr7tR0B5AHMokH939BgLLQLr1i06lPZa0 
a=ssrc:1187225734 mslabel:B857Mhr7tR0B5AHMokH939BgLLQLr1i06lPZ 
a=ssrc:1187225734 label:B857Mhr7tR0B5AHMokH939BgLLQLr1i06lPZa0 
m=video 1 RTP/SAVPF 100 116 117 
c=IN IP4 0.0.0.0 
a=rtcp:1 IN IP4 0.0.0.0 
a=ice-ufrag:kMe68YGD6wA/W3gh 
a=ice-pwd:ypGmGa5tBZxopxiZB4dtAYxh 
a=ice-options:google-ice 
a=fingerprint:sha-256  A5:20:56:7C:4E:63:4D:3D:11:77:22:FD:0C:BB:B0:5C:6C:FF:75:78:C1:83:39:31:0C:8A:9A:EB:15:91:30:7A 
a=setup:actpass 
a=mid:video 
a=extmap:2 urn:ietf:params:rtp-hdrext:toffset 
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time 
a=sendrecv 
a=rtcp-mux 
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:OhFYzSAk6czZwm8hEQNDMfKWyRFaLee2wbKS2jSL 
a=rtpmap:100 VP8/90000 
a=rtcp-fb:100 ccm fir 
a=rtcp-fb:100 nack 
a=rtcp-fb:100 goog-remb 
a=rtpmap:116 red/90000 
a=rtpmap:117 ulpfec/90000 
a=ssrc:1122033066 cname:IpuUg1fZr7ZEMRux 
a=ssrc:1122033066 msid:B857Mhr7tR0B5AHMokH939BgLLQLr1i06lPZ B857Mhr7tR0B5AHMokH939BgLLQLr1i06lPZv0 
a=ssrc:1122033066 mslabel:B857Mhr7tR0B5AHMokH939BgLLQLr1i06lPZ 
a=ssrc:1122033066 label:B857Mhr7tR0B5AHMokH939BgLLQLr1i06lPZv0

我的答案SDP看起来像这样

v=0
o=- 2870270120403727946 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio video
a=msid-semantic: WMS
m=audio 1 RTP/SAVPF 111 103 104 0 8 106 105 13 126
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:XXWIJKQPDUZJLWIZFWUYWGEVBQEYHJAWMOKJBSHB
c=IN IP4 0.0.0.0
a=rtcp:1 IN IP4 0.0.0.0
a=ice-ufrag:sQBHE9PspEfJXD7B
a=ice-pwd:KyAMCGWrNMkIpWM5PXj9gnmj
a=fingerprint:sha-256 FB:FB:EB:A6:F7:59:5A:CA:60:EC:F2:90:D9:4D:F1:E1:D4:5B:A2:F5:04:1E:3B:13:AE:BD:0D:08:A6:1B:C 6:03
a=setup:active
a=mid:audio
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=recvonly
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=fmtp:111 minptime=10
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:126 telephone-event/8000
a=maxptime:60
m=video 1 RTP/SAVPF 100 116 117
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:XXWIJKQPDUZJLWIZFWUYWGEVBQEYHJAWMOKJBSHB
c=IN IP4 0.0.0.0
a=rtcp:1 IN IP4 0.0.0.0
a=ice-ufrag:sQBHE9PspEfJXD7B
a=ice-pwd:KyAMCGWrNMkIpWM5PXj9gnmj
a=fingerprint:sha-256 FB:FB:EB:A6:F7:59:5A:CA:60:EC:F2:90:D9:4D:F1:E1:D4:5B:A2:F5:04:1E:3B:13:AE:BD:0D:08:A6:1B:C6:03
a=setup:active
a=mid:video
a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=recvonly
a=rtcp-mux
a=rtpmap:100 VP8/90000
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 goog-remb
a=rtpmap:116 red/90000
a=rtpmap:117 ulpfec/90000

1 个答案:

答案 0 :(得分:1)

当对等方A向对等方B发送要约时,对等方B应该做的第一件事是设置其远程描述,当对等方B回答时,它必须设置其本地描述。希望这个图表能让你理解这个场景。 call flow diagram