Novage / p2p-media-loader

An open-source engine for P2P streaming of live and on demand video directly in a web browser HTML page
https://novage.com.ua/p2p-media-loader/demo.html
Apache License 2.0
1.43k stars 314 forks source link

How to properly stop or destroy a p2p-media-loader instance? #213

Closed renatofrota closed 8 months ago

renatofrota commented 3 years ago

I have a website where p2p-media-loader is being used - the code is based on Novage's demo page. I want to preserve visitor's browser processing time by destroying the player's / p2p elements as they navigate to other website pages (without players).

The pages are loaded via Ajax and a main div container is updated with the new page content (which may - or not - include a video). What I did so far:

However, after loading a new page where no video is displayed, I can still see logs like Firefox can’t establish a connection to the server at wss://tracker.novage.com.ua/ - what indicates there's still "something" running in background (from the previous page load).

Any advice on how to properly stop or destroy the p2p-media-loader instance before loading a new page via Ajax?

xXxSPYxXx commented 3 years ago

I confirm this bug on jwplayer.