updateSelfPosition abstract method

Future<int?> updateSelfPosition(
  1. PositionInfo positionInfo
)

Valid since v3.56.1

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.

positionInfo: Information on the local user's position.

Return value:

  • 0: Success.
  • <0: Failure.
  • -2: Failure. The reason is that each two of the 3D coordinate vectors of your position are not perpendicular to each other.

Notes:

  • Call this API after joining the room. Before calling this API, you should call RTCSpatialAudio.enableSpatialAudio first to enable the spatial audio function.
  • The settings made locally will not influence other users' spatial audio experience.

Implementation

Future<int?> updateSelfPosition(PositionInfo positionInfo);