Compare commits

...

2 commits

Author SHA1 Message Date
hippoz
72c0b3f62e
package things idk 2021-05-17 02:26:55 +03:00
hippoz
c6ec036e9e
add voice to documentation 2021-05-17 02:26:34 +03:00
3 changed files with 930 additions and 6 deletions

File diff suppressed because it is too large Load diff

View file

@ -22,6 +22,7 @@
"semver": "^5.7.1", "semver": "^5.7.1",
"socket.io": "^3.0.1", "socket.io": "^3.0.1",
"uuid": "^8.3.1", "uuid": "^8.3.1",
"werift": "^0.9.13",
"ws": "^7.4.3" "ws": "^7.4.3"
}, },
"devDependencies": { "devDependencies": {

View file

@ -138,7 +138,7 @@ Example:
7@{_id:"totallyrealuserid",username:"totallyrealusername",status:1,status_text:"hello"} 7@{_id:"totallyrealuserid",username:"totallyrealusername",status:1,status_text:"hello"}
``` ```
## 21:ACTION\_VOICE\_BEGIN\_SESSION ## 21:ACTION_VOICE_REQUEST_SESSION
*Auth required, Client to server* *Auth required, Client to server*
@ -150,21 +150,43 @@ JSON data format:
| - | - | | - | - |
| channel | An object that contains "_id", the id of the channel to connect to | | channel | An object that contains "_id", the id of the channel to connect to |
(unfinished)
## 22:ACTION\_VOICE\_BEGIN\_SESSION ## 22:EVENT_VOICE_ASSIGN_SERVER
*Auth required, Client to server* *Auth required, Server to client*
Sent by the server when the voice session request has been accepted. If it is rejected, the client MUST be disconnected from the gateway as soon as possible. Sent by the server when a voice server has been assigned to a channel session.
JSON data format: JSON data format:
| Field | Description | | Field | Description |
| - | - | | - | - |
| reportTo | The IP and port of the voice server to connect to | | reportTo | The IP and port of the voice server to connect to |
| channel | An object that contains "_id", the id of the channel |
# Voice server gateway
Voice server signaling is done through a websocket gateway. This gateway is specified by the `reportTo` property in EVENT_VOICE_ASSIGN_SERVER.
## 50:ACTION_VOICE_CONNECTION_REQUEST
*Client to server*
| Field | Description |
| - | - |
| token | The authentication token |
| channel | An object that contains "_id", the id of the channel to connect to |
| offer | An SDP payload; the webrtc offer from the client |
## 51:EVENT_VOICE_CONNECTION_ANSWER
*Auth required, Server to client*
| Field | Description |
| - | - |
| session_id | A UUIDv4 |
| answer | An SDP payload; the webrtc answer from the server |
(unfinished)
# Objects and data types # Objects and data types