Welcome to Sign in | Join | Help

News

  • View Simon Guest's profile on LinkedIn Simon Guest's Facebook profile
Browse by Archive:




Embedding Silverlight Videos in Community Server
 

If you are running a blog using Community Server and have been looking at the Silverlight player for playing videos, this could be of interest.  I wanted a way where I could take a regular WMV file, encode it for the web, and embed it in one of my blog posts - the result was the embedded video in the last post.  For those interested, this is how I did it:

First, we need to encode the original WMV file.

1.  Download and install the Microsoft Expression Media Encoder May Preview.

2.  Using the encoder, create a new project, and import your WMV.

3.  Set the specific settings for the output of your project - such as the chapter markers (these are great for navigating through a complex technical deck) and the meta data.  I'd recommend setting the output to Web Streaming for DSL to keep the file sizes down.  Also, in the job output settings, select a look and feel for the Silverlight player.

4.  Run the encoder to generate the directory of files, including the encoded WMV and the .js files you'll need.  If you want the video not to autoplay on display, edit the StartPlayer.js file and set the autoplay to false.

5.  Upload these to a directory on your site.

You should now be able to direct people to the default.html file generated, but it's of course nice to have this embedded within a blog entry.  To do this:

6.  Edit the communityserver.config file for your CS installation.

7.  Enable iframes in blog posts and pages by adding the following line in the MarkUp/html section:

<iframe src="true" mce_src="true" scrolling="true" height="true" width="true" frameborder="true" marginHeight="true" marginWidth="true"/>

Important note:  By doing this you are also giving the ability for users to add iframe declarations to comments (which can embed other unwanted content on your site).  If you have any concerns about who your users are, or if you are not manually filtering comments you may want to rethink this.

8.  Open and resave (with no changes) the web.config file.  This is required to "kickstart" CS into reloading your settings.

9.  Upload communityserver.config and web.config file to your blog.

10.  In your blog entry, switch to HTML view and insert the iframe statement. 

<iframe frameborder="0" height="480" marginheight="0" marginwidth="0" scrolling="auto" src="/myuploadedvideo/default.html" mce_src="/myuploadedvideo/default.html" style='width: 556px; height: 419px' width='600'></iframe>

You'll probably want to tinker around with the settings to accurately fit your window.  The frameborder=0 hides the border on the iframe making your video fit in a little nicer.

Overall, it seems to work well, although I'm not that excited about opening up iframes in blog posts and pages.  If I can find out how to embed the Silverlight control using <object> or <embed> I'll probably update it.

Comments

timheuer

simon, check out http://timheuer.com/blog/archive/2007/05/14/14081.aspx for the object tag you'll need to embed -- i had to use it for an osx widget but any http sniffer will give you the same information...
# May 23, 2007 7:59 PM

Dave Burke

blog bits Microsoft&#39;s Simon Guest on how to embed Silverlight Videos in Community Server using an

# May 24, 2007 12:11 AM

Dave Burke's Community Server Bits

Microsoft&#39;s Simon Guest on how to embed Silverlight Videos in Community Server using an iFrame while

# May 24, 2007 12:20 AM

David Kelley, Sr. Software Architect

Simons article on embeding Popfly silverlight in community server pretty much sums it up. Basically you

# June 5, 2007 1:17 PM

codesecurely.org

My Virtual TechEd conversation with Mike Howard just went up on the Virtual TechEd site . Come watch

# July 11, 2007 8:09 PM

Greg

This article is what I was looking for ;)
# August 6, 2007 3:55 AM

Views on Windows Vista

I promised some changes to Partner TV , the first of which (if you don't count a bit more text explaining

# August 15, 2007 10:58 AM

Patrick Long's Blog

New technology = new &quot;Hello World&quot; app, trouble with Silverlight is it makes it far too easy

# September 14, 2007 5:26 PM

Learning Silverlight

I ran into a few issues getting a silverlight app running inside CommunityServer ( version is 2007.1

# October 13, 2007 6:03 PM

Mike Taulty's Blog

It's been a busy month and a busy week. Yesterday started at 5am and finished at 10pm and involved a...

# November 28, 2007 7:25 AM

RogerGuess

I ran into a few issues getting a silverlight app running inside CommunityServer ( version is 2007.1

# June 11, 2008 11:47 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS