|
|
mediawrap 1.2
Transparently wrap media files (RealMedia, MP3) to enable HTTP streaming.
|
mediawrap About
|
How does it work? If a visitor tries to access a file wraped by mediawrap, your web server does not deliver the file directly. Instead of that, mediawrap is called. mediwrap then checks what software (user agent) your visitor uses by looking for certain strings, for example "Real" in the user agent's name. If it does not find any of the configured strings, it assumes that the visitor just clicked the link in a "normal" browser and sends back a single line containing the URL of the file, together with the message that this file is of a certain MIME type. For MPEG-III files, it first issues a redirect to a playlist file (.m3u) and then outputs a playlist containing the file you want to stream. This is necessary because WinAmp needs to get a file with the extension .m3u. Browsers use MIME types to find out what type of content a file has. If it encounters a file with the MIME type text/html, it will display it in its own window. If you use for example a RealMedia file, the browser will get the notice that the file is of the MIME type application/x-pn-realaudio. This tells the browser that it has to start up RealPlayer and hand over the file to it after downloading it completely, which in this case is very fast since the file consists of only one line, the URL of the real file. RealPlayer sees the URL and accesses the real file himself. mediawrap now "sees" that it's not a normal browser but RealPlayer who wants the file and will send it the contents of the real file. While downloading the file, RealPlayer will start to play it. This technique of playing-while-downloading is called streaming. Why use mediawrap? If you simply link RealMedia files as you normally would, your browser first will download the whole file and then RealPlayer will start to play the file. This means that your visitors will have to wait until the whole file is downloaded. If you use mediawrap, RealPlayer will start playback almost immediately. |
Copyright © 1998 web42 - Christian Renz. Last changes: 11.07.2004. Visitors: 17052