Page 1 of 1

How to start audio player in android

Posted: Mon Dec 30, 2013 12:37 pm
by William Isseyegh

Android does not support the autoplay attribute of html 5 so I need to play a sound automatically when a button is pressed and I am using the following js code that does not work:
Appery('mobileaudio_31').play();

Any ideas?


How to start audio player in android

Posted: Mon Dec 30, 2013 1:57 pm
by Oleg Danchenkov

Hi William.
Try jplayer instead of audio component
http://jplayer.org/


How to start audio player in android

Posted: Mon Dec 30, 2013 8:11 pm
by William Isseyegh

Hi Oleg,

Thanks for the tip, but can as I am new to Appery can you please give me a hint to how to use jplayer in appery? Do I need to create it a new javascript file and use it there, or is there a way to upload it as a plugin or custom component?

Thanks


How to start audio player in android

Posted: Mon Dec 30, 2013 9:55 pm
by Serhii Kulibaba

Hi William,

Add jquery.jplayer.min.js as external source, or custom JS


How to start audio player in android

Posted: Wed Jan 01, 2014 1:55 pm
by William Isseyegh

Hi,

Ok I have added jplayer in an html component with name html_33. Player works when initialized by a jquery function inside the html code of the new html component.

However when I add an event for a button to run Javascript function that does the same thing it seems that I have a problem getting the player with the jquery selector.
Do I need to do anything additional since it is inside html_33 component?

Thanks
William


How to start audio player in android

Posted: Thu Jan 02, 2014 10:01 am
by Oleg Danchenkov

1) "I have added jplayer in an html component" - what html code do you use to add jplayer?
2) "run Javascript function that does the same thing" - what JS code do you use?