setSubscribeFallbackOption method
@detail api
@author panjian.fishing
@brief Sets the fallback option for subscribed RTC streams.
You can call this API to set whether to lower the resolution of currently subscribed stream under limited network conditions.
@param option Fallback option, see SubscribeFallbackOptions{@link #SubscribeFallbackOptions} for more details.
@return
- 0: Success.
- < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details.
@note
- You must call this API before enterting the room.
- After you enables the fallback, you will receive onSimulcastSubscribeFallback{@link #IRTCEngineEventHandler#onSimulcastSubscribeFallback} and onRemoteVideoSizeChanged{@link #IRTCEngineEventHandler#onRemoteVideoSizeChanged} when the resolution of your subscribed stream is lowered or restored.
- You can alternatively set fallback options with distrubutions from server side, which is of higher priority.
Implementation
FutureOr<int> setSubscribeFallbackOption(
SubscribeFallbackOptions option) async {
return await nativeCall('setSubscribeFallbackOption', [option.$value]);
}