How Do I Set Up Streaming Video or Music?

Many people have questions about media streaming support for their sites. Unless you have a Dedicated Server, HostGator supports only HTTP streaming which is only available on RealPlayer, QuickTime and Windows Media Player.

Once media files are encoded, there are two more steps in preparing your content for streaming from a web server:

  1. Create a Windows Media Metafile See Below
  2. Add Tags to HTML Files See Below

Create a Windows Media Metafile

You must create Windows Media metafiles with .wax, .wvx, or .asx file name extensions. To do this:

  1. In a text editor, such as Microsoft Notepad, type the following metafile script, replacing the URL with that of your media. Reference the media just as you would any other web file.
    <ASX VERSION="3.0">
    <ENTRY>
    <REF HREF = "http://YourWebServer/Path/YourFile.wmv" />
    </ENTRY>
    </ASX>
  2. You can place the metafile in the same folder as that of your media. If you do so, you can use a relative path, which is simply the name of the file. The REF line would look like this:
    <REF HREF="YourFile.wmv" />
  3. Save the text file using the name of your media file followed by the .wvx extension if the metafile points to a file with a .wmv extension, or .wax if the metafile points to a file with a .wma extension, such as YourFile.wvx. The file name extension .asx was used in previous versions of Windows Media Technologies.

Add Tags to HTML Files

Finally, you must add tags to your HTML files. The HTML tag points the end user's browser to the metafile, which points Windows Media Player to the Windows Media file. A metafile must be used to reference the media because a direct reference to the media in an HTML tag will cause most browsers to attempt to download the media rather than stream it.

  1. Using a text editor, such as Microsoft Notepad, open the web page that you want to add the media reference to.
  2. Add the URL of the metafile. For example:
    <HTML>
    <BODY>
    Play this Windows Media file:
    <A HREF = "http://YourWebServer/Path/YourFile.wvx">
    YourFile</A>
    </BODY>
    </HTML>
  3. Copy the Windows Media files (with .wma, .wax, .wmv, and .wvx file name extensions) to your web server.

When an end user clicks the reference on the web page, the metafile is downloaded, and Windows Media Player opens. Windows Media Player opens the metafile and then opens and plays the Windows Media file from your web server.