Hi,
I’ve been experimenting with openvidu using openvidu call as a test bed for seeing base performance and I’ve noticed that CPU and Network Usage do not drop if everyone is in a call with video and audio turned off. I was still seeing 200Kib coming in and 1.2Mib leaving my server with CPU setting at 50% for a 8 person call. This is behaviour that can be configured in a client app?
Garrett
Hello Garrett!
As you’ve correctly noticed the audio & video unsubscribe doesn’t help with reducing network cost on the Subscriber side, it basically mutes audio / hides video.
This functionality was requested some time ago but there’s not yet an official solution for it.
I also had the need for it so I’ve hacked a small quick fix, even though is not really the best solution.
You can build the OpenVidu browser plugin from this branch on my fork: https://github.com/mihailj/openvidu/tree/resubscribe.
The instructions to build the browser plugin are here (just replace with my repository and check-out the resubscribe
branch).
I’ve added the SubscriberProperties parameter to the Stream.subscribe
function so it enables the possibility to subscribe to audio/video only for real.
Also added a Session.resubscribe
function that you can use to unsubscribe and subscribe back with new SubscriberProperties
(hence the resubscribe
function name).
The drawback is the time required to do this, some audio will be lost even if you just unsubscribe from video only.
I recommend to read the commit code to figure out exactly what I’ve done.
If the OpenVidu team thinks this is useful I can create a pull request.
Cheers,
Mihail J