setRemoteVideoSink method
@valid since 3.57
@detail api
@hiddensdk(audiosdk)
@brief Binds the remote video stream to a custom renderer.You can get video frame data at specified positions and formats through parameter settings.
@param streamId Stream ID, used to specify the video stream to be rendered.
@param videoSink Custom video renderer. See IVideoSink{@link #IVideoSink}.
@param config remote video frame callback configuration, see RemoteVideoSinkConfig{@link #RemoteVideoSinkConfig}。
@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.
- This method can be called both before and after entering the room. If you are unable to obtain remote stream information in advance, you can call this method after joining the room and receiving the remote stream information through the onUserPublishStreamVideo{@link #IRTCRoomEventHandler#onUserPublishStreamVideo} callback.
- 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.
@order 2
Implementation
FutureOr<int> setRemoteVideoSink(
String streamId, IVideoSink videoSink, int requiredFormat) async {
return await nativeCall(
'setRemoteVideoSink', [streamId, videoSink, requiredFormat]);
}