Page 2 of 2

javascript to play music not working on andriod

Posted: Tue Jun 30, 2015 8:17 pm
by Evgene Karachevtsev

Hello David,

Audio component has button play/pause. Could you please clarify do you mean some other button command?


javascript to play music not working on andriod

Posted: Wed Jul 01, 2015 5:06 pm
by David wyatt

Hi, I want to use my own button to turn the music on and off. the music starts on the title page and continues to the game screen, where you can turn off the music. if i used an audio component could i still turn off the music with my own button or would it have to be the button in the audio component


javascript to play music not working on andriod

Posted: Thu Jul 02, 2015 2:33 pm
by Serhii Kulibaba

You can use JS for play/stop audio:

Apperyio("myAudio").get(0).play();

Apperyio("myAudio").get(0).pause();

here myAudio - name of audio component


javascript to play music not working on andriod

Posted: Mon Jul 06, 2015 8:08 pm
by David wyatt

Thanks Sergiy, that work around works great. thank you


javascript to play music not working on andriod

Posted: Wed Aug 19, 2015 5:23 am
by Vikram Raju

@ Serigly Kulibaba I also have the same issue, but I'm storing the URL for the audio component in the local storage and giving it to the component's Src. It works fine on the IOS but not working android. Please help me to solve the problem.


javascript to play music not working on andriod

Posted: Thu Aug 20, 2015 8:54 pm
by Evgene Karachevtsev

Hello Vikram,

Could you please clarify do you have any errors in a browser console when you test your app in a browser?


javascript to play music not working on andriod

Posted: Fri Aug 21, 2015 4:11 am
by Vikram Raju

No there are no errors except this one,
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.