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 901507 of HTMLMediaElement.buffered

  • Revision slug: Web/API/HTMLMediaElement/buffered
  • Revision title: HTMLMediaElement.buffered
  • Revision id: 901507
  • Created:
  • Creator: markg
  • Is current revision? No
  • Comment

Revision Content

{{APIRef("HTML DOM")}}

The HTMLMediaElement.buffered read-only property returns a {{domxref("TimeRanges")}} object that indicates the ranges of the media source that the browser has buffered (if any) at the moment the buffered property is accessed.

{{NotAvailableInWorkers}}

Syntax

var timeRange = audioObject.buffered

Value

A {{domxref("TimeRanges")}} object. This object is normalized, which means that ranges are ordered, don't overlap, aren't empty, and don't touch (adjacent ranges are folded into one bigger range).

Example

var obj = document.createElement('video');
console.log(obj.buffered); // TimeRanges { length: 0 }

Specifications

Specification Status Comment
{{SpecName('HTML WHATWG', "the-video-element.html#htmlmediaelement", "HTMLMediaElement.buffered")}} {{Spec2('HTML WHATWG')}} No change from {{SpecName('HTML5 W3C')}}
{{SpecName('HTML5 W3C', "embedded-content-0.html#htmlmediaelement", "HTMLMediaElement.buffered")}} {{Spec2('HTML5 W3C')}} Initial definition.

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
buffered property {{CompatVersionUnknown}} {{CompatGeckoDesktop("2.0")}} {{CompatIE("9")}} {{CompatUnknown}} {{CompatUnknown}}
Feature Android Firefox Mobile (Gecko) Firefox OS (Gecko) IE Mobile Opera Mobile Safari Mobile
buffered property {{CompatVersionUnknown}} {{CompatGeckoMobile("2.0")}} {{CompatVersionUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}

See also

  • The interface defining it, {{domxref("HTMLMediaElement")}}.

Revision Source

<div>{{APIRef("HTML DOM")}}</div>

<p>The <strong><code>HTMLMediaElement.buffered</code></strong> read-only property returns a {{domxref("TimeRanges")}} object that&nbsp;indicates&nbsp;the ranges of the media source that the browser has buffered (if any) at the moment the <code>buffered</code> property is accessed.</p>

<p>{{NotAvailableInWorkers}}</p>

<h2 id="Syntax" name="Syntax">Syntax</h2>

<pre class="syntaxbox">
var <em>timeRange</em> = <em>audioObject</em>.buffered</pre>

<h3 id="Value">Value</h3>

<p>A {{domxref("TimeRanges")}} object.&nbsp;This object is <a href="/en-US/docs/Web/API/TimeRanges">normalized</a>, which means that ranges are ordered, don't overlap, aren't empty, and don't touch (adjacent ranges are folded into one bigger range).</p>

<h2 id="Example">Example</h2>

<pre class="brush: js">
var obj = document.createElement('video');
console.log(obj.buffered); // TimeRanges { length: 0 }
</pre>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('HTML WHATWG', "the-video-element.html#htmlmediaelement", "HTMLMediaElement.buffered")}}</td>
   <td>{{Spec2('HTML WHATWG')}}</td>
   <td>No change from {{SpecName('HTML5 W3C')}}</td>
  </tr>
  <tr>
   <td>{{SpecName('HTML5 W3C', "embedded-content-0.html#htmlmediaelement", "HTMLMediaElement.buffered")}}</td>
   <td>{{Spec2('HTML5 W3C')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

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

<p>{{ CompatibilityTable() }}</p>

<div id="compat-desktop">
<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><code>buffered</code> property</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatGeckoDesktop("2.0")}}</td>
   <td>{{CompatIE("9")}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>Firefox OS (Gecko)</th>
   <th>IE Mobile</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td><code>buffered</code> property</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatGeckoMobile("2.0")}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<h2 id="See_Also" name="See_Also">See also</h2>

<ul>
 <li>The interface defining it, {{domxref("HTMLMediaElement")}}.</li>
</ul>
Revert to this revision