This PR factors the DOM code and related management code out of the Attendants and DeviceSelector components, bundling them into two APIs:
MediaDeviceList: Handles querying the list of available media input devices, and supports selection from the list. Provides callbacks for when the list is loaded and when a selection is made. Note in particular the default device is automatically selected -- and its callback called -- the devices are loaded (assuming the device list isn't empty).
MediaDeviceAccess: Handles requesting permission to use audio and video input devices. Provides callbacks for permission granted and denied and a status check. (The core DOM code for this was admittedly already in a separate file components/device_permissions.rs, but that's been moved into model/media_devices/media_device_access.rs to be bundled with the callbacks and status maintenance.)
Hey @ronen I caused lint to fail after attempting to merge main, I tried to fix it but I do not have access to your remote :( I think that all you need to do is to run cargo fmt inside the yew-ui folder
[another step towards #74]
This PR factors the DOM code and related management code out of the
Attendants
andDeviceSelector
components, bundling them into two APIs:MediaDeviceList
: Handles querying the list of available media input devices, and supports selection from the list. Provides callbacks for when the list is loaded and when a selection is made. Note in particular the default device is automatically selected -- and its callback called -- the devices are loaded (assuming the device list isn't empty).MediaDeviceAccess
: Handles requesting permission to use audio and video input devices. Provides callbacks for permission granted and denied and a status check. (The core DOM code for this was admittedly already in a separate filecomponents/device_permissions.rs
, but that's been moved intomodel/media_devices/media_device_access.rs
to be bundled with the callbacks and status maintenance.)