I have developed a web app that I want to package as desktop application using a framework. I tried doing so in appJS and tideSDK. Everything is working fine except for one function that plays a sound.
Here is the audio element and the button for playing the sound.
<audio id="audioElem" src="clap.mp3"></audio>
<input type="submit" value="Play" onclick="playSound();" />
This is the function for playing sounds
function playSound(){
document.getElementById('audioElem').play();
return false;
}
Everything is working fine when I test the stuff in the browsers, but the sound is not playing when I publish the app using these frameworks. The audio file is in MP3 format, and I think this format is supported in the frameworks since they are based on webkit.
Please help me.
I have found that chromium browser, on which both tideSDK and appJS work does not support MP3 unlike chrome browser.
Video and audio tags in the two browsers.
chrome : AAC, MP3, Vorbis and Theora chromium : Vorbis and Theora by default
It is because of the format support issue that the audio is not playing.