aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/canvascapturemediastreamtrack/index.html
blob: 26c00af3eb526a732a38be295c9e344766788b3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
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>