I\'m trying to get HTML5\'s audio tag to work in Chrome. The following code works flawlessly in Firefox, any ideas why it isn\'t working in Webkit?
Are you using the release version of Chrome? With the current dev build on Linux[1], I get the same behavior as FF 3.7 alpha (well, once I unblocked it with noscript) and SeaMonkey 2.0; that is, the Ogg file plays, although not even the default controls appear. If it is a bug in Chrome or Webkit, it is apparently fixed for the next version.
[1] Chrome: 5.0.342.1 (Official Build 40461) dev, Webkit: 533.2
Try to host your audio file somewhere and try this:
audio = new Audio('http://www.yourhosting.com/chat.ogg');
audio.play();
Bug in Chrome, possibly Webkit as well: http://code.google.com/p/chromium/issues/detail?id=25972
Short audio files won't play.