Page 1 of 2

javascript to play music not working on andriod

Posted: Sat Jun 13, 2015 2:43 pm
by David wyatt

Hi,

Ive used the following support page to play music throughout my app.
https://getsatisfaction.com/apperyio/...

the app works great in browser test, apperyio test app and on ios. But when I export to android it doesn't play any any music (Ive debugged it and the code is running correctly)

the code is as follows

var onLoad = function() {
var audioText = 'source src="https://files/resources/image/XappY.mp3"/source';
var audio = jQuery(audioText);
jQuery("body").append(audio);
console.log("load m");
};

jQuery(window).bind("load", onLoad);

function PlayTrack(src) {
console.log("load music");
var au = jQuery("#yourAudio");
au.attr("src", src);
if (au[0] && au[0].play) au[0].play();
}

function StopPlayTrack() {
var au = jQuery("#yourAudio");
if (au[0] && au[0].play) au[0].pause();
}

Any help wold be great

thanks


javascript to play music not working on andriod

Posted: Sat Jun 13, 2015 8:30 pm
by Evgene Karachevtsev

Hello David,

Could you please clarify have you changed any android permissions?


javascript to play music not working on andriod

Posted: Wed Jun 17, 2015 6:54 pm
by David wyatt

Hi Evgene,
there still set to default and audio is enabled


javascript to play music not working on andriod

Posted: Thu Jun 18, 2015 3:11 pm
by Evgene Karachevtsev

Hello David,

Please share your app with support, tell us its name and steps to reproduce the issue. Also please detail with what device with what os do you test it.


javascript to play music not working on andriod

Posted: Fri Jun 19, 2015 12:55 pm
by David wyatt

Thank you Evgene.
I've shared it with you, its called xappy. In browser test and ios the app plays music on loading. But ifyou export to Android the music doesn't play (its like it can't find the music file as the JavaScript is running correctly in debug(

Thank you


javascript to play music not working on andriod

Posted: Sat Jun 20, 2015 8:05 pm
by Alena Prykhodko

Hi David,

Please tell us step-by step instruction to test this problem on Android device.


javascript to play music not working on andriod

Posted: Tue Jun 23, 2015 7:12 pm
by David wyatt

Hi Alena,

If you export the app to android and open the app the music doesnt play. It should start automatically.


javascript to play music not working on andriod

Posted: Mon Jun 29, 2015 8:59 pm
by Alena Prykhodko

Hi David,

Sorry for radio silence here, we were managed to reproduce it on device, we'll investigate it more and get back with update as soon as possible.


javascript to play music not working on andriod

Posted: Tue Jun 30, 2015 4:10 pm
by Serhii Kulibaba

Hello David,

Please use audio component with property "Auto Play"


javascript to play music not working on andriod

Posted: Tue Jun 30, 2015 6:59 pm
by David wyatt

Hi Sergiy,

If I used the component and "Auto Play" how would i add the option to turn the music on or off through a button command?