NodeJS get video source from webcam on the server for webRTC
NodeJS get video source from webcam on the server for webRTC I want to get video source from webcam on NodeJS server to stream video to the client via WebRTC. There is many examples how to implement this only for browser (client side) but I still can't find any reliable solution for NodeJS (server side). In example this is the basic script for the client side to get video source: navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia; var constraints = {audio: false, video: true}; var video = document.querySelector("video"); function successCallback(stream) { // stream available to console so you could inspect it and see what this object looks like window.stream = stream; if (window.URL) { video.src = window.URL.createObjectURL(stream); } else { video.src = stream; } video.play(); } function errorCallback(error) { console.log("navigator.getUserMedia error: ", error); } navigator.getUserM...