Webrtc 和 UWP 没有滴流冰
Webrtc and UWP without trickle ice
我正在尝试使用这个 nuget 包 https://www.nuget.org/packages/WebRtc/ 建立一个 webrtc 调用。我无法在我的实施中使用滴流冰,所以我尝试在收集冰候选时将它们添加到我的 sdp 中。这在早期版本的包中有效,但是当使用最新版本时,当我尝试使用修改后的 sdp 创建会话描述时失败。据我了解,该软件包的最新版本基于 webrtc 版本 m71。添加 ice 候选人后,我的报价 sdp 如下所示:
"v=0
o=- 984872923505738618 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio video
a=msid-semantic: WMS bf18a69a-7b0e-46d0-8972-dd8995b1d839 e0014ee3-b7dc-46ae-8ebb-89669bd33f7c
m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:yHgM
a=ice-pwd:So+kgi6mFjYkB0uLEOC+cskS
a=ice-options:trickle
a=fingerprint:sha-256 55:56:B8:61:65:54:51:1B:D6:88:E7:50:BB:06:80:7D:D1:65:E5:3F:C5:D0:E5:4D:B2:9F:B9:88:84:20:FC:C2
a=setup:actpass
a=mid:audio
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=sendrecv
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:102 ILBC/8000
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:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
a=ssrc:3424879744 cname:q8MJSfLi5w/UPF2u
a=ssrc:3424879744 msid:bf18a69a-7b0e-46d0-8972-dd8995b1d839 SELF_AUDIO
a=ssrc:3424879744 mslabel:bf18a69a-7b0e-46d0-8972-dd8995b1d839
a=ssrc:3424879744 label:SELF_AUDIO
a=candidate:1862263974 1 udp 2122260223 xxx.xxx.x.xx 53631 typ host generation 0 ufrag yHgM network-id 1 network-cost 10|audio|0
a=candidate:545003606 1 tcp 1518280447 xxx.xxx.x.xx 63166 typ host tcptype passive generation 0 ufrag yHgM network-id 1 network-cost 10|audio|0
m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127 124 125
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:yHgM
a=ice-pwd:So+kgi6mFjYkB0uLEOC+cskS
a=ice-options:trickle
a=fingerprint:sha-256 55:56:B8:61:65:54:51:1B:D6:88:E7:50:BB:06:80:7D:D1:65:E5:3F:C5:D0:E5:4D:B2:9F:B9:88:84:20:FC:C2
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=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=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
a=extmap:10 http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07
a=sendrecv
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=rtpmap:98 VP9/90000
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=fmtp:98 x-google-profile-id=0
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:100 H264/90000
a=rtcp-fb:100 goog-remb
a=rtcp-fb:100 transport-cc
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=fmtp:100 packetization-mode=1
a=rtpmap:101 rtx/90000
a=fmtp:101 apt=100
a=rtpmap:127 red/90000
a=rtpmap:124 rtx/90000
a=fmtp:124 apt=127
a=rtpmap:125 ulpfec/90000
a=ssrc-group:FID 2634832858 1498331816
a=ssrc:2634832858 cname:q8MJSfLi5w/UPF2u
a=ssrc:2634832858 msid:e0014ee3-b7dc-46ae-8ebb-89669bd33f7c SELF_VIDEO
a=ssrc:2634832858 mslabel:e0014ee3-b7dc-46ae-8ebb-89669bd33f7c
a=ssrc:2634832858 label:SELF_VIDEO
a=ssrc:1498331816 cname:q8MJSfLi5w/UPF2u
a=ssrc:1498331816 msid:e0014ee3-b7dc-46ae-8ebb-89669bd33f7c SELF_VIDEO
a=ssrc:1498331816 mslabel:e0014ee3-b7dc-46ae-8ebb-89669bd33f7c
a=ssrc:1498331816 label:SELF_VIDEO
a=candidate:1862263974 1 udp 2122260223 xxx.xxx.x.xx 53632 typ host generation 0 ufrag yHgM network-id 1 network-cost 10|video|1
a=candidate:545003606 1 tcp 1518280447 xxx.xxx.x.xx 63167 typ host tcptype passive generation 0 ufrag yHgM network-id 1 network-cost 10|video|1
"```
候选行中的 network-cost 10|audio|0
看起来不对,可能会导致解析错误。
很可能您在附加到 SDP 时将 sdpMid 和 sdpMLineIndex 与候选连接起来。
请注意,通常 peerconnections localDescription.sdp 将由图书馆更新,无需您自己添加候选人。
我正在尝试使用这个 nuget 包 https://www.nuget.org/packages/WebRtc/ 建立一个 webrtc 调用。我无法在我的实施中使用滴流冰,所以我尝试在收集冰候选时将它们添加到我的 sdp 中。这在早期版本的包中有效,但是当使用最新版本时,当我尝试使用修改后的 sdp 创建会话描述时失败。据我了解,该软件包的最新版本基于 webrtc 版本 m71。添加 ice 候选人后,我的报价 sdp 如下所示:
"v=0
o=- 984872923505738618 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio video
a=msid-semantic: WMS bf18a69a-7b0e-46d0-8972-dd8995b1d839 e0014ee3-b7dc-46ae-8ebb-89669bd33f7c
m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:yHgM
a=ice-pwd:So+kgi6mFjYkB0uLEOC+cskS
a=ice-options:trickle
a=fingerprint:sha-256 55:56:B8:61:65:54:51:1B:D6:88:E7:50:BB:06:80:7D:D1:65:E5:3F:C5:D0:E5:4D:B2:9F:B9:88:84:20:FC:C2
a=setup:actpass
a=mid:audio
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=sendrecv
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:102 ILBC/8000
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:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
a=ssrc:3424879744 cname:q8MJSfLi5w/UPF2u
a=ssrc:3424879744 msid:bf18a69a-7b0e-46d0-8972-dd8995b1d839 SELF_AUDIO
a=ssrc:3424879744 mslabel:bf18a69a-7b0e-46d0-8972-dd8995b1d839
a=ssrc:3424879744 label:SELF_AUDIO
a=candidate:1862263974 1 udp 2122260223 xxx.xxx.x.xx 53631 typ host generation 0 ufrag yHgM network-id 1 network-cost 10|audio|0
a=candidate:545003606 1 tcp 1518280447 xxx.xxx.x.xx 63166 typ host tcptype passive generation 0 ufrag yHgM network-id 1 network-cost 10|audio|0
m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127 124 125
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:yHgM
a=ice-pwd:So+kgi6mFjYkB0uLEOC+cskS
a=ice-options:trickle
a=fingerprint:sha-256 55:56:B8:61:65:54:51:1B:D6:88:E7:50:BB:06:80:7D:D1:65:E5:3F:C5:D0:E5:4D:B2:9F:B9:88:84:20:FC:C2
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=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=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
a=extmap:10 http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07
a=sendrecv
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=rtpmap:98 VP9/90000
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=fmtp:98 x-google-profile-id=0
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:100 H264/90000
a=rtcp-fb:100 goog-remb
a=rtcp-fb:100 transport-cc
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=fmtp:100 packetization-mode=1
a=rtpmap:101 rtx/90000
a=fmtp:101 apt=100
a=rtpmap:127 red/90000
a=rtpmap:124 rtx/90000
a=fmtp:124 apt=127
a=rtpmap:125 ulpfec/90000
a=ssrc-group:FID 2634832858 1498331816
a=ssrc:2634832858 cname:q8MJSfLi5w/UPF2u
a=ssrc:2634832858 msid:e0014ee3-b7dc-46ae-8ebb-89669bd33f7c SELF_VIDEO
a=ssrc:2634832858 mslabel:e0014ee3-b7dc-46ae-8ebb-89669bd33f7c
a=ssrc:2634832858 label:SELF_VIDEO
a=ssrc:1498331816 cname:q8MJSfLi5w/UPF2u
a=ssrc:1498331816 msid:e0014ee3-b7dc-46ae-8ebb-89669bd33f7c SELF_VIDEO
a=ssrc:1498331816 mslabel:e0014ee3-b7dc-46ae-8ebb-89669bd33f7c
a=ssrc:1498331816 label:SELF_VIDEO
a=candidate:1862263974 1 udp 2122260223 xxx.xxx.x.xx 53632 typ host generation 0 ufrag yHgM network-id 1 network-cost 10|video|1
a=candidate:545003606 1 tcp 1518280447 xxx.xxx.x.xx 63167 typ host tcptype passive generation 0 ufrag yHgM network-id 1 network-cost 10|video|1
"```
network-cost 10|audio|0
看起来不对,可能会导致解析错误。
很可能您在附加到 SDP 时将 sdpMid 和 sdpMLineIndex 与候选连接起来。
请注意,通常 peerconnections localDescription.sdp 将由图书馆更新,无需您自己添加候选人。