Our services

More information

Legal documents

Knowledgebase

You are here: Home > Knowledgebase > How can I set up streaming media to fail over to HTTP if an MMS connection doesn't work?

How can I set up streaming media to fail over to HTTP if an MMS connection doesn't work?

When you link your web site visitors to streaming media via a URL which begins with mms:// you are essentially instructing the visitor's Windows Media Player to connect to your streaming server over port 1755, the MMS port.

Some of your site visitors may be behind corporate, ISP or personal firewalls which have imposed restrictions on port 1755.  In this case, you want the visitor's Windows Media Player to fail over and use an HTTP connection instead.  HTTP is the protocol web servers use to transmit data to your web browser, and as such most firewalls permit the HTTP protocol.

A simple way to indicate to the visitor's Windows Media Player that it should attempt to switch to an HTTP connection in the event of MMS failure is through the use of an ASX file.

An ASX file is a playlist file which Windows Media Player will read to determine the source(s) of the stream it should connect to.  There are many ASX file options which allow you to tailor the experience you present to your listener/viewer, but those are beyond the scope of this article.

For the sake of discussion, let's assume the following:

  1. The streaming server name is server1.streamingserver.com
  2. The on-demand publishing point name is ondemand
  3. The media file name you wish to play is named media.wma

The standard URL to that stream would be:

mms://server1.streamingserver.com/ondemand/media.wma

To access that resource over HTTP instead of MMS, simply change the URL to:

http://server1.streamingserver.com/ondemand/media.wma

Now, to communicate both URLs to your visitor's Windows Media Player, construct an ASX file which looks like this:

<asx version = "3.0">
 <entry>
  <ref href = "mms://server1.streamingserver.com/ondemand/media.wma"/>
  <ref href = "http://server1.streamingserver.com/ondemand/media.wma"/>
 </entry>
</asx>

Of course, you'll replace the server name, publishing point and file name with your own.  Save the ASX file as a text file, making sure it has an ASX extension.  Then, upload the file to your web site, and instead of linking directly to your mms:// url, link to the ASX file on your web site.  When a visitor clicks the link, Windows Media Player will load and read the ASX file, and attempt to play the stream using first the MMS URL, and failing that, the HTTP URL.



Was this answer helpful?

Add to Favourites
Print this Article