William Isseyegh
Posts: 0
Joined: Mon Dec 30, 2013 12:37 pm

How to start audio player in android

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?

Oleg Danchenkov
Posts: 0
Joined: Tue Apr 30, 2013 5:51 pm

How to start audio player in android

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

William Isseyegh
Posts: 0
Joined: Mon Dec 30, 2013 12:37 pm

How to start audio player in android

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

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

How to start audio player in android

Hi William,

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

William Isseyegh
Posts: 0
Joined: Mon Dec 30, 2013 12:37 pm

How to start audio player in android

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

Oleg Danchenkov
Posts: 0
Joined: Tue Apr 30, 2013 5:51 pm

How to start audio player in android

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?

Return to “Issues”