Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zslucky/standalone-rtc-server
A standalone rtc singaling srever running on nodejs with socket.io
https://github.com/zslucky/standalone-rtc-server
Last synced: about 6 hours ago
JSON representation
A standalone rtc singaling srever running on nodejs with socket.io
- Host: GitHub
- URL: https://github.com/zslucky/standalone-rtc-server
- Owner: zslucky
- Created: 2016-12-18T11:49:14.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-01T12:35:15.000Z (about 8 years ago)
- Last Synced: 2024-11-10T04:38:05.955Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 22.5 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# standalone-rtc-server
A standalone rtc singaling srever running on nodejs with socket.io
## Listened Events
### `create or join`
Message required:
```javascript
{
room: 'roomId', // The room id user applied.
}
```3 events may emit from server:
#### `created`: when there is no client in room, user will create a new room.
the return data is unique `id`.
#### `joined`: when there are some clients in room, and not full, user will join the room.
the return data is:
```javascript
{
clientId: '', // the unique id
roomClients: [] // the online clients's id
}
```#### `full`: when the room is full, user's apply to join this room will abort.
Nothing returned then full.
### `communication`
This event used for rtc communication.
`message` refer to:
```javascript
{
type: 'type', // this include: offer, answer, candidate
sendTo: 'someId', // required, send message to others.
sender: 'myId', // the sender's id, 2-ways communication need this.
desc: {}, // desc, createOffer or createAnswer need it.
label: event.candidate.sdpMLineIndex, // the candidate label
id: event.candidate.sdpMid, // the candidate id
candidate: event.candidate.candidate // the candidate object.
}
```