This is a migrated thread and some comments may be shown as answers.

Event

1 Answer 39 Views
MediaPlayer
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Aziz
Top achievements
Rank 1
Aziz asked on 17 Apr 2012, 02:49 PM
I am using the media player to play a variety of media files from my server. as such some can be streamed and some not.

Is there a way to tie into the 'fetching media' event so I can place a loading window up and then a 'media loaded' even so I can the start the playback?

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 20 Apr 2012, 03:04 PM
Hi Jacob,

I am not sure if I understand your requirements correctly, but you can examine the RadMediaPlayer events in this article.

Also, as the RadMediaPlayer is a wrapper around the MS MediaElement, so as soon as it's initialized, you can handle its BufferingProgressChanged event if you need to:
private void myMediaPlayer_MediaOpened(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
    MediaElement mediaElement = (sender as RadMediaPlayer).MediaElement;
    if (mediaElement != null)
    {
        mediaElement.BufferingProgressChanged += new RoutedEventHandler(mediaElement_BufferingProgressChanged);
    }
}
 
void mediaElement_BufferingProgressChanged(object sender, RoutedEventArgs e)
{
    double bufferingProgress = (sender as MediaElement).BufferingProgress;
}
I hope this information will help you implement your scenario, but if I can further assist you, please let me know.

Kind regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
MediaPlayer
Asked by
Aziz
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or