-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
MediaConnection close event #87
Comments
Unfortunately AFAIK there is no way to detect the connection close on Firefox yet. As you mentioned, oniceconnectionstatechange does not yet work on FF. Neither does the deprecated functions that I tested. I also tested the onended event on media stream, it also does not fire on FF. Here is the relevant bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=852665 The only other solution would be for PeerJS to send a "leave" message of some sort through PeerServer but that would not work reliably with the user closing the tab etc. |
And we don't want to use disconnecting from PeerServer as an indication of leaving because established connections should continue to work even if disconnect from PeerServer |
Can't fix for now. |
I got the similar issue while trying to listen on the close event. By calling the "PeerJS: iceConnectionState is disconnected..." message. But the
I'm not sure if is that a good idea to add this to the |
I think this issue is still present in firefox, Is anyone fixing this? |
Any updates? |
Looks like firefox should support the underlying event now: https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/iceConnectionState#Browser_compatibility |
This seems to still be an issue, and it's very annoying to deal with. Instead of closing the media connection, I am now having to resort to sending a websocket message that the peer is closing the audio connection. |
Still there I guess, same issue here |
Once I close the Media connection on a peer, the remote peer doesn't receive the "close" event. as the docs says for this event:
"Emitted when either you or the remote peer closes the media connection."
Although once I call the MediaConnection.close() on a peer, the remote peer (Only on Chrome) gets the event "oniceconnectionstatechange" after a few secs and then peer.js' callback calls the connection.close() explicitly, but for remote peers on Firefox nothing happens.
The text was updated successfully, but these errors were encountered: