setPublishFallbackOption abstract method

Future<int?> setPublishFallbackOption(
  1. PublishFallbackOption option
)

Sets the fallback option for published audio & video streams.

You can call this API to set whether to automatically lower the resolution you set of the published streams under limited network conditions.

Return value:

Notes:

  • This API only works after you call RTCVideo.enableSimulcastMode to enable the mode of publishing multiple streams.
  • You must call this API before the user enters the room.
  • After calling this API, if there is a performance fallback or recovery due to device performance or network issues, the local end will receive early warnings through the RTCVideoEventHandler.onPerformanceAlarms callback to adjust the capture device.
  • When the fallback option is set, the client subscribed to the audio/video stream will receive RTCVideoEventHandler.onSimulcastSubscribeFallback when the audio/video stream published by the local user falls back or resumes from the fallback.
  • You can alternatively set fallback options in th console, which is of higher priority.

Implementation

Future<int?> setPublishFallbackOption(PublishFallbackOption option);