How do I use HTTP streaming for RealAudio and RealVideo?
The HTTP protocol enables audio and video content providers to stream RealAudio and RealVideo from a World Wide Web server. While this method is not as robust or efficient as using a RealAudio/Video Server, it provides a reasonable method for delivering RealAudio/Video content.
Before you can stream RealAudio and RealVideo clips through HTTP, you need to define the following MIME types for your World Wide Web server:
- audio/x-pn-realaudio (files with .ra, .rm and .ram file extensions)
- audio/x-pn-realaudio-plugin (files with a .rpm file extension)
Some World Wide Web servers are pre-configured with
these MIME types.
Note If you are running a web page on an ISP server, send mail to the ISP administrator, asking them to set up the RealAudio (RealMedia) MIME type.
To stream RealMedia content using HTTP:
- Copy your encoded RealAudio or RealVideo files (files with the .ra or .rm extensions) to your World Wide Web server.
- Use a text editor (such as Notepad) to create a metafile containing a RealAudio URL. For example, the contents of your file should be in the following form:
http://hostname/path
where hostname is the name of your World Wide Web server. For example: www.realaudio.com
Note: RAM files for HTTP streaming are identical to regular RAM files with the exception that it uses http as the protocol instead of pnm.
- Save your metafile as text using a .ram filename extension.
- In your HTML document, reference the metafile in a hyperlink. For example:
<A HREF="filename.ram">
<A HREF="http://hostname/file.ram">
You can use relative or complete paths. If you use
complete paths, you must include both the hostname and the complete path. For example:
<A HREF="http://www.ra.com/home/welcome.ram">
- When a user clicks on the link, the audio/video file(s) begin to download. The RealAudio Player or RealPlayer begins playing after a few seconds; it does not need to wait for the entire file to be downloaded.
Application: RealAudio Player 3.0, RealPlayer 4.0, RealPlayer 5.0,PN Support