Using TTML captions in your XAML/C#-based Windows Store application can be done either in XAML or in the C# code-behind page.

In C#

In the code-behind page for the page containing your Player Framework instance add one line of code in your constructor:

// Constructor
public MainPage()

      // add this line
      MyPlayer.Plugins.Add(new Microsoft.PlayerFramework.TimedText.CaptionsPlugin());

Alternatively, In XAML:

1. Add a namespace for the TTML plugin

2. Add a reference to the plugin inside your Player Framework instance.
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <playerFramework:MediaPlayer x:Name="MyPlayer" Source="" IsCaptionSelectionVisible="True">
                <playerFramework:Caption Description="English" Source=""/>
                <playerFramework:Caption Description="Spanish" Source=""/>

Last edited Oct 3, 2013 at 12:35 AM by mdowney, version 4