Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Native producer localId is null #263

Closed
quanli168 opened this issue Jun 8, 2023 · 2 comments · Fixed by #271
Closed

React Native producer localId is null #263

quanli168 opened this issue Jun 8, 2023 · 2 comments · Fixed by #271
Labels

Comments

@quanli168
Copy link

quanli168 commented Jun 8, 2023

Bug Report

IMPORTANT: We primarily use GitHub as an issue tracker. Just open an issue here if you have encountered a bug in mediasoup-client.

If you have questions or doubts about mediasoup-client or need support, please use the mediasoup Discourse Group instead:

https://mediasoup.discourse.group

Your environment

  • Operating System: iOS
  • react-native: 0.70.8
  • react-native-webrtc: 111.0.0
  • mediasoup-client version: 3.6.84

Issue description

Producing client starts with producing both audio and video, then calls producer.close() for audio, but video producer is stopped.

Produce audio (note audio track mid is 0)

INFO mediasoup-client:Transport produce() [track:'{"_constraints": {"autoGainControl": true, "echoCancellation": true, "noiseSuppression": true}, "_enabled": true, "_muted": false, "_peerConnectionId": undefined, "_readyState": "live", "_settings": {}, "contentHint": "speech", "id": "D142B9CA-32DA-4DF5-8E87-E292AB5C16B6", "kind": "audio", "label": "", "remote": false}'] +4ms
INFO mediasoup-client:ReactNativeUnifiedPlan send() [kind:audio, track.id:D142B9CA-32DA-4DF5-8E87-E292AB5C16B6] +6ms
LOG rn-webrtc:pc:DEBUG 1 addTransceiver +3ms
LOG rn-webrtc:pc:DEBUG 1 createOffer +1ms
LOG rn-webrtc:pc:DEBUG 1 createOffer OK +0ms
INFO mediasoup-client:RemoteSdp updateDtlsRole() [role:server] +0ms
INFO mediasoup-client:ReactNativeUnifiedPlan send() | calling pc.setLocalDescription() [offer:'{"sdp": "v=0\r\n' +
'o=- 4197701562609324873 2 IN IP4 127.0.0.1\r\n' +
's=-\r\n' +
't=0 0\r\n' +
'a=group:BUNDLE 0\r\n' +
'a=extmap-allow-mixed\r\n' +
'a=msid-semantic: WMS ba67d5fe-2b98-b64d-9bc4-f1187b2c4e98\r\n' +
'm=audio 9 UDP/TLS/RTP/SAVPF 111 63 9 102 0 8 13 110 126\r\n' +
'c=IN IP4 0.0.0.0\r\n' +
'a=rtcp:9 IN IP4 0.0.0.0\r\n' +
'a=ice-ufrag:icKV\r\n' +
'a=ice-pwd:Yg+Ph7dkC2OKjG8qumqkpVHy\r\n' +
'a=ice-options:trickle renomination\r\n' +
'a=fingerprint:sha-256 B3:9B:C8:44:E2:07:93:69:EB:58:5E:B0:3A:42:8C:A3:04:41:86:6E:63:34:0D:BD:3E:56:78:4E:67:01:28:B6\r\n' +
'a=setup:actpass\r\n' +
'a=mid:0\r\n' +
'a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\n' +
'a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n' +
'a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n' +
'a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\n' +
'a=sendonly\r\n' +
'a=msid:ba67d5fe-2b98-b64d-9bc4-f1187b2c4e98 D142B9CA-32DA-4DF5-8E87-E292AB5C16B6\r\n' +
'a=rtcp-mux\r\n' +
'a=rtpmap:111 opus/48000/2\r\n' +
'a=rtcp-fb:111 transport-cc\r\n' +
'a=fmtp:111 minptime=10;useinbandfec=1\r\n' +
'a=rtpmap:63 red/48000/2\r\n' +
'a=fmtp:63 111/111\r\n' +
'a=rtpmap:9 G722/8000\r\n' +
'a=rtpmap:102 ILBC/8000\r\n' +
'a=rtpmap:0 PCMU/8000\r\n' +
'a=rtpmap:8 PCMA/8000\r\n' +
'a=rtpmap:13 CN/8000\r\n' +
'a=rtpmap:110 telephone-event/48000\r\n' +
'a=rtpmap:126 telephone-event/8000\r\n' +
'a=ssrc:2587252053 cname:d4DR8ilUKug4lP5X\r\n' +
'a=ssrc:2587252053 msid:ba67d5fe-2b98-b64d-9bc4-f1187b2c4e98 D142B9CA-32DA-4DF5-8E87-E292AB5C16B6\r\n' +
'", "type": "offer"}'] +25ms
LOG rn-webrtc:pc:DEBUG 1 setLocalDescription +24ms
LOG rn-webrtc:pc:DEBUG 1 setLocalDescription OK +4ms
INFO mediasoup-client:ReactNativeUnifiedPlan send() | calling pc.setRemoteDescription() [answer:'{"sdp": "v=0\r\n' +
'o=mediasoup-client 10000 1 IN IP4 0.0.0.0\r\n' +
's=-\r\n' +
't=0 0\r\n' +
'a=ice-lite\r\n' +
'a=fingerprint:sha-1 71:7F:40:E8:48:1A:9D:6E:96:EA:FF:3E:96:FA:A2:4B:2A:FB:01:5E\r\n' +
'a=msid-semantic: WMS *\r\n' +
'a=group:BUNDLE 0\r\n' +
'm=audio 7 UDP/TLS/RTP/SAVPF 111\r\n' +
'c=IN IP4 127.0.0.1\r\n' +
'a=rtpmap:111 opus/48000/2\r\n' +
'a=fmtp:111 usedtx=1\r\n' +
'a=rtcp-fb:111 transport-cc \r\n' +
'a=rtcp-fb:111 nack \r\n' +
'a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\n' +
'a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n' +
'a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n' +
'a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\n' +
'a=setup:passive\r\n' +
'a=mid:0\r\n' +
'a=recvonly\r\n' +
'a=ice-ufrag:ih1hkqxgajlnl4t6nma2p721r024a9mf\r\n' +
'a=ice-pwd:0vf7is7i4xv5v6fgdcsw3x07pu0qsnw9\r\n' +
'a=candidate:udpcandidate 1 udp 1076558079 167.71.106.54 36841 typ host\r\n' +
'a=candidate:tcpcandidate 1 tcp 1076302079 167.71.106.54 39728 typ host tcptype passive\r\n' +
'a=end-of-candidates\r\n' +
'a=ice-options:renomination\r\n' +
'a=rtcp-mux\r\n' +
'a=rtcp-rsize\r\n' +
'", "type": "answer"}'] +7ms
LOG rn-webrtc:pc:DEBUG 1 setRemoteDescription +4ms
LOG rn-webrtc:pc:DEBUG 1 setRemoteDescription OK +3ms
INFO mediasoup-client:Transport connection state changed to connecting +40ms
INFO mediasoup-client:Producer constructor() +0ms

