Discussion:
If then statement for param name=filename
(too old to reply)
DMillyOh
2010-02-03 01:42:01 UTC
Permalink
We have a backup URL for our video source that is on another server. We are
hoping to build our page code IF the primary video URL doesn't connect THEN
use the backup video URL. Can that be done at the page code level?
Alessandro Angeli
2010-02-03 05:47:46 UTC
Permalink
From: "DMillyOh"
Post by DMillyOh
We have a backup URL for our video source that is on
another server. We are hoping to build our page code IF
the primary video URL doesn't connect THEN use the backup
video URL. Can that be done at the page code level?
I'll assume you meant to say that you have a WMP instance
embedded in a web page rendered in Firefox and you want to
roll over to a second URL if connection to a first URL
fails.

You have 2 choices:

1. Do not specify the URL in the fileName PARAM (not in the
URL PARAM). Instead, use some JavaScript to set the URL
property of the embedded player. Also listen for state
change events (PlayStateChange, OpenStateChange, Error,
MediaError) in JavaScript: if there is an error or the media
is not open after a certain timeout, set the secondary URL.
http://msdn.microsoft.com/en-us/library/dd564034.aspx

2. Set fileName or URL to point to an ASX playlist that has
an ENTRY with 2 REF elements, one per URL.
http://msdn.microsoft.com/en-us/library/dd564247.aspx
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
Neil Smith [MVP Digital Media]
2010-02-08 23:49:04 UTC
Permalink
On Tue, 2 Feb 2010 17:42:01 -0800, DMillyOh
Post by DMillyOh
We have a backup URL for our video source that is on another server. We are
hoping to build our page code IF the primary video URL doesn't connect THEN
use the backup video URL. Can that be done at the page code level?
Usually you'd do it at the server level, if you're using windows media
services - checkout Rollover in the documentation for WMS Playlists
(WSX playlists) in that case.

Can you describe your actual setup better ? Allessandro may already
have provided the most useful info however.

Cheers - Neil
------------------------------------------------
Digital Media MVP : 2004-2010
http://mvp.support.microsoft.com/mvpfaqs

Loading...