Add dynamic camera size request
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
export default {
|
||||
methods: {
|
||||
async openCamera() {
|
||||
async openCamera(imContain) {
|
||||
var cameraLoaded = false
|
||||
const devicesList = await navigator.mediaDevices.enumerateDevices()
|
||||
this.videoDeviceAvailable = devicesList.some( d => d.kind == "videoinput")
|
||||
@@ -9,10 +9,10 @@ export default {
|
||||
var vidConstraint = {
|
||||
video: {
|
||||
width: {
|
||||
ideal: 1920
|
||||
ideal: imContain.offsetWidth
|
||||
},
|
||||
height: {
|
||||
ideal: 1080
|
||||
ideal: imContain.offsetHeight
|
||||
},
|
||||
facingMode: 'environment'
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user