setLocalPublishFallbackOption method
Sets the fallback option for the locally published video stream based on the network conditions.
If option is set as StreamFallbackOptions.AudioOnly, the SDK will:
- Disable the upstream video but enable audio only when the network conditions deteriorate and cannot support both video and audio.
- Re-enable the video when the network conditions improve.
When the locally published video stream falls back to audio only or when the audio-only stream switches back to the video, the SDK triggers the RtcEngineEventHandler.localPublishFallbackToAudioOnly.
Note
- Agora does not recommend using this method for CDN live streaming, because the remote CDN live user will have a noticeable lag when the locally published video stream falls back to audio only.
Parameter option
Sets the fallback option for the locally published video stream. See StreamFallbackOptions.
Implementation
@override
Future<void> setLocalPublishFallbackOption(StreamFallbackOptions option) {
return _invokeMethod('setLocalPublishFallbackOption',
{'option': StreamFallbackOptionsConverter(option).value()});
}