From 2cac71d01b23c2566b797160fd70f254c58550f3 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 8 Sep 2022 14:51:54 +0200 Subject: server rewrite works --- readme.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'readme.md') diff --git a/readme.md b/readme.md index fd6ce47..28729cf 100644 --- a/readme.md +++ b/readme.md @@ -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: } } } +---- # Whenever you change your streams change: +---- # Send an offer to everybody +C->S { relay: { recipient: 3, offer: } } +---- # Alice answers +S->C { message: { sender: 3, message: { offer: } } } +---- # In case the server uses a reverse-proxy that disconnects inactive connections: Ping every 30s +C->S { ping: null } +``` + ## Licence See `LICENCE` file. -- cgit v1.2.3-70-g09d2