SilverlightStreamingMedia Control Reference

SilverlightStreamingMedia Control Reference


The SilverlightStreamingMedia control extends the ASP.NET Futures Media control by allowing you to play videos from your Silverlight Streaming account. Using the control at design time, you can specify your account credentials and choose the video you want to display on your Web page.

Drag and drop the SilverlightStreamingMedia control on your web page and switch to designer view. From here, you can specify the URL for the video from your Silverlight Streaming account by clicking on the "..." ellipses button in the "Common SilverlightStreamingMedia tasks". From the "Select Media File" dialog box, provide your account id and key for your Silverlight Streaming account, then choose the video you want display.

Once you have selected the video and closed the "Select Media File" dialog, your account id and key are added to your web.config.

The following example shows how to declare the SilverlightStreamingMedia in an ASP.NET Web page. The MediaUrl property is set to show the Bear.wmv video from video library folder of account 22777999.

<live:SilverlightStreamingMedia ID="SilverlightStreamingMedia1" runat="server" 
Height="240px"
MediaUrl="streaming:/22777999/VideoLibrary/Assets/Bear.wmv"
Width="320px"
MediaSource="SilverlightStreaming">
</live:SilverlightStreamingMedia>

 

Property

Description

MediaSource

Optional

MediaSource specifies whether the source of the media is from Silverlight Streaming or some other source.

MediaUrl

Required

MediaUrl specifies the URL of the video to be played in the Web page. If the source of the video is a Silverlight Streaming account, the URL is in the following format:

Streaming:/<your account number>/<your folder/video collection>/<video file.wmv>

This string will be generated by the control when you select a video. The string is converted at run time into a valid http URL at run time.