getSpatialAudio method

FutureOr<ByteRTCSpatialAudio> getSpatialAudio()

@detail api @author wangjunzheng @brief Gets spatial audio instance. @return API call result:
- ISpatialAudio: Success. You will get a ByteRTCSpatialAudio{@link #ByteRTCSpatialAudio} returned from the SDK. - NULL: Failure. The current SDK does not offer spatial audio function. @note - The first time this API is called must be between you create a room and you actually enter the room. Refer to Spatial Audio for more information. - Only using real dual-channel playback device can users actually enjoy spatial audio effect. - Low-end device may have audio stalling issues due to its poor performance, so it is not recommended to enable spatial audio function on such kind of devices. - SDK currently supports up to 30 users publishing audio with spatial audio enabled at the same time in the same room.

Implementation

FutureOr<ByteRTCSpatialAudio> getSpatialAudio() async {
  final result = await nativeCall('getSpatialAudio', []);
  return packObject(
      result,
      () => ByteRTCSpatialAudio(
          const NativeClassOptions([], disableInit: true)));
}