HTML, .
<body>
<video id="video-bg>
<div id="site_wrapper">
</div>
</body>
CSS html position:absolute. , .
#site_wrapper{
position:relative;
}
#video-bg {
position:absolute;
top: 0;
left: 0;
right: 0;
}
getUserMedia, blob <video>. MDN:
navigator.getUserMedia({ audio: true, video: { width: 1280, height: 720 } },
function(stream) {
var video = document.querySelector('video');
video.src = window.URL.createObjectURL(stream);
video.onloadedmetadata = function(e) {
video.play();
};
},
function(err) {
console.log("The following error occured: " + err.name);
}
);
- , - .
. - , "local" , . , , , .
, "" . -, .