setLocalVideoSink method

FutureOr<int> setLocalVideoSink(
  1. IVideoSink videoSink,
  2. int requiredFormat
)

@valid since 3.57 @detail api @hiddensdk(audiosdk) @brief Binds the local video stream to a custom renderer.You can get video frame data at specified positions and formats through parameter settings. @param videoSink Custom video renderer. See IVideoSink{@link #IVideoSink}. @param config Local video frame callback configuration, see LocalVideoSinkConfig{@link #LocalVideoSinkConfig}。 @return - 0: Success. - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details @note - RTC SDK uses its own renderer (internal renderer) for video rendering by default. - Leaving the room will clear the binding status. - If you need to unbind the video stream from the custom renderer, you must set video_sink to null. - Generally, after receiving the onFirstLocalVideoFrameCaptured{@link #IRTCEngineEventHandler#onFirstLocalVideoFrameCaptured} callback notification that the first local video frame has been captured, call this method to bind a custom renderer to a video stream and join the room. @order 2

Implementation

FutureOr<int> setLocalVideoSink(
    IVideoSink videoSink, int requiredFormat) async {
  return await nativeCall('setLocalVideoSink', [videoSink, requiredFormat]);
}