Extending and enhancing the SMF Player

Jan 19, 2011 at 6:46 PM

Hi all,

We're looking at using the SMFPlayer to serve H264 video. We currently have a player built in Adobe Flex running on 10.1. We obviously need to ensure our player has the same look and functionality. The docs that I could find for 2.3 seemed a little light at providing direction on the following - can anyone help?

1. Skinning the entire player?

2. Adding / replacing / removing a single control - we've seen code such as this http://code.msdn.microsoft.com/SMFDownloadProgress but this seems to rely on completely copying and editing the xaml style. We would rather just change the elements necessary - so for instance the playback slider control - what is the best process for replacing - and what are the steps ?

3.  General extensions to the player - is the best model to inherit to allow for access to protected SMF Player properties and then change the behaviour as we see fit? I know we can extend via the IGenericPlugIn etc interface, but we actually have player and business custom logic that affects core components.

That'll do for a start.

Apologies if I've missed a doc link, i've looked through the samples both here and on MSDN...




Jan 20, 2011 at 5:35 PM

Hi Neil, the best approach to styling & skinning is to use Blend and generate a new template for the SMFPlayer. Here's a video to help get you started:


Regarding #3... great Q! Inheriting SMFPlayer and building plugins are both good ways of extending the default behavior of the player. You can take which ever approach you feel most comfortable with and/or seems most appropriate but here are a couple tradeoffs to the different approaches:

Inheriting gives access to protected members, plugins do not.

Plugins are arguably better for re-use because any exiting app using SMF could just add your assembly and automatically include your new behavior.

In general, if you are adding a new and isolated behavior to SMF that could be useful in other apps, I'd try to go the plugin route. If you are trying build a super player that is specific to your app or if you NEED access to protected members, inherit.

Hope that helps,

Tim Greenfield

Jan 21, 2011 at 4:10 PM

Thanks Tim. We're going to go down the inheritance route we think.