skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop
    Web
    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX UI for Silverlight UI for PHP UI for JSP
    Mobile
    UI for .NET MAUI UI for Xamarin
    Document Management
    Telerik Document Processing
    Desktop
    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF UI for UWP
    Reporting & Mocking
    Telerik Reporting Telerik Report Server Telerik JustMock
    Automated Testing
    Test Studio Test Studio Dev Edition
    CMS
    Sitefinity
    UI/UX Tools
    ThemeBuilder Design System Kit
    Debugging
    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Jam FiddlerCap FiddlerCore
    Extended Reality
    UI for Unity XR
    Free Tools
    JustAssembly JustDecompile VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Release History
  • Docs & Support
  • Pricing
  • Search
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class RadMediaPlayer

RadMediaPlayer is a flexible UI component based on Silverlight 2.0 platform. It allows users to play a variety of video and audio formats into a web page.

Inheritance
System.Object
ItemsControl
HeaderedItemsControl
HeaderedSelector
RadMediaPlayer
Inherited Members
HeaderedSelector.SelectedValuePathProperty
HeaderedSelector.SelectedValueProperty
HeaderedSelector.IsSelectedProperty
HeaderedSelector.SelectedIndexProperty
HeaderedSelector.SelectedItemProperty
HeaderedSelector.SelectedEvent
HeaderedSelector.SelectionChangedEvent
HeaderedSelector.UnselectedEvent
HeaderedSelector.add_SelectionChanged(SelectionChangedEventHandler)
HeaderedSelector.remove_SelectionChanged(SelectionChangedEventHandler)
HeaderedSelector.GetIsSelected(DependencyObject)
HeaderedSelector.AddSelectedHandler(DependencyObject, RoutedEventHandler)
HeaderedSelector.AddUnselectedHandler(DependencyObject, RoutedEventHandler)
HeaderedSelector.RemoveSelectedHandler(DependencyObject, RoutedEventHandler)
HeaderedSelector.RemoveUnselectedHandler(DependencyObject, RoutedEventHandler)
HeaderedSelector.SetIsSelected(DependencyObject, Boolean)
HeaderedSelector.ClearContainerForItemOverride(DependencyObject, Object)
HeaderedSelector.OnItemsChanged(NotifyCollectionChangedEventArgs)
HeaderedSelector.OnSelectedValueChanged(Object, Object)
HeaderedSelector.OnSelectedValuePathChanged(String, String)
HeaderedSelector.SelectedValuePath
HeaderedSelector.SelectedValue
HeaderedSelector.SelectedIndex
HeaderedSelector.SelectedItem
HeaderedSelector.SelectionChanged
HeaderedItemsControl.HasHeaderProperty
HeaderedItemsControl.HeaderProperty
HeaderedItemsControl.FocusVisualStyleProperty
HeaderedItemsControl.HeaderTemplateProperty
HeaderedItemsControl.HeaderTemplateSelectorProperty
HeaderedItemsControl.OnHeaderChanged(Object, Object)
HeaderedItemsControl.OnHeaderTemplateChanged(DataTemplate, DataTemplate)
HeaderedItemsControl.OnHeaderTemplateSelectorChanged(DataTemplateSelector, DataTemplateSelector)
HeaderedItemsControl.HasHeader
HeaderedItemsControl.Header
HeaderedItemsControl.HeaderTemplate
HeaderedItemsControl.FocusVisualStyle
HeaderedItemsControl.HeaderTemplateSelector
ItemsControl.ItemContainerStyleProperty
ItemsControl.IsTextSearchEnabledProperty
ItemsControl.ItemContainerStyleSelectorProperty
ItemsControl.ItemTemplateSelectorProperty
ItemsControl.IsFocusedProperty
ItemsControl.HasItemsProperty
ItemsControl.ItemsControlFromItemContainer(DependencyObject)
ItemsControl.ChangeVisualState()
ItemsControl.ChangeVisualState(Boolean)
ItemsControl.OnIsEnabledChanged(DependencyPropertyChangedEventArgs)
ItemsControl.OnGotFocus(RoutedEventArgs)
ItemsControl.OnLostFocus(RoutedEventArgs)
ItemsControl.OnItemTemplateSelectorChanged(DataTemplateSelector, DataTemplateSelector)
ItemsControl.OnIsFocusedChanged(DependencyPropertyChangedEventArgs)
ItemsControl.IsTextSearchEnabled
ItemsControl.HasItems
ItemsControl.IsFocused
ItemsControl.ItemContainerStyle
ItemsControl.ItemContainerStyleSelector
ItemsControl.ItemTemplateSelector
ItemsControl.OverrideStyles
ItemsControl.ItemContainerGenerator
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.MediaPlayer.dll

