IWTNStream class

Inheritance
  • Object
  • NativeClass
  • IWTNStream

Constructors

IWTNStream([NativeClassOptions? options])

Properties

$resource → NativeResource
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
ready Future<void>
Whether the instance is initialized
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

destroy() → void
inherited
nativeCall<T>(String method, [List? args, NativeMethodMeta? meta]) Future<T>
Call instance method
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendInstanceGet<T>(String property) Future<T>
Get instance property
inherited
sendInstancePropertiesGet(dynamic nativeClass) Future<Map<String, dynamic>>
Get instance properties
inherited
sendInstanceSet(String property, dynamic value) Future<void>
Set instance property
inherited
setWTNRemoteAudioPlaybackVolume(String streamId, int volume) FutureOr<int>
@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
setWTNRemoteVideoCanvas(String streamId, VideoCanvas canvas) FutureOr<int>
@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
setWTNRemoteVideoSink(String streamId, IVideoSink videoSink, RemoteVideoSinkConfig config) FutureOr<int>
@detail api @valid since 3.60. @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 IVideoSink{@link #IVideoSink} for more details. @param config Remote video frame callback configuration. Refer to RemoteVideoSinkConfig{@link #RemoteVideoSinkConfig} for more details. @return - 0: Success. - <0: Failure. See ReturnStatus{@link #ReturnStatus} for specific reasons. @order 3
setWTNStreamEventHandler(IWTNStreamEventHandler handler) FutureOr<int>
@detail api @valid since 3.60. @author hanchenchen @brief Set the WTN event handler. @param handler See IWTNStreamEventHandler{@link #IWTNStreamEventHandler}. @order 5
subscribeWTNAudioStream(String streamId, boolean subscribe) FutureOr<int>
@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
subscribeWTNVideoStream(String streamId, boolean subscribe) FutureOr<int>
@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
toString() String
A string representation of this object.
inherited
updateResource(NativeResource resource) → void
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

codegen_$namespace → dynamic
no setter