Open nickfan opened 4 years ago
autosetup: { type: Boolean, default: true },
so that we can give user to show some guide ui before the browser pop up the permission request on page load.
/** * get canvas */ getCanvas() { let video = this.$refs.video; if (!this.ctx) { let canvas = document.createElement("canvas"); canvas.height = video.videoHeight; canvas.width = video.videoWidth; this.canvas = canvas; this.ctx = canvas.getContext("2d"); } const { ctx, canvas } = this; ctx.drawImage(video, 0, 0, canvas.width, canvas.height); return canvas; }
so is that possible to add a property something like 'canvasEl'
canvasEl: { type: Object, default: null },
so change code into something like this:
if(this.$refs.canvasEl !==null){ let canvas = this.$refs.canvasEl }
i created a PR for this, maybe it could be helpful. https://github.com/VinceG/vue-web-cam/pull/62
so that we can give user to show some guide ui before the browser pop up the permission request on page load.
so is that possible to add a property something like 'canvasEl'
so change code into something like this: