1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
This commit is contained in:
brunobar79 2018-07-23 19:45:13 -04:00
parent 0940ecd57b
commit 0209148609

View File

@ -102,10 +102,10 @@ function initCameraScanner () {
// Append preview div
const preview = document.createElement('div')
preview.id = 'metamask-preview-wrapper'
preview.style = 'position:absolute; top: 20px; left: 20px; z-indez: 99999999999999; width: 300px; height: 300px; overflow: hidden'
preview.style = 'position:absolute; top: 20px; left: 20px; width: 300px; height: 300px; overflow: hidden; z-index: 999999999;'
const previewVideo = document.createElement('video')
previewVideo.id = 'metamask-preview-video'
previewVideo.style = 'width: 100%; height: 100%; object-fit: none; margin-left: -10%; margin-top: 10%'
previewVideo.style = 'width: 100%; height: 100%; object-fit: none; margin-left: -10%; margin-top: 10%;'
preview.appendChild(previewVideo)
document.body.appendChild(preview)
console.log('injected')
@ -122,7 +122,7 @@ function initCameraScanner () {
})
Instascan.Camera.getCameras().then(function (cameras) {
if (cameras.length > 0) {
scanner.start(cameras[1])
scanner.start(cameras[0])
} else {
console.error('No cameras found.')
}