This PR refactors devices to allow users to retrieve the names of devices in dart for display in selection menus.
Adds:
// See a list of available system audio devices.
// You can then change the device with setDevice,
// and the ID included in the returned map.
Map<String, dynamic> result = await audioPlayer.getDevices();
// or if you don't need to refresh, access from
// audioPlayer.devices
The system default will automatically be the selected device on init.
setDevice can now be used to change devices dynamically.
On all AudioPlayers there is a public map devices that is auto-populated on init. Calling getDevices() will refresh this list if new devices are added/deleted from the system.
This PR refactors devices to allow users to retrieve the names of devices in dart for display in selection menus.
Adds:
The system default will automatically be the selected device on init. setDevice can now be used to change devices dynamically. On all AudioPlayers there is a public map devices that is auto-populated on init. Calling getDevices() will refresh this list if new devices are added/deleted from the system.