aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/htmlmediaelement/index.html
blob: b4080417d3e28417c603338e643ca3c30d1d49d6 (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
---
title: HTMLMediaElement
slug: Web/API/HTMLMediaElement
tags:
  - API
  - DOM
  - HTML
  - HTMLMediaElement
  - Interface
  - Media
  - NeedsNewLayout
  - Reference
  - インターフェイス
translation_of: Web/API/HTMLMediaElement
---
<div>{{APIRef("HTML DOM")}}</div>

<p><span class="seoSummary"><strong><code>HTMLMediaElement</code></strong> インターフェイスは、 {{domxref("HTMLElement")}} に音声や動画で一般的なメディアに関する基本的な能力の対応に必要なプロパティやメソッドを追加します。</span> {{domxref("HTMLVideoElement")}} および {{domxref("HTMLAudioElement")}} 要素はどちらも、このインターフェイスを継承しています。</p>

<p>{{InheritanceDiagram(600, 120)}}</p>

<h2 id="Properties" name="Properties">プロパティ</h2>

<p><em>このインターフェイスは祖先である {{domxref("HTMLElement")}}, {{domxref("Element")}}, {{domxref("Node")}}, {{domxref("EventTarget")}} のプロパティを継承しています。</em></p>

<dl>
 <dt>{{domxref("HTMLMediaElement.audioTracks")}}</dt>
 <dd>{{domxref("AudioTrackList")}} で、この要素に含まれる {{domxref("AudioTrack")}} オブジェクトを列挙します。</dd>
 <dt>{{domxref("HTMLMediaElement.autoplay")}}</dt>
 <dd>{{jsxref("Boolean")}} で、 HTML の {{htmlattrxref("autoplay", "video")}} 属性の値を反映し、再生に十分なデータが揃った時点で自動的に再生を始めるかどうかを示します。
 <div class="note"><strong>メモ</strong>: オーディオ(またはオーディオトラックを含むビデオ)を自動的に再生するサイトは、ユーザーにとって不快なエクスペリエンスになる可能性があるため、可能な限り避ける必要があります。 自動再生機能を実装する必要がある場合、オプトイン(ユーザーに明示的に有効にすること)する必要があります。 ただし、ソースが後でユーザー制御下で実行されるメディア要素をプレ作成する場合、これは便利です。</div>
 </dd>
 <dt>{{domxref("HTMLMediaElement.buffered")}} {{readonlyinline}}</dt>
 <dd>その時点でブラウザがバッファしたメディアデータの範囲を表す {{domxref("TimeRanges")}} オブジェクトを取得できます。</dd>
 <dt>{{domxref("HTMLMediaElement.controller")}}</dt>
 <dd>要素に割り当てられた {{domxref("MediaController")}} オブジェクトを参照できます。割り当てられていない場合の値は <code>null</code> です。</dd>
 <dt>{{domxref("HTMLMediaElement.controls")}}</dt>
 <dd>再生をコントロールするユーザインタフェースの表示 / 非表示を指定する{{htmlattrxref("controls", "video")}}  属性を、{{jsxref('Boolean')}} で参照できます。</dd>
 <dt>{{domxref("HTMLMediaElement.controlsList")}} {{readonlyinline}}</dt>
 <dd>ユーザーエージェントが独自のコントロールセットを表示するたびに、メディア要素に表示するコントロールをユーザーエージェントが選択するのに役立つ{{domxref("DOMTokenList")}}を返します。 <code>DOMTokenList</code>は、<code>nodownload</code><code>nofullscreen</code><code>noremoteplayback</code>の3つの値のうち1つ以上を取ります。</dd>
 <dt>{{domxref("HTMLMediaElement.crossOrigin")}}</dt>
 <dd>このメディア要素の <a href="/docs/Web/HTML/CORS_settings_attributes">CORS 設定</a>{{domxref("DOMString")}} で参照できます。</dd>
 <dt>{{domxref("HTMLMediaElement.currentSrc")}}{{readonlyinline}}</dt>
 <dd>選択されたメディアリソースの絶対 URL を {{domxref("DOMString")}} で返します。</dd>
 <dt>{{domxref("HTMLMediaElement.currentTime")}}</dt>
 <dd>現在の再生時間を <code>double</code> で返します。値を代入することで、シークを行えます。</dd>
 <dt>{{domxref("HTMLMediaElement.defaultMuted")}}</dt>
 <dd>標準状態で音声がミュートされているか、いないかを表す、HTML の {{htmlattrxref("muted", "video")}} 属性を {{jsxref('Boolean')}} で参照できます。</dd>
 <dt>{{domxref("HTMLMediaElement.defaultPlaybackRate")}}</dt>
 <dd>標準の再生レートを <code>double</code> で返します。</dd>
 <dt>{{domxref("HTMLMediaElement.disableRemotePlayback")}}</dt>
 <dd>リモート再生ができるかどうかを{{jsxref('Boolean')}}で取得できます。メディア要素にリモート再生UIを許可するかどうかを返します。</dd>
 <dt>{{domxref("HTMLMediaElement.duration")}}{{readonlyinline}}</dt>
 <dd>メディアの長さを秒数で表した数値を <code>double</code> で取得できます。メディアデータがない場合は、0 を返します。</dd>
 <dt>{{domxref("HTMLMediaElement.ended")}}{{readonlyinline}}</dt>
 <dd>再生が終了しているか、いないかを {{jsxref('Boolean')}} で取得できます。</dd>
 <dt>{{domxref("HTMLMediaElement.error")}}{{readonlyinline}}</dt>
 <dd>一番最後に起きたエラーを {{domxref("MediaError")}} オブジェクトとして返します。エラーが起きていない場合は null を返します。</dd>
 <dt>{{domxref("HTMLMediaElement.loop")}}</dt>
 <dd>繰り返し再生を有効、無効を表す HTML の {{htmlattrxref("loop", "video")}}{{jsxref('Boolean')}} として参照できます。</dd>
 <dt>{{domxref("HTMLMediaElement.mediaGroup")}}</dt>
 <dd>Is a {{domxref("DOMString")}} that reflects the {{ htmlattrxref("mediagroup", "video")}} HTML attribute, which indicates the name of the group of elements it belongs to. A group of media elements shares a common {{domxref('MediaController')}}.</dd>
 <dt>{{domxref("HTMLMediaElement.mediaKeys")}} {{readonlyinline}} {{experimental_inline}}</dt>
 <dd>Returns a {{domxref("MediaKeys")}} object or <code>null</code>. MediaKeys is a set of keys that an associated HTMLMediaElement can use for decryption of media data during playback.</dd>
 <dt>{{domxref("HTMLMediaElement.mozAudioCaptured")}} {{readonlyinline}} {{non-standard_inline}}</dt>
 <dd>Returns a {{jsxref('Boolean')}}. Related to audio stream capture.</dd>
 <dt>{{domxref("HTMLMediaElement.mozFragmentEnd")}} {{non-standard_inline}}</dt>
 <dd>Is a <code>double</code> that provides access to the fragment end time if the media element has a fragment URI for <code>currentSrc</code>, otherwise it is equal to the media duration.</dd>
 <dt>{{domxref("HTMLMediaElement.mozFrameBufferLength")}} {{non-standard_inline}} {{deprecated_inline}}</dt>
 <dd>
 <p>Is a <code>unsigned long</code> that indicates the number of samples that will be returned in the framebuffer of each <code>MozAudioAvailable</code> event. This number is a total for all channels, and by default is set to be the number of channels * 1024 (e.g., 2 channels * 1024 samples = 2048 total).</p>

 <p>The <code>mozFrameBufferLength</code> property can be set to a new value for lower latency, larger amounts of data, etc. The size given <em>must</em> be a number between 512 and 16384. Using any other size results in an exception being thrown. The best time to set a new length is after the <a href="/en-US/docs/Web/Events/loadedmetadata">loadedmetadata</a> event fires, when the audio info is known, but before the audio has started or <code>MozAudioAvailable</code> events have begun firing.</p>
 </dd>
 <dt>{{domxref("HTMLMediaElement.mozSampleRate")}} {{readonlyinline}} {{non-standard_inline}} {{deprecated_inline}}</dt>
 <dd>Returns a <code>double</code> representing the number of samples per second that will be played. For example, 44100 samples per second is the sample rate used by CD audio.</dd>
 <dt>{{domxref("HTMLMediaElement.muted")}}</dt>
 <dd>Is a {{jsxref('Boolean')}} that determines whether audio is muted. <code>true</code> if the audio is muted and <code>false</code> otherwise.</dd>
 <dt>{{domxref("HTMLMediaElement.networkState")}} {{readonlyinline}}</dt>
 <dd>Returns a <code>unsigned short</code> (enumeration) indicating the current state of fetching the media over the network.</dd>
 <dt>{{domxref("HTMLMediaElement.paused")}} {{readonlyinline}}</dt>
 <dd>Returns a {{jsxref('Boolean')}} that indicates whether the media element is paused.</dd>
 <dt>{{domxref("HTMLMediaElement.playbackRate")}}</dt>
 <dd>Is a <code>double</code> that indicates the rate at which the media is being played back.</dd>
 <dt>{{domxref("HTMLMediaElement.played")}} {{readonlyinline}}</dt>
 <dd>Returns a {{domxref('TimeRanges')}} object that contains the ranges of the media source that the browser has played, if any.</dd>
 <dt>{{domxref("HTMLMediaElement.preload")}}</dt>
 <dd>Is a {{domxref("DOMString")}} that reflects the {{htmlattrxref("preload", "video")}} HTML attribute, indicating what data should be preloaded, if any. Possible values are: <code>none</code>, <code>metadata</code>, <code>auto</code>.</dd>
 <dt>{{domxref("HTMLMediaElement.preservesPitch")}} {{non-standard_inline}}</dt>
 <dd>Is a {{jsxref('Boolean')}} that determines if the pitch of the sound will be preserved. If set to <code>false</code>, the pitch will adjust to the speed of the audio. This is implemented with prefixes in Firefox (<code>mozPreservesPitch</code>) and WebKit (<code>webkitPreservesPitch</code>).</dd>
 <dt>{{domxref("HTMLMediaElement.readyState")}} {{readonlyinline}}</dt>
 <dd>Returns a <code>unsigned short</code> (enumeration) indicating the readiness state of the media.</dd>
 <dt>{{domxref("HTMLMediaElement.seekable")}} {{readonlyinline}}</dt>
 <dd>Returns a {{domxref('TimeRanges')}} object that contains the time ranges that the user is able to seek to, if any.</dd>
 <dt>{{domxref("HTMLMediaElement.seeking")}} {{readonlyinline}}</dt>
 <dd>Returns a {{jsxref('Boolean')}} that indicates whether the media is in the process of seeking to a new position.</dd>
 <dt>{{domxref("HTMLMediaElement.sinkId")}} {{readonlyinline}} {{experimental_inline}}</dt>
 <dd>Returns a {{domxref("DOMString")}} that is the unique ID of the audio device delivering output, or an empty string if it is using the user agent default. This ID should be one of the <code>MediaDeviceInfo.deviceid</code> values returned from {{domxref("MediaDevices.enumerateDevices()")}}, <code>id-multimedia</code>, or <code>id-communications</code>.</dd>
 <dt>{{domxref("HTMLMediaElement.src")}}</dt>
 <dd>Is a {{domxref("DOMString")}} that reflects the {{htmlattrxref("src", "video")}} HTML attribute, which contains the URL of a media resource to use.</dd>
 <dt>{{domxref("HTMLMediaElement.srcObject")}}</dt>
 <dd>Is a {{domxref('MediaStream')}} representing the media to play or that has played in the current <code>HTMLMediaElement</code>, or <code>null</code> if not assigned.</dd>
 <dt>{{domxref("HTMLMediaElement.textTracks")}} {{readonlyinline}}</dt>
 <dd>Returns the list of {{domxref("TextTrack")}} objects contained in the element.</dd>
 <dt>{{domxref("HTMLMediaElement.videoTracks")}} {{readonlyinline}}</dt>
 <dd>要素の持つ {{domxref("VideoTrack")}} オブジェクトのリストを参照できます。
 <div class="note">
 <p>Gecko は 1 トラックの再生のみをサポートします。また複数トラックのメタデータ解析は、 Ogg フォーマットの場合にのみ有効です。</p>
 </div>
 </dd>
 <dt>{{domxref("HTMLMediaElement.volume")}}</dt>
 <dd>音量を <code>double</code> で取得できます。この値は 0.0 (無音) 以上、1.0 (最大) 以下でなくてはなりません。</dd>
</dl>

<h3 id="Event_handlers" name="Event_handlers">イベントハンドラー</h3>

<dl>
 <dt>{{domxref("HTMLMediaElement.onencrypted")}}</dt>
 <dd>メディアが暗号化されている場合に呼ばれる {{domxref('EventHandler')}} を設定できます。</dd>
 <dt>{{domxref("HTMLMediaElement.onwaitingforkey")}}</dt>
 <dd>Sets the {{domxref('EventHandler')}} called when playback is blocked while waiting for an encryption key.</dd>
</dl>

<h2 id="Obsolete_attributes" name="Obsolete_attributes">廃止された属性</h2>

<p>These attributes are obsolete and should not be used, even if a browser still supports them.</p>

<dl>
 <dt>{{domxref("HTMLMediaElement.initialTime")}} {{readonlyinline}} {{non-standard_inline}} {{obsolete_inline}}</dt>
 <dd><code>double</code> で、初期再生位置を示す値を秒単位で返します。</dd>
 <dt>{{domxref("HTMLMediaElement.mozChannels")}} {{readonlyinline}} {{non-standard_inline}} {{deprecated_inline}}</dt>
 <dd>Returns a <code>double</code> representing the number of channels in the audio resource (e.g., <code>2</code> for stereo).</dd>
</dl>

<h3 id="Obsolete_event_handlers" name="Obsolete_event_handlers">廃止されたイベントハンドラー</h3>

<dl>
 <dt>{{domxref("HTMLMediaElement.onmozinterruptbegin")}} {{non-standard_inline}} {{obsolete_inline}}</dt>
 <dd>オーディオチャンネルマネージャによってメディア要素が割り込まれたときに呼び出される {{event("Event_handlers", "event handler")}} を設定します。これは Firefox 固有のもので、 Firefox OS のために実装されていましたが、 Firefox 55 で削除されました。</dd>
 <dt>{{domxref("HTMLMediaElement.onmozinterruptend")}} {{non-standard_inline}} {{obsolete_inline}}</dt>
 <dd>割り込みが完了したときに呼び出される {{domxref('EventHandler')}} を設定します。これは Firefox 固有のもので、 Firefox OS のために実装されていましたが、 Firefox 55 で削除されました。</dd>
</dl>

<h2 id="Methods" name="Methods">メソッド</h2>

<p><em>このインターフェイスは祖先である {{domxref("HTMLElement")}}, {{domxref("Element")}}, {{domxref("Node")}}, {{domxref("EventTarget")}} のメソッドを継承しています。</em></p>

<dl>
 <dt>{{domxref("HTMLMediaElement.addTextTrack()")}}</dt>
 <dd>字幕向けトラックのような、テキストトラックを追加します。</dd>
 <dt>{{domxref("HTMLMediaElement.captureStream()")}} {{experimental_inline}}</dt>
 <dd>Returns {{domxref("MediaStream")}}, captures a stream of the media content.</dd>
 <dt>{{domxref("HTMLMediaElement.canPlayType()")}}</dt>
 <dd>メディアタイプが再生可能かどうかを判定します。</dd>
 <dt>{{domxref("HTMLMediaElement.fastSeek()")}}</dt>
 <dd>指定された時間へシークします。</dd>
 <dt>{{domxref("HTMLMediaElement.load()")}}</dt>
 <dd>メディア要素をリセットし、メディアリソースをリスタートします。処理されなかったイベントは破棄されます。メディアデータがダウンロードされる量は <code>preload </code>属性の値に影響されます。<code>src </code>属性の値、もしくは <code>source </code>要素内の要素を削除した際のリソース解放、もしくは <code>source </code>の子要素が動的に変更される場合の再スキャンのために利用します。それ以外の場合に呼びだす必要はありません。</dd>
 <dt>{{domxref("HTMLMediaElement.mozCaptureStream()")}} {{non-standard_inline}}</dt>
 <dd>[enter description]</dd>
 <dt>{{domxref("HTMLMediaElement.mozCaptureStreamUntilEnded()")}} {{non-standard_inline}}</dt>
 <dd>[enter description]</dd>
 <dt>{{domxref("HTMLMediaElement.mozGetMetadata()")}} {{non-standard_inline}}</dt>
 <dd>再生中のメディアデータに対するメタデータを {{jsxref('Object')}} として返します。呼び出すたびに、オブジェクトのコピーが新しく作られます。このメソッドを呼び出すには、<a href="/en-US/docs/Web/Events/loadedmetadata">loadedmetadata</a> イベント発火している必要があります。</dd>
 <dt>{{domxref("HTMLMediaElement.pause()")}}</dt>
 <dd>再生を一時停止します。</dd>
 <dt>{{domxref("HTMLMediaElement.play()")}}</dt>
 <dd>再生を開始します。</dd>
 <dt>{{domxref("HTMLMediaElement.seekToNextFrame()")}} {{non-standard_inline}} {{experimental_inline}}</dt>
 <dd>Seeks to the next frame in the media. This non-standard, experimental method makes it possible to manually drive reading and rendering of media at a custom speed, or to move through the media frame-by-frame to perform filtering or other operations.</dd>
 <dt>{{domxref("HTMLMediaElement.setMediaKeys()")}} {{experimental_inline}}</dt>
 <dd>再生に利用する{{domxref("MediaKeys")}} を指定します。{{jsxref("Promise")}} オブジェクトを返します。</dd>
 <dt>{{domxref("HTMLMediaElement.setSinkId()")}} {{experimental_inline}}</dt>
 <dd>音声出力をレンダリングするデバイスの ID を指定できます。指定はアプリケーションからの利用が許されている場合に有効です。なお返り値は {{jsxref("Promise")}} オブジェクトとなっています。</dd>
</dl>

<h2 id="Obsolete_methods" name="Obsolete_methods">廃止されたメソッド</h2>

<p>These methods are obsolete and should not be used, even if a browser still supports them.</p>

<dl>
 <dt>{{domxref("HTMLMediaElement.mozLoadFrom()")}} {{non-standard_inline}} {{deprecated_inline}}</dt>
 <dd>このメソッドは Mozilla の独自実装で、他のメディア要素からデータをロードします。通常のリソース選択のアルゴリズムではなく、他の要素の <code>currentSrc </code>を選ぶ点以外は、 <code>load() </code>メソッドと同じように振る舞います。これは他の要素がキャッシュし、バッファしているデータを利用することにより最適化を図るためです。実際に、2 つの要素が同じダウンロードデータを利用する場合、どちらか一方のダウンロードが終われば、他方でもそのデータを利用できるようになります。</dd>
</dl>

<h2 id="Events" name="Events">イベント</h2>

<p><em>Inherits methods from its parent, {{domxref("HTMLElement")}} </em>, defined in the {{domxref('GlobalEventHandlers')}} mixin. Listen to these events using <code><a href="https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener">addEventListener()</a></code> or by assigning an event listener to the <code>on<em>eventname</em></code> property of this interface.</p>

<dl>
 <dt>{{domxref("HTMLMediaElement.abort_event", 'abort')}}</dt>
 <dd>Fired when the resource was not fully loaded, but not as the result of an error.</dd>
 <dt>{{domxref("HTMLMediaElement.canplay_event", 'canplay')}}</dt>
 <dd>Fired when the user agent can play the media, but estimates that <strong>not</strong> enough data has been loaded to play the media up to its end without having to stop for further buffering of content</dd>
 <dt>{{domxref("HTMLMediaElement.canplaythrough_event", 'canplaythrough')}}</dt>
 <dd>Fired when the user agent can play the media, and estimates that enough data has been loaded to play the media up to its end without having to stop for further buffering of content.</dd>
 <dt>{{domxref("HTMLMediaElement.durationchange_event", 'durationchange')}}</dt>
 <dd>Fired when the duration attribute has been updated.</dd>
 <dt>{{domxref("HTMLMediaElement.emptied_event", 'emptied')}}</dt>
 <dd>Fired when the media has become empty; for example, when the media has already been loaded (or partially loaded), and the {{domxref("HTMLMediaElement.load()")}} method is called to reload it.</dd>
 <dt>{{domxref("HTMLMediaElement.ended_event", 'ended')}}</dt>
 <dd>Fired when playback stops when end of the media (&lt;audio&gt; or &lt;video&gt;) is reached or because no further data is available.</dd>
 <dt>{{domxref("HTMLMediaElement.error_event", 'error')}}</dt>
 <dd>Fired when the resource could not be loaded due to an error.</dd>
 <dt>{{domxref("HTMLMediaElement.loadeddata_event", 'loadeddata')}}</dt>
 <dd>Fired when the first frame of the media has finished loading.</dd>
 <dt>{{domxref("HTMLMediaElement.loadedmetadata_event", 'loadedmetadata')}}</dt>
 <dd>Fired when the metadata has been loaded</dd>
 <dt>{{domxref("HTMLMediaElement.loadstart_event", 'loadstart')}}</dt>
 <dd>Fired when the browser has started to load a resource.</dd>
 <dt>{{domxref("HTMLMediaElement.pause_event", 'pause')}}</dt>
 <dd>Fired when a request to pause play is handled and the activity has entered its paused state, most commonly occurring when the media's {{domxref("HTMLMediaElement.pause()")}} method is called.</dd>
 <dt>{{domxref("HTMLMediaElement.play_event", 'play')}}</dt>
 <dd>Fired when when the <code>paused</code> property is changed from <code>true</code> to <code>false</code>, as a result of the {{domxref("HTMLMediaElement.play()")}} method, or the <code>autoplay</code> attribute</dd>
 <dt>{{domxref("HTMLMediaElement.playing_event", "playing")}}</dt>
 <dd>Fired when playback is ready to start after having been paused or delayed due to lack of data</dd>
 <dt>{{domxref("HTMLMediaElement.progress_event", "progress")}}</dt>
 <dd>Fired periodically as the browser loads a resource.</dd>
 <dt>{{domxref("HTMLMediaElement.ratechange_event", 'ratechange')}}</dt>
 <dd>Fired when the playback rate has changed.</dd>
 <dt>{{domxref("HTMLMediaElement.seeked_event", 'seeked ')}}</dt>
 <dd>Fired when a seek operation completes</dd>
 <dt>{{domxref("HTMLMediaElement.seeking_event", 'seeking')}}</dt>
 <dd>Fired when a seek operation begins</dd>
 <dt>{{domxref("HTMLMediaElement.stalled_event", 'stalled')}}</dt>
 <dd>Fired when the user agent is trying to fetch media data, but data is unexpectedly not forthcoming.</dd>
 <dt>{{domxref("HTMLMediaElement.suspend_event", 'suspend')}}</dt>
 <dd>Fired when the media data loading has been suspended.</dd>
 <dt>{{domxref("HTMLMediaElement.timeupdate_event", 'timeupdate')}}</dt>
 <dd>Fired when the time indicated by the currentTime attribute has been updated</dd>
 <dt>{{domxref("HTMLMediaElement.volumechange_event", 'volumechange')}}</dt>
 <dd>Fired when the volume has changed.</dd>
 <dt>{{domxref("HTMLMediaElement.waiting_event", 'waiting')}}</dt>
 <dd>Fired when playback has stopped because of a temporary lack of data</dd>
</dl>

<h2 id="Specifications" name="Specifications">仕様書</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">仕様書</th>
   <th scope="col">状態</th>
   <th scope="col">備考</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('Media Capture','#htmlmediaelement-extensions','HTMLMediaElement')}}</td>
   <td>{{Spec2('Media Capture')}}</td>
   <td>Adds <code>sinkId</code> and <code>setSinkId()</code>, and <code>captureStream()</code>.</td>
  </tr>
  <tr>
   <td>{{SpecName('EME', '#introduction', 'Encrypted Media Extensions')}}</td>
   <td>{{Spec2('EME')}}</td>
   <td>Adds {{domxref("MediaKeys")}}, {{domxref("MediaEncryptedEvent")}}, {{domxref("setMediaKeys")}}, {{domxref("onencrypted")}}, and {{domxref("onwaitingforkey")}}.</td>
  </tr>
  <tr>
   <td>{{SpecName('HTML WHATWG', "the-video-element.html#htmlmediaelement", "HTMLMediaElement")}}</td>
   <td>{{Spec2('HTML WHATWG')}}</td>
   <td>{{SpecName('HTML5 W3C')}} からの変更なし</td>
  </tr>
  <tr>
   <td>{{SpecName('HTML5 W3C', "embedded-content-0.html#htmlmediaelement", "HTMLMediaElement")}}</td>
   <td>{{Spec2('HTML5 W3C')}}</td>
   <td>初回定義</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの対応</h2>

<div class="hidden">このページの互換性一覧表は構造化データから生成されています。データに協力していただけるのであれば、 <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> をチェックアウトしてプルリクエストを送信してください。</div>

<p>{{Compat("api.HTMLMediaElement")}}</p>

<h2 id="See_also" name="See_also">関連情報</h2>

<ul>
 <li>参考文献
  <ul>
   <li>{{HTMLElement("video")}} および {{HTMLElement("audio")}}</li>
   <li>このインタフェースを継承している{{domxref("HTMLVideoElement")}}{{domxref("HTMLAudioElement")}}</li>
  </ul>
 </li>
 <li>記事
  <ul>
   <li><a class="internal" href="/docs/Using_HTML5_audio_and_video">HTML5 での音声と動画の利用</a></li>
   <li><a class="internal" href="/ja/docs/Media_formats_supported_by_the_audio_and_video_elements">audio 要素と video 要素が対応しているメディア形式</a></li>
   <li><a href="/ja/docs/Web_Audio_API">Web Audio API</a></li>
  </ul>
 </li>
</ul>