Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

javascript to play music not working on andriod

Hello David,

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

David wyatt
Posts: 0
Joined: Mon Sep 15, 2014 7:12 pm

javascript to play music not working on andriod

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

javascript to play music not working on andriod

You can use JS for play/stop audio:

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

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

here myAudio - name of audio component

David wyatt
Posts: 0
Joined: Mon Sep 15, 2014 7:12 pm

javascript to play music not working on andriod

Thanks Sergiy, that work around works great. thank you

Vikram Raju
Posts: 0
Joined: Mon Jul 20, 2015 4:06 am

javascript to play music not working on andriod

@ 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.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

javascript to play music not working on andriod

Hello Vikram,

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

Vikram Raju
Posts: 0
Joined: Mon Jul 20, 2015 4:06 am

javascript to play music not working on andriod

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/.

Return to “Issues”