Friday, December 3, 2010

SharePoint 2010: Silverlight Media Player

What can you do with the Out Of the Box (OOB) SharePoint 2010 Silverlight Media Player?

Well you can add it to the page.
Provide buttons to Pause, Play and Stop.

But they (Microsoft) haven't provided us with any player states. Is the media player playing a movie or has it stopped?

In my current project I need to do something once the movie has finished. Unfortunately after looking through the Silverlight code (after decompilation). I can see that there are no events to plug into.

Here are the relevent bits:
// Methods
public string CaptureCurrentFrame();
public void Pause();
public void Play();
public void Stop();

// Properties
public bool AutoPlay { get; set; }
public string DisplayMode { get; set; }
public string Duration { get; }
public long DurationMilliseconds { get; }
public string EmbedText { get; }
public bool Loop { get; set; }
public string MediaSource { get; set; }
public string MediaTitle { get; set; }
public int NaturalVideoHeight { get; }
public int NaturalVideoWidth { get; }
public string Position { get; set; }
public long PositionMilliseconds { get; set; }
public string PreviewImageSource { get; set; }
public string TemplateSource { get; set; }
public double Volume { get; set; }

What I'll try to do is to re-skin the player and perhaps do a little magic. If I have any success in this area I'll create a post.

In the mean time. This is a good article to see what you can do with this control: http://msdn.microsoft.com/en-us/library/ee558890.aspx

No comments:

Post a Comment