Edit this page

Smooth Streaming

RadMediatelerik allows you to play Smooth Streaming video. You have to provide implementaion of MediaStreamSource that can handle Smooth streaming. Here is an example that uses AdaptiveStreamingSource. To enable smooth streaming set IsStreamingSource to true and handle the StreamAttached event to provide some additional preparation.

XAML

<telerik:RadMediaPlayer x:Name="telerik">
    <telerik:RadMediaItem IsStreamingSource="True" 
                          Source="http://video3.smoothhd.com.edgesuite.net/ondemand/Big Buck Bunny Adaptive.ism/Manifest"
                          StreamAttached="RadMediaItem_StreamAttached" />
</telerik:RadMediaPlayer>

C#

private void RadMediaItem_StreamAttached(object sender, EventArgs e)
{
    var item = sender as RadMediaItem;
    if (item != null)
    {
        var adaptiveSource = new AdaptiveStreamingSource();
        adaptiveSource.MediaElement = player.MediaElement;
        adaptiveSource.ManifestUrl = item.Source;
        adaptiveSource.StartPlayback();
    }
}

VB.NET

Private Sub RadMediaItem_StreamAttached(ByVal sender As Object, ByVal e As EventArgs)
    Dim item = TryCast(sender, RadMediaItem)
    If item IsNot Nothing Then
        Dim adaptiveSource = New AdaptiveStreamingSource()
        adaptiveSource.MediaElement = player.MediaElement
        adaptiveSource.ManifestUrl = item.Source
        adaptiveSource.StartPlayback()
    End If
End Sub