×

First time here?

You are looking at the most recent posts. You may also want to check out older archives. Please leave a comment, ask a question and consider subscribing to the latest posts via RSS or email. Thank you for visiting!

Yesterday (7-Jul-2010), the Silverlight Media Framework v2 was released on Codeplex (yeah, it’s Open Source).  If you aren’t familiar with it, it is a Silverlight framework encapsulating the best practices for media playback for Silverlight applications.  It is both a framework and, in v2, they also provided compiled simple player XAPs that you can just drop in HTML.  If you are building apps, you’ll want to take a look at the framework in more detail, but if you want a solid media player experience grab the players too.

Since I use Windows Live Writer as my blogging tool, I wanted to share my workflow for embedding videos into blog posts (or other content that I can author using Live Writer).  First, grab the necessary tools:

Install the Dynamic Template add-in for Writer.  Next step is to put your ProgressiveDownloadPlayer.xap somewhere.  This doesn’t matter, as along as you know the URL to it.  I keep mine on my cloud storage share since I can re-use it in various places.  Once all those pieces are in place here is what I do.

Step 1 – Create the Dynamic Template

In order to create a template, you have to execute the Insert function for Dynamic Template to bring up the dialog.  Once there, choose to Edit Templates and give it a name.

Dynamic Template insert dialog

Then in the template code, copy this HTML:

   1: <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="640" height="480">
   2:   <param name="source" value="URL_TO_YOUR_PLAYER_XAP" />
   3:   <param name="background" value="white" />
   4:   <param name="enableHtmlAccess" value="true" />
   5:   <param name="minRuntimeVersion" value="4.0.50424.0" />
   6:   <param name="initParams" value="MediaUrl=<%= VideoUrl %>,AutoPlay=false,ThumbnailUrl=<%= ThumbnailUrl %>" />
   7:   <param name="autoUpgrade" value="true" />
   8:   <a href="http://go.microsoft.com/fwlink/?LinkID=149156&amp;v=4.0.50424.0" style="text-decoration:none">
   9:       <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none" />
  10:   </a>
  11: </object>

And in the settings use these in this screenshot:

Code variables

Of course, replace with the URL to your player location.  That’s it, that is your template.

Step 2 – Prepare your media

I’m assuming that you already have media to display, but if you don’t, use your favorite media encoding tool to create the media and have the URL.  Note that it doesn’t have to be an absolute URL, but just understand the paths of your web app if you plan on using a relative URL.  Personally I recommend using an absolute one always.

Also the snippet above, while not required, implements the ThumbnailUrl (thanks Kevin) parameter for the player.  You’ll need a URL to a thumbnail image for preview.

Step 3 – Execute the template

Now that you have the template, you can use it.  Rather than talk about it, here’s an embedded video (using the process) demonstrating the process :-)…

Get Microsoft Silverlight

