Home > Client Technologies > MediaPlayer control included in Silverlight 3

MediaPlayer control included in Silverlight 3

August 19, 2009
Silverlight/Expression 3 MediaPlayer

For some reason I missed this until just recently, but Silverlight 3 comes with a MediaPlayer control courtesy of the Expression team. If you open the Assets panel and search for media, you’ll find both the MediaElement and the MediaPlayer, which you can then draw out on the artboard like any other control.

The MediaPlayer is very similar to the one that ships with Expression Encoder and mirrors the default theme. There is a ton of functionality built in: Playlist, Chapters, AutoLoad, AutoPlay, Offline, Popout, Transport Controls, Progress Bar, Volume Bar, Full Screen and Closed Caption buttons.

The best part is, that like any other control you can just right-click on the MediaPlayer and select the “Edit Template” – > “Edit A Copy…” option and you can modify the template to change the look and behavior of the MediaPlayer.

Another option is to reuse the different MediaPlayers available from Expression Encoder using the method outlined by Tim Heuer.

No need to start from scratch anymore.

  1. August 19, 2009 at 8:53 pm

    The MediaPlayer control is installed by Expression Encoder, if you have Blend and not Encoder then that control won’t be in your Assets Panel.

  2. August 19, 2009 at 9:27 pm

    Ah, thanks for the information Nigel. Now its all starting to make sense…

  3. Stuart
    August 20, 2009 at 1:38 am

    Is this natively part of the Silverlight 3 runtime, or a separate download?

  4. August 20, 2009 at 1:49 pm

    Just confirming that I have the Blend 3 Trial installed and I do not have the MediaPlayer asset. I expect it will show up when I install the full Expression Studio 3.

  5. August 23, 2009 at 1:13 am

    @Stuart and @Joel – You need to have Expression Encoder 3 installed. It will then automagically register and add MediaPlayer control into Blend’s Asset pane from where you will be able to use it in the way Adam has described.I’ve played with the very same control few days ago and managed to get it to play HD YouTube videos with Silverlight. You can take a look here if you are looking for more details: http://www.uxpassion.com/2009/08/silverlight-tutorial-play-hd-youtube-videos-silverlight/Hope this helps,Vibor

  6. February 23, 2010 at 3:22 pm

    Is there a simple way to implement the FullScreen functionality on clicking the Fullscreen button for this MediaPlayer in SL3 using only c# code? It seems something like this must be trivial, but I have not been able to find a good solution yet.

    • February 23, 2010 at 8:33 pm

      No, for security reasons Fullscreen mode can only be initiated by a user.

      • Ajay
        April 5, 2010 at 7:57 pm

        Hi Adam, i am just curious to know what security reasons would prevent from displaying direct full screen without user intervention.

        I appreciate your response.

      • April 20, 2010 at 12:06 pm

        Hi Ajay,

        The reason is to prevent screen spoofing. We have to be careful that an application doesn’t do something like impersonate the Windows login screen without the user’s knowledge.

  1. December 18, 2009 at 5:48 am
Comments are closed.
%d bloggers like this: