setRemoteVideoSink method

FutureOr<int> setRemoteVideoSink(
  1. NSString streamId,
  2. id<ByteRTCVideoSinkDelegate> videoSink,
  3. ByteRTCVideoSinkPixelFormat requiredFormat
)

@detail api @hiddensdk(audiosdk) @deprecated since 3.57, use setRemoteVideoSink:withSink:withRemoteRenderConfig:{@link #ByteRTCEngine#setRemoteVideoSink:withSink:withRemoteRenderConfig} instead. @region Custom Video Capturing & Rendering @author sunhang.io @brief Binds the remote video stream to a custom renderer. @param streamId ID of Remote stream. @param videoSink Custom video renderer. See ByteRTCVideoSinkDelegate{@link #ByteRTCVideoSinkDelegate}. @param requiredFormat Encoding format that applys to the custom renderer. See ByteRTCVideoSinkPixelFormat{@link #ByteRTCVideoSinkPixelFormat}. @return - 0: Success. - < 0 : Fail. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for more details @note - RTC SDK uses its own renderer (internal renderer) for video rendering by default. - Joining or leaving the room will not affect the binding state. - This API can be called before and after entering the room. To call before entering the room, you need to get the remote stream information before joining the room; if you cannot get the remote stream information in advance, you can call the API after joining the room and getting the remote stream information through rtcRoom:onUserPublishStreamVideo:info:isPublish:{@link #ByteRTCRoomDelegate#rtcRoom:onUserPublishStreamVideo:info:isPublish}. - If you need to unbind the remote stream from the renderer, you must set videoSink to null. - This method gets video frames that have undergone proprocessing.

Implementation

FutureOr<int> setRemoteVideoSink(
    NSString streamId,
    id<ByteRTCVideoSinkDelegate> videoSink,
    ByteRTCVideoSinkPixelFormat requiredFormat) async {
  return await nativeCall('setRemoteVideoSink:withSink:withPixelFormat:',
      [streamId, videoSink, requiredFormat.$value]);
}