Streaming Media
- How do I stream MP3 files?
- How do I stream QuickTime files?
- How do I stream Real Audio and Video files?
- How do I stream Windows Media files?
1. How do I stream MP3 files?
- Upload your MP3 files to the server, using a FTP program or the file manager (files with the .mp3 extension). Make sure the files are uploaded in binary mode.
- Create a metafile (ASCII text file) containing a URL to one of your MP3 files. For example:
http://www.mickwood.com/media/hello.mp3
- Save the above metafile as a text file, using a text editor like Notepad, with the .mpu extension.
For example: "hello.mpu"
Upload the metafile to your web site, using a FTP program or the file manager. Make sure the file is uploaded in ASCII mode.
- In your HTML document, reference the metafile in a hyperlink. For example:
<a href="media/hello.mpu">Click to hear my melody!</a>
When a visitor clicks on the metafile link, the media file will immediately start streaming on their computer.
2. How do I stream QuickTime files?
To stream QuickTime files from your web site, simply embed the files into your web pages using the following code:
<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
WIDTH="320"HEIGHT="180"
CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">
<PARAM name="SRC" VALUE="videofilename.mov">
<PARAM name="AUTOPLAY" VALUE="true">
<PARAM name="CONTROLLER" VALUE="false">
<EMBED SRC="videofilename.mov" WIDTH="320" HEIGHT="180" AUTOPLAY="true"
CONTROLLER="false" PLUGINSPAGE="http://www.apple.com/quicktime/download/">
</EMBED>
</OBJECT>
NOTE: Make sure to edit the line "<PARAM name="SRC" VALUE="videofilename.mov">", so that it reflects the location of your media file.
3. How do I stream Real Audio and Video files?
- Upload your Real Audio and Video files to the server, using a FTP program or the file manager (files with the .rm and ra extensions). Make sure the files are uploaded in binary mode.
- Create a metafile (ASCII text file) containing a URL to one of your Real Audio and Video files. For example:
http://www.mickwood.com/media/hello.ra
- Save the above metafile as a text file, using a text editor like Notepad, with the .ram extension.
For example: "hello.ram"
Upload the metafile to your web site, using a FTP program or the file manager. Make sure the file is uploaded in ASCII mode.
- In your HTML document, reference the metafile in a hyperlink. For example:
<a href="media/hello.ram">Click to hear my melody!</a> When a visitor clicks on the metafile link, the media file will immediately start streaming on their computer.
4. How do I stream Windows Media files?
To stream Windows Media files from your web site, simply embed them into your web pages using the following code:
<OBJECT ID="MediaPlayer" WIDTH="192" HEIGHT="190" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE="videofilename.wmv">
<PARAM name="ShowControls" VALUE="true">
<param name="ShowStatusBar" value="false">
<PARAM name="ShowDisplay" VALUE="false">
<PARAM name="autostart" VALUE="false">
<EMBED TYPE="application/x-mplayer2" SRC="videofilename.wmv" NAME="MediaPlayer"
WIDTH="192" HEIGHT="190" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"> </EMBED>
</OBJECT>
NOTE: Make sure to edit the line "<PARAM NAME="FileName" VALUE="videofilename.wmv">", so that it reflects the location of your media file.
The Windows Media player which appears on the page can be customised to some extent. For example, you can choose whether or not to show the playback controls, status indicator, etc.
|