Silverlight Streaming: new iframe-based invocation mechanism
With a recent update to the Silverlight Streaming service, it's now even easier to instantiate a hosted app on a web page: all you need is a single iframe element whose source attribute refers to a server-side invocation URL. You can now write something like this:
<html>
<body>
<iframe src=https://silverlight.services.live.com/invoke/AccountID/AppName/iframe.html
scrolling="no" frameborder="0" width="500" height="400"></iframe>
</body>
</html>
(Note that AccountID and AppName need to be replaced with values specific to the hosted application)
Background
Silverlight Streaming is a new Windows Live Platform offering (currently in alpha) that provides scalability-on-demand for media-rich Silverlight applications. (You can find more information here)
Once you upload a Silverlight application to the Silverlight Streaming service, it's fairly trivial to instantiate the hosted app on a web page. You could previously do it in four easy steps that look something like this:
<html>
<head>
<!-- (1) add a script reference -->
<script src="https://agappdom.net/g/silverlight.js" type="text/javascript"></script>
<!-- (2) define a Javascript function to create the hosted object; usually in a separate .js file -->
<script type="text/javascript">
function CreateSilverlight() {
Sys.Silverlight.createHostedObjectEx({ source: "streaming:/AccountID/AppName",
parentElement: pe});
}
</script>
</head>
<body>
<!-- (3) define a DIV to contain the hosted object -->
<div id="myApp" class="aghost">
<!-- (4) add a script element to call the create function -->
<script type="text/javascript">
var pe = document.getElementById("myApp");
CreateSilverlight();
</script>
</div>
</body>
</html>
[Details on the individual steps can be found here, on the Windows Live Dev site. Note that the URL used in step (1) is for the Silverlight 1.0 Beta. For more information on how to reference Silverlight 1.0 RC, see the July 27th entry on the Silverlight Streaming News page]
Comments
- Anonymous
July 31, 2007
Catherine Heller has written up a great post that describes a new feature in Silverlight Streaming. Having - Anonymous
July 31, 2007
Catherine Heller has written up a great post that describes a new feature in Silverlight Streaming. Having - Anonymous
August 01, 2007
The comment has been removed - Anonymous
August 05, 2007
Javier,You're probably using the RC.Cathrene used the Beta syntax.Make sure you have <script src="http://agappdom.net/g/silverlight.js" type="text/javascript"></script> - Anonymous
August 14, 2007
Sorry, it has been a little quite on the blog. I was on vacation last week and training down in Redmond - Anonymous
August 14, 2007
Sorry, it has been a little quite on the blog. I was on vacation last week and training down in Redmond - Anonymous
October 31, 2007
As a follow-on to the last screencast (about how to do a screencast), I've created a screencast that - Anonymous
October 31, 2007
As a follow-on to the last screencast (about how to do a screencast), I've created a screencast that - Anonymous
December 06, 2007
A ver... tenía que contar en mi blog que Titín III había ganando, a sus 38 añazos, la txapela del 4 y