MediaElement в Silverlight поддерживает потоковую передачу через mms. Вы должны взглянуть на MSDN аудио и видео обзор для Silverlight.
Вот очень базовое приложение Silverlight, которое может управлять MediaElement и отображать состояние носителя / состояние буферизации:
1010 * XAML *
<UserControl x:Class="StreamingTest.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:DesignWidth="640" d:DesignHeight="480">
<Grid x:Name="LayoutRoot">
<StackPanel Orientation="Vertical">
<MediaElement x:Name="MediaElement" Width="640" Height="480" Source="mms://danarec:8080"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<TextBlock x:Name="Status" Margin="0,5"/>
<TextBlock x:Name="Buffer" Margin="10,5"/>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Button x:Name="Play" Content="Play" Click="Play_Click"/>
<Button x:Name="Pause" Content="Pause" Click="Pause_Click"/>
<Button x:Name="Stop" Content="Stop" Click="Stop_Click"/>
</StackPanel>
</StackPanel>
</Grid>
</UserControl>
C #
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
this.MediaElement.CurrentStateChanged += (sender, e) =>
{
this.Status.Text = this.MediaElement.CurrentState.ToString();
this.Buffer.Visibility = this.MediaElement.CurrentState == MediaElementState.Buffering ? Visibility.Visible : Visibility.Collapsed;
};
this.MediaElement.BufferingProgressChanged += (sender, e) =>
{
this.Buffer.Text = string.Format("{0:0.0} %", this.MediaElement.BufferingProgress * 100);
};
}
private void Play_Click(object sender, RoutedEventArgs e)
{
this.MediaElement.Play();
}
private void Pause_Click(object sender, RoutedEventArgs e)
{
this.MediaElement.Pause();
}
private void Stop_Click(object sender, RoutedEventArgs e)
{
this.MediaElement.Stop();
}
}