CanvasCaptureMediaStreamTrack

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

EventTarget MediaStreamTrack CanvasCaptureMediaStreamTrack

Instance 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.

Instance 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
Media Capture from DOM Elements
# the-canvascapturemediastreamtrack

Browser compatibility

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
CanvasCaptureMediaStreamTrack
canvas
requestFrame

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
See implementation notes.

See also