I have an webGL canvas rendering an 3D hologram image using Three.js and I want to stream it as a video to another pc.
I already tried the code below and didn't work.
var gl = renderer.getContext(); //get webGl context
var canvas = gl.canvas; //get gl's canvas
var video = document.querySelector('video');
var stream = canvas.captureStream();
video.srcObject = stream;
Is it possible to stream and webGl canvas with WebRTC?
this is not yet fully supported in Chrome (Firefox should work since 43), you need "Experimental Web Platform features" in chrome://flags. See this demo for a classical teapot example.
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