View Single Post
  #15 (permalink)  
Old 07-01-2004, 01:36 AM
Perri29's Avatar
Perri29 Perri29 is offline
Registered User
 
Join Date: Jun 2004
Location: US
Posts: 27
Send a message via Yahoo to Perri29
How to play multiple files in player...

After some searching and a lot of testing... Here's how I coded the embedded Media Player 9 to play more than one file in succession:

One of two files need to be created: either an ".asx" or a ".m3u" file. These files are
created through the Media Player itself.

First create a "playlist" of ".mp3" files that you want to play on the web page:

1. Choose "new playlist" in the media player tool bar

2. Name it, then begin selecting ".mp3" files or video files from the media library

3. Place these files in the "new playlist" you just created.

4. Once you have all the files you want in the playlist:

5. Select your playlist (highlight it)

6. Go to "file" in the media tool bar

7. Choose "save playlist as"

8. In the window that opens you will create your ".asx" or ".m3u" file

9. Name it

10. In the "save as type" box use the drop down menu to choose the file type

**You can choose either ".m3u", "any (.asx, .m3u, or .wpl)"
(I chose to use the .m3u format because by choosing "any" seems to only save your file in the ".wpl" format, which did not appear to be applicable to the embedded
player code according to all the information I could gather in my searches).


Now that you have created your ".asx" or ".m3u" file:

11. Upload this file and all ".mp3" files associated with it (what's in your playlist) to your server.

The code for the embedded player, using these playlist files is as follows:

<OBJECT ID="mediaPlayer"
CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" width="300" height="120"
CODEBASE="http://activex.microsoft.com/activex/
controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
STANDBY="Loading Microsoft Windows Media Player components..."
TYPE="application/x-oleobject">
<PARAM NAME="fileName" VALUE="http://myserver.com/New Playlist.m3u">
<PARAM NAME="animationatStart" VALUE="true">
<PARAM NAME="transparentatStart" VALUE="true">
<PARAM NAME="autoStart" VALUE="false">
<PARAM NAME="showControls" VALUE="true">
<PARAM NAME="ShowDisplay" VALUE="true">
<PARAM NAME="loop" VALUE="true">
</OBJECT>

Of course you'll need to adjust the width and height if you'll be using this to play videos; at the current settings listed above only the player controls and track info will be visible.

***Example of this working player on a page***
http://help.javalotjive.com/media9_example.html
__________________
"Just another freak in the freak kingdom." H.S. Thompson

PR (www.site418.com)

Last edited by Perri29; 07-01-2004 at 09:59 AM.
Reply With Quote