|
@@ -98,24 +98,24 @@
|
|
|
|
|
|
<h2>Methods</h2>
|
|
|
|
|
|
- <h3>[method:null connect]()</h3>
|
|
|
+ <h3>[method:Audio connect]()</h3>
|
|
|
<p>
|
|
|
Connect to the [page:Audio.source]. This is used internally on initialisation and when
|
|
|
setting / removing filters.
|
|
|
</p>
|
|
|
|
|
|
- <h3>[method:null disconnect]()</h3>
|
|
|
+ <h3>[method:Audio disconnect]()</h3>
|
|
|
<p>
|
|
|
Disconnect from the [page:Audio.source]. This is used internally when
|
|
|
setting / removing filters.
|
|
|
</p>
|
|
|
|
|
|
- <h3>[method:Array getFilter]()</h3>
|
|
|
+ <h3>[method:BiquadFilterNode getFilter]()</h3>
|
|
|
<p>
|
|
|
Returns the first element of the [page:Audio.filters filters] array.
|
|
|
</p>
|
|
|
|
|
|
- <h3>[method:null getFilters]()</h3>
|
|
|
+ <h3>[method:Array getFilters]()</h3>
|
|
|
<p>
|
|
|
Returns the [page:Audio.filters filters] array.
|
|
|
</p>
|
|
@@ -131,22 +131,22 @@
|
|
|
Return the [page:Audio.gain gainNode].
|
|
|
</p>
|
|
|
|
|
|
- <h3>[method:Number getPlaybackRate]()</h3>
|
|
|
+ <h3>[method:Float getPlaybackRate]()</h3>
|
|
|
<p>
|
|
|
Return the value of [page:Audio.playbackRate playbackRate].
|
|
|
</p>
|
|
|
|
|
|
- <h3>[method:Number getVolume]( value )</h3>
|
|
|
+ <h3>[method:Float getVolume]( value )</h3>
|
|
|
<p>
|
|
|
Return the current volume.
|
|
|
</p>
|
|
|
|
|
|
- <h3>[method:null play]()</h3>
|
|
|
+ <h3>[method:Audio play]()</h3>
|
|
|
<p>
|
|
|
If [page:Audio.hasPlaybackControl hasPlaybackControl] is true, starts playback.
|
|
|
</p>
|
|
|
|
|
|
- <h3>[method:null pause]()</h3>
|
|
|
+ <h3>[method:Audio pause]()</h3>
|
|
|
<p>
|
|
|
If [page:Audio.hasPlaybackControl hasPlaybackControl] is true, pauses playback.
|
|
|
</p>
|
|
@@ -162,7 +162,7 @@
|
|
|
If [page:Audio.autoplay autoplay], also starts playback.
|
|
|
</p>
|
|
|
|
|
|
- <h3>[method:null setFilter]( filter )</h3>
|
|
|
+ <h3>[method:Audio setFilter]( filter )</h3>
|
|
|
<p>
|
|
|
Applies a single [link:https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode BiquadFilterNode] to the audio.
|
|
|
</p>
|
|
@@ -173,37 +173,37 @@
|
|
|
Applies an array of [link:https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode BiquadFilterNodes] to the audio.
|
|
|
</p>
|
|
|
|
|
|
- <h3>[method:null setLoop]( [param:Boolean value] )</h3>
|
|
|
+ <h3>[method:Audio setLoop]( [param:Boolean value] )</h3>
|
|
|
<p>
|
|
|
Set [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/loop source.loop] to *value*
|
|
|
(whether playback should loop).
|
|
|
</p>
|
|
|
|
|
|
- <h3>[method:null setMediaElementSource]( mediaElement )</h3>
|
|
|
+ <h3>[method:Audio setMediaElementSource]( mediaElement )</h3>
|
|
|
<p>
|
|
|
Applies the given object of type [link:https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement HTMLMediaElement] as the source of this audio.<br />
|
|
|
Also sets [page:Audio.hasPlaybackControl hasPlaybackControl] to false.
|
|
|
|
|
|
</p>
|
|
|
|
|
|
- <h3>[method:null setNodeSource]( audioNode )</h3>
|
|
|
+ <h3>[method:Audio setNodeSource]( audioNode )</h3>
|
|
|
<p>
|
|
|
Setup the [page:Audio.source source] to the audioBuffer, and sets [page:Audio.sourceType sourceType] to 'audioNode'.<br />
|
|
|
Also sets [page:Audio.hasPlaybackControl hasPlaybackControl] to false.
|
|
|
|
|
|
</p>
|
|
|
|
|
|
- <h3>[method:null setPlaybackRate]( [param:Number value] )</h3>
|
|
|
+ <h3>[method:Audio setPlaybackRate]( [param:Float value] )</h3>
|
|
|
<p>
|
|
|
If [page:Audio.hasPlaybackControl hasPlaybackControl] is enabled, set the [page:Audio.playbackRate playbackRate] to *value*.
|
|
|
</p>
|
|
|
|
|
|
- <h3>[method:null setVolume]( [param:Number value] )</h3>
|
|
|
+ <h3>[method:Audio setVolume]( [param:Float value] )</h3>
|
|
|
<p>
|
|
|
Set the volume.
|
|
|
</p>
|
|
|
|
|
|
- <h3>[method:null stop]()</h3>
|
|
|
+ <h3>[method:Audio stop]()</h3>
|
|
|
<p>
|
|
|
If [page:Audio.hasPlaybackControl hasPlaybackControl] is enabled, stops playback,
|
|
|
resets [page:Audio.startTime startTime] to *0* and sets [page:Audio.isPlaying isPlaying] to false.
|