Syntax

[TelerikToolboxCategory("Containers")]
public class RadMediaPlayer : HeaderedSelector

Constructors

RadMediaPlayer()

Initializes a new instance of the RadMediaPlayer class.

Declaration
public RadMediaPlayer()

Fields

AutoPlayProperty

Identifies the AutoPlay dependency property.

Declaration
public static readonly DependencyProperty AutoPlayProperty
Field Value
System.Windows.DependencyProperty

CanSeekProperty

Identifies the CanSeek dependency property.

Declaration
public static readonly DependencyProperty CanSeekProperty
Field Value
System.Windows.DependencyProperty

ChapterReachedEvent

Occurs whenever a chapter has been reached.

Declaration
public static readonly RoutedEvent ChapterReachedEvent
Field Value
RoutedEvent

ChaptersStaysOpenIntervalProperty

Identifies the ChaptersStaysOpenInterval dependency property.

Declaration
public static readonly DependencyProperty ChaptersStaysOpenIntervalProperty
Field Value
System.Windows.DependencyProperty

CurrentStateChangedEvent

Occurs whenever RadMediaPlayer changes its CurrentState.

Declaration
public static readonly RoutedEvent CurrentStateChangedEvent
Field Value
RoutedEvent

DownloadProgressChangedEvent

Occurs when there is a change in the download progress of RadMediaPlayer.

Declaration
public static readonly RoutedEvent DownloadProgressChangedEvent
Field Value
RoutedEvent

DownloadProgressOffsetProperty

Identifies the DownloadProgressOffset dependency property.

Declaration
public static readonly DependencyProperty DownloadProgressOffsetProperty
Field Value
System.Windows.DependencyProperty

DownloadProgressValueProperty

Identifies the DownloadProgressValue dependency property.

Declaration
public static readonly DependencyProperty DownloadProgressValueProperty
Field Value
System.Windows.DependencyProperty

IsAutoPlaylistAdvanceProperty

Identifies the AutoPlaylistAdvance dependency property.

Declaration
public static readonly DependencyProperty IsAutoPlaylistAdvanceProperty
Field Value
System.Windows.DependencyProperty

IsAutoReverseProperty

Identifies the IsAutoReverse dependency property.

Declaration
public static readonly DependencyProperty IsAutoReverseProperty
Field Value
System.Windows.DependencyProperty

IsChaptersPanelHiddenProperty

Identifies the IsChaptersPanelHidden dependency property.

Declaration
public static readonly DependencyProperty IsChaptersPanelHiddenProperty
Field Value
System.Windows.DependencyProperty

IsChaptersPanelPinnedProperty

Identifies the IsChaptersPanelPinned dependency property.

Declaration
public static readonly DependencyProperty IsChaptersPanelPinnedProperty
Field Value
System.Windows.DependencyProperty

IsFullscreenProperty

Identifies the IsFullScreen dependency property.

Declaration
public static readonly DependencyProperty IsFullscreenProperty
Field Value
System.Windows.DependencyProperty

IsMuteProperty

Identifies the IsMuteProperty dependency property.

Declaration
public static readonly DependencyProperty IsMuteProperty
Field Value
System.Windows.DependencyProperty

IsPlayingProperty

Identifies the IsPlaying dependency property.

Declaration
public static readonly DependencyProperty IsPlayingProperty
Field Value
System.Windows.DependencyProperty

IsPlaylistVisibleProperty

Identifies the IsPlaylistVisible dependency property.

Declaration
public static readonly DependencyProperty IsPlaylistVisibleProperty
Field Value
System.Windows.DependencyProperty

