prevent session restored #6827
Replies: 1 comment 1 reply
-
Hi @Lveronneau, When you reload your page, the WebRTCAdaptor attempts to restore the session, which is why you're seeing a "session restored" message on the server. This mechanism is designed to help with reconnections, ensuring seamless user experiences in cases like accidental disconnections or temporary network issues. If your use case requires stopping the session entirely when the page reloads, you can modify the behavior by adding a beforeunload event listener to your code. This will allow you to stop publishing or playing the stream just before the page is reloaded. Here's an example:
This approach ensures the session is stopped cleanly before the page reloads. Let us know if you need further clarification or assistance! Best regards, |
Beta Was this translation helpful? Give feedback.
-
HI everyone,
when i reload my page it restarts the webrtcadaptor and the server see a session restored.
How can i avoid getting a session restored when relaoding my page ?
thanks
Louis
Beta Was this translation helpful? Give feedback.
All reactions