User:Corban/AudioAPI: Difference between revisions

m
Line 3: Line 3:
The HTML5 specification introduces the audio and video media elements, and with them the opportunity to dramatically change the way we integrate media on the web. The current API provides ways to play and get limited information about audio and video, but gives no way to programatically access or create such media. We present a new API for these media elements which allows web developers to read and write raw audio data.
The HTML5 specification introduces the audio and video media elements, and with them the opportunity to dramatically change the way we integrate media on the web. The current API provides ways to play and get limited information about audio and video, but gives no way to programatically access or create such media. We present a new API for these media elements which allows web developers to read and write raw audio data.


'''Current Implemention'''
===== Current Implementation =====


David Humphrey has developed a proof of concept, experimental build of Firefox which implements the following basic API:
David Humphrey has developed a proof of concept, experimental build of Firefox which implements the following basic API:
''' Reading Audio '''


<code>onaudiowritten="callback(event);"</code>
<code>onaudiowritten="callback(event);"</code>
Line 22: Line 24:
}
}
</pre>
</pre>
''' Getting FFT Spectrum '''


<code>mozSpectrum</code>
<code>mozSpectrum</code>
Line 32: Line 36:
}
}
</pre>
</pre>
''' Writing Audio '''


<code>mozSetup(channels, sampleRate, volume)</code>
<code>mozSetup(channels, sampleRate, volume)</code>
35

edits