This project is read-only.

How to create new plugin in Win8?

Topics: Windows 8 Xaml
Oct 19, 2012 at 3:27 AM

Hi all:

I want to create a plugin on win8 platform , but it seems difference with smf, who can tell me how to do it?

Oct 24, 2012 at 9:06 PM

Plugins are much simpler in Win8. All you need to do is implemement IPlugin and add the instance to the MediaPlayers.Plugins collection to participate as a plugin.

Once you're in the collection, MediaPlayer will get set and Load will get called. Unload is eventually called when the MediaPlayer is shutdown to give you a chance to clean up.

Additionally, you can use the Update method to receive notification when a new playlistitem is loaded. This allows you to reset the plugin if necessary and configure the plugin with any playlistitem specific metadata at that time (usually via attached properties).

Note: You can always look at the source code for examples on how we built the plugins that ship with the framework if it helps.


Oct 25, 2012 at 7:16 AM

Hi timgreenfield;

Thanks for you reply.

I create a Win8 windows store Player base on SMF , and try to support a stream protocal  that smf not support now.

First I create a Sliverlight Class Library project  , but it can't Reference by Win8 Player.

Then I create a Class Library(Windows Store apps) project and implemement IMediaPlugin , but it can't complie becuase CacheMode , LicenseAcquirer not define in System.Windows.Media namespace . 

I'm a new guy of smf and .net , can you tell me how to develop media plugin of smf on Win8 detail?

Nov 1, 2012 at 8:29 PM

To support new streaming formats, you'll need to write a media foundation extension instead of a player framework plugin. Here's a sample on MSDN that shows how:

Nov 5, 2012 at 6:50 AM

That's great , it's easy for me , thanks.