IsVideoControlsPanelVisibleProperty

Identifies the IsVideoControlsPanelVisibleProperty dependency property.

Declaration
public static readonly DependencyProperty IsVideoControlsPanelVisibleProperty
Field Value
System.Windows.DependencyProperty

IsVideoPanelHiddenProperty

Identifies the IsVideoPanelHidden dependency property.

Declaration
public static readonly DependencyProperty IsVideoPanelHiddenProperty
Field Value
System.Windows.DependencyProperty

IsVideoPanelPinnedProperty

Identifies the IsVideoPanelPinned dependency property.

Declaration
public static readonly DependencyProperty IsVideoPanelPinnedProperty
Field Value
System.Windows.DependencyProperty

MediaElementCurrentTimeProperty

A dependency property that holds the current time of the MediaElement in RadMediaPlayer. This is a string property and it is formatted in order to be used by a TextBlock.

Declaration
public static readonly DependencyProperty MediaElementCurrentTimeProperty
Field Value
System.Windows.DependencyProperty

MediaElementTotalSecondsProperty

A dependency property that holds the duration(in seconds) of the current media item. This property is used by TimeSlider's Maximum property.

Declaration
public static readonly DependencyProperty MediaElementTotalSecondsProperty
Field Value
System.Windows.DependencyProperty

MediaElementTotalTimeProperty

A dependency property that holds the duration(in seconds) of the current media item. This is a string property and it is formatted in order to be used by a TextBlock.

Declaration
public static readonly DependencyProperty MediaElementTotalTimeProperty
Field Value
System.Windows.DependencyProperty

MediaEndedEvent

Occurs when the current RadMediaItem has ended.

Declaration
public static readonly RoutedEvent MediaEndedEvent
Field Value
RoutedEvent

MediaOpenedEvent

Occurs when the current RadMediaItem opens its source.

Declaration
public static readonly RoutedEvent MediaOpenedEvent
Field Value
RoutedEvent

PanelStaysOpenIntervalProperty

Identifies the PanelStaysOpenInterval dependency property.

Declaration
public static readonly DependencyProperty PanelStaysOpenIntervalProperty
Field Value
System.Windows.DependencyProperty

PositionProperty

Identifies the Position dependency property.

Declaration
public static readonly DependencyProperty PositionProperty
Field Value
System.Windows.DependencyProperty

SelectedMediaItemProperty

A dependency property that holds the SelectedItem property of type RadMediaItem.

Declaration
public static readonly DependencyProperty SelectedMediaItemProperty
Field Value
System.Windows.DependencyProperty

TimeSliderTickMarksProperty

Identifies the TimeSliderTickMarks dependency property.

Declaration
public static readonly DependencyProperty TimeSliderTickMarksProperty
Field Value
System.Windows.DependencyProperty

VolumeProperty

Identifies the Volume dependency property.

Declaration
public static readonly DependencyProperty VolumeProperty
Field Value
System.Windows.DependencyProperty

Properties

AutoPlay

Gets or sets a value that indicates whether RadMediaPlayer will play automatically the selected item or when click explicitly Play.

Declaration
public bool AutoPlay { get; set; }
Property Value
System.Boolean

CanSeek

Get or set value to determine if seeking is enabled.

Declaration
public bool CanSeek { get; set; }
Property Value
System.Boolean

ChaptersStaysOpenInterval

The amount of time Chapters panel will stays open.

Declaration
public TimeSpan ChaptersStaysOpenInterval { get; set; }
Property Value
System.TimeSpan

DownloadProgressOffset

Gets value representing the download progress offset of the currently selected RadMediaItem. This is a DependencyProperty.

Declaration
public double DownloadProgressOffset { get; }
Property Value
System.Double

DownloadProgressValue

Gets value representing the download progress of the currently selected RadMediaItem. This is a DependencyProperty.

Declaration
public double DownloadProgressValue { get; }
Property Value
System.Double

IsAutoPlaylistAdvance

Gets or sets a value that indicates whether RadMediaPlayer should play the next item in the playlist when the current one ends.

Declaration
public bool IsAutoPlaylistAdvance { get; set; }
Property Value
System.Boolean

IsAutoReverse

