RTCForge API Reference v1.1.1
    Preparing search index...

    Function onDeviceChange

    • Subscribes to device add/remove events (e.g. plugging in a headset).

      Parameters

      • handler: () => void

        Callback invoked whenever the device list changes.

      Returns () => void

      An unsubscribe function that removes the listener.

      const off = onDeviceChange(() => refreshDeviceList())
      // later
      off()