How to use an incoming MediaStream?
maks opened this issue · 3 comments
I'd like to be able to use an incoming MediaStream (eg. one being captured from another a webbrowser on another computer using a desktop (eg. using something like https://github.com/muaz-khan/Chrome-Extensions) as one of the video inputs in a scene.
The Readme currently does say I can add any video input to opts.inputs but I'm clear what the stream
arg in the callback
should be? Is it a MediaStream object that I create by pointing at a url that the desktop capture streaming extension would provide?
Sorry if this is a very basic/obvious question.
Yes, the stream
argument in the callback is a Mediastream object obtained in any way.
If you're asking how to get a MediaStream object, there's many ways: They can be generated using the captureStream APIs (on canvas or video), provided by a bunch of different desktop capture APIs (like the Chrome one you linked), received through an RTCPeerConnection or through getusermedia.
Thank you again. RTCPeerConnection is what I'm looking for. Really appreciate your help! I think I have all the pieces now to experiment with the setup I need.