Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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>
Comment

PREVIOUS NEXT
Code Example
Javascript :: preg_match javascript 
Javascript :: change localhost react 
Javascript :: nodejs for windows 7 
Javascript :: how to filter list of objects by an array in javascript 
Javascript :: how to delete a letter from a string in javascript 
Javascript :: post method 
Javascript :: js loop to array backwards 
Javascript :: select elements of an array starting by a certain letter javascript 
Javascript :: mongoose update push 
Javascript :: mongodb data types 
Javascript :: npm got 
Javascript :: vscode 
Javascript :: normalize in javascript 
Javascript :: pass parameter to handleclick react 
Javascript :: javascript object without undefined values 
Javascript :: get average and sum javascript 
Javascript :: vanilla javascript change background color 
Javascript :: array of images javascript 
Javascript :: create url with query parameters javascript 
Javascript :: datatables server side 
Javascript :: what is functional composition 
Javascript :: searching in json array mongodb 
Javascript :: how to remove quotes using regex 
Javascript :: http request javascript 
Javascript :: hash object javascript 
Javascript :: javascript listen array change 
Javascript :: slice method in js 
Javascript :: js check if array is empty 
Javascript :: strpos in javascript 
Javascript :: concatenate multiple arrays javascript 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =