vue-web-cam stopped working
vlahde opened this issue · 4 comments
Hello, I installed vue-webcam and had no problem making it work in my project. But now, a few months later, it is not working anymore. The webcam picture does not come up and when I try to capture picture, it is just a black box. The browser enables the camera but nothing happens. No error message comes up. Tested on Chrome, Firefox and Edge. I don't know when it stopped working or is this related to the vue version.
My current vue version: 6.4.1
Usage:
import Webcam from 'vue-web-cam/src/webcam.vue'
...
components: {
Webcam
}
...
<webcam ref="webcam" v-if="!webcam_image" :height="350" @error="webCamError($event)">
Can you please help me troubleshoot this?
@vlahde i am not sure what vue version 6.4.1 is. Can you try with an older version of this package to see if maybe one of the PRs caused this?
@vlahde I think i know what happened, in the older version we used the first webcam available, since then we changed it to allow to select any camera the user has. In order to do that we no longer just set the first camera but rather emit events with available cameras and you'll need to set the first one.
See the demo for examples. I just confirmed this and this is probably the issue you are facing.
Hi. It turns out that my system was build on older version of vue-web-cam. After checking out demo I got this working again. Thank you so much for your help!