CanvasCaptureMediaStream

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The CanvasCaptureMediaStream interface represents a MediaStream capturing in real-time the surface of an HTMLCanvasElement.

Properties

This interface inherits the properties of its parents, MediaStream and EventTarget.

CanvasCaptureMediaStream.canvas Read only
Returns the HTMLCanvasElement object whose surface is captured in real-time.

Methods

This interface inherits the methods of its parent, MediaStream and EventTarget.

CanvasCaptureMediaStream.requestFrame()
Manually forces a frame to be captured and sent to the stream. This allows to capture partially rendered frames.

Specifications

Specification Status Comment
Media Capture from DOM Elements
The definition of 'CanvasCaptureMediaStream' in that specification.
Working Draft Initial definition

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support51 ?411 No No No
canvas No ?411 No No No
requestFrame ? ?411 No ? ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support No No ?411 No No No
canvas No No ?411 No No No
requestFrame ? ? ? ? ? ? ?

1. From version 41: this feature is behind the canvas.capturestream.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.

See also

Document Tags and Contributors

 Contributors to this page: fscholz, uysalere, Sebastianz, teoli
 Last updated by: fscholz,