Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 5    Views: 111

ASusoeff
Aspiring developer
Profile
Posts: 296
Reg: Aug 13, 2011
Bryant, AR
13,460
04/18/12 06:30 AM (13 years ago)

combining/developing plugins

guys, I would like to have a plugin that is half "custom html" and half "launch native app". Basically i want ot put a button (or something) in a given screen that will play an mp3. Ideally, i would have several buttons on the screen. Is this doable in terms of writing a new plugin, or am i smokin crack on this one? and if i am not nuts, then how hard is it to build a plugin...
 
DannyH
Apple Fan
Profile
Posts: 122
Reg: Nov 30, 2011
location unknow...
2,220
like
04/18/12 06:54 AM (13 years ago)
You can easily do it by using an audio html5 tag in a local or remote html file. I found examples on Google as well. Be creative :)
 
Vali
buzztouch Evangelist
Profile
Posts: 193
Reg: May 22, 2011
Bucharest
5,830
like
04/18/12 07:45 AM (13 years ago)
Hi, I don't know how will the forum format below code but this is what I used in one of my apps. And it worked flawless: <audio controls="controls" id="audio" loop="loop" src="LINK TO MP3" tabindex="0"> </audio> <script type="text/javascript"> window.onload = function() { var audioPlayer = document.getElementById("audio"); audioPlayer.load(); audioPlayer.play(); }; </script>
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
04/19/12 06:47 PM (13 years ago)
@vali very nice. that looks like javascript and looks like it's calling the native audio player is that for an ios or android app? can i ask what plugin/screen/file did you use that code in?
 
ASusoeff
Aspiring developer
Profile
Posts: 296
Reg: Aug 13, 2011
Bryant, AR
13,460
like
04/22/12 06:10 AM (13 years ago)
Thanks @DannyH and @Vali. I will give those a try!
 
Vali
buzztouch Evangelist
Profile
Posts: 193
Reg: May 22, 2011
Bucharest
5,830
like
04/23/12 12:18 AM (13 years ago)
Hi, It is an HTML script and I put it in a custom HTML page. I used it for an iOS app, I don't know how Android is handling this, but common sense dictates that it will work as well. Give it a try and let me know if I can help you more on this topic.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.