diff options
Diffstat (limited to 'readme.md')
-rw-r--r-- | readme.md | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -34,6 +34,26 @@ Booleans can be either `1`, `true`, `yes` or their opposites. | `screen_enabled` | boolean | false | Adds screen track on startup (wont work) | | `mic_gain` | number | 1 | Sets the microphone volume | +## Protocol + +The protocol packets are defined in [packets.d.ts](./common/packets.d.ts). Here is an (simplified) example of how the protocol is used. + +``` +S->C { init: { your_id: 5, version: "..." } } +---- # Your join packet will be the first one. +S->C { client_join: { id: 5, name: "bob" } } +S->C { client_join: { id: 3, name: "alice" } } +---- # Now publish your ICE candidates +C->S { relay: { message: { ice_candiate: <RTCIceCandidateInit> } } } +---- # Whenever you change your streams change: +---- # Send an offer to everybody +C->S { relay: { recipient: 3, offer: <RTCSessionDescriptionInit> } } +---- # Alice answers +S->C { message: { sender: 3, message: { offer: <RTCSessionDescriptionInit> } } } +---- # In case the server uses a reverse-proxy that disconnects inactive connections: Ping every 30s +C->S { ping: null } +``` + ## Licence See `LICENCE` file. |