[whatwg] Audio and Video APIs
lachlan.hunt at lachy.id.au
Sat Mar 17 20:09:57 PDT 2007
I think the audio and video APIs should be mostly identical because
that would make them easier for authors to learn both.
Presently, the APIs have the following:
<video> | Audio()
src | new Audio("file");
length | length **
begin ** |
ui ** |
volume | volume **
| pan **
play() | play()
stop() | stop()
pause() | pause() **
seek(offset) | seek() **
addEventListener() | onload
addEventListener() | onerror
addEventListener() | onprogress **
** Features currently mentioned in a comment in the spec.
Most of those APIs could apply equally well to both audio and video,
with the exception of height and width.
However, as the spec says, the Audio() API is only designed for simple
sound effects, not streaming audio. Perhaps that is a use case for a
more fully featured <audio> element that does that, while keeping
Audio() for simple sound effects.
More information about the whatwg