--- title: CanvasCaptureMediaStreamTrack slug: Web/API/CanvasCaptureMediaStreamTrack tags: - CanvasCaptureMediaStreamTrack - Experimental - Frame Capture - Interface - Media - Media Capture - NeedsTranslation - Reference - TopicStub - Web translation_of: Web/API/CanvasCaptureMediaStreamTrack --- <div>{{APIRef("Media Capture and Streams")}}</div> <p><span class="seoSummary">The <strong><code>CanvasCaptureMediaStreamTrack</code></strong> interface represents the video track contained in a {{domxref("MediaStream")}} being generated from a {{HTMLElement("canvas")}} following a call to {{domxref("HTMLCanvasElement.captureStream()")}}.</span></p> <p>Part of the <a href="/en-US/docs/Web/API/Media_Streams_API">Media Capture and Streams API</a>.</p> <h2 id="Properties">Properties</h2> <p><em>This interface inherits the properties of its parent, {{domxref("MediaStreamTrack")}}.</em></p> <dl> <dt>{{domxref("CanvasCaptureMediaStreamTrack.canvas")}} {{readonlyInline}}</dt> <dd>Returns the {{domxref("HTMLCanvasElement")}} object whose surface is captured in real-time.</dd> </dl> <h2 id="Methods">Methods</h2> <p><em>This interface inherits the methods of its parent, {{domxref("MediaStreamTrack")}}.</em></p> <dl> <dt>{{domxref("CanvasCaptureMediaStreamTrack.requestFrame()")}}</dt> <dd>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 <code>frameRate</code> of 0 when calling {{domxref("HTMLCanvasElement.captureStream", "captureStream()")}}.</dd> </dl> <h2 id="Specifications">Specifications</h2> <table class="standard-table"> <thead> <tr> <th scope="col">Specification</th> <th scope="col">Status</th> <th scope="col">Comment</th> </tr> </thead> <tbody> <tr> <td>{{SpecName('Media Capture DOM Elements', '#the-canvascapturemediastreamtrack', 'CanvasCaptureMediaStreamTrack')}}</td> <td>{{Spec2('Media Capture DOM Elements')}}</td> <td>Initial definition</td> </tr> </tbody> </table> <h2 id="Browser_compatibility">Browser compatibility</h2> <div> <p>{{Compat("api.CanvasCaptureMediaStreamTrack")}}</p> </div> <h2 id="See_also">See also</h2> <ul> <li>{{domxref("HTMLCanvasElement.captureStream()")}} to begin capturing frames from a canvas</li> </ul>