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

RadMediaPlayer Play Button

2 Answers 44 Views
MediaPlayer
This is a migrated thread and some comments may be shown as answers.
C
Top achievements
Rank 1
C asked on 14 Dec 2011, 01:15 PM
Hi Is it possible to catch the event when the play button is pressed on the RadMediaPlayer ?

2 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 19 Dec 2011, 12:20 PM
Hello C,

The RadMediaPlayer MediaOpened event occurs as soon as the media stream that has to be played is validated and opened, and the file headers have been read. This is why you can handle this event and then you can attach a handler to the RadMediaPlayer.MediaElement.CurrentStateChanged event. In this handler you can track the MediaElement.CurrentState changes.
private void RadMediaPlayer_MediaOpened(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
    (sender as RadMediaPlayer).MediaElement.CurrentStateChanged += new RoutedEventHandler(MediaElement_CurrentStateChanged);
}
 
void MediaElement_CurrentStateChanged(object sender, RoutedEventArgs e)
{
    var state = (sender as MediaElement).CurrentState;
}

I hope this information will help you.

Regards,
Tina Stancheva
the Telerik team

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

0
C
Top achievements
Rank 1
answered on 19 Dec 2011, 01:36 PM
Hi ,
Thanks For Your Reply.
Thats not really what i was looking for but it may work.
I have gone another route though so will not be trying to implement it.
Thanks All the Same
Tags
MediaPlayer
Asked by
C
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
C
Top achievements
Rank 1
Share this question
or