microsoft / MixedReality-WebRTC

MixedReality-WebRTC is a collection of components to help mixed reality app developers integrate audio and video real-time communication into their application and improve their collaborative experience
https://microsoft.github.io/MixedReality-WebRTC/
MIT License
908 stars 282 forks source link

ICE negotiate stuck when state is completion, VideoTrackAdded func not callback can't received remote stream #659

Open PureCoderPan opened 3 years ago

PureCoderPan commented 3 years ago

Describe the problem: I use MixedRealty as receiver , other peer is iOS by using CocoaPods named webrtc-framework. When received stream from Android device always work fine, but received from iOS is not work. I checked establish peer connection flow, Android and iOS not any different. But when remote side is Android, PC's VideoTrackAdded callback can be involved, iOS is not be involved when ICE negotiate state is complete.

offer: form PC(MixedRealty) to iOS

offer
v=0
o=- 3014744102137043708 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0 1
a=msid-semantic: WMS
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:B5Jd
a=ice-pwd:spERo7nZYiAvUmjSBuqyET8w
a=ice-options:trickle
a=fingerprint:sha-256 E3:99:1D:9A:BF:A1:7F:A0:8C:2C:41:E0:0A:E7:56:FD:47:40:41:25:46:ED:C2:35:33:C5:04:5B:20:38:AB:E0
a=setup:actpass
a=mid:0
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid
a=sendrecv
a=msid:- 05c9551c-f4d1-4c7a-97a3-e6c229472ced
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:3947776607 cname:Th1egATyMOOWW+QV
a=ssrc:3947776607 msid: 05c9551c-f4d1-4c7a-97a3-e6c229472ced
a=ssrc:3947776607 mslabel:
a=ssrc:3947776607 label:05c9551c-f4d1-4c7a-97a3-e6c229472ced
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:B5Jd
a=ice-pwd:spERo7nZYiAvUmjSBuqyET8w
a=ice-options:trickle
a=fingerprint:sha-256 E3:99:1D:9A:BF:A1:7F:A0:8C:2C:41:E0:0A:E7:56:FD:47:40:41:25:46:ED:C2:35:33:C5:04:5B:20:38:AB:E0
a=setup:actpass
a=mid:1
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=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid
a=sendrecv
a=msid:- 973b950c-354f-422d-bbdb-afa694f49ef8
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 multiplex/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 acn=VP9;x-google-profile-id=0
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 2052416292 3081243029
a=ssrc:2052416292 cname:Th1egATyMOOWW+QV
a=ssrc:2052416292 msid: 973b950c-354f-422d-bbdb-afa694f49ef8
a=ssrc:2052416292 mslabel:
a=ssrc:2052416292 label:973b950c-354f-422d-bbdb-afa694f49ef8
a=ssrc:3081243029 cname:Th1egATyMOOWW+QV
a=ssrc:3081243029 msid: 973b950c-354f-422d-bbdb-afa694f49ef8
a=ssrc:3081243029 mslabel:
a=ssrc:3081243029 label:973b950c-354f-422d-bbdb-afa694f49ef8

answer: form iOS to PC(MixedRealty)

answer
v=0
o=- 8209427212219477458 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0 1
a=msid-semantic: WMS
m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 126
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:LZdE
a=ice-pwd:W80W1mkVyHvboZ/VdH5BW6ra
a=ice-options:renomination
a=fingerprint:sha-256 38:E4:CE:10:A4:A7:BC:8D:3A:87:CB:5C:5B:87:19:85:12:AB:B0:79:AF:33:EE:32:4F:C1:11:14:0B:A1:60:99
a=setup:active
a=mid:0
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=recvonly
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:126 telephone-event/8000
m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 127 124 125
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:LZdE
a=ice-pwd:W80W1mkVyHvboZ/VdH5BW6ra
a=ice-options:renomination
a=fingerprint:sha-256 38:E4:CE:10:A4:A7:BC:8D:3A:87:CB:5C:5B:87:19:85:12:AB:B0:79:AF:33:EE:32:4F:C1:11:14:0B:A1:60:99
a=setup:active
a=mid:1
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=recvonly
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:97 rtx/90000
a=fmtp:97 apt=96
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:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:127 red/90000
a=rtpmap:124 rtx/90000
a=fmtp:124 apt=127
a=rtpmap:125 ulpfec/90000

Environment received: PC MixedRealty: latest version 2.0.2 window 10

send: iOS iOS version 13.7 WebRTC framework webrtc-framework 14493

djee-ms commented 3 years ago

See maybe #181 and #625. Could be video-orientation again.