Web Audio API: Search, Play / Buffer

When you play audio using an audio element in Chrome, you get annoying clicks and cracks. At least under my 64-bit Linux installation, even after I formatted and installed a new version of Fedora. (Firefox and Opera are fine, even IE9 on VirtualBox Windows 7.)

But the demos using the web audio API, instead of the audio element, have great sound. So I was wondering if I can use the web audio API, for example, an audio element? But there are some things you can't seem to do with this API. Or am I missing something? What I could not find where:

  • Start playing the file until it is fully downloaded.
  • receiving updates of the buffer progress (depends on the previous point)
  • receiving updates to the progress of the playback
  • looking for

Is there a way to do this using the web audio API?

Here I will use it: http://tinyurl.com/magnatune-player

+3
source share
3 answers

In the meantime, Chrome fixed issues with audio playback. Therefore, I no longer need workarounds.

0
source

I think you should use <audio>streaming anyway , at least. You can treat it like MediaElementAudioSourceNodein web audio if you want:

var mediaSourceNode = context.createMediaElementSource(audioElement);

AFAIK, there is no way to directly transmit web audio. In fact, the web audio api assumes you are not doing this:

4.9. AudioBuffer Interface

( ). - 32- IEEE -1 → +1. . , , ( ). , , MediaElementAudioSourceNode.

0

MediaElementAudioSourceNode (, , , , <audio>), AFAIK :

  • :
  • receiving updates of the buffer progress (depends on the previous point): Possible (you can check progress events on XHR)
  • receive progress updates: No
  • looking for: No
0
source

All Articles