views:

446

answers:

1

Hi All,

I need to develop a Video Player component to consume/play publishing points (On Demand and Live) from Media Services. I use Silverlight 3.

I got a prototype working with SL 3 'Media Element' control. Since the control lacks any generic media player functionality (play/pause/seek etc...) I need to develop on top of it. But my fair guess is this has been already done. The closest I got was SL2VideoPlayer, which has desired media player features, but not working with media services streams. Beside it's based on SL2, not 3.

Can you guys help me with any suggestions? My req are;
1. Support basic video player functionality
2. Support media services streams (live and ondemand)
3. Open Source (So I can improve on it to match my requirement)

+1  A: 

Silverlight's MediaElement has the Play and Stop functions and the CurrentState property, which are some of the things you'd need to expose to create your own Video Player. You can easily add buttons to the Silverlight Canvas to call those functions.

You can also register your SL app to be a scriptable object, which would allow interaction from javascript on the HTML page:

System.Windows.Browser.HtmlPage.RegisterScriptableObject("scriptobject", this);

Then just create public functions adorned with the [ScriptableMember] attribute to allow consumption by javascript:

[ScriptableMember]
public void Play()
{
    MediaElement.Play();
}
JML

related questions