I am trying to play a sound using the HTML5 audio-tag and Adobe Air SDK 2.5.
This is part of the HTML5 code:
<audio preload="auto" id="myTone"> <source src="test.mp3"> <source src="test.ogg"> </audio>
a = document.getElementById("myTone");
Unfortunately, that doesn't work. I get this error message in the console window:
TypeError: Result of expression 'a.play' [undefined] is not a function.
However, when I run this code directly in Firefox 3.6.11 on my Windows XP machine, it works.
Dito in Safari 3.2.1 on my Mac OS 10.5.6 computer.
So apparantly, not all methods and events of the audio-tag are implemented in the Adobe AIR environment.
Is this by design? Or is it a bug?
I know there is another way to play sounds (I read Jeff Swartz' article - http://www.adobe.com/devnet/air/ajax/quickstart/articles/sound_in_html.html). But I think a pure HTML5 solution would be cleaner.
Who can provide more info about this issue?
Retrieving data ...