stream recording javascript
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function enter() {
if (navigator.mozGetUserMedia) {
navigator.myGetMedia=navigator.mozGetUserMedia;
navigator.myGetMedia({video: true}, connect, error);
}
else {
alert("NO");
}
function connect(stream) {
var video = document.getElementById("my_video");
video.src = window.URL ? window.URL.createObjectURL(stream) : stream;
video.play();
var canvas = document.getElementById("c");
}
function error(e) { console.log(e); }
}
</script>
</head>
<body>
<canvas width="640" height="480" id="c"></canvas>
<input type="button" value="RECORD" onClick="enter()"/>
<input type="button" value="SAVE" />
<video id="my_video" width="640" height="480"/>
</body>
</html>
Also in JavaScript:
- node biology definition
- jsx babel webpack
- jquery get value of td by class
- json server
- change dxform label angular
- JavaScript's automatic semicolon insertion (ASI)
- create callback function javascript
- jquery check checkbox
- react template
- javascript does not equal
- javascript base64 decode
- javascript array remove element
- javascript format date yyyy-mm-dd
- var x=21; var myFunction = function(){ console.log(x); var x= 20; }; myFunction();
- react class and props example
- tinymce menubar hide
- reactjs javascript is mobile and desktop
- string to boolean javascript
- i18n react get current language
- vuejs how use this.$slots.default
- how to add elements in array in javascript
- document ready js
- how to make a var and sprite in javascript
- js window resize listener