Add dynamic camera size request

Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
2024-03-11 20:22:28 -07:00
parent a665fb591d
commit 76a0cba2af
2 changed files with 5 additions and 5 deletions

View File

@@ -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'
},