I have a MediaStream object returned from getUserMedia and displaying it on my own screen.
The thing is, I don’t know, like * send / pipe / stream / *, that MediaStream is from point A to NodeJS, using socket.io at point B.
My code right now:
if (navigator.getUserMedia) {
navigator.getUserMedia({audio: true, video: true}, function(stream) {
video.src = URL.createObjectURL(stream) || window.URL.createObjectURL(stream);
webcamstream = stream;
}, onVideoFail);
} else {
alert ('failed');
}
});
function onVideoFail(e) {
console.log('webcam fail!', e);
};
I need this thread to be sent continuously to another user using NodeJS .
source
share