Subscribes to device add/remove events (e.g. plugging in a headset).
Callback invoked whenever the device list changes.
An unsubscribe function that removes the listener.
const off = onDeviceChange(() => refreshDeviceList())// lateroff() Copy
const off = onDeviceChange(() => refreshDeviceList())// lateroff()
Subscribes to device add/remove events (e.g. plugging in a headset).