setLocalSimulcastMode method
- ByteRTCVideoSimulcastMode mode,
- NSArray<
ByteRTCVideoEncoderConfig> streamConfig
@valid since 3.60. @detail api @brief Enable the Simulcast feature and configure the lower-quality video streams settings. @param mode Whether to publish lower-quality streams and how many of them to be published. See ByteRTCVideoSimulcastMode{@link #ByteRTCVideoSimulcastMode}. By default, it is set to Single, where the publisher sends the video in a single profile. In the other modes, the low-quality stream is set to a default resolution of 160px × 90px with a bitrate of 50Kbps. @param streamConfig The specification of the lower quality stream. You can configure up to three low-quality streams for a video source. See ByteRTCVideoEncoderConfig{@link #ByteRTCVideoEncoderConfig}. The resolution of the lower quality stream must be smaller than the standard stream set via setVideoEncoderConfig:withParameters:{@link #ByteRTCEngine#setVideoEncoderConfig:withParameters}. The specifications in the array must be arranged in ascending order based on resolution. By default, it is set to Single, where the publisher sends the video in a single profile. In the other modes, the low-quality stream is set to a default resolution of 160px × 90px with a bitrate of 50Kbps. @return - 0: Success. - < 0 : Fail. @note - The default specification of the video stream is 640px × 360px @15fps. - The method applies to the camera video only. - Refer to Simulcasting for more information.
Implementation
FutureOr<int> setLocalSimulcastMode(ByteRTCVideoSimulcastMode mode,
NSArray<ByteRTCVideoEncoderConfig> streamConfig) async {
return await nativeCall(
'setLocalSimulcastMode:config:', [mode.$value, streamConfig]);
}