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
ReactNative: transceiver.mid is not available until setRemoteDescription is called #264
Conversation
I think sendingRtpParameters should also be updated. |
and what exactly needs to be updated do not tell me? |
|
you correctly noted. But will it work or should the following actions be rewritten too? it might say @ibc |
Related issue reported in react-native-webrtc project: react-native-webrtc/react-native-webrtc#1404 |
Here something I personally hate:
BTW I've reported the issue in react-native-webrtc project: react-native-webrtc/react-native-webrtc#1404 |
…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`.
Feedback given in this PR makes sense plus this PR fails at lint task. I'm doing another one here: #271 |
…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`.
This PR attempts to fix #263.
The issue is
transciever.mid
is not available after callingpc.setLocalDescription
. Since mediasoup-client usesmid
as the key to_mapMidTransceiver
map, without a valid mid, future call toproducer.close()
finds wrong transceiver to turn off.After enabling react-native-webrtc logs,I noticed that
transeiver.mid
is properly updated inpc.setRemoteDescription
, therefore I added code to update themid
after the call.