Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 1066420 of <video>

  • Revision slug: Web/HTML/Element/video
  • Revision title: <video>
  • Revision id: 1066420
  • Created:
  • Creator: kentuckyfriedtakahe
  • Is current revision? No
  • Comment Updated to reflect webm as the example container

Revision Content

{{HTMLRef}}

Use the  HTML <video> element to embed video content in a document. The video element contains one or more video sources. To specify a video source, use either the src attribute or the {{HTMLElement("source")}} element; the browser will choose the most suitable one.

For a list of supported formats, see Media formats supported by the audio and video elements.

Usage context

Content categories Flow content, phrasing content, embedded content. If it has a {{htmlattrxref("controls", "video")}} attribute: interactive content and palpable content.
Permitted content

If the element has a {{htmlattrxref("src", "video")}} attribute: zero or more {{HTMLElement("track")}} elements, followed by transparent content that contains no media elements — that is no {{HTMLElement("audio")}} or {{HTMLElement("video")}}

Else: zero or more {{HTMLElement("source")}} elements, followed by zero or more {{HTMLElement("track")}} elements, followed by transparent content that contains no media elements — that is no {{HTMLElement("audio")}} or {{HTMLElement("video")}}.

Tag omission {{no_tag_omission}}
Permitted parent elements Any element that accepts embedded content.
DOM interface {{domxref("HTMLVideoElement")}}

Attributes

Like all other HTML elements, this element supports the global attributes.

{{htmlattrdef("autoplay")}}
A Boolean attribute; if specified, the video automatically begins to play back as soon as it can do so without stopping to finish loading the data.
Note: Some versions of Chrome only acknowledge autostart, rather than autoplay
{{htmlattrdef("buffered")}}
An attribute you can read to determine the time ranges of the buffered media. This attribute contains a {{domxref("TimeRanges")}} object.
{{htmlattrdef("controls")}}
If this attribute is present, the browser will offer controls to allow the user to control video playback, including volume, seeking, and pause/resume playback.
{{htmlattrdef("crossorigin")}}
This enumerated attribute indicates whether to use CORS to fetch the related image. CORS-enabled resources can be reused in the {{HTMLElement("canvas")}} element without being tainted. The allowed values are:
anonymous
Sends a  cross-origin request without a credential. In other words, it sends the Origin: HTTP header without a cookie, X.509 certificate, or performing HTTP Basic authentication. If the server does not give credentials to the origin site (by not setting the Access-Control-Allow-Origin: HTTP header), the image will be tainted, and its usage restricted.
use-credentials
Sends a  cross-origin request with a credential. In other words, it sends the Origin: HTTP header with a cookie, a certificate, or performing HTTP Basic authentication. If the server does not give credentials to the origin site (through Access-Control-Allow-Credentials: HTTP header), the image will be tainted and its usage restricted.
When not present, the resource is fetched without a CORS request (i.e. without sending the Origin: HTTP header), preventing its non-tainted used in {{HTMLElement('canvas')}} elements. If invalid, it is handled as if the enumerated keyword anonymous was used. See CORS settings attributes for additional information.
{{htmlattrdef("height")}}
The height of the video's display area, in CSS pixels.
{{htmlattrdef("loop")}}
A Boolean attribute; if specified, we will, upon reaching the end of the video, automatically seek back to the start.
{{htmlattrdef("muted")}}
A Boolean attribute which indicates the default setting of the audio contained in the video. If set, the audio will be initially silenced. Its default value is false, meaning that the audio will be played when the video is played.
{{htmlattrdef("played")}}
A {{domxref("TimeRanges")}} object indicating all the ranges of the video that have been played.
{{htmlattrdef("preload")}}
This enumerated attribute is intended to provide a hint to the browser about what the author thinks will lead to the best user experience. It may have one of the following values:
  • none: indicates that the video should not be preloaded.
  • metadata: indicates that only video metadata (e.g. length) is fetched.
  • auto: indicates that the whole video file could be downloaded, even if the user is not expected to use it.
  • the empty string: synonym of the auto value.

If not set, its default value is browser-defined (i.e. each browser may have its default value). The spec advises it to be set to metadata.

