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 ByteRTCSubscribeFallbackOption{@link #ByteRTCSubscribeFallbackOption} for more details.
@return
- 0: Success.
- < 0 : Fail. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for more details.
@note
- You must call this API before enterting the room.
- When the fallback option is set, the local user will receive rtcEngine:onSimulcastSubscribeFallback:info:event:{@link #ByteRTCEngineDelegate#rtcEngine:onSimulcastSubscribeFallback:info:event} and rtcEngine:onRemoteVideoSizeChanged:info:withFrameInfo:{@link #ByteRTCEngineDelegate#rtcEngine:onRemoteVideoSizeChanged:info:withFrameInfo} when the subscribed audio/video stream falls back or resumes from a fallback.
- You can alternatively set fallback options in the console, which is of higher priority.
Implementation
FutureOr<int> setSubscribeFallbackOption(
ByteRTCSubscribeFallbackOption option) async {
return await nativeCall('setSubscribeFallbackOption:', [option.$value]);
}