@platform android
@detail api
@valid since 3.60.
@author hanchenchen
@brief Set the WTN event handler.
@param handler See IWTNStreamEventHandler{@link #IWTNStreamEventHandler}.
@order 5
@platform ios
@detail api
@valid since 3.60.
@author hanchenchen
@brief Set the WTN event handler.
@param delegate See ByteRTCWTNStreamDelegate{@link #ByteRTCWTNStreamDelegate}.
@order 5
@detail api
@valid since 3.60. Since version 3.60, this interface replaces setPublicStreamAudioPlaybackVolume 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
@author hanchenchen
@detail api
@valid since 3.60. Since version 3.60, this interface replaces setPublicStreamVideoCanvas 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.
@brief Assign a internal render view to the WTN stream
@param streamId ID of the WTN stream
@param canvas Internal render view. If you want to unbind the video, set videoCanvas to null. Refer to VideoCanvas{@link #VideoCanvas} for more details.
@return
- 0: Success
- !0: Failure
@order 2
@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.
@author hanchenchen
@brief Subscribe/unsubscribe the 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 onWTNAudioSubscribeStateChanged{@link #IWTNStreamEventHandler#onWTNAudioSubscribeStateChanged}.
- !0: Failure because of invalid parameter or empty parameters.
@note
- A client can play up to 5 WTN streams simultaneously. Please call subscribeWTNVideoStream{@link #IWTNStream#subscribeWTNVideoStream}/subscribeWTNAudioStream{@link #IWTNStream#subscribeWTNAudioStream} 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{@link #IWTNStream#setWTNRemoteVideoCanvas} or
- Custom renderer: By calling setWTNRemoteVideoSink{@link #IWTNStream#setWTNRemoteVideoSink}
- After calling this API, you will be informed once the first frame has been decoded successfully by onWTNFirstRemoteAudioFrame{@link #IWTNStreamEventHandler#onWTNFirstRemoteAudioFrame}.
- If the WTN stream contains SEI information, you will be informed by onWTNSEIMessageReceived{@link #IWTNStreamEventHandler#onWTNSEIMessageReceived}.
@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 onWTNVideoSubscribeStateChanged{@link #IWTNStreamEventHandler#onWTNVideoSubscribeStateChanged}.
- !0: Failure because of invalid parameter or empty parameters.
@note
- A client can play up to 5 WTN streams simultaneously. Please call subscribeWTNVideoStream{@link #IWTNStream#subscribeWTNVideoStream}/subscribeWTNAudioStream{@link #IWTNStream#subscribeWTNAudioStream} 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{@link #IWTNStream#setWTNRemoteVideoCanvas} or
- Custom renderer: By calling setWTNRemoteVideoSink{@link #IWTNStream#setWTNRemoteVideoSink}
- After calling this API, you will be informed once the first frame has been decoded successfully by onWTNFirstRemoteVideoFrameDecoded{@link #IWTNStreamEventHandler#onWTNFirstRemoteVideoFrameDecoded}.
- If the WTN stream contains SEI information, you will be informed by oonWTNSEIMessageReceived{@link #IWTNStreamEventHandler#onWTNSEIMessageReceived}.
@order 0