CanvasCaptureMediaStreamTrack

The CanvasCaptureMediaStreamTrack interface represents the video track contained in a MediaStream being generated from a <canvas> following a call to HTMLCanvasElement.captureStream().

Part of the Media Capture and Streams API.

Properties

This interface inherits the properties of its parent, MediaStreamTrack.

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

Methods

This interface inherits the methods of its parent, MediaStreamTrack.

CanvasCaptureMediaStreamTrack.requestFrame()
Manually forces a frame to be captured and sent to the stream. This lets applications that wish to specify the frame capture times directly do so, if they specified a frameRate of 0 when calling captureStream().

Specifications

Specification Status Comment
Media Capture from DOM Elements
The definition of 'CanvasCaptureMediaStreamTrack' 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: Sheppy, fscholz, uysalere, Sebastianz, teoli
Last updated by: Sheppy,