MDN self-hosted library · e01.org

CanvasCaptureMediaStreamTrack

Media Capture and Streams

no runnable cells web-api-interface upstream source

Media Capture and Streams

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

Instance properties

This interface inherits the properties of its parent, MediaStreamTrack.

  • CanvasCaptureMediaStreamTrack.canvas
  • : 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

Browser compatibility

See also

  • HTMLCanvasElement.captureStream() to begin capturing frames from a canvas