diff options
author | brunobar79 <brunobar79@gmail.com> | 2018-08-08 15:00:39 +0800 |
---|---|---|
committer | brunobar79 <brunobar79@gmail.com> | 2018-08-08 15:00:39 +0800 |
commit | c6b7e460b536a6fcff4e4328b1007f677720b585 (patch) | |
tree | 7107eeb7fc05507906e1096811d7920fae5ef0f4 /ui/lib | |
parent | 2e0916d8ff17c89147005d22e8c100113aaf3360 (diff) | |
download | tangerine-wallet-browser-c6b7e460b536a6fcff4e4328b1007f677720b585.tar tangerine-wallet-browser-c6b7e460b536a6fcff4e4328b1007f677720b585.tar.gz tangerine-wallet-browser-c6b7e460b536a6fcff4e4328b1007f677720b585.tar.bz2 tangerine-wallet-browser-c6b7e460b536a6fcff4e4328b1007f677720b585.tar.lz tangerine-wallet-browser-c6b7e460b536a6fcff4e4328b1007f677720b585.tar.xz tangerine-wallet-browser-c6b7e460b536a6fcff4e4328b1007f677720b585.tar.zst tangerine-wallet-browser-c6b7e460b536a6fcff4e4328b1007f677720b585.zip |
code review changes
Diffstat (limited to 'ui/lib')
-rw-r--r-- | ui/lib/webcam-utils.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ui/lib/webcam-utils.js b/ui/lib/webcam-utils.js index 9b507cd99..eb717b23a 100644 --- a/ui/lib/webcam-utils.js +++ b/ui/lib/webcam-utils.js @@ -2,16 +2,15 @@ import DetectRTC from 'detectrtc' const { ENVIRONMENT_TYPE_POPUP } = require('../../app/scripts/lib/enums') -const { getEnvironmentType } = require('../../app/scripts/lib/util') +const { getEnvironmentType, getPlatform } = require('../../app/scripts/lib/util') +const { PLATFORM_BRAVE, PLATFORM_FIREFOX } = require('../../app/scripts/lib/enums') class WebcamUtils { static checkStatus () { return new Promise((resolve, reject) => { const isPopup = getEnvironmentType(window.location.href) === ENVIRONMENT_TYPE_POPUP - const isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1 - const isBrave = !!window.chrome.ipcRenderer - const isFirefoxOrBrave = isFirefox || isBrave + const isFirefoxOrBrave = getPlatform() === (PLATFORM_FIREFOX || PLATFORM_BRAVE) try { DetectRTC.load(_ => { if (DetectRTC.hasWebcam) { |