I would like to set up a camera in a scene and get an HTML5
MediaStream of it so I can stream out using WebRTC.
I know I can probably get the stream from the visible
<canvas>, but what about an arbitrary Babylon camera? So for example if I wanted to stream from a fixed POV while players ran around?
Edit: I see there is support for multiple via
scene.activeCameras() and I found rendering a scene to a video, am I on the right track?
Edit 2: Ok just looked at the source of
VideoRecorder, it calls
engine.getRenderingCanvas() which I assume is the visible canvas. But I see that Camera has
outputRenderTarget, so maybe there is a way to make a camera render to an off-screen canvas?