networked-aframe / janus-plugin-sfu

Janus plugin to act as a kind of SFU for game networking data.
Mozilla Public License 2.0
2 stars 5 forks source link

Reenable subscribe message with security #6

Open vincentfretin opened 2 years ago

vincentfretin commented 2 years ago

Reenable subscribe message that was commented in #2 and add proper JWT check. This closes https://github.com/mozilla/janus-plugin-sfu/issues/83 and https://github.com/mozilla/janus-plugin-sfu/pull/86

This is to support use case like 1-5 publishers and 100 listeners for some sort of webinar, see discussion in https://github.com/mozilla/janus-plugin-sfu/issues/76

This Subscribe message is currently only useful if:

Having written the above, rewritten the api documentation, reading again my comments on https://github.com/mozilla/janus-plugin-sfu/issues/76 and knowing that

It would be more useful if we do the following changes instead:

Changes in naf adapter master branch that maintain a separate availableOccupants and occupants lists and syncOccupants api:

This way, you can use the plugin without any additional backend, you can also choose to keep reliableTransport/unreliableTransport to datachannel or websocket, and keep networked updates and chat on it. Note: the server still maintain a WebRTC connection for the participant, even if the participant don't use datachannel, audio or video. We can probably remove creation of the datachannels if reliableTransport and unreliableTransport are not set to "datachannel" (this is the default, so meaning you set it to "websocket"), but we still keep a main WebRTC connection with an inactive audio track and an inactive video track.