Select Video Quality

Simulcast enables Adaptive Bitrate (ABR) in video conferencing scenarios. This means 100ms SDKs can upgrade or downgrade video quality for remote tracks based on user preferences or network conditions.

Minimum requirements

  • SDK versions @100mslive/hms-video-store@0.8.0, @100mslive/react-sdk@0.6.0 or later
  • Simulcast to be enabled from dashboard template

Simulcast Layer 100ms API's

Available simulcast layers are:

  • HMSSimulcastLayer.HIGH
  • HMSSimulcastLayer.MEDIUM
  • HMSSimulcastLayer.LOW

Note: The number of layers available will be dependent on the video publish resolution for the role and the available simulcast resolutions, in template settings in the dashboard.

Action to update the layer:

import { HMSSimulcastLayer } from '@100mslive/hms-video-store'; /* * layer can be one of: * HMSSimulcastLayer.HIGH * HMSSimulcastLayer.MEDIUM * HMSSimulcastLayer.LOW * * Setting preferred layer does not guarantee that the layer will be selected. * The server tries to give you that preferred layer when possible. * Otherwise, it will pick the next closest layer. Some of the reasons for * not getting the preferred layer could be publisher is not publishing that * layer or your download bandwidth is not good enough to handle that layer. */ hmsActions.setPreferredLayer(<videoTrackID>, layer);

Simulcast fields on the track

The HMSVideoTrack has a few fields related to simulcast.

  • layer - is the current layer you are receiving from the server
  • layerDefinitions - are the available layers for the role based on the template. These will contain layer name and resolution(widthxheight).
  • preferredLayer - this will contain the layer that is either manually set or auto selected based on resolution.

Auto Layer selection:

When using useVideo hook from our React SDK the relevant simulcast layer is automatically subscribed to, based on the video element dimensions.

Have a suggestion? Recommend changes ->

Was this helpful?