3

For example, I want the page to play an audio file while at the same time have some bullets slide into view at just the right moment that said bullet is talked about in the audio file. A similar effect would also be used for closed captioning. When I say reliable I mean specifically that the timing will be consistent across many common platforms (browser/OS/CPU/etc) as well as consistent in different sessions on the same platform (they hit refresh, it works again just as it did before, etc).

NOTE: It's OK if the answer is 'NO', but please include at least a little quip about why that is.

skaffman
  • 398,947
  • 96
  • 818
  • 769
MetaGuru
  • 42,847
  • 67
  • 188
  • 294

2 Answers2

2

Check out this animation, which synchronizes a 3D SVG effect to an audio file.

The technique is explained in a blog post at http://mrdoob.com/blog/page/3. Look for the one entitled "svg tag+audio tag = 3D waveform". The key is to create a table of volume values corresponding to the audio file.

You'll obviously have some work to do in studying this example and the Javascript it uses to adapt it to your scenario. And it will probably only work in browsers that support HTML5.

brainjam
  • 18,863
  • 8
  • 57
  • 82
  • would rather not have HTML5 be part of this solution, because there are not enough supported browsers yet – MetaGuru Nov 07 '10 at 04:02
  • @shogun, how are you playing the audio then?. I was assuming that you were using the HTML5 – brainjam Nov 08 '10 at 13:08
  • I'm not sure but that was part of the question, I know that I have been able to play audio on the internet for YEARS though... but then again you're probably right, it always used a plugin not pure HTML.. hmmmm... – MetaGuru Nov 08 '10 at 15:13
  • @shogun, you've probably been playing audio via Flash. So you may as well go all the way and use Flash for your app. Or there are ways to synchronize javascript with Flash. But at this point, you probably need to refine your question, telling us what's in and what's out. – brainjam Nov 08 '10 at 18:06
1

Given the current situation and HTML5 support, I would solve this using Flash.

kapa
  • 77,694
  • 21
  • 158
  • 175