updatePosition method

Future<int?> updatePosition(
  1. Position pos
)

@detail api @author chuzhongtao @brief Updates the coordinate of the local user's position in the rectangular coordinate system in the current room. @param pos 3D coordinate values, the default value is 0, 0, 0, see Position{@link #Position}. @return API call result:
- 0: Success - !0: Failure @note - After calling this API, you should call enableRangeAudio{@link #IRangeAudio#enableRangeAudio} to enable range audio function to actually enjoy the range audio effect.

Implementation

Future<int?> updatePosition(Position pos) async {
  $a() => ($instance as $p_a.IRangeAudio)
      .updatePosition(unpackObject<$p_a.Position>(pos));
  $i() => ($instance as $p_i.ByteRTCRangeAudio)
      .updatePosition(unpackObject<$p_i.ByteRTCPosition>(pos));

  if (Platform.isAndroid) {
    return $a();
  } else if (Platform.isIOS) {
    return $i();
  } else {
    throw UnsupportedError(
        'Not Support Platform ${Platform.operatingSystem}');
  }
}