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

Close peer connections (modulo firing ended) on page unload. #2552

Merged
merged 1 commit into from Jul 9, 2020

Conversation

jan-ivar
Copy link
Member

@jan-ivar jan-ivar commented Jul 1, 2020

Fixes #2516.

cc @annevk in case I'm using the wrong hook here.

@jan-ivar jan-ivar self-assigned this Jul 1, 2020
@annevk
Copy link
Member

annevk commented Jul 2, 2020

That looks reasonable, though I suspect we might want to eventually turn this into a thing where HTML calls an algorithm in WebRTC to ensure consistent ordering.

@jan-ivar
Copy link
Member Author

jan-ivar commented Jul 2, 2020

@annevk there was some question about how this works with bfcache. Are pages even unloaded then? Safari apparently queuest a task to fire an ended event in these steps, and were hoping to see that task run on revival, e.g. if the user hits the back button.

@annevk
Copy link
Member

annevk commented Jul 2, 2020

They are, yes. As part of https://html.spec.whatwg.org/#unload-a-document. I'm not entirely convinced all of this is defined correctly though and interoperable across browsers.

@alvestrand alvestrand merged commit 24dafe0 into w3c:master Jul 9, 2020
@jan-ivar jan-ivar deleted the unload branch July 9, 2020 14:10
@jan-ivar
Copy link
Member Author

jan-ivar commented Jul 9, 2020

@youennf please file a follow-up if needed to fire the event on bfcache revival if you think it is not covered by this. We couldn't figure it out definitively one way or the other.

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

Successfully merging this pull request may close these issues.

Does a PC depend on the page context?
3 participants