Produce video (note video track mid is 1)

INFO mediasoup-client:Transport produce() [track:'{"_constraints": {"facingMode": "user", "frameRate": 24, "height": 720, "width": 1280}, "_enabled": true, "_muted": false, "_peerConnectionId": undefined, "_readyState": "live", "_settings": {"frameRate": 30, "height": 720, "width": 1280}, "contentHint": "motion", "id": "354C053A-DC27-46CE-A4A0-2982FC4EBF58", "kind": "video", "label": "", "remote": false}'] +18ms
INFO mediasoup-client:ReactNativeUnifiedPlan send() [kind:video, track.id:354C053A-DC27-46CE-A4A0-2982FC4EBF58] +24ms
LOG rn-webrtc:pc:DEBUG 1 addTransceiver +20ms
LOG rn-webrtc:pc:DEBUG 1 createOffer +1ms
DEBUG 19:47:26:668 EXIT [GatherPeerManager][produceStart] 92.02ms [Object]
LOG rn-webrtc:pc:DEBUG 1 createOffer OK +1ms
INFO mediasoup-client:ReactNativeUnifiedPlan send() | calling pc.setLocalDescription() [offer:'{"sdp": "v=0\r\n' +
'o=- 4197701562609324873 3 IN IP4 127.0.0.1\r\n' +
's=-\r\n' +
't=0 0\r\n' +
'a=group:BUNDLE 0 1\r\n' +
'a=extmap-allow-mixed\r\n' +
'a=msid-semantic: WMS ba67d5fe-2b98-b64d-9bc4-f1187b2c4e98\r\n' +
'm=audio 57760 UDP/TLS/RTP/SAVPF 111 63 9 102 0 8 13 110 126\r\n' +
'c=IN IP4 192.168.1.79\r\n' +
'a=rtcp:9 IN IP4 0.0.0.0\r\n' +
'a=candidate:1164057254 1 udp 2122262783 2600:4040:a50c:cd00:ccfd:680e:2cb1:a61f 59546 typ host generation 0 network-id 2 network-cost 10\r\n' +
'a=candidate:2072448892 1 udp 2122194687 192.168.1.79 57760 typ host generation 0 network-id 1 network-cost 10\r\n' +
'a=candidate:1287761130 1 udp 2122131711 2607:fb90:93af:9837:49dd:4780:7ca0:f1a5 63763 typ host generation 0 network-id 17 network-cost 900\r\n' +
'a=candidate:3104054561 1 udp 2122063615 192.0.0.2 60332 typ host generation 0 network-id 16 network-cost 900\r\n' +
'a=ice-ufrag:icKV\r\n' +
'a=ice-pwd:Yg+Ph7dkC2OKjG8qumqkpVHy\r\n' +
'a=ice-options:trickle renomination\r\n' +
'a=fingerprint:sha-256 B3:9B:C8:44:E2:07:93:69:EB:58:5E:B0:3A:42:8C:A3:04:41:86:6E:63:34:0D:BD:3E:56:78:4E:67:01:28:B6\r\n' +
'a=setup:actpass\r\n' +
'a=mid:0\r\n' +
'a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\n' +
'a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n' +
'a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n' +
'a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\n' +
'a=sendonly\r\n' +
'a=msid:ba67d5fe-2b98-b64d-9bc4-f1187b2c4e98 D142B9CA-32DA-4DF5-8E87-E292AB5C16B6\r\n' +
'a=rtcp-mux\r\n' +
'a=rtpmap:111 opus/48000/2\r\n' +
'a=rtcp-fb:111 transport-cc\r\n' +
'a=fmtp:111 minptime=10;useinbandfec=1\r\n' +
'a=rtpmap:63 red/48000/2\r\n' +
'a=fmtp:63 111/111\r\n' +
'a=rtpmap:9 G722/8000\r\n' +
'a=rtpmap:102 ILBC/8000\r\n' +
'a=rtpmap:0 PCMU/8000\r\n' +
'a=rtpmap:8 PCMA/8000\r\n' +
'a=rtpmap:13 CN/8000\r\n' +
'a=rtpmap:110 telephone-event/48000\r\n' +
'a=rtpmap:126 telephone-event/8000\r\n' +
'a=ssrc:2587252053 cname:d4DR8ilUKug4lP5X\r\n' +
'a=ssrc:2587252053 msid:ba67d5fe-2b98-b64d-9bc4-f1187b2c4e98 D142B9CA-32DA-4DF5-8E87-E292AB5C16B6\r\n' +
'm=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127 103 35 36 104 105 106\r\n' +
'c=IN IP4 0.0.0.0\r\n' +
'a=rtcp:9 IN IP4 0.0.0.0\r\n' +
'a=ice-ufrag:icKV\r\n' +
'a=ice-pwd:Yg+Ph7dkC2OKjG8qumqkpVHy\r\n' +
'a=ice-options:trickle renomination\r\n' +
'a=fingerprint:sha-256 B3:9B:C8:44:E2:07:93:69:EB:58:5E:B0:3A:42:8C:A3:04:41:86:6E:63:34:0D:BD:3E:56:78:4E:67:01:28:B6\r\n' +
'a=setup:actpass\r\n' +
'a=mid:1\r\n' +
'a=extmap:14 urn:ietf:params:rtp-hdrext:toffset\r\n' +
'a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n' +
'a=extmap:13 urn:3gpp:video-orientation\r\n' +
'a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n' +
'a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\n' +
'a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\r\n' +
'a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\r\n' +
'a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space\r\n' +
'a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\n' +
'a=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\n' +
'a=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r\n' +
'a=sendonly\r\n' +
'a=msid:ba67d5fe-2b98-b64d-9bc4-f1187b2c4e98 354C053A-DC27-46CE-A4A0-2982FC4EBF58\r\n' +
'a=rtcp-mux\r\n' +
'a=rtcp-rsize\r\n' +
'a=rtpmap:96 H264/90000\r\n' +
'a=rtcp-fb:96 goog-remb\r\n' +
'a=rtcp-fb:96 transport-cc\r\n' +
'a=rtcp-fb:96 ccm fir\r\n' +
'a=rtcp-fb:96 nack\r\n' +
'a=rtcp-fb:96 nack pli\r\n' +
'a=fmtp:96 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=640c34\r\n' +
'a=rtpmap:97 rtx/90000\r\n' +
'a=fmtp:97 apt=96\r\n' +
'a=rtpmap:98 H264/90000\r\n' +
'a=rtcp-fb:98 goog-remb\r\n' +
'a=rtcp-fb:98 transport-cc\r\n' +
'a=rtcp-fb:98 ccm fir\r\n' +
'a=rtcp-fb:98 nack\r\n' +
'a=rtcp-fb:98 nack pli\r\n' +
'a=fmtp:98 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e034\r\n' +
'a=rtpmap:99 rtx/90000\r\n' +
'a=fmtp:99 apt=98\r\n' +
'a=rtpmap:100 VP8/90000\r\n' +
'a=rtcp-fb:100 goog-remb\r\n' +
'a=rtcp-fb:100 transport-cc\r\n' +
'a=rtcp-fb:100 ccm fir\r\n' +
'a=rtcp-fb:100 nack\r\n' +
'a=rtcp-fb:100 nack pli\r\n' +
'a=rtpmap:101 rtx/90000\r\n' +
'a=fmtp:101 apt=100\r\n' +
'a=rtpmap:127 VP9/90000\r\n' +
'a=rtcp-fb:127 goog-remb\r\n' +
'a=rtcp-fb:127 transport-cc\r\n' +
'a=rtcp-fb:127 ccm fir\r\n' +
'a=rtcp-fb:127 nack\r\n' +
'a=rtcp-fb:127 nack pli\r\n' +
'a=rtpmap:103 rtx/90000\r\n' +
'a=fmtp:103 apt=127\r\n' +
'a=rtpmap:35 AV1/90000\r\n' +
'a=rtcp-fb:35 goog-remb\r\n' +
'a=rtcp-fb:35 transport-cc\r\n' +
'a=rtcp-fb:35 ccm fir\r\n' +
'a=rtcp-fb:35 nack\r\n' +
'a=rtcp-fb:35 nack pli\r\n' +
'a=rtpmap:36 rtx/90000\r\n' +
'a=fmtp:36 apt=35\r\n' +
'a=rtpmap:104 red/90000\r\n' +
'a=rtpmap:105 rtx/90000\r\n' +
'a=fmtp:105 apt=104\r\n' +
'a=rtpmap:106 ulpfec/90000\r\n' +
'a=rid:r0 send\r\n' +
'a=rid:r1 send\r\n' +
'a=simulcast:send r0;~r1\r\n' +
'", "type": "offer"}'] +3ms
LOG rn-webrtc:pc:DEBUG 1 setLocalDescription +2ms
LOG rn-webrtc:pc:DEBUG 1 setLocalDescription OK +1ms
INFO mediasoup-client:ReactNativeUnifiedPlan send() | calling pc.setRemoteDescription() [answer:'{"sdp": "v=0\r\n' +
'o=mediasoup-client 10000 2 IN IP4 0.0.0.0\r\n' +
's=-\r\n' +
't=0 0\r\n' +
'a=ice-lite\r\n' +
'a=fingerprint:sha-1 71:7F:40:E8:48:1A:9D:6E:96:EA:FF:3E:96:FA:A2:4B:2A:FB:01:5E\r\n' +
'a=msid-semantic: WMS *\r\n' +
'a=group:BUNDLE 0 1\r\n' +
'm=audio 7 UDP/TLS/RTP/SAVPF 111\r\n' +
'c=IN IP4 127.0.0.1\r\n' +
'a=rtpmap:111 opus/48000/2\r\n' +
'a=fmtp:111 usedtx=1\r\n' +
'a=rtcp-fb:111 transport-cc \r\n' +
'a=rtcp-fb:111 nack \r\n' +
'a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\n' +
'a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n' +
'a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n' +
'a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\n' +
'a=setup:passive\r\n' +
'a=mid:0\r\n' +
'a=recvonly\r\n' +
'a=ice-ufrag:ih1hkqxgajlnl4t6nma2p721r024a9mf\r\n' +
'a=ice-pwd:0vf7is7i4xv5v6fgdcsw3x07pu0qsnw9\r\n' +
'a=candidate:udpcandidate 1 udp 1076558079 167.71.106.54 36841 typ host\r\n' +
'a=candidate:tcpcandidate 1 tcp 1076302079 167.71.106.54 39728 typ host tcptype passive\r\n' +
'a=end-of-candidates\r\n' +
'a=ice-options:renomination\r\n' +
'a=rtcp-mux\r\n' +
'a=rtcp-rsize\r\n' +
'm=video 7 UDP/TLS/RTP/SAVPF 100 101\r\n' +
'c=IN IP4 127.0.0.1\r\n' +
'a=rtpmap:100 VP8/90000\r\n' +
'a=rtpmap:101 rtx/90000\r\n' +
'a=fmtp:100 x-google-start-bitrate=1000\r\n' +
'a=fmtp:101 apt=100\r\n' +
'a=rtcp-fb:100 transport-cc \r\n' +
'a=rtcp-fb:100 ccm fir\r\n' +
'a=rtcp-fb:100 nack \r\n' +
'a=rtcp-fb:100 nack pli\r\n' +
'a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\n' +
'a=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\n' +
'a=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r\n' +
'a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n' +
'a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n' +
'a=extmap:13 urn:3gpp:video-orientation\r\n' +
'a=extmap:14 urn:ietf:params:rtp-hdrext:toffset\r\n' +
'a=setup:passive\r\n' +
'a=mid:1\r\n' +
'a=recvonly\r\n' +
'a=ice-ufrag:ih1hkqxgajlnl4t6nma2p721r024a9mf\r\n' +
'a=ice-pwd:0vf7is7i4xv5v6fgdcsw3x07pu0qsnw9\r\n' +
'a=candidate:udpcandidate 1 udp 1076558079 167.71.106.54 36841 typ host\r\n' +
'a=candidate:tcpcandidate 1 tcp 1076302079 167.71.106.54 39728 typ host tcptype passive\r\n' +
'a=end-of-candidates\r\n' +
'a=ice-options:renomination\r\n' +
'a=rtcp-mux\r\n' +
'a=rtcp-rsize\r\n' +
'a=rid:r0 recv\r\n' +
'a=rid:r1 recv\r\n' +
'a=simulcast:recv r0;~r1\r\n' +
'", "type": "answer"}'] +5ms
LOG rn-webrtc:pc:DEBUG 1 setRemoteDescription +3ms
INFO mediasoup-client:Transport connection state changed to connected +9ms
LOG rn-webrtc:pc:DEBUG 1 setRemoteDescription OK +679ms
INFO mediasoup-client:Producer constructor() +722ms

Stop producing audio (note localId passed to stopSending is null, and mid 1 is turned off)

INFO mediasoup-client:Producer close() +17ms
INFO mediasoup-client:ReactNativeUnifiedPlan stopSending() [localId:null] +6s
LOG rn-webrtc:pc:DEBUG 1 removeTrack +570ms
LOG rn-webrtc:pc:DEBUG 1 createOffer +1ms
LOG rn-webrtc:pc:DEBUG 1 createOffer OK +6ms
INFO mediasoup-client:ReactNativeUnifiedPlan stopSending() | calling pc.setLocalDescription() [offer:'{"sdp": "v=0\r\n' +
'o=- 4197701562609324873 4 IN IP4 127.0.0.1\r\n' +
's=-\r\n' +
't=0 0\r\n' +
'a=group:BUNDLE 0\r\n' +
'a=extmap-allow-mixed\r\n' +
'a=msid-semantic: WMS ba67d5fe-2b98-b64d-9bc4-f1187b2c4e98\r\n' +
'm=audio 57760 UDP/TLS/RTP/SAVPF 111 63 9 102 0 8 13 110 126\r\n' +
'c=IN IP4 192.168.1.79\r\n' +
'a=rtcp:9 IN IP4 0.0.0.0\r\n' +
'a=candidate:1164057254 1 udp 2122262783 2600:4040:a50c:cd00:ccfd:680e:2cb1:a61f 59546 typ host generation 0 network-id 2 network-cost 10\r\n' +
'a=candidate:2072448892 1 udp 2122194687 192.168.1.79 57760 typ host generation 0 network-id 1 network-cost 10\r\n' +
'a=candidate:1287761130 1 udp 2122131711 2607:fb90:93af:9837:49dd:4780:7ca0:f1a5 63763 typ host generation 0 network-id 17 network-cost 900\r\n' +
'a=candidate:3104054561 1 udp 2122063615 192.0.0.2 60332 typ host generation 0 network-id 16 network-cost 900\r\n' +
'a=ice-ufrag:icKV\r\n' +
'a=ice-pwd:Yg+Ph7dkC2OKjG8qumqkpVHy\r\n' +
'a=ice-options:trickle renomination\r\n' +
'a=fingerprint:sha-256 B3:9B:C8:44:E2:07:93:69:EB:58:5E:B0:3A:42:8C:A3:04:41:86:6E:63:34:0D:BD:3E:56:78:4E:67:01:28:B6\r\n' +
'a=setup:actpass\r\n' +
'a=mid:0\r\n' +
'a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\n' +
'a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n' +
'a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n' +
'a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\n' +
'a=sendonly\r\n' +
'a=msid:ba67d5fe-2b98-b64d-9bc4-f1187b2c4e98 D142B9CA-32DA-4DF5-8E87-E292AB5C16B6\r\n' +
'a=rtcp-mux\r\n' +
'a=rtpmap:111 opus/48000/2\r\n' +
'a=rtcp-fb:111 transport-cc\r\n' +
'a=fmtp:111 minptime=10;useinbandfec=1\r\n' +
'a=rtpmap:63 red/48000/2\r\n' +
'a=fmtp:63 111/111\r\n' +
'a=rtpmap:9 G722/8000\r\n' +
'a=rtpmap:102 ILBC/8000\r\n' +
'a=rtpmap:0 PCMU/8000\r\n' +
'a=rtpmap:8 PCMA/8000\r\n' +
'a=rtpmap:13 CN/8000\r\n' +
'a=rtpmap:110 telephone-event/48000\r\n' +
'a=rtpmap:126 telephone-event/8000\r\n' +
'a=ssrc:2587252053 cname:d4DR8ilUKug4lP5X\r\n' +
'a=ssrc:2587252053 msid:ba67d5fe-2b98-b64d-9bc4-f1187b2c4e98 D142B9CA-32DA-4DF5-8E87-E292AB5C16B6\r\n' +
'm=video 0 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127 103 35 36 104 105 106\r\n' +
'c=IN IP4 0.0.0.0\r\n' +
'a=rtcp:9 IN IP4 0.0.0.0\r\n' +
'a=ice-ufrag:icKV\r\n' +
'a=ice-pwd:Yg+Ph7dkC2OKjG8qumqkpVHy\r\n' +
'a=ice-options:trickle renomination\r\n' +
'a=fingerprint:sha-256 B3:9B:C8:44:E2:07:93:69:EB:58:5E:B0:3A:42:8C:A3:04:41:86:6E:63:34:0D:BD:3E:56:78:4E:67:01:28:B6\r\n' +
'a=setup:actpass\r\n' +
'a=mid:1\r\n' +
'a=extmap:14 urn:ietf:params:rtp-hdrext:toffset\r\n' +
'a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n' +
'a=extmap:13 urn:3gpp:video-orientation\r\n' +
'a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n' +
'a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\n' +
'a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\r\n' +
'a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\r\n' +
'a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space\r\n' +
'a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\n' +
'a=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\n' +
'a=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r\n' +
'a=inactive\r\n' +
'a=rtcp-mux\r\n' +
'a=rtcp-rsize\r\n' +
'a=rtpmap:96 H264/90000\r\n' +
'a=rtcp-fb:96 goog-remb\r\n' +
'a=rtcp-fb:96 transport-cc\r\n' +
'a=rtcp-fb:96 ccm fir\r\n' +
'a=rtcp-fb:96 nack\r\n' +
'a=rtcp-fb:96 nack pli\r\n' +
'a=fmtp:96 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=640c34\r\n' +
'a=rtpmap:97 rtx/90000\r\n' +
'a=fmtp:97 apt=96\r\n' +
'a=rtpmap:98 H264/90000\r\n' +
'a=rtcp-fb:98 goog-remb\r\n' +
'a=rtcp-fb:98 transport-cc\r\n' +
'a=rtcp-fb:98 ccm fir\r\n' +
'a=rtcp-fb:98 nack\r\n' +
'a=rtcp-fb:98 nack pli\r\n' +
'a=fmtp:98 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e034\r\n' +
'a=rtpmap:99 rtx/90000\r\n' +
'a=fmtp:99 apt=98\r\n' +
'a=rtpmap:100 VP8/90000\r\n' +
'a=rtcp-fb:100 goog-remb\r\n' +
'a=rtcp-fb:100 transport-cc\r\n' +
'a=rtcp-fb:100 ccm fir\r\n' +
'a=rtcp-fb:100 nack\r\n' +
'a=rtcp-fb:100 nack pli\r\n' +
'a=rtpmap:101 rtx/90000\r\n' +
'a=fmtp:101 apt=100\r\n' +
'a=rtpmap:127 VP9/90000\r\n' +
'a=rtcp-fb:127 goog-remb\r\n' +
'a=rtcp-fb:127 transport-cc\r\n' +
'a=rtcp-fb:127 ccm fir\r\n' +
'a=rtcp-fb:127 nack\r\n' +
'a=rtcp-fb:127 nack pli\r\n' +
'a=rtpmap:103 rtx/90000\r\n' +
'a=fmtp:103 apt=127\r\n' +
'a=rtpmap:35 AV1/90000\r\n' +
'a=rtcp-fb:35 goog-remb\r\n' +
'a=rtcp-fb:35 transport-cc\r\n' +
'a=rtcp-fb:35 ccm fir\r\n' +
'a=rtcp-fb:35 nack\r\n' +
'a=rtcp-fb:35 nack pli\r\n' +
'a=rtpmap:36 rtx/90000\r\n' +
'a=fmtp:36 apt=35\r\n' +
'a=rtpmap:104 red/90000\r\n' +
'a=rtpmap:105 rtx/90000\r\n' +
'a=fmtp:105 apt=104\r\n' +
'a=rtpmap:106 ulpfec/90000\r\n' +
'", "type": "offer"}'] +8ms
LOG rn-webrtc:pc:DEBUG 1 setLocalDescription +1ms
LOG rn-webrtc:pc:DEBUG 1 setLocalDescription OK +3ms
INFO mediasoup-client:ReactNativeUnifiedPlan stopSending() | calling pc.setRemoteDescription() [answer:'{"sdp": "v=0\r\n' +
'o=mediasoup-client 10000 3 IN IP4 0.0.0.0\r\n' +
's=-\r\n' +
't=0 0\r\n' +
'a=ice-lite\r\n' +
'a=fingerprint:sha-1 71:7F:40:E8:48:1A:9D:6E:96:EA:FF:3E:96:FA:A2:4B:2A:FB:01:5E\r\n' +
'a=msid-semantic: WMS *\r\n' +
'a=group:BUNDLE 0\r\n' +
'm=audio 7 UDP/TLS/RTP/SAVPF 111\r\n' +
'c=IN IP4 127.0.0.1\r\n' +
'a=rtpmap:111 opus/48000/2\r\n' +
'a=fmtp:111 usedtx=1\r\n' +
'a=rtcp-fb:111 transport-cc \r\n' +
'a=rtcp-fb:111 nack \r\n' +
'a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\n' +
'a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n' +
'a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n' +
'a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\n' +
'a=setup:passive\r\n' +
'a=mid:0\r\n' +
'a=recvonly\r\n' +
'a=ice-ufrag:ih1hkqxgajlnl4t6nma2p721r024a9mf\r\n' +
'a=ice-pwd:0vf7is7i4xv5v6fgdcsw3x07pu0qsnw9\r\n' +
'a=candidate:udpcandidate 1 udp 1076558079 167.71.106.54 36841 typ host\r\n' +
'a=candidate:tcpcandidate 1 tcp 1076302079 167.71.106.54 39728 typ host tcptype passive\r\n' +
'a=end-of-candidates\r\n' +
'a=ice-options:renomination\r\n' +
'a=rtcp-mux\r\n' +
'a=rtcp-rsize\r\n' +
'm=video 0 UDP/TLS/RTP/SAVPF 100 101\r\n' +
'c=IN IP4 127.0.0.1\r\n' +
'a=rtpmap:100 VP8/90000\r\n' +
'a=rtpmap:101 rtx/90000\r\n' +
'a=fmtp:100 x-google-start-bitrate=1000\r\n' +
'a=fmtp:101 apt=100\r\n' +
'a=rtcp-fb:100 transport-cc \r\n' +
'a=rtcp-fb:100 ccm fir\r\n' +
'a=rtcp-fb:100 nack \r\n' +
'a=rtcp-fb:100 nack pli\r\n' +
'a=setup:passive\r\n' +
'a=mid:1\r\n' +
'a=inactive\r\n' +
'a=ice-ufrag:ih1hkqxgajlnl4t6nma2p721r024a9mf\r\n' +
'a=ice-pwd:0vf7is7i4xv5v6fgdcsw3x07pu0qsnw9\r\n' +
'a=candidate:udpcandidate 1 udp 1076558079 167.71.106.54 36841 typ host\r\n' +
'a=candidate:tcpcandidate 1 tcp 1076302079 167.71.106.54 39728 typ host tcptype passive\r\n' +
'a=end-of-candidates\r\n' +
'a=ice-options:renomination\r\n' +
'a=rtcp-mux\r\n' +
'a=rtcp-rsize\r\n' +
'", "type": "answer"}'] +4ms
LOG rn-webrtc:pc:DEBUG 1 setRemoteDescription +1ms
LOG rn-webrtc:pc:DEBUG 1 setRemoteDescription OK +1ms

