Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ethand91/mediasoup3-wsdemo
Mediasoup 3 Simple WS Demo
https://github.com/ethand91/mediasoup3-wsdemo
mediasoup sample webrtc
Last synced: 1 day ago
JSON representation
Mediasoup 3 Simple WS Demo
- Host: GitHub
- URL: https://github.com/ethand91/mediasoup3-wsdemo
- Owner: ethand91
- Created: 2019-05-29T04:38:12.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T05:53:53.000Z (about 2 years ago)
- Last Synced: 2024-05-01T17:14:23.741Z (9 months ago)
- Topics: mediasoup, sample, webrtc
- Language: JavaScript
- Homepage:
- Size: 2.26 MB
- Stars: 15
- Watchers: 0
- Forks: 4
- Open Issues: 26
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mediasoup3 WS Demo
---
**Simple Mediasoupv3 demo using HTML5 Websocket as ws module**
## How to use
```bash
# Download the repo
git clone https://github.com/ethand91/mediasoup3-wsdemo.git# Install server modules
npm i# Install public side modules
cd public
npm i# Build the HTML source
npm run build# Start the server
npm start
```Access: https://localhost:3000?options...
## Server ENV Options
Options to customize the server
| Argument | Type | Explanation | Example |
| -------- | :--: | :---------: | :-----: |
| REST_PORT | number | Port for the Koa REST server to listen on | PORT=3000 |
| LISTEN_IP | string | Ip for the socket server to listen on | LISTEN_IP=0.0.0.0 |
| LISTEN_PORT | number | Port for the socket server to listen on | LISTEN_PORT=3001 |
| CERT_FILE | string | Path to the certificate file | CERT_FILE=./ssl/server.crt |
| KEY_FILE | string | Path to the key file | KEY_FILE=./ssl/server.key |## HTML URL Options
Options can be added to the end of the url to customize the session
| Argument | Type | Explanation | Example |
| -------- | :--: | :---------: | :-----: |
| roomId | string(required) | Unique room id, will be created if it doesn't already exist | ?roomId=room |
| peerId | string(required) | Unique user id | ?peerId=peer |
| produce | number | 1 = produce a stream to mediasoup, anything other than 1 will not produce a stream | ?produce=1 |
| consume | number | 1 = consume streams from mediasoup, anything other than 1 will not consume any streams | ?consume=1 |
| videoCodec | string | video codec to use then producing video (default is vp8) | ?videoCodec=h264 |**Example: https://localhost:3000?roomId=room&peerId=peer&produce=1&consume=1&videoCodec=h264**