mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
lint
This commit is contained in:
parent
caa9e202cf
commit
7a40072f1a
@ -13,21 +13,20 @@ class WebcamUtils {
|
||||
const isBrave = !!window.chrome.ipcRenderer
|
||||
const isFirefoxOrBrave = isFirefox || isBrave
|
||||
try {
|
||||
reject({type: 'NO_WEBCAM_FOUND'})
|
||||
// DetectRTC.load(_ => {
|
||||
// if (DetectRTC.hasWebcam) {
|
||||
// let environmentReady = true
|
||||
// if ((isFirefoxOrBrave && isPopup) || (isPopup && !DetectRTC.isWebsiteHasWebcamPermissions)) {
|
||||
// environmentReady = false
|
||||
// }
|
||||
// resolve({
|
||||
// permissions: DetectRTC.isWebsiteHasWebcamPermissions,
|
||||
// environmentReady,
|
||||
// })
|
||||
// } else {
|
||||
// reject({type: 'NO_WEBCAM_FOUND'})
|
||||
// }
|
||||
// })
|
||||
DetectRTC.load(_ => {
|
||||
if (DetectRTC.hasWebcam) {
|
||||
let environmentReady = true
|
||||
if ((isFirefoxOrBrave && isPopup) || (isPopup && !DetectRTC.isWebsiteHasWebcamPermissions)) {
|
||||
environmentReady = false
|
||||
}
|
||||
resolve({
|
||||
permissions: DetectRTC.isWebsiteHasWebcamPermissions,
|
||||
environmentReady,
|
||||
})
|
||||
} else {
|
||||
reject({type: 'NO_WEBCAM_FOUND'})
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
reject({type: 'UNKNOWN_ERROR'})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user