interface HTMLCanvasElement {}; interface HTMLMediaElement {}; interface MediaStream {}; interface MediaStreamTrack {};
// https://w3c.github.io/mediacapture-fromelement/ partial interface HTMLMediaElement { MediaStream captureStream(); }; partial interface HTMLCanvasElement { MediaStream captureStream(optional double frameRequestRate); }; interface CanvasCaptureMediaStreamTrack : MediaStreamTrack { readonly attribute HTMLCanvasElement canvas; void requestFrame(); };