aboutsummaryrefslogtreecommitdiffstats
path: root/ui/lib
diff options
context:
space:
mode:
authorbrunobar79 <brunobar79@gmail.com>2018-08-01 06:34:18 +0800
committerbrunobar79 <brunobar79@gmail.com>2018-08-01 06:34:18 +0800
commit7a40072f1aff5296f80c0aab29ea679384de0b8d (patch)
tree08a19a83d1b755d1ddb26b537f6568ae270a7ea2 /ui/lib
parentcaa9e202cf4bac328759695e05d1bda5997ef6e7 (diff)
downloadtangerine-wallet-browser-7a40072f1aff5296f80c0aab29ea679384de0b8d.tar
tangerine-wallet-browser-7a40072f1aff5296f80c0aab29ea679384de0b8d.tar.gz
tangerine-wallet-browser-7a40072f1aff5296f80c0aab29ea679384de0b8d.tar.bz2
tangerine-wallet-browser-7a40072f1aff5296f80c0aab29ea679384de0b8d.tar.lz
tangerine-wallet-browser-7a40072f1aff5296f80c0aab29ea679384de0b8d.tar.xz
tangerine-wallet-browser-7a40072f1aff5296f80c0aab29ea679384de0b8d.tar.zst
tangerine-wallet-browser-7a40072f1aff5296f80c0aab29ea679384de0b8d.zip
lint
Diffstat (limited to 'ui/lib')
-rw-r--r--ui/lib/webcam-utils.js29
1 files changed, 14 insertions, 15 deletions
diff --git a/ui/lib/webcam-utils.js b/ui/lib/webcam-utils.js
index e4261dfbc..9b507cd99 100644
--- a/ui/lib/webcam-utils.js
+++ b/ui/lib/webcam-utils.js
@@ -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'})
}