I am trying to use this javascript to create an audio element:
music.js:
myAudio = new Audio('/assets/drumloop.mp3'); myAudio.loop = true; myAudio.play();
When I include this as a script in a simple html file and open the html file in Safari 5.1, it becomes accurate. When I enable this javascript from my Rails application running on a local rails server, the sound is playing but not working.
I tried using the callback in the "finished" event to set the time to zero and play again (as suggested here , but that won't work either.
Is it possible that the rails do not send enough information to the http header?
javascript html5 ruby-on-rails audio
Ricky
source share