setVideoDecoderConfig method
@detail api
@hiddensdk(audiosdk)
@author wangzhanqiang
@brief Before subscribing to the remote video stream, set the remote video data decoding method
@param streamId ID of Remote stream.
@param config Video decoding method. See ByteRTCVideoDecoderConfig{@link #ByteRTCVideoDecoderConfig}.
@return
- 0: Success.
- < 0 : Fail. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for more details
@note
- When you want to custom decode a remote stream, you need to call registerRemoteEncodedVideoFrameObserver:{@link #ByteRTCEngine#registerRemoteEncodedVideoFrameObserver} Register the remote video stream monitor, and then call the interface to set the decoding method to custom decoding. The monitored video data is called back through onRemoteEncodedVideoFrame:info:withEncodedVideoFrame:{@link #ByteRTCRemoteEncodedVideoFrameObserver#onRemoteEncodedVideoFrame:info:withEncodedVideoFrame}.
- Since version 3.56, for automatic subscription, you can set streamId to a specific value (if there is corresponding logic). In this case, the decoding settings set by calling the API applies to all remote main streams or screen sharing streams based on the relevant logic of streamId.
Implementation
FutureOr<int> setVideoDecoderConfig(
NSString streamId, ByteRTCVideoDecoderConfig config) async {
return await nativeCall('setVideoDecoderConfig:withVideoDecoderConfig:',
[streamId, config.$value]);
}