I believe the issue is in ReactNativeUnifiedPlan.send(), transceiver.mid is not set after setLocalDescription(offer), it is only set after calling setRemoteDescription(answer).

@quanli168 quanli168 added the bug label Jun 8, 2023
@quanli168 quanli168 changed the title React Native producer localId is undefined React Native producer localId is null Jun 8, 2023
ibc added a commit that referenced this issue Jun 23, 2023
…tc 111 on iOS (unset transceiver.mid)

- Fixes issue #263
- Replaces PR #264
- Issue in react-native-webrtc: react-native-webrtc/react-native-webrtc#1404

### Details

- `ReactNativeWithUnifiedPlan`: Read `transceiver.mid` after calling `pc.setRemoteDescription()` since it's set then (and not before, bug in react-native-webrtc).
- Problem of this approach is that we are generating the remote SDP without MID (since we don't know it yet). Not sure about the implications. I'm pretty sure that the new media section in the SDP **does** contain proper `a=mid` (it's just that `transceiver.mid` returns `null`), and in this PR we are calling `setRemoteDescription()` with a remote media section that doesn't contain `a=mid`.
@ibc ibc closed this as completed in #271 Jun 23, 2023
ibc added a commit that referenced this issue Jun 23, 2023
…tc 111 on iOS (unset transceiver.mid) (#271)

- Fixes issue #263
- Replaces PR #264
- Issue in react-native-webrtc: react-native-webrtc/react-native-webrtc#1404

### Details

- `ReactNativeWithUnifiedPlan`: Read `transceiver.mid` after calling `pc.setRemoteDescription()` since it's set then (and not before, bug in react-native-webrtc).
- Problem of this approach is that we are generating the remote SDP without MID (since we don't know it yet). Not sure about the implications. I'm pretty sure that the new media section in the SDP **does** contain proper `a=mid` (it's just that `transceiver.mid` returns `null`), and in this PR we are calling `setRemoteDescription()` with a remote media section that doesn't contain `a=mid`.
@ibc
Copy link
Member

ibc commented Jun 23, 2023

Fix released in mediasoup-client 3.6.88

@ibc
Copy link
Member

ibc commented Jun 23, 2023

But better use mediasoup-client 3.6.89 which contains this improvement react-native-webrtc/react-native-webrtc#1404.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment