@detail api
@valid since 3.60. Since version 3.60, this interface replaces setPublicStreamAudioPlaybackVolume:volume: for the following function. If you have upgraded to version 3.60 or above and are still using this method, please migrate to this interface.
@author hanchenchen
@brief Set the audio playback volume of the WTN stream.
@param streamId ID of the WTN stream.
@param volume Ratio(%) of the audio playback volume to the original volume, in the range [0, 400], with overflow protection. The default volume is 100.
To ensure the audio quality, the recommended range is [0, 100].
@return
- 0: Success.
- -2: Wrong parameter.
@order 4
@detail api
@valid since 3.60. Since version 3.60, this interface replaces setPublicStreamVideoSink:withSink:withPixelFormat: for the following function. If you have upgraded to version 3.60 or above and are still using this method, please migrate to this interface.
@author hanchenchen
@brief Assign a custom renderer to the WTN stream. See Custom Video Rendering
@param streamId ID of the WTN stream
@param videoSink Custom renderer. Set to be null when you want to release the renderer. Refer to ByteRTCVideoSinkDelegate{@link #ByteRTCVideoSinkDelegate} for more details.
@param config Remote video frame callback configuration. Refer to ByteRTCRemoteVideoSinkConfig{@link #ByteRTCRemoteVideoSinkConfig} for more details.
@return
- 0: Success
- !0: Failure. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for specific reasons.
@order 3
@detail api
@valid since 3.60.
@author hanchenchen
@brief Set the WTN event handler.
@param delegate See ByteRTCWTNStreamDelegate{@link #ByteRTCWTNStreamDelegate}.
@order 5
@author hanchenchen
@detail api
@valid since 3.60. Since version 3.60, this interface replaces the startPlayPublicStream: and stopPlayPublicStream: methods for subscribing to and unsubscribing from WTN audio streams. If you are using these methods, please migrate to this interface.
@brief Subscribes to/unsubscribes from the specified WTN audio stream.
A user can call this method to subscribe a WTN stream whether he/she has joined the room or not.
@param streamId ID of the WTN stream. If the stream has not been published then, the local client will receive the WTN stream once it starts publishing.
@param subscribe Whether to subscribe to the WTN stream.
- true: Subscribe
- false: Unsubscribe
@return
- 0: Success. You will also be informed by onWTNVideoSubscribeStateChanged:state:reason:{@link #ByteRTCWTNStreamDelegate#onWTNVideoSubscribeStateChanged:state:reason}.
- !0: Failure because of invalid parameter or empty parameters.
@note
- A client can play up to 5 WTN streams simultaneously. Please call subscribeWTNVideoStream:subscribe:{@link #ByteRTCWTNStream#subscribeWTNVideoStream:subscribe}/subscribeWTNAudioStream:subscribe:{@link #ByteRTCWTNStream#subscribeWTNAudioStream:subscribe} in time to cancel the subscription to WTN streams to avoid exceeding the limit of subscribed WTN streams.
- We recommend to bind a view for the WTN stream before calling this API to subscribe a WTN stream.
- Internal renderer: By calling setWTNRemoteVideoCanvas:withCanvas:{@link #ByteRTCWTNStream#setWTNRemoteVideoCanvas:withCanvas} or
- Custom renderer: By calling setWTNRemoteVideoSink:withSink:withConfig:{@link #ByteRTCWTNStream#setWTNRemoteVideoSink:withSink:withConfig}
- After calling this API, you will be informed once the first frame has been decoded successfully by onWTNFirstRemoteAudioFrame:{@link #ByteRTCWTNStreamDelegate#onWTNFirstRemoteAudioFrame}.
- If the WTN stream contains SEI information, you will be informed by onWTNSEIMessageReceived:andChannelId:andMessage:{@link #ByteRTCWTNStreamDelegate#onWTNSEIMessageReceived:andChannelId:andMessage}.
@order 1
@detail api
@valid since 3.60. Since version 3.60, this interface replaces the startPlayPublicStream: and stopPlayPublicStream: methods for subscribing to and unsubscribing from WTN video streams. If you are using these methods, please migrate to this interface.
@author hanchenchen
@brief Subscribe/ unsubscribe WTN video stream
A user can call this method to subscribe or unsubscribe a WTN stream whether he/she has joined the room or not.
@param streamId ID of the WTN stream. If the stream has not been published then, the local client will receive the WTN stream once it starts publishing.
@param subscribe Whether to subscribe to the WTN stream.
- true: Subscribe
- false: Unsubscribe
@return
- 0: Success. You will also be informed by onWTNAudioSubscribeStateChanged:state:reason:{@link #ByteRTCWTNStreamDelegate#onWTNAudioSubscribeStateChanged:state:reason}.
- !0: Failure because of invalid parameter or empty parameters.
@note
A client can play up to 5 WTN streams simultaneously. Please call subscribeWTNVideoStream:subscribe:{@link #ByteRTCWTNStream#subscribeWTNVideoStream:subscribe}/subscribeWTNAudioStream:subscribe:{@link #ByteRTCWTNStream#subscribeWTNAudioStream:subscribe} in time to cancel the subscription to WTN streams to avoid exceeding the limit of subscribed WTN streams.
- We recommend you bind a view for the WTN stream before calling this API.
- Internal renderer: By calling setWTNRemoteVideoCanvas:withCanvas:{@link #ByteRTCWTNStream#setWTNRemoteVideoCanvas:withCanvas}.
- Custom renderer: By calling setWTNRemoteVideoSink:withSink:withConfig:{@link #ByteRTCWTNStream#setWTNRemoteVideoSink:withSink:withConfig}.
- After calling this API, the local user will be informed once the first frame has been decoded successfully by onWTNFirstRemoteVideoFrameDecoded:withFrameInfo:{@link #ByteRTCWTNStreamDelegate#onWTNFirstRemoteVideoFrameDecoded:withFrameInfo}.
- If the WTN stream contains SEI information, the local user will be informed by onWTNSEIMessageReceived:andChannelId:andMessage:{@link #ByteRTCWTNStreamDelegate#onWTNSEIMessageReceived:andChannelId:andMessage}.