Open farhadnowzari opened 3 years ago
Thanks for this library!
For anyone else experiencing the same issue, I found a quick and easy fix:
Add a ref
to the camera as follows:
<v-easy-camera ref="cam" v-model="picture"></v-easy-camera>
Watch the v-model
(in my case value
) of the dialogue to identify when it opens/closes and call the stop()
function explicitly upon modal close
watch: {
async value(opened) {
if (opened) {
// dialogue was opened
} else {
// dialogue was closed
this.$refs.cam.stop()
}
}
}
I found the actual issue specially when it was used like in a modal with vuetify. I have to stop it on "unmounted" but this will be in the next release with Vue 3 support
If the camera component is loaded inside a Vuetify dialog and the dialog is closed it will stay on.