Getting Started Guide

Player Framework for Xaml-based Windows store applications

1. Make sure you have installed the tools and SDK for Windows 8.

2. Install the Visual Studio Extension SDK (Microsoft.PlayerFramework.vsix) by double clicking on the file.

3. Create a new project using the Windows Store Application templates for C# or Visual Basic.
xaml-step-1.png

4. Add 'Microsoft Player Framework' to your project references. Under References --> Windows --> Extensions
xaml-step-2.png
Note: the version number may differ depending on what version of the player framework you have installed.

5. Add the PlayerFramework namespace to your xaml file.
xmlns:mmppf="using:Microsoft.PlayerFramework"

6. Add the MediaPlayer control that is part of the PlayerFramework namespace to the body of your Xaml file and set the source to a valid url. For example:
<Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
    <mmppf:MediaPlayer Source="http://smf.blob.core.windows.net/samples/videos/bigbuck.mp4"/>
</Grid>

That's all you need to get started. Run your app and see video player using the Player Framework. There is an extensive API as well as optional plugins to help customize the experience to the needs of your app.

Adding support for Smooth Streaming

1. Follow the instructions above to create a new app that uses the Microsoft Media Platform Player Framework for Xaml.

2. Install the Visual Studio Extension SDK for the Smooth Streaming Client (this is a separate download).

3. Add 'Microsoft Smooth Streaming Client SDK for Windows 8' and 'Microsoft Visual C++ Runtime Package' to your project References. Under References --> Microsoft--> Extensions

4. Add 'Microsoft Player Framework Adaptive Streaming Plugin' to your project references. Under References --> Windows --> Extensions
ss-step-1.png

5. Modify the MediaPlayer control Xaml so it uses a valid smooth streaming url and adds the Adaptive plugin to the plugins collection on the player framework.
xmlns:adaptive="using:Microsoft.PlayerFramework.Adaptive"

<mmppf:MediaPlayer Source="http://mediadl.microsoft.com/mediadl/iisnet/smoothmedia/Experience/BigBuckBunny_720p.ism/Manifest">
    <mmppf:MediaPlayer.Plugins>
        <adaptive:AdaptivePlugin />
    </mmppf:MediaPlayer.Plugins>
</mmppf:MediaPlayer>
Note: alternatively, you can add the plugin in your code behind

6. Target your app to x86, x64, or ARM. Because the IIS Smooth Streaming Client is written in unmanaged code, AnyCPU will not work and instead you must target and build your app for each platform you wish to support.
ss-step-2.png
ss-step-3.png

That's all you need to get started. Run your test app watch Big Buck Bunny playing in smooth streaming!

Last edited Nov 30, 2012 at 12:15 AM by timgreenfield, version 16