No issue to add PlaylistItem in VS 2010 with RTW 2.5 (using player framework plugin)

Mar 10, 2015 at 4:32 PM
Hi,

I would like to add several uri by programming in C# with smf. player function.
It's work well when I've added directly the manifest into the configuration
But where can I add in .cs file and which function could be used to add the Playlist URI as described below

PlaylistItem pliTemp = new PlaylistItem();
       pliTemp.MediaSource = new Uri("http://video3.smoothhd.com.edgesuite.net/ondemand/Big%20Buck%20Bunny%20Adaptive.ism/Manifest");
       MyPlayer.Playlist[0] = pliTemp;

       pliTemp.MediaSource = new Uri("http://video3.smoothhd.com/ondemand/Turner_Sports_PGA.ism/Manifest");
       MyPlayer.Playlist[1] = pliTemp;



Code below in Xaml file.

<UserControl x:Class="SMF_SmoothStreaming5.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400" 
xmlns:smf="http://schemas.microsoft.com/smf/2010/xaml/player"
xmlns:media="clr-namespace:Microsoft.SilverlightMediaFramework.Core.Media;assembly=Microsoft.SilverlightMediaFramework.Core" Loaded="UserControl_Loaded" MediaCommand="UserControl_MediaCommand" xmlns:my="clr-namespace:Microsoft.Web.Media.SmoothStreaming;assembly=Microsoft.Web.Media.SmoothStreaming" xmlns:smf_accesscontrols="http://schemas.microsoft.com/smf/2010/xaml/accesscontrols" IsEnabled="True" DataContext="{Binding}" UseLayoutRounding="True" FontFamily="Arial" FontSize="16">


<Grid x:Name="LayoutRoot" Background="White" Loaded="UserControl_Loaded">
    <smf:SMFPlayer Loaded="UserControl_Loaded" Name="MyPlayer" AutoLoad="True" AutoPlay="False" LogLevel="Information" MediaOpened="MyPlayer_MediaOpened" PlayStateChanged="MyPlayer_PlayStateChanged" DataContext="{Binding}" PlayerGraphVisibility="Hidden" PlaylistVisibility="Hidden" LoggingConsoleVisibility="Hidden" ChaptersVisibility="Hidden" IsFullScreen="False" MediaCommand="UserControl_MediaCommand">
        <smf:SMFPlayer.Playlist>
            <media:PlaylistItem DeliveryMethod="AdaptiveStreaming" x:Name="My_PlayList" PropertyChanged="My_PlayList_PropertyChanged" Title="AAAA" MediaSource="http://video3.smoothhd.com.edgesuite.net/ondemand/Big%20Buck%20Bunny%20Adaptive.ism/Manifest" />
        </smf:SMFPlayer.Playlist>
    </smf:SMFPlayer>

</Grid>
</UserControl>



Additionnal using in my main.cs file
using Microsoft.Web.Media.SmoothStreaming;


using System.ComponentModel.Composition;
using System.ComponentModel.Composition.Hosting;
using System.ComponentModel.Composition.Primitives;
using System.ComponentModel.Composition.ReflectionModel;

using Microsoft.SilverlightMediaFramework.Core;
using Microsoft.SilverlightMediaFramework.Plugins;
using Microsoft.SilverlightMediaFramework.Plugins.SmoothStreaming;
using Microsoft.SilverlightMediaFramework.Core.Media;
using Microsoft.SilverlightMediaFramework.Utilities;