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.