don't show error dialog when user has no webcam
instead, retry with just audio. Also when mounted, check if the user has given enough permissions to return non-empty labels for the devices, something both ff & chrome do if you haven't going through the permissions popup yet. If not, show the permissions button.
This commit is contained in:
parent
b673742e40
commit
f6e0cd9a03
3 changed files with 48 additions and 37 deletions
|
@ -18,6 +18,11 @@ import * as Matrix from 'matrix-js-sdk';
|
|||
import SettingsStore, {SettingLevel} from "./settings/SettingsStore";
|
||||
|
||||
export default {
|
||||
hasAnyLabeledDevices: async function() {
|
||||
const devices = await navigator.mediaDevices.enumerateDevices();
|
||||
return devices.some(d => !!d.label);
|
||||
},
|
||||
|
||||
getDevices: function() {
|
||||
// Only needed for Electron atm, though should work in modern browsers
|
||||
// once permission has been granted to the webapp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue