OfflineAudioContext

  • Revision slug: Web/API/OfflineAudioContext
  • Revision title: OfflineAudioContext
  • Revision id: 471075
  • Created:
  • Creator: kscarfone
  • Is current revision? Yes
  • Comment Updated tags

Revision Content

{{WebAudioRef}} {{SeeCompatTable}}

The OfflineAudioContext interface is an {{domxref("AudioContext")}} that is an interface representing an audio-processing graph built from {{domxref("AudioNode")}} linked together. In contrast with a basic AudioContext, an OfflineAudioContext doesn't really render the audio but generates it, as fast as it can, in a buffer.

An OfflineAudioContext is a regular AudioContext and therefore can be target of events, therefore it implements the {{domxref("EventTarget")}} interface.

Properties

Also implements properties from its parents {{domxref("AudioContext")}}.

{{domxref("OfflineAudioContext.oncomplete")}}
Is an {{domxref("EventHandler")}} called when the processing is terminated, that is when the event {{event("complete")}} of type {{domxref("OfflineAudioCompletionEvent")}} is raised.

Methods

Also implements methods from its parent {{domxref("AudioContext")}}, and therefore of {{domxref("EventTarget")}}.

{{domxref("OfflineAudioContext.startRendering()")}}
Starts rendering the audio, taking into account the current connections and the current scheduled changes. The event {{event("complete")}} of type {{domxref("OfflineAudioCompletionEvent")}}, and containing the resulting buffer, is raised when the rendering is finished

Examples

---

Specifications

Specification Status Comment
{{SpecName('Web Audio API', '#OfflineAudioContext-section', 'OfflineAudioContext')}} {{Spec2('Web Audio API')}}  

Browser compatibility

{{CompatibilityTable}}
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{CompatVersionUnknown}}{{property_prefix("webkit")}} Activated on Nightly only (24) {{CompatNo}} {{CompatNo}} {{CompatUnknown}}
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{CompatUnknown}} Activated on Nightly only {{CompatNo}} {{CompatNo}} {{CompatUnknown}}

See also

  • Using Web Audio

Revision Source

<div>
  {{WebAudioRef}} {{SeeCompatTable}}</div>
<p>The <strong><code>OfflineAudioContext</code></strong> interface is an {{domxref("AudioContext")}} that is an interface representing an audio-processing graph built from {{domxref("AudioNode")}} linked together. In contrast with a basic <code>AudioContext</code>, an <code>OfflineAudioContext</code> doesn't really render the audio but generates it, <em>as fast as it can</em>, in a buffer.</p>
<p>An <code>OfflineAudioContext</code> is a regular <code>AudioContext</code> and therefore can be target of events, therefore it implements the {{domxref("EventTarget")}} interface.</p>
<h2 id="Properties">Properties</h2>
<p><em>Also implements properties from its parents {{domxref("AudioContext")}}.</em></p>
<dl>
  <dt>
    {{domxref("OfflineAudioContext.oncomplete")}}</dt>
  <dd>
    Is an {{domxref("EventHandler")}} called when the processing is terminated, that is when the event {{event("complete")}} of type {{domxref("OfflineAudioCompletionEvent")}} is raised.</dd>
</dl>
<h2 id="Methods">Methods</h2>
<p><em>Also implements methods from its parent {{domxref("AudioContext")}}, and therefore of {{domxref("EventTarget")}}.</em></p>
<dl>
  <dt>
    {{domxref("OfflineAudioContext.startRendering()")}}</dt>
  <dd>
    Starts rendering the audio, taking into account the current connections and the current scheduled changes. The event {{event("complete")}} of type {{domxref("OfflineAudioCompletionEvent")}}, and containing the resulting buffer, is raised when the rendering is finished</dd>
</dl>
<h2 id="Examples">Examples</h2>
<p>---</p>
<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('Web Audio API', '#OfflineAudioContext-section', 'OfflineAudioContext')}}</td>
      <td>{{Spec2('Web Audio API')}}</td>
      <td>&nbsp;</td>
    </tr>
  </tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<div>
  {{CompatibilityTable}}</div>
<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 (WebKit)</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{CompatVersionUnknown}}{{property_prefix("webkit")}}</td>
        <td>Activated on Nightly only (24)</td>
        <td>{{CompatNo}}</td>
        <td>{{CompatNo}}</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>IE Phone</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{CompatUnknown}}</td>
        <td>Activated on Nightly only</td>
        <td>{{CompatNo}}</td>
        <td>{{CompatNo}}</td>
        <td>{{CompatUnknown}}</td>
      </tr>
    </tbody>
  </table>
</div>
<h2 id="See_also">See also</h2>
<ul>
  <li>Using Web Audio</li>
</ul>
Revert to this revision