我有2个不同的webrtc应用程序的同级对象(不是我编写的,我想它们有2个不同的内部实现)。我在这两个同行之间创建了信号服务器 我能够在同行之间交换要约/答案和候选人。 在“提供者”对等端,我可以看到视频并且可以收听音频,而在“应答者”对等端,我可以听到音频,但是看不到视频。 在候选者交换阶段,我发现“提供者”对等方发送所有候选者(音频-视频),而“应答者”对等方仅发送音频候选者,因此不发送任何视频候选者。 我已经使用通用的webrtc网络应用程序测试了“报价”对等方,并且一切正常。 同样,“应答者”对等体与另一种“应答者”对等体类型也可以很好地配合。 我想要的是双向交换音频和视频。 所以,我的问题是为什么应答者没有视频发送给报价者,而是音频呢?为什么不向答题者对等视频候选人?
sdps和候选项下方。 在此先感谢任何想要帮助我的人;)
=======================
SDP - OFFER
v=0
o=- 1599140247719 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio video
m=audio 1 RTP/SAVPF 111 103 104 126
c=IN IP4 0.0.0.0
a=rtcp:1 IN IP4 0.0.0.0
a=ice-ufrag:7banc1eha2veda
a=ice-pwd:155319cd1dcq914faumqf0nq53
a=fingerprint:sha-256 D2:9F:ED:FB:56:3F:20....
a=setup:actpass
a=mid:audio
a=candidate:1 1 udp 2130706431 10.X.Y.Z 10000 typ host generation 0
a=candidate:2 1 udp 1694498815 34.X.Y.Z 10000 typ srflx raddr 10.X.Y.Z rport 10000 generation 0
a=sendrecv
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=fmtp:111 minptime=10; useinbandfec=1
a=rtcp-fb:111 transport-cc
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:126 telephone-event/8000
a=rtcp-fb:* transport-cc
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=ssrc:1406484216 cname:mixed
a=ssrc:1406484216 label:audio_label
a=ssrc:1406484216 msid:stream_label audio_label
a=ssrc:1406484216 mslabel:stream_label
m=video 1 RTP/SAVPF 100 107 101 96 97 99
c=IN IP4 0.0.0.0
a=rtcp:1 IN IP4 0.0.0.0
a=ice-ufrag:7banc1eha2veda
a=ice-pwd:155319cd1dcq914faumqf0nq53
a=fingerprint:sha-256 D2:9F:ED:FB:56:3F:20:36:27:5F:5A:98.....
a=setup:actpass
a=mid:video
a=candidate:1 1 udp 2130706431 10.X.Y.Z 10000 typ host generation 0
a=candidate:2 1 udp 1694498815 34.X.Y.Z 10000 typ srflx raddr 10.X.Y.Z rport 10000 generation 0
a=sendrecv
a=rtcp-mux
a=rtpmap:100 VP8/90000
a=fmtp:100 x-google-start-bitrate=800
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=rtcp-fb:100 transport-cc
a=rtpmap:107 H264/90000
a=fmtp:107 x-google-start-bitrate=800; profile-level-id=42e01f;level-asymmetry-allowed=1;packetization-mode=1;
a=rtcp-fb:107 ccm fir
a=rtcp-fb:107 nack
a=rtcp-fb:107 nack pli
a=rtcp-fb:107 transport-cc
a=rtpmap:101 VP9/90000
a=fmtp:101 x-google-start-bitrate=800
a=rtcp-fb:101 ccm fir
a=rtcp-fb:101 nack
a=rtcp-fb:101 nack pli
a=rtcp-fb:101 transport-cc
a=rtpmap:96 rtx/90000
a=fmtp:96 apt=100
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=101
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=107
a=rtcp-fb:* ccm fir
a=rtcp-fb:* nack
a=rtcp-fb:* nack pli
a=rtcp-fb:* transport-cc
a=rtcp-fb:* ccm fir
a=rtcp-fb:* nack
a=rtcp-fb:* nack pli
a=rtcp-fb:* transport-cc
a=rtcp-fb:* ccm fir
a=rtcp-fb:* nack
a=rtcp-fb:* nack pli
a=rtcp-fb:* transport-cc
a=rtcp-fb:* ccm fir
a=rtcp-fb:* nack
a=rtcp-fb:* nack pli
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=ssrc:1326485757 cname:mixed
a=ssrc:1326485757 label:video_label
a=ssrc:1326485757 msid:stream_label video_label
a=ssrc:1326485757 mslabel:stream_label
=======================
SDP - ANSWER
v=0
o=- 8506032378498580840 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio video
a=msid-semantic: WMS stream_label
m=audio 9 RTP/SAVPF 111 103 104 126
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:yCUG
a=ice-pwd:RjTVnIL/RG5nQU2tkDDKBiFI
a=ice-options:trickle
a=fingerprint:sha-256 D4:07:A4:9D:CD:99:F4:6A:71:78:11:6F:89....
a=setup:active
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:126 telephone-event/8000
a=ssrc:3622668164 cname:B0qrBGuMdfuBl52O
a=ssrc:3622668164 msid:stream_label audio_label
a=ssrc:3622668164 mslabel:stream_label
a=ssrc:3622668164 label:audio_label
m=video 9 RTP/SAVPF 100 101 96 97
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:yCUG
a=ice-pwd:RjTVnIL/RG5nQU2tkDDKBiFI
a=ice-options:trickle
a=fingerprint:sha-256 D4:07:A4:9D:CD:99:F4:6A:71:78:11:6F:89....
a=setup:active
a=mid:video
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=sendrecv
a=rtcp-mux
a=rtpmap:100 VP8/90000
a=rtcp-fb:100 transport-cc
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=rtpmap:101 VP9/90000
a=rtcp-fb:101 transport-cc
a=rtcp-fb:101 ccm fir
a=rtcp-fb:101 nack
a=rtcp-fb:101 nack pli
a=fmtp:101 profile-id=0
a=rtpmap:96 rtx/90000
a=fmtp:96 apt=100
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=101
a=ssrc-group:FID 2974236660 3019067573
a=ssrc:2974236660 cname:B0qrBGuMdfuBl52O
a=ssrc:2974236660 msid:stream_label video_label
a=ssrc:2974236660 mslabel:stream_label
a=ssrc:2974236660 label:video_label
a=ssrc:3019067573 cname:B0qrBGuMdfuBl52O
a=ssrc:3019067573 msid:stream_label video_label
a=ssrc:3019067573 mslabel:stream_label
a=ssrc:3019067573 label:video_label
=====================
CANDIDATES FROM INITIATOR-PEER ( WHO SEND OFFER )
{"candidate":"candidate:1 1 udp 2130706431 10.X.Y.Z 10000 typ host generation 0","sdpMid":"audio","sdpMLineIndex":0}
{"candidate":"candidate:2 1 udp 1694498815 34.X.Y.Z 10000 typ srflx raddr 10.X.Y.Z rport 10000 generation 0","sdpMid":"audio","sdpMLineIndex":0}
{"candidate":"candidate:1 1 udp 2130706431 10.X.Y.Z 10000 typ host generation 0","sdpMid":"video","sdpMLineIndex":1}
{"candidate":"candidate:2 1 udp 1694498815 34.X.Y.Z 10000 typ srflx raddr 10.X.Y.Z rport 10000 generation 0","sdpMid":"video","sdpMLineIndex":1}
=====================
CANDIDATES FROM RESPONDER-PEER ( WHO SEND ANSWER )
{"candidate":"candidate:3054232416 1 udp 2122260223 169.X.Y.Z 55621 typ host generation 0 ufrag yCUG network-id 1","sdpMLineIndex":0,"sdpMid":"audio"}
{"candidate":"candidate:211232335 1 udp 2122194687 172.X.Y.Z 55622 typ host generation 0 ufrag yCUG network-id 2","sdpMLineIndex":0,"sdpMid":"audio"}
{"candidate":"candidate:1986380506 1 udp 2122129151 10.T.K.Q 55623 typ host generation 0 ufrag yCUG network-id 3","sdpMLineIndex":0,"sdpMid":"audio"}
{"candidate":"candidate:27784895 1 udp 2122063615 192.X.Y.Z 55624 typ host generation 0 ufrag yCUG network-id 4","sdpMLineIndex":0,"sdpMid":"audio"}
{"candidate":"candidate:2894147627 1 udp 2121998079 172.T.K.Q 55625 typ host generation 0 ufrag yCUG network-id 7","sdpMLineIndex":0,"sdpMid":"audio"}
{"candidate":"candidate:2163208203 1 udp 1685855999 82.X.Y.Z 55624 typ srflx raddr 192.X.Y.Z rport 55624 generation 0 ufrag yCUG network-id 4","sdpMLineIndex":0,"sdpMid":"audio"}
{"candidate":"candidate:4169670544 1 tcp 1518280447 169.X.Y.Z 54604 typ host tcptype passive generation 0 ufrag yCUG network-id 1","sdpMLineIndex":0,"sdpMid":"audio"}
{"candidate":"candidate:1108662975 1 tcp 1518214911 172.X.Y.Z 54605 typ host tcptype passive generation 0 ufrag yCUG network-id 2","sdpMLineIndex":0,"sdpMid":"audio"}
{"candidate":"candidate:954613290 1 tcp 1518149375 10.T.K.Q 54606 typ host tcptype passive generation 0 ufrag yCUG network-id 3","sdpMLineIndex":0,"sdpMid":"audio"}
{"candidate":"candidate:1327761999 1 tcp 1518083839 192.X.Y.Z 54607 typ host tcptype passive generation 0 ufrag yCUG network-id 4","sdpMLineIndex":0,"sdpMid":"audio"}
{"candidate":"candidate:3791834331 1 tcp 1518018303 172.T.K.Q 54608 typ host tcptype passive generation 0 ufrag yCUG network-id 7","sdpMLineIndex":0,"sdpMid":"audio"}