Gets or sets a value that indicates whether when RadMediaPlayer reaches the end of its playlist and AutoReverse is set to True, RadMediaPlayer to play its first item in the playlist.

Declaration
public bool IsAutoReverse { get; set; }
Property Value
System.Boolean

IsChaptersPanelHidden

Gets or sets value that determines whether the chapters panel is hidden or not. Takes precedence over IsChaptersPanelPinned.

Declaration
public bool IsChaptersPanelHidden { get; set; }
Property Value
System.Boolean

IsChaptersPanelPinned

Gets or sets value that determines whether the chapters panel is pinned or not. This property has lower precedence than IsChaptersPanelHidden.

Declaration
public bool IsChaptersPanelPinned { get; set; }
Property Value
System.Boolean

IsFullScreen

Gets or sets a value that indicates whether RadMediaPlayer is displaying in full screen mode.

Declaration
public bool IsFullScreen { get; set; }
Property Value
System.Boolean

IsMute

Gets or sets value indicating whether the volume is mute or not. This is a DependencyProperty.

Declaration
public bool IsMute { get; set; }
Property Value
System.Boolean

IsPlaying

Gets or sets a value that indicates whether RadMediaPlayer is currently playing media.

Declaration
public bool IsPlaying { get; set; }
Property Value
System.Boolean

IsPlaylistVisible

Gets or sets a value that indicates whether Playlist is visible initially. This is a DependencyProperty.

Declaration
public bool IsPlaylistVisible { get; set; }
Property Value
System.Boolean

IsVideoControlsPanelVisible

Gets or sets value that determines whether the video panel is visible or not. This property has lower precedence than IsVideoPanelHidden. This property is used internally by the player, which means its value may change in certain circumstances. If IsVideoPanelPinned is set to false, the IsVideoControlsPanelVisible property will become false after the time in PanelStaysOpenInterval expires.

Declaration
public bool IsVideoControlsPanelVisible { get; set; }
Property Value
System.Boolean

IsVideoPanelHidden

Gets or sets value that determines whether the video panel is hidden or not. Takes precedence over IsVideoControlsPanelVisible and IsVideoPanelPinned.

Declaration
public bool IsVideoPanelHidden { get; set; }
Property Value
System.Boolean

IsVideoPanelPinned

Gets or sets value that determines whether the video panel is pinned or not. This property has lower precedence than IsVideoPanelHidden.

Declaration
public bool IsVideoPanelPinned { get; set; }
Property Value
System.Boolean

MediaElement

Gets the System.Windows.Controls.MediaElement object inside RadMediaPlayer.

Declaration
public virtual MediaElement MediaElement { get; protected set; }
Property Value
System.Windows.Controls.MediaElement

The media element.

MediaElementCurrentTime

Obsolete! Gets the a string representing MediaElement's Position. This is a read-only dependency property.

Declaration
public string MediaElementCurrentTime { get; }
Property Value
System.String

MediaElementTotalSeconds

Gets the a double value representing MediaElement's total time. This is a read-only dependency property.

Declaration
public double MediaElementTotalSeconds { get; }
Property Value
System.Double

MediaElementTotalTime

Gets the a string representing MediaElement's total time. This is a read-only dependency property.

Declaration
public string MediaElementTotalTime { get; }
Property Value
System.String

PanelStaysOpenInterval

The amount of time Video controls panel will stays open.

Declaration
public TimeSpan PanelStaysOpenInterval { get; set; }
Property Value
System.TimeSpan

Position

Gets or sets value for current position of the played RadMediaItem. This is a DependencyProperty.

Declaration
public double Position { get; set; }
Property Value
System.Double

SelectedMediaItem

Gets the RadMediaItem that represents the currently played SelectedItem. This is a DependencyProperty.

Declaration
public RadMediaItem SelectedMediaItem { get; }
Property Value
RadMediaItem

TimeSliderTickMarks

Collection of marks which are shown on the player chapters panel.

Declaration
public DoubleCollection TimeSliderTickMarks { get; }
Property Value
System.Windows.Media.DoubleCollection

Volume

Gets or sets the volume of the currently played RadMediaItem.

Declaration
public double Volume { get; set; }
Property Value
System.Double

