ByteRTCSpatialAudio class

Inheritance
  • Object
  • NativeClass
  • ByteRTCSpatialAudio

Constructors

ByteRTCSpatialAudio([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
disableRemoteOrientation() FutureOr<void>
@detail api @brief Turn off the effect of the orientation of the local user as the sound source.
After the effect is off, all the other users in the room listen to the local user as if the local user is in right front of each of them. @note - After the orientation effect as the sound source is disabled, you cannot enable it during the lifetime of the SpatialAudio instance. - Calling this API does not affect the orientation effect of the local user as a listener. See updateSelfPosition:{@link #ByteRTCSpatialAudio#updateSelfPosition} and updateRemotePosition:positionInfo:{@link #ByteRTCSpatialAudio#updateRemotePosition:positionInfo}.
enableSpatialAudio(BOOL enable) FutureOr<void>
@detail api @author majun.lvhiei @brief Enables/disables spatial audio function. @param enable Whether to enable spatial audio function:
- YES: Enable - NO: Disable(Default setting) @note You need to call updateSelfPosition:{@link #ByteRTCSpatialAudio#updateSelfPosition} as well to really enjoy the spatial audio effect.
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
removeAllRemotePosition() FutureOr<int>
@valid since 3.52 @detail api @author wangjunzheng @brief Disables all spatial audio effects set by calling updateRemotePosition:positionInfo:{@link #ByteRTCSpatialAudio#updateRemotePosition:positionInfo} for all remote users. @return - 0: Success. - <0: Failure.
removeRemotePosition(NSString uid) FutureOr<int>
@valid since 3.52 @detail api @author wangjunzheng @brief Disables all spatial audio effects set by calling updateRemotePosition:positionInfo:{@link #ByteRTCSpatialAudio#updateRemotePosition:positionInfo} for a certain remote user. @param uid User ID of the remote user. @return - 0: Success. - <0: Failure.
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
toString() String
A string representation of this object.
inherited
updateRemotePosition(NSString uid, ByteRTCPositionInfo positionInfo) FutureOr<int>
@valid since 3.52 @detail api @author wangjunzheng @brief Sets the coordinate and orientation of the remote user as a speaker in the rectangular coordinate system of the local user. In this case, the local user hears from the remote user with the expected spatial audio effects. @param uid User ID @param positionInfo Information on the remote user's position. Refer to ByteRTCPositionInfo{@link #ByteRTCPositionInfo} for details. @return - 0: Success. - <0: Failure. - -2: Failure. The reason is that any two of the 3D coordinate vectors of the position of the remote user are not perpendicular to each other. @note You must call this API after creating the room.
The settings made locally will not influence other users' spatial audio experience.
updateResource(NativeResource resource) → void
inherited
updateSelfPosition(ByteRTCPositionInfo positionInfo) FutureOr<int>
@valid since 3.52 @detail api @author wangjunzheng @brief Sets the coordinate and orientation of the local user as a listener in the rectangular coordinate system the local user built to achieve expected spatial audio effects. @param positionInfo Information on the local user's position. Refer to ByteRTCPositionInfo{@link #ByteRTCPositionInfo} for details. @return - 0: Success. - <0: Failure. - -2: Failure. The reason is that any two of the 3D coordinate vectors of your position are not perpendicular to each other. @note - You need to call this API after joining the room. - Before calling this API, you should call enableSpatialAudio:{@link #ByteRTCSpatialAudio#enableSpatialAudio} first to enable the spatial audio function. - The settings made locally will not influence other users' spatial audio experience.

Operators

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

Static Properties

codegen_$namespace → dynamic
no setter