-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't subscribe to audio/video if occupant is a listener #70
base: 3.0.x
Are you sure you want to change the base?
Conversation
…hey are only listener and doesn't talk
If a listener leaves, you get the following errors
that would be spamming sentry. So probably make a change in networked-audio-source to not call |
Looking at the code again, I may have had some misunderstanding. I asked chatgpt: With janus-gateway can we create a plugin that use a janus_plugin_session without a webrtc connection, just using websocket? Yes, with Janus Gateway you can indeed create a plugin that uses a Here’s how you can approach this:
This architecture leverages the flexibility of Janus and allows you to use its plugin and session management capabilities in applications where real-time media is not necessary. This could be useful in various scenarios, such as command and control platforms, gaming backends, or other interactive services where media streams aren’t required. |
Instead of the "-l" suffix hack, we could add a default option to not subscribe to media by default with See my comment about |
I actually made an option |
@vincentfretin we do not need the replace for loop
|
I replace it for the createPublisher, but it shouldn't be needed for createSubscriber because we don't call it if the clientId ends with "-l". |
oh sorry I misread, we don't need it, ok, I'll remove it. |
Don't subscribe to audio/video if occupantId ends with '-l' meaning they are only listener and doesn't talk.
The avatar position and chat are still working because datachannel is send/receive on the publisher RTCPeerConnection connection.
Less sessions (RTCPeerConnection) are created on the server, so normally less cpu.
That's a hacky and simple way of doing some of the use case I talked about in networked-aframe/janus-plugin-sfu#6
We still use a RTCPeerConnection for the listeners, if we could just use websocket and no RTCPeerConnection at all that would be even better, that would need changes in the rust code for sure, but I don't think that's possible to use janus websocket without having a session.
cc @arpu