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

MediaPlayer MarkerReached

1 Answer 19 Views
MediaPlayer
This is a migrated thread and some comments may be shown as answers.
Manuel
Top achievements
Rank 1
Manuel asked on 09 Jan 2012, 05:43 PM
Hello,

In MediaElement exists MarkerReached event. I want to know if exist some similar in MediaPlayer?

Thanks

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 12 Jan 2012, 03:25 PM
Hi Manuel,

The RadMediaPlayer control is basically a wrapper around the Silverlight MediaElement control. This is why you can handle all MediaElement events. Once the MediaPlayer opens the media you can attach an event handler for the MarkerReached event:
<telerik:RadMediaPlayer x:Name="myMediaPlayer" MediaOpened="myMediaPlayer_MediaOpened">
    <telerik:RadMediaItem Source="http://ecn.channel9.msdn.com/o9/pdc09/wmv/CL16.wmv" VideoStretch="None" />
</telerik:RadMediaPlayer>

private void myMediaPlayer_MediaOpened(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
    (sender as RadMediaPlayer).MediaElement.MarkerReached += new TimelineMarkerRoutedEventHandler(MediaElement_MarkerReached);
}
 
void MediaElement_MarkerReached(object sender, TimelineMarkerRoutedEventArgs e)
{
             
}

Please give this a try and let me know if it works for you.

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
Manuel
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or