Multiple Worlds WebRTC samples Record stream from a canvas

Click and drag on the canvas (on the left) to move the teapot.

This demo requires Firefox 43 or above, Chrome 51 or above, or Chrome 50 with Experimental Web Platform features enabled.

The teapot is drawn on the canvas element using WebGL. A stream is captured from the canvas element using its captureStream() method then recorded using the MediaRecorder API.

The canvas, video, and stream variables are in global scope, so you can inspect them from the browser console.

For more demos and information about captureStream(), see Media Capture from Canvas Implementation.

For more information see the MediaStream Recording API Editor's Draft.

View source on GitHub