Says on the iceConnectionState that is connected but does not run the onaddstream function
See original GitHub issueHey,
onaddstream not being fired.
I have a code like that that runs the ice connection state change and says that the this.pc.iceConnectionState
is completed but the function this.pc.onaddstream
never runs
I’ve tried refactoring the code and spliting in two components but i got the same behaviour
this.pc.oniceconnectionstatechange = () => {
console.log('ICE STATE', this.pc.iceConnectionState);
if (
this.pc.iceConnectionState === 'failed' ||
this.pc.iceConnectionState === 'disconnected' ||
this.pc.iceConnectionState === 'closed'
) {
console.log('Failed');
} else if (this.pc.iceConnectionState === 'checking') {
console.log('Checking');
} else {
this.setState({
success: true,
});
console.log('Success');
}
};
this.pc.onaddstream = e => {
console.log('Stream event', e);
}
The expected result is to log the stream event when the event is completed.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Says on the iceConnectionState that is connected but does ...
When the migration is complete, you will access your Teams at stackoverflowteams.com, and they will no longer appear in the left sidebar on ......
Read more >RTCPeerConnection.iceConnectionState - Web APIs | MDN
iceConnectionState returns a string which state of the ICE agent associated with the RTCPeerConnection: new, checking, connected, completed, ...
Read more >How to pass audio stream recorded with WebRTC to Google ...
It supports many locales and brings globalization in WebRTC! ... Says on the iceConnectionState that is connected but does not run the onaddstream...
Read more >Re: [JsSIP] Ice restart on network change - Google Groups
This is clearly saying that no new candidates are found. Should they? ... 200 OK received and iceConnectionState changed to checking and then...
Read more >18. WebRTC - High Performance Browser Networking [Book]
Real-Time Communication in Web-browsers (RTCWEB) is the IETF Working Group ... However, raw audio and video streams are also not sufficient on their...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Should anyone hit this problem, I went through it before. Please make sure: did you addStream BEFORE you setRemoteDescription? If you didn’t, onaddstream will never be triggered. OnAddStreamEvent is triggered after setRemoteDescription and it will check if the sdp in the remoteDescription contains a stream.
@saghul i am not much idea about what i am doing wrong but in my cash i am getting always iceConnectionState first checking and then after some time its return failed. can you please guide me to solve the issues