100ms Logo

100ms

Docs

Search docs
/

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.

Responding in the app

All videoTrack, 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.