Remarks

The Volume property ranges between 0 and 1.

Examples

Gets or sets the volume of the currently played RadMediaItem.

 <telerik:RadMediaPlayer  
        x:Name="radMediaPlayer1"
        Width="500" Height="400" 
        AutoPlay="True"
        Volume="0.7" />
 RadMediaPlayer radMediaPlayer1 = new RadMediaPlayer();
    radMediaPlayer1.Width = 500;
    radMediaPlayer1.Height = 400;
    radMediaPlayer1.AutoPlay = true;
    radMediaPlayer1.Volume = 0.7d;
    LayoutRoot.Children.Add(radMediaPlayer1);

Methods

GetContainerForItemOverride()

Creates or identifies the element that is used to display the given item.

Declaration
protected override DependencyObject GetContainerForItemOverride()
Returns
System.Windows.DependencyObject

Instance of RadMediaItem.

NextChapter()

Goes to the next chapter.

Declaration
public void NextChapter()

NextMovie()

Gets the next movie.

Declaration
public void NextMovie()

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call System.Windows.Controls.Control.ApplyTemplate.

Declaration
public override void OnApplyTemplate()
Overrides
HeaderedItemsControl.OnApplyTemplate()

OnIsFullScreenChanged()

Called when the RadMediaPlayer either enters or exits full-screen mode and fires the FullScreenChanged.

Declaration
protected virtual void OnIsFullScreenChanged()

OnSelectionChanged(SelectionChangedEventArgs)

Raise the SelectionChanged event.

Declaration
protected override void OnSelectionChanged(SelectionChangedEventArgs e)
Parameters
System.Windows.Controls.SelectionChangedEventArgs e

Overrides
HeaderedSelector.OnSelectionChanged(SelectionChangedEventArgs)

Pause()

Invokes System.Windows.Controls.MediaElement.Pause of the System.Windows.Controls.MediaElement inside RadMediaPlayer.

Declaration
public void Pause()

Play()

Invokes System.Windows.Controls.MediaElement.Play of the System.Windows.Controls.MediaElement inside RadMediaPlayer.

Declaration
public void Play()

PrepareContainerForItemOverride(DependencyObject, Object)

Prepares the specified element to display the specified item.

Declaration
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters
System.Windows.DependencyObject element

The element used to display the specified item.

System.Object item

The item to display.

Overrides
HeaderedSelector.PrepareContainerForItemOverride(DependencyObject, Object)

PreviousChapter()

Goes to the previous chapter.

Declaration
public void PreviousChapter()

PreviousMovie()

Gets the previous movie.

Declaration
public void PreviousMovie()

Stop()

Invokes System.Windows.Controls.MediaElement.Stop of the System.Windows.Controls.MediaElement inside RadMediaPlayer.

Declaration
public void Stop()

Events

ChapterReached

CLR accessors for ChapterReachedEvent.

Declaration
public event EventHandler<RadRoutedEventArgs> ChapterReached
Event Type
System.EventHandler<RadRoutedEventArgs>

CurrentStateChanged

CLR accessors for CurrentStateChangedEvent.

Declaration
public event EventHandler<RadRoutedEventArgs> CurrentStateChanged
Event Type
System.EventHandler<RadRoutedEventArgs>

DownloadProgressChanged

CLR accessors for DownloadProgressChangedEvent.

Declaration
public event EventHandler<RadRoutedEventArgs> DownloadProgressChanged
Event Type
System.EventHandler<RadRoutedEventArgs>

FullScreenChanged

Occurs when RadMediaPlayer toggles between full screen and normal screen.

Declaration
public event EventHandler FullScreenChanged
Event Type
System.EventHandler

MediaEnded

CLR accessors for MediaEndedEvent.

Declaration
public event EventHandler<RadRoutedEventArgs> MediaEnded
Event Type
System.EventHandler<RadRoutedEventArgs>

MediaOpened

CLR accessors for MediaOpenedEvent.

Declaration
public event EventHandler<RadRoutedEventArgs> MediaOpened
Event Type
System.EventHandler<RadRoutedEventArgs>

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)

Was this article helpful?

Tell us how we can improve this article

Skip
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.