updateRemotePosition method
@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 PositionInfo{@link #PositionInfo} 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.
Implementation
Future<int?> updateRemotePosition(
string uid, PositionInfo positionInfo) async {
$a() => ($instance as $p_a.ISpatialAudio).updateRemotePosition(
uid, unpackObject<$p_a.PositionInfo>(positionInfo));
$i() => ($instance as $p_i.ByteRTCSpatialAudio).updateRemotePosition(
uid, unpackObject<$p_i.ByteRTCPositionInfo>(positionInfo));
if (Platform.isAndroid) {
return $a();
} else if (Platform.isIOS) {
return $i();
} else {
throw UnsupportedError(
'Not Support Platform ${Platform.operatingSystem}');
}
}