Discussion Forums  >  Audio, Video, Playing, Recording

Replies: 5    Views: 2370

Masons App Design
Aspiring developer
Profile
Posts: 206
Reg: Aug 06, 2013
Andrews, TX
12,660
09/26/13 11:21 AM (10 years ago)

Lost With HTML Playlist

So I want to create a playlist usign HTML for my churches app.I have tried and found tons of info but can not seem to sort it all out. This is the code I have so far: <embed name="music_playlist" src="music_playlist.m3u" width="300" height="90" loop="false" hidden="false" autostart="true"> </embed> I have a m3u playlist file created. This code pulls up a player in the HTML5 plugin but I can not get it to play the music. I have not had the opprtunity to test this ona device yet so will I have to add the m3u file to the project also?I am sure I am missing something but can not get it figured out. Any thoughts?
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
09/27/13 06:46 AM (10 years ago)
Take a look at this for HTML5: http://blog.yeradis.com/2012/09/simple-html5-audio-streaming-with.html You would just basically make an HTML doc and use the <audio> element to link to the m3u file. The m3u file is what has the links to the mp3 files that the player should cycle thru one by one. The cool thing about doing it with HTML5 is that you'll be good for ios and Android. The downside of using an HTML doc to do is that the audio is not going to play in the background once you leave the screen.
 
Masons App Design
Aspiring developer
Profile
Posts: 206
Reg: Aug 06, 2013
Andrews, TX
12,660
like
09/27/13 07:27 AM (10 years ago)
Thank you thats awesome. I have the m3u file created on my desktop. Will I need to place it in one of the project folders once I down load teh project from BT?
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
09/27/13 08:02 AM (10 years ago)
You can and it should work either way - This is the sample URL link: < audio src="http://youserverurl/yourplaylist.m3u" type="audio/mpeg" > < / audio > That's what you need to mod. if you want to host the m3u file on the web, then refernce it via a full url. But if you want to reference a .m3u file you stuff inside a BT project (and drag into your BT_Docs folder, you'd use a link like this for iOS: < audio src="yourplaylist.m3u" type="audio/mpeg" > < / audio > You're just basically removing the http:// because it's accessing it locally and will search your project bundle for that file. for a local Android it should be < audio src="file:///android_asset/yourplaylist.m3u" type="audio/mpeg" > < / audio >
 
Masons App Design
Aspiring developer
Profile
Posts: 206
Reg: Aug 06, 2013
Andrews, TX
12,660
like
09/27/13 08:12 AM (10 years ago)
Wow awesome thank you.
 
Masons App Design
Aspiring developer
Profile
Posts: 206
Reg: Aug 06, 2013
Andrews, TX
12,660
like
10/01/13 11:18 AM (10 years ago)
I have this as my html code in my HTML5 plugin: <p> <iframe allowfullscreen="" frameborder="0" height="400" mozallowfullscreen="true" src="http://archive.org/embed/ChurchPlaylist&amp;playlist=1" webkitallowfullscreen="true" width="300"></iframe></p> If you try it, this will show my playlist and play in the plugin, however when I run it on my Galaxy S2 I see the playlist but it will not play anything. Can someone tell me if I need to add a player or what piece of the puzzle am I missing to make this work?
 

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.