Hi,
Just like you mentioned, I am using the relative path after placing the mp4 file in the ClientBin folder. I want to play a smooth streaming video at the same time.
The below code wouldn't work because of the relative source. It is throwing a "Failed to open media" error. Can you please help me with the relative source path and the manifesturl?
<telerik:RadMediaPlayer CanSeek="True" Height="334" HorizontalAlignment="Left" Name="player" VerticalAlignment="Top" Width="540" MediaEnded="player_MediaEnded">
<telerik:RadMediaItem IsStreamingSource="True" VideoStretch="Fill" Source=
"/TestVideo.mp4" StreamAttached="RadMediaItem_StreamAttached">
</telerik:RadMediaItem>
</telerik:RadMediaPlayer>
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();
}
}
Regards,
Chandana