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

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
CanvasCaptureMediaStreamTrack
Experimental
Chrome Full support 51Edge Full support ≤79Firefox Full support 41
Disabled
Full support 41
Disabled
Disabled 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.
IE No support NoOpera No support NoSafari No support NoWebView Android Full support 51Chrome Android Full support 51Firefox Android Full support 41
Disabled
Full support 41
Disabled
Disabled 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.
Opera Android No support NoSafari iOS No support NoSamsung Internet Android Full support 5.0
canvas
Experimental
Chrome No support NoEdge No support NoFirefox Full support 41
Disabled
Full support 41
Disabled
Disabled 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.
IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoFirefox Android Full support 41
Disabled
Full support 41
Disabled
Disabled 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.
Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support No
requestFrame
Experimental
Chrome Full support 51Edge Full support ≤79Firefox Full support 41
Disabled
Full support 41
Disabled
Disabled 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.
IE No support NoOpera No support NoSafari No support NoWebView Android Full support 51Chrome Android Full support 51Firefox Android ? Opera Android No support NoSafari iOS No support NoSamsung Internet Android Full support 5.0

Legend

Full support
Full support
No support
No support
Compatibility unknown
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
User must explicitly enable this feature.
User must explicitly enable this feature.

See also