mirror of
https://github.com/vector-im/element-call.git
synced 2026-03-01 05:27:04 +00:00
comment
This commit is contained in:
@@ -358,6 +358,9 @@ export class MediaDevices {
|
||||
*/
|
||||
public requestDeviceNames(): void {
|
||||
void navigator.mediaDevices.enumerateDevices().then((result) => {
|
||||
// we only actually update the requests$ subject if there are no
|
||||
// devices with a label, because otherwise we already have the permission
|
||||
// to access the devices.
|
||||
this.requests$.next(!result.some((device) => device.label));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user