How to Stream M3U's on a Website
Please, regard this article as "TEMPORARILY INCOMPLETE." Problems with the code mentioned have been brought to the author's attention and will be resolved ASAP.
Want to know how to embed a music player to stream an M3U on your Website?
In case you didn't know; M3U files, plain text files, contain the locations of one or more media files that the media player should play. Only a fraction of the size of an MP3, M3U's amount to nothing more than a pathway or an address to the actual file(s). Your website host may not yet recognize the M3U file format; so, check before uploading this text file to the File Manager. And, Firefox & Chrome don't seem to want to play them in any of their Plugin mods. In fact, you'll get a drop down bar telling you to search for "Missing Plugins." You likely won't find one. With the code I included below, you can easily embed Windows Media Player to stream M3U content; with the appropriate ActiveX plugin installed on a Browser which supports them.
Want to know how to embed a music player to stream an M3U on your Website?
In case you didn't know; M3U files, plain text files, contain the locations of one or more media files that the media player should play. Only a fraction of the size of an MP3, M3U's amount to nothing more than a pathway or an address to the actual file(s). Your website host may not yet recognize the M3U file format; so, check before uploading this text file to the File Manager. And, Firefox & Chrome don't seem to want to play them in any of their Plugin mods. In fact, you'll get a drop down bar telling you to search for "Missing Plugins." You likely won't find one. With the code I included below, you can easily embed Windows Media Player to stream M3U content; with the appropriate ActiveX plugin installed on a Browser which supports them.
Things you'll need:
* Website with Administrative rights
* Permission to use links to copyrighted M3U/Audio files
1. Look for M3U's where you find music files available for play online. M3U's are found everywhere, these days! Bands often use them to link their MP3's (and other formats) from the server to their websites. In fact, if the website has an embedded media player, the play list probably gets its information from M3U's. An M3U you can access will appear as a song title you click-to-play. Right click and choose Properties. 2. Copy the address to the M3U and save it in a text file. To do this, right-click the M3U link and copy the like address. Open the text file and paste the address, or use the shortcut keys Ctrl V, before saving (Ctrl S) with a filename of your choosing. 3. Edit this into one of the following scripts: Note: in both of the following examples, I have linked to (my friend) Jimmy Ryan's song, from "Pay To Stay" on the "Lost Diamond Angel" CD for sale on iTunes. Replace this red text with your link, including the quotation marks. The following script is for Windows Media Player. It works with Internet Explorer: The following script is for RealPlayer: <embed width="300" height="30" src="urlOfPlaylist" type="application/x-mplayer2" autoplay="true"></embed>" 4. Decide where on your page you want the player to appear. Having a little bit of knowledge in HTML code will come in handy with positioning. Paste the code into a custom HTML page element in the appropriate location. Tips * The code as shown can be edited to mute autoplay, by changing "true" to "False". * These same scripts are used to link MP3, Midi & Wave files. Maybe others. * You can link to files in your own File Manager or other online directories. * The WMP script may also be used to link associated audio/video playback. * At this time, there are no single universal M3U capable players compatible with all operating systems or all Browsers. * (updated 2/11/2016) With recent updates, Media Player appears as a black box on Internet Explorer 8, RealPlayer appears correctly & they both play! This doesn't seem to work with Firefox or Chrome, at the moment. Warnings * Get permission from the registered owner, before using COPYRIGHTED material! * Always preview the page to be sure everything looks the way you want it to, before saving your changes! Copyright 11/28/2008 All Rights Reserved. Questions? Comments? Contact Me Related Articles: Audio/Visual - Sub Directory |
|