Skip to content

fix: unload the previous player when Play is clicked again - #128

Open
TzuHuanTai wants to merge 1 commit into
Eyevinn:mainfrom
TzuHuanTai:fix/demo-unload-previous-player
Open

TzuHuanTai wants to merge 1 commit into
Eyevinn:mainfrom
TzuHuanTai:fix/demo-unload-previous-player

Conversation

@TzuHuanTai

Copy link
Copy Markdown

The demo code didn't release the player if it was connected. The old one was never closed. There was no way to terminate it without refreshing the page.

Steps to reproduce:

  1. Open the demo with the WHEP adapter and play a stream.
  2. Without pressing Stop, press Play again.
  3. The new stream plays fine, but no DELETE request is sent for the first session, and the server still counts it as connected.

Changes:

  • unload() and destroy() the previous player before creating a new one.

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.

1 participant