VinceG / vue-web-cam

Webcam component for VueJs.
MIT License
257 stars 110 forks source link

Added video-live event to wait for video load #21

Closed igogrek closed 5 years ago

igogrek commented 5 years ago

In our case we show web-cam only after a user presses a button and this causes the delay between start and actual video load.

started event fires successfully, but there's around 1 second delay. After that the actual video is started - it seems that this happens due to the webcam itself takes some time to initialise.

So for us the solution was to add additional event for video stream to load - we show a loader until it does. Probably this will be helpful to others.

VinceG commented 5 years ago

@Igogrek Thank You! Would you mind testing this on v1.4 i just released after upgrading some dependencies and switching to webpack 4?

igogrek commented 5 years ago

For me new version doesn't work at all - I get Cannot assign to read only property 'exports' of object '#<Object>'

Pretty sure additional dependencies or webpack version should not affect additional event anyway.

VinceG commented 5 years ago

@Igogrek Thanks. I'll just test this and merge it once i confirm everything works. Yeah i know this PR has nothing to do with the recent changes i just wanted to merge it into the next release rather than the 1.3.x tag

VinceG commented 5 years ago

@Igogrek Thank You. it's merged into 1.4.3