Table of Contents

Class CanvasCaptureMediaStreamTrack

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

The CanvasCaptureMediaStreamTrack interface of the {{domxref("Media Capture and Streams API", "", "", "nocode")}} represents the video track contained in a MediaStream being generated from a {{HTMLElement("canvas")}} following a call to CaptureStream(Number).

[Value("CanvasCaptureMediaStreamTrack")]
public class CanvasCaptureMediaStreamTrack : MediaStreamTrack
Inheritance
CanvasCaptureMediaStreamTrack
Inherited Members

Remarks

-CaptureStream(Number) to begin capturing frames from a canvas

See also on MDN

Constructors

CanvasCaptureMediaStreamTrack()

public CanvasCaptureMediaStreamTrack()

Properties

Canvas

The canvas read-only property of the CanvasCaptureMediaStreamTrack interface returns the HTMLCanvasElement from which frames are being captured.

[Value("canvas")]
public HTMLCanvasElement Canvas { get; }

Property Value

HTMLCanvasElement

An HTMLCanvasElement indicating the canvas, which is the source of the frames being captured.

Remarks

-CaptureStream(Number) to create a stream to capture a
given canvas element.
-canvas

See also on MDN

Methods

RequestFrame()

The requestFrame() method of the CanvasCaptureMediaStreamTrack interface requests that a frame be captured from the canvas and sent to the stream.

[Value("requestFrame")]
public GlobalObject.Undefined RequestFrame()

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

Applications that need to carefully control
the timing of rendering and frame capture can use requestFrame() to
directly specify when it's time to capture a frame.

To prevent automatic capture of frames, so that frames are only captured when
requestFrame() is called, specify a value of 0 for the
CaptureStream(Number) method when creating
the stream.

-CanvasCaptureMediaStreamTrack, the interface it belongs to.
-canvas

See also on MDN