JSFiddle - React, Tailwind, and code Playground
by HYEONGJINKIM
HTML
<video autoplay="autoplay" id="myVideo" />
JavaScript
function load() {
var video = document.getElementById('myVideo');
if (navigator.webkitGetUserMedia) {
navigator.webkitGetUserMedia('video',
function(stream) { video.src = webkitURL.createObjectURL(stream); },
function(error) { alert('ERROR: ' + error.toString()); } );
} else {
alert('webkitGetUserMedia not supported');
}
}
$(document).ready(function() {
// put all your jQuery goodness in here.
load();
});