Giter VIP home page Giter VIP logo

meething-mediasoup's Introduction

mozilla-builders

Meething : dWebRTC

Meething is a semi-decentralized conference bridge using modern WebRTC, GunDB and MediaSoup to produce a hybrid MESH-SFU with strong privacy, zero user data retention and powerful off-grid capabilities.

Status

Ready to try Meething? Join Now!


Remix on Glitch

Installation

Docker

Try Meething using docker containers

Manual

  • Install pm2
sudo npm install pm2 -g
  • Clone the repository and install using npm
npm install

Configuration

  • Copy the example meething.config.example.js to meething.config.js
  • Customize meething.config.js to set the desired port and other environment variables
  • Configure your SSL certificate & key in certs/ by either copying certs/fullchain.pem.example to certs/fullchain.pem and certs/privkey.pem.example to certs/privkey.pem or using your own certificate & key
  • Run using pm2
pm2 start meething.config.js

Usage

  • Browse to the configured HTTPS port (default 3443)
  • Accept the self-signed certificates (if needed)
  • Choose a Room and User name
  • Share link with other participants

The Meething application will connect to community Gun nodes for user discovery. All room data/audio/video is p2p.

SuperPeers

SuperPeers can provide the network with services such as STUN/TURN/RELAY and in the future SFU/MCU features. For more details, check out the Project Wiki.


Credits & Thanks

meething-mediasoup's People

Contributors

dependabot[bot] avatar lmangani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

meething-mediasoup's Issues

Meeting-mediasoup server crashes after a while

Hi

So here I explain:
I migrated to a new dedicated server from Debian 9 to Debian 11, it's all almost blank, I put Nodejs v16.13.1 and npm 8.2.0 and I put Meeting-mediasoup like on my old server.

When I start my webcam and I look at myself in another place, I found that it works well but the camera of the transmitter stops the stream at some point, and it restarts randomly a few seconds later. It seems that this bug occurs as soon as a log poster appears indicating "protoo server ... close" here the screen I am looking at on my recipient stops.
This is the first problem!

The second problem is that after a while, maybe 4 or 6 hours, the server will end up crashing on its own, it should be restarted. The server reports the following error (last error recovered) :

/home/debian/node/mediasoup/meething-mediasoup/node_modules/mediasoup/lib/Channel.js:199
                        sent.reject(new Error(msg.reason));
                                    ^

Error: Consumer not found
    at Channel._processMessage (/home/debian/node/mediasoup/meething-mediasoup/node_modules/mediasoup/lib/Channel.js:199:37)
    at Socket.<anonymous> (/home/debian/node/mediasoup/meething-mediasoup/node_modules/mediasoup/lib/Channel.js:61:34)
    at Socket.emit (node:events:390:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:199:23)

here is the stopping that starts during the webcam session and then restarts then stops and restarts again.. :

protoo Peer "close" event [peerId:Lyredev]
protoo connection request [peerId:51.2xx.xx.1xx, address:/?roomId=d8yn94xv25qh1qfc4lc&peerId=Lyredev&t=1642594542713, room:%s]
existing room stat d8yn94xv25qh1qfc4lc Lyredev {
  peer: 2,
  transport: 2,
  transports: [ { producer: 1 }, { consumer: 0 } ]
}
request:getRouterRtpCapabilities
request:createWebRtcTransport
request:createWebRtcTransport
request:join
request:connectWebRtcTransport

I tried to update several "npm i <name>@<version>" but it's the same, there's still the error.
I also tried to update mediasoup server to the latest version, and there the Meeting-mediasoup server absolutely does not want to start, there are errors.

The problem does not seem to come from ipv6 or not only because of that

Is it possible to give you a tip (less than 120€) to make it functional on a Debian 11 with nodejs latest version and possibly the latest version of mediasoup?

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

Hi
I imported the direct url <script src="https://meeting.site.com/main.1f19ae8e.js"></script> 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

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

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()

request timeout

I installed meething-mediasoup by recovering the meething-mediasoup that was on my old server, I installed everything on the server and client side with "npm i" and the side seems to crash on average every 6h to 12h with this mistake:

_createConsumer() | failed:Error: TypeError: Cannot read properties of null (reading 'consume')
    at Peer._handleResponse (/home/debian/node/mediasoup/meething-mediasoup/node_modules/protoo-server/lib/Peer.js:282:18)
    at WebSocketTransport.<anonymous> (/home/debian/node/mediasoup/meething-mediasoup/node_modules/protoo-server/lib/Peer.js:214:10)
    at WebSocketTransport.emit (node:events:390:28)
    at WebSocketTransport.safeEmit (/home/debian/node/mediasoup/meething-mediasoup/node_modules/protoo-server/lib/EnhancedEventEmitter.js:18:9)
    at WebSocketConnection.<anonymous> (/home/debian/node/mediasoup/meething-mediasoup/node_modules/protoo-server/lib/transports/WebSocketTransport.js:129:9)
    at WebSocketConnection.emit (node:events:390:28)
    at WebSocketConnection.processFrame (/home/debian/node/mediasoup/meething-mediasoup/node_modules/websocket/lib/WebSocketConnection.js:554:26)
    at /home/debian/node/mediasoup/meething-mediasoup/node_modules/websocket/lib/WebSocketConnection.js:323:40
    at processTicksAndRejections (node:internal/process/task_queues:78:11) {
  [stack]: "Error: TypeError: Cannot read properties of null (reading 'consume')\n" +
    '    at Peer._handleResponse (/home/debian/node/mediasoup/meething-mediasoup/node_modules/protoo-server/lib/Peer.js:282:18)\n' +
    '    at WebSocketTransport.<anonymous> (/home/debian/node/mediasoup/meething-mediasoup/node_modules/protoo-server/lib/Peer.js:214:10)\n' +
    '    at WebSocketTransport.emit (node:events:390:28)\n' +
    '    at WebSocketTransport.safeEmit (/home/debian/node/mediasoup/meething-mediasoup/node_modules/protoo-server/lib/EnhancedEventEmitter.js:18:9)\n' +
    '    at WebSocketConnection.<anonymous> (/home/debian/node/mediasoup/meething-mediasoup/node_modules/protoo-server/lib/transports/WebSocketTransport.js:129:9)\n' +
    '    at WebSocketConnection.emit (node:events:390:28)\n' +
    '    at WebSocketConnection.processFrame (/home/debian/node/mediasoup/meething-mediasoup/node_modules/websocket/lib/WebSocketConnection.js:554:26)\n' +
    '    at /home/debian/node/mediasoup/meething-mediasoup/node_modules/websocket/lib/WebSocketConnection.js:323:40\n' +
    '    at processTicksAndRejections (node:internal/process/task_queues:78:11)',
  [message]: "TypeError: Cannot read properties of null (reading 'consume')",
  code: 500
}
_createConsumer() | failed:Error: request timeout
    at Timeout._onTimeout (/home/debian/node/mediasoup/meething-mediasoup/node_modules/protoo-server/lib/Peer.js:156:14)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7) {
  [stack]: 'Error: request timeout\n' +
    '    at Timeout._onTimeout (/home/debian/node/mediasoup/meething-mediasoup/node_modules/protoo-server/lib/Peer.js:156:14)\n' +
    '    at listOnTimeout (node:internal/timers:557:17)\n' +
    '    at processTimers (node:internal/timers:500:7)',
  [message]: 'request timeout'
}
request failed:Error: producer with id "e509edbb-5687-4003-94fe-b71eb325edaf" not found
    at ConfRoom._handleProtooRequest (/home/debian/node/mediasoup/meething-mediasoup/lib/Room.js:222:17)
    at Peer.<anonymous> (/home/debian/node/mediasoup/meething-mediasoup/lib/Room.js:58:12)
    at Peer.emit (node:events:390:28)
    at Peer._handleRequest (/home/debian/node/mediasoup/meething-mediasoup/node_modules/protoo-server/lib/Peer.js:224:9)
    at WebSocketTransport.<anonymous> (/home/debian/node/mediasoup/meething-mediasoup/node_modules/protoo-server/lib/Peer.js:212:10)
    at WebSocketTransport.emit (node:events:390:28)
    at WebSocketTransport.safeEmit (/home/debian/node/mediasoup/meething-mediasoup/node_modules/protoo-server/lib/EnhancedEventEmitter.js:18:9)
    at WebSocketConnection.<anonymous> (/home/debian/node/mediasoup/meething-mediasoup/node_modules/protoo-server/lib/transports/WebSocketTransport.js:129:9)
    at WebSocketConnection.emit (node:events:390:28)
    at WebSocketConnection.processFrame (/home/debian/node/mediasoup/meething-mediasoup/node_modules/websocket/lib/WebSocketConnection.js:554:26) {
  [stack]: 'Error: producer with id "e509edbb-5687-4003-94fe-b71eb325edaf" not found\n' +
    '    at ConfRoom._handleProtooRequest (/home/debian/node/mediasoup/meething-mediasoup/lib/Room.js:222:17)\n' +
    '    at Peer.<anonymous> (/home/debian/node/mediasoup/meething-mediasoup/lib/Room.js:58:12)\n' +
    '    at Peer.emit (node:events:390:28)\n' +
    '    at Peer._handleRequest (/home/debian/node/mediasoup/meething-mediasoup/node_modules/protoo-server/lib/Peer.js:224:9)\n' +
    '    at WebSocketTransport.<anonymous> (/home/debian/node/mediasoup/meething-mediasoup/node_modules/protoo-server/lib/Peer.js:212:10)\n' +
    '    at WebSocketTransport.emit (node:events:390:28)\n' +
    '    at WebSocketTransport.safeEmit (/home/debian/node/mediasoup/meething-mediasoup/node_modules/protoo-server/lib/EnhancedEventEmitter.js:18:9)\n' +
    '    at WebSocketConnection.<anonymous> (/home/debian/node/mediasoup/meething-mediasoup/node_modules/protoo-server/lib/transports/WebSocketTransport.js:129:9)\n' +
    '    at WebSocketConnection.emit (node:events:390:28)\n' +
    '    at WebSocketConnection.processFrame (/home/debian/node/mediasoup/meething-mediasoup/node_modules/websocket/lib/WebSocketConnection.js:554:26)',
  [message]: 'producer with id "e509edbb-5687-4003-94fe-b71eb325edaf" not found'
}
/home/debian/node/mediasoup/meething-mediasoup/node_modules/protoo-server/lib/Peer.js:156
					pReject(new Error('request timeout'));
					        ^

Error: request timeout
    at Timeout._onTimeout (/home/debian/node/mediasoup/meething-mediasoup/node_modules/protoo-server/lib/Peer.js:156:14)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7)


it could come from where the problem?

OS: Debian 11 (my old OS: Debian 9)
my package.json:

{
  "name": "meething-mediasoup",
  "version": "1.0.2",
  "description": "",
  "scripts": {
    "start": "nodemon ./main.js ./lib"
  },
  "dependencies": {
    "mediasoup": "^3.7.9",
    "protoo-server": "^4.0.3",
    "quick-lru": "^5.1.0",
    "stun": "^2.1.0"
  },
  "devDependencies": {
    "nodemon": "^1.19.1"
  }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.