0 Replies Latest reply on Oct 28, 2010 8:53 AM by Jay NS

    play() method not implemented HTML5 audio  tag?

    Jay NS



      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">


      And from javascript I do:

          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?


      Many thanks.