deepch / RTSPtoWeb

RTSP Stream to WebBrowser
MIT License
1.32k stars 312 forks source link

How to close webrtc connection #254

Closed AlessandroMartinelli closed 1 year ago

AlessandroMartinelli commented 1 year ago

Hi, I'm using this javascript to display webrtc streams in my browser. At a certain points, e.g. if I want to switch from high quality stream to low quality stream, I need to close che currently open stream, and open a connection to the new one. How can I do this? I'd like to avoid having unnecessary connections open

Thanks

AlessandroMartinelli commented 1 year ago

Closing since solved. Just need to remove the "onclose" part of the mentioned script and to invoke connection.close() method