diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js index 58c6bb7c20..0d182b27ab 100644 --- a/src/components/structures/UserSettings.js +++ b/src/components/structures/UserSettings.js @@ -820,8 +820,7 @@ module.exports = React.createClass({ CallMediaHandler.setVideoInput(deviceId); }, - _requestMediaPermissions: function() { - console.log("Request media perms"); + _requestMediaPermissions: function(event) { const getUserMedia = ( window.navigator.getUserMedia || window.navigator.webkitGetUserMedia || window.navigator.mozGetUserMedia ); @@ -829,7 +828,13 @@ module.exports = React.createClass({ return getUserMedia.apply(window.navigator, [ { video: true, audio: true }, this._refreshMediaDevices, - function() {}, + function() { + const ErrorDialog = sdk.getComponent('dialogs.ErrorDialog'); + Modal.createDialog(ErrorDialog, { + title: "No media permissions", + description: "You may need to manually permit Riot to access your microphone/webcam", + }); + }, ]); } }, @@ -839,15 +844,17 @@ module.exports = React.createClass({ return
+ Missing Media Permissions, click here to request. +
No Microphones detected
; + let webcamDropdown =No Webcams detected
; const audioInputs = this.state.mediaDevices.audioinput; if ('default' in audioInputs) {