Skip to content

Instantly share code, notes, and snippets.

@kypflug
Created Jun 11, 2015
Embed
What would you like to do?
navigator.mediaDevices.getUserMedia({
video: {
facingMode: "user"
}}).then(function (stream) {
var video = document.getElementById('videoTag');
video.srcObject = stream;
}).catch( function (error) {
console.log(error.name + ": " + error.message);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment