Problem Smooth Streaming SMF Player

May 4, 2012 at 5:28 PM
Edited May 4, 2012 at 5:32 PM

Hi ;)

I have a problem with streaming video in smf player.

I have followed this tutorial  : http://debugmode.net/2011/07/24/smooth-streaming-in-silverlight/#comment-4576

I have already add references and add code in :

MainPage.xaml.cs :

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.SilverlightMediaFramework.Core.Media;
namespace MMPlayer
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();
               PlaylistItem item = new PlaylistItem();

            item.MediaSource = new Uri("http://user-pc:5599/film.ism/manifest");

            item.DeliveryMethod = Microsoft.SilverlightMediaFramework.Plugins.Primitives.DeliveryMethods.AdaptiveStreaming;

            strmPlayer.Playlist.Add(item);

            strmPlayer.Play();

        }
    }
}


And in MainPage.xaml
<UserControl x:Class="MMPlayer.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:strmmedia="http://schemas.microsoft.com/smf/2010/xaml/player"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
    <Grid x:Name="LayoutRoot" Background="White">
        <StackPanel Orientation="Vertical"> 
            <TextBlock Text="Streaming Media from IIS on Silverlight" Height="22" Width="266" FontSize="12" Foreground="Blue"/>
            <strmmedia:SMFPlayer Name="strmPlayer"
                                 HorizontalAlignment="Stretch"
                                 Margin="0"
                                 VerticalAlignment="Stretch"
                                 Height="261" Width="395"/>
  
        </StackPanel>


    </Grid>
</UserControl>


I want  to add media source in parameter in code in C# .
I would appreciate for any help please .



May 11, 2012 at 7:39 AM

Hi,

I am not sure this is the root cause, but are you fetching the manifest from the same server and port as the Silverlight page is hosted? What does tracing the network connections using something like the IE developer tools or fiddler show?

Also see http://msdn.microsoft.com/en-us/library/cc189008%28v=vs.95%29 and http://msdn.microsoft.com/en-us/library/cc645032%28v=vs.95%29.aspx

- Loke