W3cubDocs

/DOM

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

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 51.0 41 (41)[1] No support No support No support
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support No support 41.0 (41)[1] No support No support No support

[1] Disabled by default; set the preference canvas.capturestream.enabled to true to activate.

See also

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/CanvasCaptureMediaStream