meething / meething-mediasoup

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

As soon as the content of the page (Javascript, websocket ..) is deactivated (tab not closed), the events return on return (not good) #10

Open Madriix opened 3 years ago

Madriix commented 3 years ago

To reproduce the bug, you must have for example Firefox and this module: https://addons.mozilla.org/fr/firefox/addon/work-offline-page-only/ in order to simulate the auto-disconnection that there is a on Android and iOS compared to battery or battery economy to reproduce the same thing but on a computer with Firefox.

Here's how to reproduce the bug:

1) Install https://github.com/meething/meething-mediasoup.git as usual and replace const wsTransport = new WebSocketTransport ('wss: //'+window.location.hostname+': 2345 '); by const wsTransport = new WebSocketTransport('wss://soupes.xxx.com:443/?roomId=test&peerId='+(new Date).getTime()+'g&t='+(new Date).getTime()); or done as you want. 2) Start meething-mediasoup 3) Open 2 browsers like Firefox and Chrome 4) You must only use Chrome to send your webcam. 5) With Firefox, accept the webcam of the Chrome user, you will see this: "Do you consume video from 16222 ..." and accepted. 6) Now put the Firefox tab in inactive with the work-offline-page-only module, then a few seconds after restarting it, you will automatically receive "Do you consume video from 16222090749 .." and it's not well, normally nothing should happen, it has to be emptied or something, how to not make this appear on reconnection? On an Android / iOS this technique in production is very dirty, that's why you would have to remove the consume or the id.

it would take a kind of leave()