Skip to content

iceGatheringStateChange is never triggered. #400

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

Open
0wwafa opened this issue Sep 10, 2024 · 1 comment
Open

iceGatheringStateChange is never triggered. #400

0wwafa opened this issue Sep 10, 2024 · 1 comment

Comments

@0wwafa
Copy link

0wwafa commented Sep 10, 2024

pc1.addEventListener('iceGatheringStateChange', () => {
    if (pc1.iceGatheringState === 'complete') {
        console.log('ICE gathering complete for pc1');
        console.log('SDP:', pc1.localDescription.sdp);
    }
});

pc1.onicegatheringstatechange = () => {
	console.log('changed',pc1.localDescription.sdp);
    if (pc1.iceGatheringState === 'complete') {
        console.log('ICE gathering complete for pc1');
        console.log('SDP:', pc1.localDescription.sdp);
    }
};

both these functions are never triggered.
Also, at the end of the ice gathering (and during) sdp should contain all the ice candidates gathered.

This works in a browser.
Does not work with werift.

The purpose:
I want to instantiate a datachannel.
At the end of the ice gathering I want to create the offer with all the candidates inside the sdp.
From a web browser I can do that.
So after that I send the full offer, I get the full answer and the connection starts.

So in the end is only:

pc1 (create full offer) >> send offer to pc2.
pc2 (create full answer) >> send answer to pc1
pc1: connect.

@shinyoshiaki
Copy link
Owner

I'm not sure of the situation where the iceGatheringStateChange event is not firing in werift, please write a reproduction code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants