mirror of
https://github.com/MarcZierle/photo-log-frontend.git
synced 2025-04-12 15:04:37 +00:00
fix camera facing mode
This commit is contained in:
parent
2597014525
commit
3eaafa1933
@ -180,7 +180,9 @@ export default {
|
||||
|
||||
const constraints = (window.constraints = {
|
||||
audio: false,
|
||||
video: true
|
||||
video: {
|
||||
facingMode: 'environment'
|
||||
}
|
||||
})
|
||||
|
||||
navigator.mediaDevices.getUserMedia(constraints).then((stream) => {
|
||||
@ -231,7 +233,13 @@ export default {
|
||||
|
||||
const file = dataURLtoFile(this.photo.src, 'upload.png')
|
||||
|
||||
addNewPhoto(file, null, this.selected_group)
|
||||
addNewPhoto(file, null, this.selected_group).then(() => {
|
||||
this.message.success('Done!')
|
||||
this.isPhotoTaken = false
|
||||
this.showPhotoTakenModal = false
|
||||
}).catch((error) => {
|
||||
this.message.error('There was an error uploading the photo: ' + error)
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user