meething / meething-mediasoup

Meething Mediasoup Server
https://web.meething.space
11 stars 5 forks source link

How to create a close that closes navigator.mediaDevices and all the peers #2

Open Madriix opened 4 years ago

Madriix commented 4 years ago

Hi I imported the direct url by putting this all at the bottom of a page remotely, and I'm trying to adapt. Everything works well, the camera is displayed both locally and remotely, but when I close the camera (without reloading the page) and relaunch the camera, there are duplicate peers and they all come back. To fix this problem, I thought I might have to create a "close () {}" or "part () {}" in Room.js but I don't know what to update inside. Can you tell me how to create a closure of navigator.mediaDevices.getUserMedia that closes all peers?

salutations

Madriix commented 4 years ago

it is resolved.

I also deleted close(){} which was useless. I opened a ticket here for my other problem: https://mediasoup.discourse.group/t/on-trackended-does-not-work-when-closing-the-webcam/1428