Skip to content

features/output

useIosOutput()

ts
function useIosOutput(): IosOutput | undefined;

Hook that returns the current audio output info. Updates when the output changes (e.g., AirPods connected/disconnected). Always returns a value on iOS, undefined on Android.

Returns

IosOutput | undefined


getIosOutput()

ts
function getIosOutput(): IosOutput | undefined;

Gets the current audio output info. Always returns a value on iOS, undefined on Android.

Returns

IosOutput | undefined


onIosOutputChanged

ts
const onIosOutputChanged: NativeUpdatedValue<IosOutput>;

Subscribes to output state changes (iOS only). Never fires on Android.

Param

Called with output info when output changes

Returns

Cleanup function to unsubscribe


IosOutput

ts
type IosOutput = object;

Audio output information (iOS only).

Properties

type

ts
type: IosOutputType;

The output port type

name

ts
name: string;

Human-readable device name (e.g., "AirPods Pro", "iPhone Speaker")

external

ts
external: boolean;

Whether this is an external output (false for built-in speaker/receiver)


IosOutputType

ts
type IosOutputType = 
  | "built-in-speaker"
  | "built-in-receiver"
  | "airplay"
  | "bluetooth-a2dp"
  | "bluetooth-hfp"
  | "bluetooth-le"
  | "headphones"
  | "car-audio"
  | "hdmi"
  | "usb-audio"
  | "other";

openIosOutputPicker()

ts
function openIosOutputPicker(): void;

Opens the system output picker (iOS only). Allows users to select output device (speaker, AirPlay, Bluetooth, etc.). No-op on Android.

Returns

void