Simple, huh? Now of course you cannot see the final result in Writer (not sure why actually but I think it has something to do with the rendering techniques they use in authoring mode (hence the white box in the vid), but you can see the end result!

Summary

Silverlight Media Framework is awesome.  Live Writer is awesome.  Awesome+Aweomse = Awesomely Awesome.  Kidding aside, if you have similar workflows to me, this should help you.  It has streamlined the content publishing process when I need it in a simple, but efficient way.

Hope this helps!


This work is licensed under a Creative Commons Attribution By license.


7/8/2010 3:35 PM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
I love it when a plan comes together.
7/8/2010 10:49 PM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
So today, i got reply from microsoft connect
silverlight related problem

i test my old solution, i get error from visual studio 2010
that i have to install developer runtime
(remember your previous post, silverlight top issue, i think i somehow install silverlight plugin)

then i decide to remove microsoft silverlight 4 by control panel
re-install silverlight tool visual studio 2010
i can run my silverlight again from visual studio....

now on lunch time, i open your blog
and get pop up, that this page require latest silverlight.....
i'm to afraid to install the new one, since it's probably broke my developer runtime again...
7/8/2010 11:10 PM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
Andrew - you don't need to re-install the tools, but rather just upgrade the DEV runtime. You were auto-upgraded to the latest release of SL, however it wasn't the dev version. Direct link to DEV runtime: http://go.microsoft.com/fwlink/?LinkID=188039
7/8/2010 11:41 PM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
Just download and install silverlight runtime from your link,
it's solve the issue, i can see your video

so, Silverlight tool for visual studio 2010
which i get from silverlight.net get started page
is not updated....
7/9/2010 2:11 AM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
Hi Tim,

Why doesn't Silverlight update automatically? I had to download and run the new version.
7/9/2010 7:30 AM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
Andrew -- as I said, the *tools* don't need to be installed again. The DEV runtime (http://go.microsoft.com/fwlink/?LinkID=188039) is the one that needs to be installed for developers (and this link is on silverlight.net)

ColinM - it does update automatically depending on your settings with Microsoft Update and/or the settings for the plugin for auto-update.
7/9/2010 10:24 AM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
TimelineMarkerSkipped event does not work anymore with this release. Even documentation says this event is raised when a marker is reached instead of when a marker is skipped.
7/9/2010 10:29 PM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
Hi Tim,
i bet you hate it, what if you download a software, run it and the software need to be updated
and the link, i know it from you, not silverlight.net

my point is, silverlight tool for visual studio must have the latest developer runtime
even if i do re-install, i should have the latest one...

i think, microsoft start to think to force an update, automatically hidden from user
all internet explorer version updated to version 9 automatically
and the world will be happy
maybe start from silverlight ? :P


6/30/2011 5:49 AM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
I am using latest SilverLight Media Framework and I think last version is much better than current one, any thought?
zubair
7/4/2011 10:33 AM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
Current release of Silverlight is much better than last Framework 2, although it was the first to integrate with Live Writer. It was the result of great efforts by Silverlight developers. sympathy messages
7/6/2011 5:32 PM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
Live writer is the thing I miss the most after having migrated to linux. types of doctors
7/12/2011 6:06 AM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
The author has written an excellent article. airstreamYou made your point and not much to discuss. It's like this universal truth that you can not argue with the truth is not universal, everything has its exception. Thanks for this information.
7/16/2011 6:07 AM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
The author has written an excellent article. You made your point and not much to discuss. It's like this universal truth that you can not argue with the truth is not universal, everything has its exception. Thanks for this information.
Keyword Bikini
7/20/2011 2:17 AM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
The Open source silverlight media framework enables developers to quickly deploy a robust,scalable,customizable player for IIS Smooth Streaming Delivery with koty rasowe
7/21/2011 12:07 AM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
well i must say that microsoft silverlight programmers are really doing a great job. Serrapeptase
7/21/2011 12:51 AM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
I don’t suppose I have read anything like this before. So nice to find somebody with some original thoughts on this subject
youcandid.com
7/28/2011 10:02 PM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
The Silverlight Media Framework (SMF) is an open source project that was released by Microsoft at the 2009 Microsoft Professional Developers Conference. It is an extensible and highly scalable Silverlight video framework that directly answers the need for a stable core upon which developers and designers can create their own players with Florida Lowest Rates
8/1/2011 9:36 PM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
I definitely like on the way to understand on this particular site. Retain way up this superior work of art. happy birthday wishes i just would likely additionally like to help you discuss this link together with your company.
9/17/2011 5:27 AM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
Silverlight´s getting closer to android, yet I think they´re still ahead. Anyhow, love that game and play it frequently in my breaks. Cheers, Ruther @ how to short sale
9/19/2011 5:35 AM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
True silverlight is becoming more androidesk. But that was always going to happen as apple and android battle it out for the top and new players try to join in the duel.
James - Dofollow List
9/23/2011 2:58 AM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
Thanks for sharing this with us. I found it informative and interesting. Looking forward for more updates.booking
9/26/2011 12:32 AM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
Very rarely do I come across a site thats both informative and entertaining, and let me tell you, you've hit the nail on the head. Your site is important; the issue is something that not enough people are talking intelligently about.personal injury lawyer orange county
10/7/2011 2:18 PM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
For those who are not acquainted with it, it's a Silverlight framework encapsulating the ideal practices for media playback for Silverlight programs. It can be at the same time a framework and, in v2, in addition they offered compiled simple player XAPs which you can just drop in HTML. In case you are developing applications, you will desire to consider the framework in much more detail, but when you'd like a solid media player expertise get the players as well. edu links
10/8/2011 4:56 AM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
Where to start... That seems like a nice clean way to handle objects, but how does it measure up to todays HTML5 and xhtml issues. For those who are not acquainted with it, it's a Silverlight framework encapsulating the ideal practices for media playback for Silverlight programs. It can be at the same time a framework and, in v2, in addition they offered compiled simple player XAPs which you can just drop in HTML.
Paul @ Leaflet Distribution Companies
10/9/2011 9:28 PM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
Thanks for this article, I have read your blog it is very helpful for me. I want to say thanks to you. I have bookmark your site for future updates!
buy triactol
10/11/2011 3:46 PM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
Thanks for the tutorial, I've been looking to get more creative with Windows live writer and Silverlight seems like the perfect solution.
shark motorcycle audio speakers
Gravatar
10/15/2011 12:20 AM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
This is the first time I am visiting this post.I have gathered much of it.Really a interesting firm things.SonhosBR
10/28/2011 6:19 AM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
I was experiencing issues with using the silverlight framework with live writer, but I just upgraded the DEV runtime and that solved the problem.
11/4/2011 7:11 AM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
This distance using the applications are just brilliant .. Using Silverlight applications are quite difficult, because not all programmers are familiar with these applications.
Sears Coupon Codes
3/3/2012 2:03 PM | # re: Silverlight Media Framework 2 released–integrate with Live Writer
Thank you for this useful information. almost two years since you posted it but still interesting

 
Please add 6 and 3 and type the answer here:

DISCLAIMER:

The opinions/content expressed on this blog are provided "ASIS" with no warranties and are my own personal opinions/content (unless otherwise noted) and do not represent my employer's view in any way.