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.
Inherited Members
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.MediaPlayer.dll
Syntax
[TelerikToolboxCategory("Containers")]
public class RadMediaPlayer : HeaderedSelector
Constructors
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
<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
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
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
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>
|