COMING SOON! Hit the Heart Button if you want me to finish this blog next!
Live Facetime / Webcam Application.. Record yourself to mp4..
Coding with Webcams and Videos
Using React and HTML5
#1, using HTML5 we can easily play any mp4 file type, with code like this:
<video controls="controls">
<source src="~/videos/MatrixTools.mp4" type="video/mp4" />
</video>
#2, Webcam Integration:
<video controls="controls">
<source src="~/videos/MatrixTools.mp4" type="video/mp4" />
</video>
var video = document.getElementById('video');
if(navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
navigator.mediaDevices.getUserMedia({ video: true }).then(function(stream) {
video.src = window.URL.createObjectURL(stream);
video.play();
});
}
Permanent Link
If this article helped you, or you have any thoughts on how to do this better, please click the Like button and/or leave a comment below.