-
-
Save justinyoo/a277ae55ccab65a95bb8ad3160d0e1dd to your computer and use it in GitHub Desktop.
Accessing to Camera on Mobile Devices from Vue.js + TypeScript + ASP.NET Core Applications
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mounted (): void { | |
this._refs = <any>this.$refs; | |
this._video = <HTMLVideoElement>this._refs.video; | |
var md: MediaDevices = this.getMediaDevices(); | |
md.getUserMedia({ video: true }) | |
.then((stream) => { | |
this.src = window.URL.createObjectURL(stream); | |
this._stream = stream; | |
this._hasUserMedia = true; | |
}, (err) => { | |
console.log(err); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment