Auto Video Degrade/Restore

Sometimes people have bad internet connections but everyone deserves a good meeting.

When the network is too slow to support audio and video conversations together, the 100ms SDK can automatically turn off downloading other peer's videos, which may improve the audio quality and avoid disconnections.

If the network quality improves, the videos will be restored automatically as well.

To turn on subscribe degradation in your room, open the templates in the dashboard and enable it for roles there. Here's more information about templates.

Dashboard Degradation Option

Responding in the app

All HMSVideoTrack, within the HMSPeer's have a variable called isDegraded.

If isDegraded is true, treat it as if the video is turned off. If the UI is not changed, the video tile will appear black.

Video Track Update

We can listen to the track update of trackDegraded and trackRestored in HMSTrackUpdate to update the UI whenever someone's track gets changed due to degradation.

class Meeting implements HMSUpdateListener, HMSActionResultListener{ ... void onTrackUpdate( {required HMSTrack track, required HMSTrackUpdate trackUpdate, required HMSPeer peer}) { switch (update) { case HMSTrackUpdate.trackDegraded: //Show as if video is turned off otherwise the tile becomes black break; case HMSTrackUpdate.trackRestored: //Switch to normal video as track is restored now break; } } }

Have a suggestion? Recommend changes ->

Was this helpful?