Adding Silverlight .xap file to post

Topics: ASP.NET 2.0, Controls
Mar 4, 2011 at 3:26 AM

I've been trying to get a silverlight video player to work in a post - and seem to be close, but it's not working. 

I'm using BE  When adding a new post, I switch to html view and add my <object> tag that points to the .xap file:

<object data="data:application/x-silverlight," type="application/x-silverlight" width="100%" height="100%">
<param name="source" value="/blog/videos/myvideo.xap"/>
<param name="onerror" value="onSilverlightError" />
<param name="autoUpgrade" value="true" />
<param name="minRuntimeVersion" value="3.0.40624.0" />
<param name="enableHtmlAccess" value="true" />
<param name="enableGPUAcceleration" value="true" />
<param name="initparams" value='playerSettings =
<Title>Hey, it's my cool video!</Title>

<div onmouseover="highlightDownloadArea(true)" onmouseout="highlightDownloadArea(false)">
<img src="toppper2_Thumb.png" style="position:absolute;width:100%;height:100%;border-style:none;" onerror="'none'"/>
<img src="Preview.png" style="position:absolute;width:100%;height:100%;border-style:none;" onerror="'none'"/>
<div id="overlay" class="fadeLots" style="position:absolute;width:100%;height:100%;border-style:none;background-color:white;"/></div>
<table width="100%" height="100%" style="position:absolute;"><tr><td align="center" valign="middle">
<img src="" alt="Get Microsoft Silverlight">
<a href="">
<img src="" class="fadeCompletely" style="position:absolute;width:100%;height:100%;border-style:none;" alt="Get Microsoft Silverlight"/>

Once I save the post, and view in the browser, the new post renders and shows the silverlight player template with the correct height/width. However when clicking the play button, nothing happens.
It seems that the .xap file isn't finding the MediaSource? I've tried altering the MediaSource path so that it point to the root: /blog/videos/myvideo.wmv.

Can anyone on the BE team advise to whether this approach should work?

I've tried to search for silverlight video extensions, but those that come up on search results are indeed broken links.

Thanks for any ideas you my have!

Mar 4, 2011 at 11:19 AM
Edited Mar 4, 2011 at 11:20 AM

I use Bill Beckleman's extension for a Silverlight Slide.Show on my site. Maybe it can help.

Mar 4, 2011 at 1:37 PM

Thanks, I use Beckleman's extension too. Great for slide shows!  But I'm looking for a regular Silverlight video player embedded in the post.

I thought using the <object> tag directly in the html view would work.  Does anyone know if the path to the MediaSource needs special formatting  - perhaps escaped in single or double quotes? 

<MediaSource>"myvideo.wmv"</MediaSource>  or <MediaSource>"myvideo.wmv"</MediaSource>  ?  Or maybe my version BE (1.6.1) does not support this?

 I seems like this shouldn't be this difficult.   Thanks again for any ideas from the BE community!