Usage notes:
  • The autoplay attribute has precedence over preload. If autoplay is specified, the browser would obviously need to start downloading the video for playback.
  • The specification does not force the browser to follow the value of this attribute; it is a mere hint.
{{htmlattrdef("poster")}}
A URL indicating a poster frame to show until the user plays or seeks. If this attribute isn't specified, nothing is displayed until the first frame is available; then the first frame is shown as the poster frame.
{{htmlattrdef("src")}}
The URL of the video to embed. This is optional; you may instead use the {{HTMLElement("source")}} element within the video block to specify the video to embed.
{{htmlattrdef("width")}}
The width of the video's display area, in CSS pixels.

Events

The <video> element can fire many different events.

Examples

<!-- Simple video example -->
<video src="videofile.webm" autoplay poster="posterimage.jpg">
  Sorry, your browser doesn't support embedded videos, 
  but don't worry, you can <a href="videofile.webm">download it</a>
  and watch it with your favorite video player!
</video>

<!-- Video with subtitles -->
<video src="foo.ogg">
  <track kind="subtitles" src="foo.en.vtt" srclang="en" label="English">
  <track kind="subtitles" src="foo.sv.vtt" srclang="sv" label="Svenska">
</video>

The first example plays a video, starting playback as soon as enough of the video has been received to allow playback without pausing to download more. Until the video starts playing, the image "posterimage.jpg" is displayed in its place.

The second example allows the user to choose between different subtitles.

Multiple Sources Example

<video width="480" controls poster="https://archive.org/download/WebmVp8Vorbis/webmvp8.gif" >
  <source src="https://archive.org/download/WebmVp8Vorbis/webmvp8.webm" type="video/webm">
  <source src="https://archive.org/download/WebmVp8Vorbis/webmvp8_512kb.mp4" type="video/mp4">
  <source src="https://archive.org/download/WebmVp8Vorbis/webmvp8.ogv" type="video/ogg">
  Your browser doesn't support HTML5 video tag.
</video>

You can try the preceding example on HTML5 video demo example with live preview code editor.

Server support

If the MIME type for the video is not set correctly on the server, the video may not show or show a gray box containing an X (if JavaScript is enabled).

If you use Apache Web Server to serve Ogg Theora videos, you can fix this problem by adding the video file type extensions to "video/ogg" MIME type.  The most common video file type extensions are ".ogm", ".ogv", or ".ogg"To do this, edit the "mime.types" file in "/etc/apache" or use the "AddType" configuration directive in httpd.conf.

AddType video/ogg .ogm
AddType video/ogg .ogv
AddType video/ogg .ogg

If you serve your videos as WebM, you can fix this problem for the Apache Web Server by adding the extension used by your video files (".webm" is the most common one) to the MIME type "video/webm" via the "mime.types" file in "/etc/apache" or via the "AddType" configuration directive in httpd.conf.

AddType video/webm .webm

Your web host may provide an easy interface to MIME type configuration changes for new technologies until a global update naturally occurs.

DOM interface

This element implements the HTMLVideoElement interface.

Browser compatibility

