Implementing Failover
Previous | Next |
Implementing Failover
If the content requested by a client cannot be accessed, you can use the switch element to specify alternate sources. The server iterates through the switch statement until it finds a source that it is able to stream to the client. This is called failover and is illustrated by the following example.
<?wsx version="1.0"?> <smil> <switch> <media id="media1" src="https://encoder1:8080?WMReconnect=0"/> <media id="media2" src="Alternate_1.wmv"/> </switch> <switch> <media id="media3" src="https://encoder2:8080?WMReconnect=0"/> <media id="media4" src="Alternate_2.wmv"/> </switch> </smil>
If the server cannot connect to media1 or the connection fails, it plays the file Alternate_1.wmv and, while playing Alternate_1.wmv, immediately attempts to connect to media3. If it cannot connect to media3, it plays the file Alternate_2.wmv. For more information about failover, see the switch element.
See Also
Previous | Next |