0
votes

I'm building a camera streaming platform that uses navigator.getUserMedia. The clients seem to broadcast their video streams without error. The code (on clients) for doing so looks like this:

    navigator.mediaDevices.getUserMedia({
    audio: false, //We don't need audio at the moment
    video: true
    }).then(function(stream) {
    ss(socket).emit("BroadcastStream", stream);
    }).catch(err) {
    //Code for handling error
    });
However my Node.JS server handling the stream (and sending it to the other client) throws this error:
    TypeError: socket_stream(...).to is not a function

It seems socket.io-stream isn't exposing the .to function. I know the argument to socket_stream (reference to the socket.io instance) is valid; and socket.io-stream's documentation seems to agree with this (there is no mention of .to)

How would I go around resolving this? EDIT: I am open to suggestions (even using a different method altogether; but leave that as a last resort)

1

1 Answers

0
votes

Alright, nevermind (after a month later), I found A Dead Simple WebRTC Example which showed me the basics of using WebRTC (without STUN servers, which I kind of needed for this project), which I adapted to my specific needs. Great job to Shane Tully on that tutorial!