Skip to content

Commit

Permalink
Deploying to gh-pages from @ 4a2e0cf 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
WCY-dt committed Jun 23, 2024
1 parent 0ea68ec commit 653e853
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/Upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ export default {
onCameraClick() { // Handle camera click event
if (!this.isConnectSuccess) return

this.showCamera = true
this.showStream = true

navigator.mediaDevices
.getUserMedia({
audio: false,
Expand All @@ -44,8 +41,12 @@ export default {
}).then((stream) => {
window.stream = stream;
this.$refs.stream.srcObject = stream
this.showCamera = true
this.showStream = true
}).catch((error) => {
console.error(`[ERR] GetUserMedia error: ${error}`)
this.showCamera = false
this.showStream = false
alert('Please allow camera access to use this feature')
})
},
Expand Down

0 comments on commit 653e853

Please sign in to comment.