setRemoteSubscribeFallbackOption method Null safety
- int option
Sets the fallback option for the subscribed remote audio and video stream with poor network connections.
The quality of the subscribed audio and video streams is degraded with unreliable network connections. After you set the fallback options for the subscribed audio and video stream by using this method:
- With unreliable downstream network connections, the SDK switches to receive a low-quality video stream or stops receiving video streams. This way, the audio quality is maintained or improved.
- The SDK monitors the network quality and resumes the video stream when the network conditions improve. If the subscribed remote video stream falls back to audio only, or the audio-only stream switches back to the video stream, the SDK triggers the onNERtcEngineRemoteSubscribeFallbackToAudioOnly callback.
You must call the method before calling joinChannel.
option indicates the fallback option for subscribing to audio and video streams. The default setting is to fall back to the low-quality video stream in the poor network. For more information, see NERtcStreamFallbackOptions.
Return 0 indicates a successful call.
Implementation
Future<int> setRemoteSubscribeFallbackOption(int option) async {
IntValue reply =
await _api.setRemoteSubscribeFallbackOption(IntValue()..value = option);
return reply.value ?? -1;
}