Streaming a Silverlight Media Application from Silverlight Live
page 4 of 6
by Jesudas Chinnathampi (Das)
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 28244/ 110

Preparing files to be uploaded to Silverlight.LIVE.com

As per the above example, to stream the video file, "BabyShower.wmv" from Silverlight.live.com, we have to follow some rules. 

A) The first rule is to create a file called "manifest.xml."  The manifest.xml file describes the application to the hosting service. It is like a mediator. In the above screen shot, you can see around 14 files. We only need 7 files plus the manifest.xml. Those seven files are all .js files except the Silverlight.js, player.xaml and the .WMV file. The XML file should look like listing 1.

Listing 1

<SilverlightApp>
 <loadFunction>StartWithParent</loadFunction> 
 <jsOrder>
   <js>MicrosoftAjax.js</js> 
   <js>PreviewMedia.js</js> 
   <js>EmePlayer.js</js> 
   <js>player.js</js> 
   <js>StartPlayer.js</js> 
 </jsOrder>
</SilverlightApp>

B) Move all 8 files to a different folder and name it babyshower. 

Figure 2

C) Create a zip file using the above 8 files.

D) Go to http://silverlight.live.com/ and sign in using your Silverlight streaming account or get one for FREE by creating a new account for FREE at https://silverlight.live.com/account/create.aspx.

E) You will see the following screen after the successful login.

Figure 3

F) Click the "Manage Applications" link and then click "Upload a Silverlight Application."

G) Provide an "Application Name" and upload the zip file that you created in step (C).

Now you have hosted a Silverlight application at Silverlight streaming. You can stream the video from any other web page no matter where it is hosted. After you have uploaded the zip file, you will get a screen similar to the following.

Figure 4

As per the above instructions, all you have to do is to include the following code in your web page.

Listing 2

<script type="text/javascript" src="http://agappdom.net/g/silverlight.js"></script>
<script type="text/javascript" src="CreateSilverlight.js"></script>
 
<div id="Workflow3Wrapper" style="width:500px; height:400px; overflow:hidden;"></div>
<script type="text/javascript">
var BabyShowerWrapper = document.getElementById("BabyShowerWrapper");
CreateSilverlight();
</script>

And do not forget to create a file called "CreateSilverlight.js" with the following contents:

Listing 3

function CreateSilverlight()
{
Sys.Silverlight.createHostedObjectEx({source:
"streaming:/99999/BabyShower",parentElement: BabyShower});
}

Please remember to replace the account ID number "99999" with your account ID number.

 


View Entire Article

User Comments

Title: real-time broadcasting   
Name: Jassim
Date: 2007-09-09 3:01:41 PM
Comment:
what about real-time broadcasting?






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-10-06 3:27:51 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search