setRemoteSubscribeFallbackOption abstract method

Future<void> setRemoteSubscribeFallbackOption(
  1. StreamFallbackOptions option
)

Sets the fallback option for the subscribed video stream based on the network conditions.

An unstable network affects the audio and video quality in a video call or interactive live video streaming. If option is set as streamFallbackOptionVideoStreamLow or streamFallbackOptionAudioOnly, the SDK automatically switches the video from a high-quality stream to a low-quality stream or disables the video when the downlink network conditions cannot support both audio and video to guarantee the quality of the audio. Meanwhile, the SDK continuously monitors network quality and resumes subscribing to audio and video streams when the network quality improves. When the subscribed video stream falls back to an audio-only stream, or recovers from an audio-only stream to an audio-video stream, the SDK triggers the onRemoteSubscribeFallbackToAudioOnly callback. Ensure that you call this method before joining a channel.

  • option Fallback options 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.

Implementation

Future<void> setRemoteSubscribeFallbackOption(StreamFallbackOptions option);