I am using html5 getUserMedia to attain the user's webcam stream and is stored into an object namely stream now i want to send it to the server using socket.io. When I use follwing code i get an array
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
var video=document.querySelector("#outputview");
if( navigator.getUserMedia )
{
navigator.getUserMedia( {video: true, audio: true},successcallback,errorcallback);
function successcallback( stream )
{
video.src = window.URL.createObjectURL(stream);
var socket = io('http://192.168.1.102:8000');
socket.emit('data',stream);`
How to convert this into a data stream so that i could send this stream to view in another page?
you may get some help from this demo https://github.com/LingyuCoder/SkyRTC-demo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With