<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Silverlight &#124; WPF &#124; Microsoft.Net &#187; CodePlex</title>
	<atom:link href="http://joel.neubeck.net/tag/codeplex/feed/" rel="self" type="application/rss+xml" />
	<link>http://joel.neubeck.net</link>
	<description>Simplifing structure without changing results</description>
	<lastBuildDate>Wed, 26 May 2010 18:43:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>SL Video Player used on Microsoft Mediaroom site</title>
		<link>http://joel.neubeck.net/2009/01/sl-video-player-used-on-microsoft-mediaroom-site/</link>
		<comments>http://joel.neubeck.net/2009/01/sl-video-player-used-on-microsoft-mediaroom-site/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 23:07:59 +0000</pubDate>
		<dc:creator>joel</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Microsoft.Net 2.0]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[CodePlex]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://joel.neubeck.net/?p=325</guid>
		<description><![CDATA[Some of you who follow my blog (which I apologize for how stale it has been) know that Tim Heuer and I worked on a Silverlight Video player which we posted on CodePlex.  Every once in while Tim clues me into people that might be using it and this one popped up today.  I thought [...]]]></description>
			<content:encoded><![CDATA[<p>Some of you who follow my blog (which I apologize for how stale it has been) know that <a href="http://timheuer.com/blog/">Tim Heuer</a> and I worked on a Silverlight Video player which we posted on <a href="http://www.codeplex.com/sl2videoplayer">CodePlex</a>.  Every once in while Tim clues me into people that might be using it and this one popped up today.  I thought it was cool enough to post!</p>
<p><a href="http://www.microsoft.com/mediaroom/" target="_blank"><img class="aligncenter size-full wp-image-326" title="mm_logo_162x59-copy" src="http://joel.neubeck.net/wp-content/uploads/2009/01/mm_logo_162x59-copy.png" alt="mm_logo_162x59-copy" width="170" height="70" /></a><br style="clear:both"/></p>
]]></content:encoded>
			<wfw:commentRss>http://joel.neubeck.net/2009/01/sl-video-player-used-on-microsoft-mediaroom-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silverlight Video Player updated to display external bookmarks</title>
		<link>http://joel.neubeck.net/2008/08/sl2videoplayer-external-bookmark/</link>
		<comments>http://joel.neubeck.net/2008/08/sl2videoplayer-external-bookmark/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 17:17:14 +0000</pubDate>
		<dc:creator>joel</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Bookmark]]></category>
		<category><![CDATA[CodePlex]]></category>
		<category><![CDATA[ScriptableMember]]></category>
		<category><![CDATA[Video Player]]></category>

		<guid isPermaLink="false">http://joel.neubeck.net/2008/08/sl2videoplayer-external-bookmark/</guid>
		<description><![CDATA[Last week someone requested a new feature to the Silverlight 2 Video player on CodePlex that would allow users to create an external list of &#8220;bookmarks&#8221;, that would link to a specific marker or moment in playback.  The idea would be to have a series of links outside of Silverlight, that once clicked,playback would jump [...]]]></description>
			<content:encoded><![CDATA[<p>Last week someone requested a new feature to the <a href="http://www.codeplex.com/sl2videoplayer/" target="_blank">Silverlight 2 Video player on CodePlex</a> that would allow users to create an external list of &#8220;bookmarks&#8221;, that would link to a specific marker or moment in playback.  The idea would be to have a series of links outside of Silverlight, that once clicked,playback would jump to that moment in the video.</p>
<p>When I originally created marker support I had given this some thought and was just waiting for the opportunity to add this feature.  I am excited someone really wants it.  Back in July I created a post called <a href="http://joel.neubeck.net/2008/07/communicating-between-sl2-objects/" target="_blank">Communicating between two Silverlight objects on a single page</a>. In this post I demonstrate how one can use a <strong>[ScriptableMember]</strong> to expose a method to JavaScript. To add this feature to the Video Player I can use this technique.</p>
<p>The first step was to create a method in my mediaControls control, which would allow a time (TimeSpan) to be passed during playback.  This call will jump the slider to that position in time and begin or continue playback.</p>
<p><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" title="sl2video_externalLink2" src="http://joel.neubeck.net/wp-content/uploads/2008/08/sl2video-externallink2-thumb.png" border="0" alt="sl2video_externalLink2" width="457" height="221" align="left" /> <br style="clear: both" /><a href="http://joel.neubeck.net/wp-content/uploads/2008/08/sl2video-externallink.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" title="sl2video_externalLink" src="http://joel.neubeck.net/wp-content/uploads/2008/08/sl2video-externallink-thumb.png" border="0" alt="sl2video_externalLink" width="383" height="125" align="left" /></a>Once we have a method in mediaControl we can expose a scriptable method in Page.xaml. This method can be called from any page hosting out Silverlight XAP.     <br style="clear: both" /></p>
<p>To demonstrate how to use this method I created a sample html page that presents a list of bookmarks that target the video player.  Each link calls a JavaScript method, that in turn calls my [ScritableMember]</p>
<p><a href="http://joel.neubeck.net/wp-content/uploads/2008/08/sl2video-externallink4.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" title="sl2video_externalLink4" src="http://joel.neubeck.net/wp-content/uploads/2008/08/sl2video-externallink4-thumb.png" border="0" alt="sl2video_externalLink4" width="499" height="72" align="left" /></a> <br style="clear: both" /><a href="http://joel.neubeck.net/wp-content/uploads/2008/08/sl2video-externallink3.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" title="sl2video_externalLink3" src="http://joel.neubeck.net/wp-content/uploads/2008/08/sl2video-externallink3-thumb.png" border="0" alt="sl2video_externalLink3" width="531" height="91" align="left" /></a> <br style="clear: both" /></p>
]]></content:encoded>
			<wfw:commentRss>http://joel.neubeck.net/2008/08/sl2videoplayer-external-bookmark/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Silverlight Video Player updated to display Closed Captioning</title>
		<link>http://joel.neubeck.net/2008/07/sl2videoplayer-closed-captioning/</link>
		<comments>http://joel.neubeck.net/2008/07/sl2videoplayer-closed-captioning/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 15:02:47 +0000</pubDate>
		<dc:creator>joel</dc:creator>
				<category><![CDATA[CodePlex]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Closed Captioning]]></category>
		<category><![CDATA[ToggleButton]]></category>
		<category><![CDATA[Video Player]]></category>

		<guid isPermaLink="false">http://joel.neubeck.net/?p=205</guid>
		<description><![CDATA[Yesterday I completed the first version of Closed Captioning support for the Silverlight 2 Video Player on CodePlex.  It definitely in an alpha phase, but with some polish it should be reliable and more usable.  Here is an image of how the captions are being displayed. In this first version I made a decision to [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I completed the first version of Closed Captioning support for the <a title="SL2 Video Player" href="http://www.codeplex.com/sl2videoplayer/" target="_blank">Silverlight 2 Video Player</a> on CodePlex.  It definitely in an alpha phase, but with some polish it should be reliable and more usable.  Here is an image of how the captions are being displayed.</p>
<p><a href="http://joel.neubeck.net/wp-content/uploads/2008/07/video_cc.png"><img class="aligncenter size-full wp-image-206" title="video_cc" src="http://joel.neubeck.net/wp-content/uploads/2008/07/video_cc.png" alt="" width="500" height="248" /></a><br style="clear:both"/>In this first version I made a decision to display closed captioning when the volume is muted, but with the right visualization we should be able to find a nice place for a ToggleButton.  Here is a list of a few other things I did to the project.</p>
<ul>
<li>Updated Xml parsing to support markers with multiple types (Marker, CC, etc)</li>
<li>Converted speaker button control to ToggleButton to display a different visualization when the player is muted.</li>
<li>Linked volumeSlider to speaker button so slider drops to zero on mute and back to previous volume when mute is turned off.</li>
<li>Added a new event from mediaControl that is fired when the volume is changed.  This allows the player to control closed captioning display and not the media controller.</li>
<li>Wrote closedCaptioning UserControl that visualizes the scrolling captions.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://joel.neubeck.net/2008/07/sl2videoplayer-closed-captioning/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Asynchronous loading of TimelineMarkers for Silverlight Video Player</title>
		<link>http://joel.neubeck.net/2008/07/asynchronous-loading-of-timelinemarkers-for-silverlight-video-player/</link>
		<comments>http://joel.neubeck.net/2008/07/asynchronous-loading-of-timelinemarkers-for-silverlight-video-player/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 20:50:05 +0000</pubDate>
		<dc:creator>joel</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[CodePlex]]></category>
		<category><![CDATA[Dispatcher.BeginInvoke]]></category>
		<category><![CDATA[TimeLineMarker]]></category>
		<category><![CDATA[Video Player]]></category>

		<guid isPermaLink="false">http://joel.neubeck.net/2008/07/asynchronous-loading-of-timelinemarkers-for-silverlight-video-player/</guid>
		<description><![CDATA[As part of the ongoing evolution of our Open Source Silverlight Video Player on CodePlex, I added the ability to asynchronously load a set of TimeLineMarkers from an XML document.&#160; The goal was to allow users a choice between encoding there video with markers or defining those markers in an external xml file.&#160; What I [...]]]></description>
			<content:encoded><![CDATA[<p>As part of the ongoing evolution of our Open Source <a href="http://www.codeplex.com/sl2videoplayer/" target="_blank">Silverlight Video Player on CodePlex</a>, I added the ability to asynchronously load a set of <strong>TimeLineMarkers</strong> from an XML document.&#160; The goal was to allow users a choice between encoding there video with markers or defining those markers in an external xml file.&#160; What I thought would be a pretty trivial task, proved to be an interesting challenge. Here is a snapshot of the Xml format.</p>
<p><a href="http://joel.neubeck.net/wp-content/uploads/2008/07/marker-1.png"><img title="marker_1" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="164" alt="marker_1" src="http://joel.neubeck.net/wp-content/uploads/2008/07/marker-1-thumb.png" width="473" align="left" border="0" /></a> </p>
<p>  <br style="clear: both" />
<p>The first step in implementing this functionality was to download the marker Xml.&#160; In the event that this marker file was quite large in size I decided to make the download asynchronous.&#160; Downloading a file asynchronously required that the path to the file is absolute.&#160; Since I have no real control over my <strong>initParams</strong> I decided to support both an absolute or relative Uri.&#160; In the event that the path to the Xml document is relative, I make a reasonable assumption that it is located in the same location as the XAP.&#160; As a result ,I can define my Uri with “<strong>Host.Source</strong>” as the baseUri of the Xml document.&#160; To Download the file, I simply make a <strong>WebRequest</strong> and define an <strong>AsyncCallback</strong> to be fired when the file has completed downloading.&#160; </p>
<p><strong>Threading Considerations</strong></p>
<p>In Silverlight 2 Beta 2 there was a significant change in the concurrency model used for asynchronous communications.&#160; In Beta 1 these type of requests returned on the UI thread.&#160; In Beta 2, when you choose to use the BeginGetResponse of the WebRequest you are telling Silverlight to use a worker thread that comes from a thread pool.&#160; As a result, you can NOT update any user interface elements on the UI thread.&#160; Initially I thought I would be able to use “Application.Current.RootVisual.Dispatcher” as a way to execute a delegate on the UIThread.&#160; Unfortunately this throws a Cross Thread exception.&#160; After explored a few options I realized that I could simply call <strong>Dispatcher.BeginInvoke(MyMethod)</strong> from within my AsyncCallback.&#160; here is what that looked like.</p>

<div class="wp_syntax"><div class="code"><pre class="c-sharp" style="font-family:monospace;">void OpenStreamCompleted(IAsyncResult ar)
{
    HttpWebRequest request = ar.AsyncState as HttpWebRequest;
    WebResponse response = request.EndGetResponse(ar);
&nbsp;
    // Read the response into a Stream object.
    Stream responseStream = response.GetResponseStream();
&nbsp;
    // Create a new StreamReader instance using the specified Stream object.
    using (StreamReader streamreader = new StreamReader(responseStream))
    {
        XElement document = XElement.Load(streamreader); 
        _externalMarkerData = (from el in document.Elements() select GetMarkerData(el)).ToList();
    }
    Dispatcher.BeginInvoke(ProcessParsedMarkerCollection);
}</pre></div></div>

<p>As you can see above, once I have the Xml downloaded I parse it from Xml into a collection. For this I thought it would be cool to use Linq for XML.&#160; I am always amazed at how few a lines of code I need to write to parse an Xml document with Linq.&#160; The end product of the parse is a List&lt;&gt; containing a very simple custom object called “MarkerData”.&#160; If I had chosen to move this parsing back to the UIThread I could have just created a collection of TimelineMarkers, but I thought there was no harm in having my own object to expand over time.</p>
<p>To get the latest source visit the project at <a title="http://www.codeplex.com/sl2videoplayer" href="http://www.codeplex.com/sl2videoplayer">http://www.codeplex.com/sl2videoplayer</a></p>
]]></content:encoded>
			<wfw:commentRss>http://joel.neubeck.net/2008/07/asynchronous-loading-of-timelinemarkers-for-silverlight-video-player/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Silverlight 2 Video Player pushed to CodePlex</title>
		<link>http://joel.neubeck.net/2008/06/silverlight-2-video-player-pushed-to-codeplex/</link>
		<comments>http://joel.neubeck.net/2008/06/silverlight-2-video-player-pushed-to-codeplex/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 18:26:03 +0000</pubDate>
		<dc:creator>joel</dc:creator>
				<category><![CDATA[CodePlex]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Tim Heuer]]></category>
		<category><![CDATA[Video Player]]></category>

		<guid isPermaLink="false">http://joel.neubeck.net/?p=166</guid>
		<description><![CDATA[Yesterday Tim Heuer made a great suggestion that we submit our collaboration on a  Silverlight 2 Video Player as Open Source to CodePlex. You can now find the latest source at http://www.codeplex.com/sl2videoplayer.  As we find any &#8220;undocumented features&#8221; or add new and exciting ehancments we will push these up to CodePlex.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.codeplex.com/sl2videoplayer"><img class="alignleft size-full wp-image-167" title="codeplex-logo_thumb" src="http://joel.neubeck.net/wp-content/uploads/2008/06/codeplex-logo_thumb.jpg" alt="" width="235" height="92" /></a>Yesterday Tim Heuer made a great suggestion that we submit our collaboration on a  Silverlight 2 Video Player as Open Source to CodePlex.  You can now find the latest source at <a title="http://www.codeplex.com/sl2videoplayer" href="http://www.codeplex.com/sl2videoplayer">http://www.codeplex.com/sl2videoplayer</a>.  As we find any &#8220;undocumented features&#8221; or add new and exciting ehancments we will push these up to CodePlex.</p>
]]></content:encoded>
			<wfw:commentRss>http://joel.neubeck.net/2008/06/silverlight-2-video-player-pushed-to-codeplex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
