setRemoteSubscribeFallbackOption abstract method

Future<void> setRemoteSubscribeFallbackOption(
  1. StreamFallbackOptions option
)

Sets the fallback option for subscribed audio and video streams under poor network conditions.

In poor network conditions, the quality of real-time audio and video communication may degrade. You can call this method and set option to streamFallbackOptionVideoStreamLow or streamFallbackOptionAudioOnly. The SDK will switch the video stream to a lower stream or disable the video stream when the downlink network is poor and audio/video quality is severely affected, to ensure audio quality. The SDK continuously monitors network quality and resumes the audio and video stream subscription when the network improves. When the subscription falls back to audio only or recovers to audio and video, the SDK triggers the onRemoteSubscribeFallbackToAudioOnly callback.

  • option Fallback option for the subscribed stream. See StreamFallbackOptions.

Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. See Error Codes for details and resolution suggestions.

Implementation

Future<void> setRemoteSubscribeFallbackOption(StreamFallbackOptions option);