{{CompatibilityTable}}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 3.0 {{CompatGeckoDesktop("1.9.1")}} 9.0 10.5 3.1
autoplay attribute 3.0 {{CompatGeckoDesktop("1.9.1")}} 9.0 10.5 3.1
buffered attribute {{CompatUnknown}} {{CompatGeckoDesktop("2.0")}} {{CompatUnknown}} {{CompatVersionUnknown}} {{CompatUnknown}}
controls attribute 3.0 {{CompatGeckoDesktop("1.9.1")}} 9.0 10.5 3.1
crossorigin attribue {{CompatUnknown}} {{CompatGeckoDesktop("12.0")}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
loop attribute 3.0 {{CompatGeckoDesktop("11.0")}} 9.0 10.5 3.1
muted attribute 30.0 {{CompatGeckoDesktop("11.0")}} 10.0 {{CompatVersionUnknown}} 5.0
played property {{CompatUnknown}} {{CompatGeckoDesktop("15.0")}} {{CompatUnknown}} {{CompatVersionUnknown}} {{CompatUnknown}}
poster attribute 3.0 {{CompatGeckoDesktop("1.9.2")}} 9.0 10.5 3.1
preload attribute 3.0 {{CompatGeckoDesktop("2.0")}} 9.0 {{CompatVersionUnknown}} 3.1
src attribute 3.0 {{CompatGeckoDesktop("1.9.1")}} 9.0 10.5 3.1
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{CompatUnknown}} {{CompatGeckoMobile("1.0")}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
autoplay attribute {{CompatUnknown}} {{CompatGeckoMobile("1.0")}} 8.1 {{CompatUnknown}} {{CompatVersionUnknown}}[1]
buffered attribute {{CompatUnknown}} {{CompatGeckoMobile("2.0")}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
controls attribute {{CompatUnknown}} {{CompatGeckoMobile("1.0")}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
loop attribute {{CompatUnknown}} {{CompatGeckoMobile("11.0")}} 8.0 {{CompatUnknown}} 6.0
muted attribute {{CompatUnknown}} {{CompatGeckoMobile("11.0")}} 8.0 {{CompatUnknown}} {{CompatUnknown}}
played property {{CompatUnknown}} {{CompatGeckoMobile("15.0")}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
poster attribute {{CompatUnknown}} {{CompatGeckoMobile("1.0")}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
preload attribute {{CompatUnknown}} {{CompatGeckoMobile("2.0")}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
src attribute {{CompatUnknown}} {{CompatGeckoMobile("1.0")}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
crossorigin attribute {{CompatUnknown}} {{CompatGeckoMobile("12.0")}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}

[1] This feature is only available on iOS 6.0.

See also

Revision Source

<p>{{HTMLRef}}</p>

<p>Use the &nbsp;<strong>HTML <code>&lt;video&gt;</code> element</strong>&nbsp;to embed video content in a document. The video element contains one or more video sources. To specify a video source, use either the <code>src</code> attribute or the {{HTMLElement("source")}} element; the browser will choose the most suitable one.</p>

<p>For a list of supported formats, see <a href="/en-US/docs/Media_formats_supported_by_the_audio_and_video_elements">Media formats supported by the audio and video elements</a>.</p>

<h2 id="Usage_context">Usage context</h2>

<table class="properties">
 <tbody>
  <tr>
   <th scope="row"><a href="/en-US/docs/Web/HTML/Content_categories">Content categories</a></th>
   <td><a href="/en-US/docs/Web/HTML/Content_categories#Flow_content">Flow content</a>, phrasing content, embedded content. If it has a {{htmlattrxref("controls", "video")}} attribute: interactive content and palpable content.</td>
  </tr>
  <tr>
   <th scope="row">Permitted content</th>
   <td>
    <p>If the element has a {{htmlattrxref("src", "video")}} attribute: zero or more {{HTMLElement("track")}} elements, followed by transparent content that contains no media elements&nbsp;— that is no {{HTMLElement("audio")}} or {{HTMLElement("video")}}</p>

    <p>Else: zero or more {{HTMLElement("source")}} elements, followed by zero or more {{HTMLElement("track")}} elements, followed by transparent content that contains no media elements&nbsp;— that is no {{HTMLElement("audio")}} or {{HTMLElement("video")}}.</p>
   </td>
  </tr>
  <tr>
   <th scope="row">Tag omission</th>
   <td>{{no_tag_omission}}</td>
  </tr>
  <tr>
   <th scope="row">Permitted parent elements</th>
   <td>Any element that accepts embedded content.</td>
  </tr>
  <tr>
   <th scope="row">DOM interface</th>
   <td>{{domxref("HTMLVideoElement")}}</td>
  </tr>
 </tbody>
</table>

<h2 id="Attributes">Attributes</h2>

<p>Like all other HTML elements, this element supports the <a href="/en-US/docs/HTML/Global_attributes">global attributes</a>.</p>

<dl>
 <dt>{{htmlattrdef("autoplay")}}</dt>
 <dd>A Boolean attribute; if specified, the video automatically begins to play back as soon as it can do so without stopping to finish loading the data.</dd>
 <dd>
 <pre>
Note: Some versions of Chrome only acknowledge <strong><code>autostart</code></strong>, rather than <strong><code>autoplay</code></strong></pre>
 </dd>
</dl>

<dl>
 <dt>{{htmlattrdef("buffered")}}</dt>
 <dd>An attribute you can read to determine the time ranges of the buffered media. This attribute contains a {{domxref("TimeRanges")}} object.</dd>
 <dt>{{htmlattrdef("controls")}}</dt>
 <dd>If this attribute is present, the browser will offer controls to allow the user to control video playback, including volume, seeking, and pause/resume playback.</dd>
 <dt>{{htmlattrdef("crossorigin")}}</dt>
 <dd>This enumerated attribute indicates whether to use CORS to fetch the related image. <a href="/en-US/docs/CORS_Enabled_Image">CORS-enabled resources</a> can be reused in the {{HTMLElement("canvas")}} element without being <em>tainted</em>. The allowed values are:
 <dl>
  <dt>anonymous</dt>
  <dd>Sends a &nbsp;cross-origin request without a credential. In other words, it sends the&nbsp;<code style="font-size: 15px; background-color: rgb(245, 246, 245);">Origin:</code><span style="background-color:rgb(245, 246, 245)">&nbsp;HTTP header without a&nbsp;</span>cookie, X.509 certificate, or performing HTTP Basic authentication. If the server does not give credentials to the origin site (by not setting the <code style="font-size: 15px;">Access-Control-Allow-Origin:</code> HTTP header), the image will be <em>tainted</em>, and its usage restricted.</dd>
  <dt>use-credentials</dt>
  <dd><span style="background-color:rgb(245, 246, 245)">Sends a &nbsp;cross-origin request with a credential.&nbsp;</span><span style="background-color:rgb(245, 246, 245)">In other words, it sends the&nbsp;</span><code style="font-size: 15px; background-color: rgb(245, 246, 245);">Origin:</code><span style="background-color:rgb(245, 246, 245)">&nbsp;HTTP header with&nbsp;</span>a cookie, a certificate, or performing HTTP Basic authentication. If the server does not give credentials to the origin site (through <code style="font-size: 15px;">Access-Control-Allow-Credentials:</code> HTTP header), the image will be <em>tainted</em> and its usage restricted.</dd>
 </dl>
 When not present, the resource is fetched without a CORS request (i.e. without sending the <code>Origin:</code> HTTP header), preventing its non-tainted used in {{HTMLElement('canvas')}} elements. If invalid, it is handled as if the enumerated keyword <strong>anonymous</strong> was used. See <a href="/en-US/docs/HTML/CORS_settings_attributes">CORS settings attributes</a> for additional information.</dd>
 <dt>{{htmlattrdef("height")}}</dt>
 <dd>The height of the video's display area, in CSS pixels.</dd>
 <dt>{{htmlattrdef("loop")}}</dt>
 <dd>A Boolean attribute; if specified, we will, upon reaching the end of the video, automatically seek back to the start.</dd>
 <dt>{{htmlattrdef("muted")}}</dt>
 <dd>A Boolean attribute which indicates the default setting of the audio contained in the video. If set, the audio will be initially silenced. Its default value is false, meaning that the audio will be played when the video is played.</dd>
 <dt>{{htmlattrdef("played")}}</dt>
 <dd>A {{domxref("TimeRanges")}} object indicating all the ranges of the video that have been played.</dd>
 <dt>{{htmlattrdef("preload")}}</dt>
 <dd>This enumerated attribute is intended to provide a hint to the browser about what the author thinks will lead to the best user experience. It may have one of the following values:
 <ul>
  <li><code>none</code>: indicates that the video should not be preloaded.</li>
  <li><code>metadata</code>: indicates that only video metadata (e.g. length) is fetched.</li>
  <li><code>auto</code>: indicates that the whole video file could be downloaded, even if the user is not expected to use it.</li>
  <li>the <em>empty string</em>: synonym of the <code>auto</code> value.</li>
 </ul>

 <p>If not set, its default value is browser-defined (i.e. each browser may have its default value). The spec advises it to be set to <code>metadata</code>.</p>

 <div class="note"><strong>Usage notes:</strong>

 <ul>
  <li>The <code>autoplay</code> attribute has precedence over&nbsp;<code>preload</code>. If <code>autoplay</code> is specified, the browser would obviously need to start downloading the video for playback.</li>
  <li>The&nbsp;<span style="background-color:rgb(245, 246, 245)">specification does not force the&nbsp;</span>browser to follow the value of this attribute; it is a mere&nbsp;hint.</li>
 </ul>
 </div>
 </dd>
 <dt>{{htmlattrdef("poster")}}</dt>
 <dd>A URL indicating a poster frame to show until the user plays or seeks. If this attribute isn't specified, nothing is displayed until the first frame is available; then the first frame is shown as the poster frame.</dd>
 <dt>{{htmlattrdef("src")}}</dt>
 <dd>The URL of the video to embed. This is optional; you may instead use the {{HTMLElement("source")}} element within the video block to specify the video to embed.</dd>
 <dt>{{htmlattrdef("width")}}</dt>
 <dd>The width of the video's display area, in CSS pixels.</dd>
</dl>

<h2 id="Events">Events</h2>

<p>The <code>&lt;video&gt;</code> element can fire many different <a href="/en-US/docs/Web/Guide/Events/Media_events">events</a>.</p>

<h2 id="Examples">Examples</h2>

<pre class="brush: html">
&lt;!-- Simple video example --&gt;
&lt;video src="videofile.webm" autoplay poster="posterimage.jpg"&gt;
  Sorry, your browser doesn't support embedded videos, 
  but don't worry, you can &lt;a href="videofile.webm"&gt;download it&lt;/a&gt;
  and watch it with your favorite video player!
&lt;/video&gt;

&lt;!-- Video with subtitles --&gt;
&lt;video src="foo.ogg"&gt;
  &lt;track kind="subtitles" src="foo.en.vtt" srclang="en" label="English"&gt;
  &lt;track kind="subtitles" src="foo.sv.vtt" srclang="sv" label="Svenska"&gt;
&lt;/video&gt;
</pre>

<p>The first example plays a video, starting playback as soon as enough of the video has been received to allow playback without pausing to download more. Until the video starts playing, the image "posterimage.jpg" is displayed in its place.</p>

<p>The second example allows the user to choose between different subtitles.</p>

<h2 id="Multiple_Sources_Example">Multiple Sources Example</h2>

<pre class="brush: html">
&lt;video width="480" controls poster="https://archive.org/download/WebmVp8Vorbis/webmvp8.gif" &gt;
  &lt;source src="https://archive.org/download/WebmVp8Vorbis/webmvp8.webm" type="video/webm"&gt;
  &lt;source src="https://archive.org/download/WebmVp8Vorbis/webmvp8_512kb.mp4" type="video/mp4"&gt;
  &lt;source src="https://archive.org/download/WebmVp8Vorbis/webmvp8.ogv" type="video/ogg"&gt;
  Your browser doesn't support HTML5 video tag.
&lt;/video&gt;</pre>

<p>You can try the preceding example on <a href="https://dul.web.id/contoh-example/html/tag-element/html5-video.php">HTML5 video demo example</a> with live preview code editor.</p>

<h2 id="Server_support">Server support</h2>

<p>If the MIME type for the video is not set correctly on the server, the video may not show or show a gray box containing an X (if JavaScript is enabled).</p>

<p>If you use&nbsp;<span style="background-color:rgb(245, 246, 245)">Apache Web Server</span><span style="background-color:rgb(245, 246, 245)">&nbsp;to&nbsp;</span>serve Ogg Theora videos, you can fix this problem by adding the video file type extensions to "video/ogg" MIME type.&nbsp;<span style="background-color:rgb(245, 246, 245)">&nbsp;The&nbsp;</span><span style="background-color:rgb(245, 246, 245)">most common video file type extensions are&nbsp;</span><span style="background-color:rgb(245, 246, 245)">".ogm</span><span style="background-color:rgb(245, 246, 245)">",</span><span style="background-color:rgb(245, 246, 245)">&nbsp;".ogv", or ".ogg"</span><span style="background-color:rgb(245, 246, 245)">.&nbsp;</span>To do this, edit the "mime.types" file in "/etc/apache" or use the "AddType" configuration directive in httpd.conf.</p>

<pre class="eval">
AddType video/ogg .ogm
AddType video/ogg .ogv
AddType video/ogg .ogg
</pre>

<p>If you serve your videos as WebM, you can fix this problem for the Apache Web Server by adding the extension used by your video files (".webm" is the most common one) to the MIME type "video/webm" via the "mime.types" file in "/etc/apache" or via the "AddType" configuration directive in httpd.conf.</p>

<pre class="eval">
AddType video/webm .webm
</pre>

<p>Your web host may provide an easy interface to MIME type configuration changes for new technologies until a global update naturally occurs.</p>

<h2 id="DOM_interface">DOM interface</h2>

<p>This element implements the <code><a href="/en-US/docs/Web/API/HTMLVideoElement">HTMLVideoElement</a></code> interface.</p>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<p>{{CompatibilityTable}}</p>

<div>
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>3.0</td>
   <td>{{CompatGeckoDesktop("1.9.1")}}</td>
   <td>9.0</td>
   <td>10.5</td>
   <td>3.1</td>
  </tr>
  <tr>
   <td><code>autoplay</code> attribute</td>
   <td>3.0</td>
   <td>{{CompatGeckoDesktop("1.9.1")}}</td>
   <td>9.0</td>
   <td>10.5</td>
   <td>3.1</td>
  </tr>
  <tr>
   <td><code>buffered</code> attribute</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoDesktop("2.0")}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
  <tr>
   <td><code>controls</code> attribute</td>
   <td>3.0</td>
   <td>{{CompatGeckoDesktop("1.9.1")}}</td>
   <td>9.0</td>
   <td>10.5</td>
   <td>3.1</td>
  </tr>
  <tr>
   <td><code>crossorigin</code> attribue</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoDesktop("12.0")}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
  <tr>
   <td><code>loop</code> attribute</td>
   <td>3.0</td>
   <td>{{CompatGeckoDesktop("11.0")}}</td>
   <td>9.0</td>
   <td>10.5</td>
   <td>3.1</td>
  </tr>
  <tr>
   <td><code>muted</code> attribute</td>
   <td>30.0</td>
   <td>{{CompatGeckoDesktop("11.0")}}</td>
   <td>10.0</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>5.0</td>
  </tr>
  <tr>
   <td><code>played</code> property</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoDesktop("15.0")}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
  <tr>
   <td><code>poster</code> attribute</td>
   <td>3.0</td>
   <td>{{CompatGeckoDesktop("1.9.2")}}</td>
   <td>9.0</td>
   <td>10.5</td>
   <td>3.1</td>
  </tr>
  <tr>
   <td><code>preload</code> attribute</td>
   <td>3.0</td>
   <td>{{CompatGeckoDesktop("2.0")}}</td>
   <td>9.0</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>3.1</td>
  </tr>
  <tr>
   <td><code>src</code> attribute</td>
   <td>3.0</td>
   <td>{{CompatGeckoDesktop("1.9.1")}}</td>
   <td>9.0</td>
   <td>10.5</td>
   <td>3.1</td>
  </tr>
 </tbody>
</table>
</div>

<div>
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>IE Mobile</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoMobile("1.0")}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
  <tr>
   <td><code>autoplay</code> attribute</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoMobile("1.0")}}</td>
   <td>8.1</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatVersionUnknown}}<sup>[1]</sup></td>
  </tr>
  <tr>
   <td><code>buffered</code> attribute</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoMobile("2.0")}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
  <tr>
   <td><code>controls</code> attribute</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoMobile("1.0")}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
  <tr>
   <td><code>loop</code> attribute</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoMobile("11.0")}}</td>
   <td>8.0</td>
   <td>{{CompatUnknown}}</td>
   <td>6.0</td>
  </tr>
  <tr>
   <td><code>muted</code> attribute</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoMobile("11.0")}}</td>
   <td>8.0</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
  <tr>
   <td><code>played</code> property</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoMobile("15.0")}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
  <tr>
   <td><code>poster</code> attribute</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoMobile("1.0")}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
  <tr>
   <td><code>preload</code> attribute</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoMobile("2.0")}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
  <tr>
   <td><code>src</code> attribute</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoMobile("1.0")}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
  <tr>
   <td><code>crossorigin</code> attribute</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoMobile("12.0")}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<p>[1] This feature is only available on iOS 6.0.</p>

<h2 id="See_also">See also</h2>

<ul>
 <li><a href="/en-US/docs/Media_formats_supported_by_the_audio_and_video_elements">Media formats supported by the audio and video elements</a></li>
 <li>{{htmlelement("audio")}}</li>
 <li><a href="/en-US/docs/Using_HTML5_audio_and_video">Using HTML5 audio and video</a></li>
 <li><a href="/en-US/docs/Manipulating_video_using_canvas">Manipulating video using canvas</a></li>
 <li><a href="/en-US/docs/XPCOM_Interface_Reference/NsIDOMHTMLMediaElement"><code>nsIDOMHTMLMediaElement</code></a></li>
 <li><a class="external" href="https://tinyvid.tv/">TinyVid</a> - examples using ogg files in HTML5.</li>
 <li><a class="external" href="https://www.whatwg.org/specs/web-apps/current-work/#video">The <code>video</code> element</a> (HTML5 specification)</li>
 <li><a href="/en-US/docs/Configuring_servers_for_Ogg_media">Configuring servers for Ogg media</a></li>
 <li><a href="https://www.jwplayer.com/html5/">The state of HTML5 video</a></li>
</ul>
Revert to this revision