New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

Definition

Namespace:Telerik.Web.UI

Assembly:Telerik.Web.UI.dll

Syntax:

C#
[RequiredScript(typeof(jQueryPlugins))]
[RequiredScript(typeof(AnimationFramework), 10)]
[ClientScriptResource("Telerik.Web.UI.RadMediaPlayer", "Telerik.Web.UI.MediaPlayer.RadMediaPlayerScripts.js")]
[ToolboxBitmap(typeof(RadMediaPlayer), "Toolbox.Icons.MediaPlayer.png")]
[TelerikToolboxCategory("Data")]
[RequiredCss("Telerik.Web.UI.Skins.Common.fonticons.css", RenderMode.Lightweight, typeof(RadGrid))]
[RequiredCss("Telerik.Web.UI.Skins.Common.fonticons.css", RenderMode.Mobile, typeof(RadMediaPlayer))]
[RequiredCss("Telerik.Web.UI.Skins.Common.MaterialRipple.css", RenderMode.Lightweight, typeof(RadMediaPlayer))]
[RequiredScript(typeof(MaterialRipple))]
[EmbeddedSkin("MediaPlayer")]
[EmbeddedSkin("MediaPlayer", "Default")]
public class RadMediaPlayer : RadWebControl, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, IScriptControl, IControlResolver, IPostBackDataHandler, ISkinnableControl, IControl, INamingContainer, IPostBackEventHandler

Inheritance: objectControlWebControlRadWebControlRadMediaPlayer

Implements: IAttributeAccessorIComponentIControlIControlBuilderAccessorIControlDesignerAccessorIControlResolverIDataBindingsAccessorIDisposableIExpressionsAccessorINamingContainerIParserAccessorIPostBackDataHandlerIPostBackEventHandlerIScriptControlISkinnableControlIUrlResolutionService...

Inherited Members WebControl.AddAttributesToRender(HtmlTextWriter)WebControl.ApplyStyle(Style)WebControl.CopyBaseAttributes(WebControl)WebControl.CreateControlStyle()WebControl.MergeStyle(Style)WebControl.RenderBeginTag(HtmlTextWriter)WebControl.RenderEndTag(HtmlTextWriter)WebControl.RenderContents(HtmlTextWriter)WebControl.AccessKeyWebControl.AttributesWebControl.BackColorWebControl.BorderColorWebControl.BorderWidthWebControl.BorderStyleWebControl.ControlStyleWebControl.ControlStyleCreatedWebControl.CssClassWebControl.DisabledCssClassWebControl.StyleWebControl.EnabledWebControl.EnableThemingWebControl.FontWebControl.ForeColorWebControl.HasAttributesWebControl.HeightWebControl.IsEnabledWebControl.SupportsDisabledAttributeWebControl.SkinIDWebControl.TabIndexWebControl.TagNameWebControl.ToolTipWebControl.WidthControl.ResolveAdapter()Control.HasEvents()Control.GetRouteUrl(object)Control.GetRouteUrl(string, object)Control.GetRouteUrl(RouteValueDictionary)Control.GetRouteUrl(string, RouteValueDictionary)Control.GetUniqueIDRelativeTo(Control)Control.ApplyStyleSheetSkin(Page)Control.OnDataBinding(EventArgs)Control.DataBind()Control.DataBind(bool)Control.DataBindChildren()Control.AddParsedSubObject(object)Control.EnsureID()Control.OnInit(EventArgs)Control.ClearChildState()Control.ClearChildControlState()Control.ClearChildViewState()Control.ClearEffectiveClientIDMode()Control.ClearCachedClientID()Control.Focus()Control.LoadControlState(object)Control.MapPathSecure(string)Control.OpenFile(string)Control.OnLoad(EventArgs)Control.OnPreRender(EventArgs)Control.BuildProfileTree(string, bool)Control.SaveControlState()Control.RenderChildren(HtmlTextWriter)Control.RenderControl(HtmlTextWriter)Control.RenderControl(HtmlTextWriter, ControlAdapter)Control.OnUnload(EventArgs)Control.Dispose()Control.RaiseBubbleEvent(object, EventArgs)Control.OnBubbleEvent(object, EventArgs)Control.AddedControl(Control, int)Control.CreateControlCollection()Control.ResolveUrl(string)Control.ResolveClientUrl(string)Control.FindControl(string)Control.FindControl(string, int)Control.GetDesignModeState()Control.HasControls()Control.IsLiteralContent()Control.EnsureChildControls()Control.RemovedControl(Control)Control.SetDesignModeState(IDictionary)Control.SetRenderMethodDelegate(RenderMethod)Control.ClientIDModeControl.ClientIDControl.ClientIDSeparatorControl.ContextControl.AdapterControl.DesignModeControl.EventsControl.IDControl.IsChildControlStateClearedControl.EnableViewStateControl.ViewStateModeControl.IsViewStateEnabledControl.NamingContainerControl.IdSeparatorControl.LoadViewStateByIDControl.PageControl.RenderingCompatibilityControl.TemplateControlControl.ParentControl.TemplateSourceDirectoryControl.AppRelativeTemplateSourceDirectoryControl.SiteControl.VisibleControl.UniqueIDControl.HasChildViewStateControl.ControlsControl.ValidateRequestModeControl.ViewStateControl.ViewStateIgnoresCaseControl.ChildControlsCreatedControl.IsTrackingViewStateControl.DisposedControl.DataBindingControl.InitControl.LoadControl.PreRenderControl.Unloadobject.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()object.GetType()object.MemberwiseClone()...

Constructors

C#
public RadMediaPlayer()

Properties

Gets or sets a flag that indicates if the media file will start playing on load

C#
public bool AutoPlay { get; set; }

Gets or sets the text ToolTip of the close button of the banners.

C#
public virtual string BannerCloseButtonToolTip { get; set; }

Gets a collection of MediaPlayerBanner objects

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
[TypeConverter(typeof(ExpandableObjectConverter))]
public MediaPlayerBannerCollection Banners { get; }

The CssClass property will now be used instead of the former Skin and will be modified in AddAttributesToRender()

C#
protected override string CssClassFormatString { get; }

Overrides: RadWebControl.CssClassFormatString

Example:
C#
protected override string CssClassFormatString
{
       get
       {
           return "RadDock RadDock_{0} rdWTitle rdWFooter";
       }
}

Gets or sets the selected culture. Localization strings will be loaded based on this value.

C#
public CultureInfo Culture { get; set; }
Property Value:

The selected culture. Localization strings will be loaded based on this value.

Determines if the control will have WAI-ARIA support enabled

C#
public bool EnableAriaSupport { get; set; }

Gets/sets whether Full Screen is switched on for the player

C#
public bool FullScreen { get; set; }

Gets or sets the tooltip for the full screen button on the media player toolbar.

C#
public string FullScreenButtonToolTip { get; set; }

Gets/sets whether HD is switched on for the player

C#
public bool HDActive { get; set; }

Gets or sets the tooltip for the hd button on the media player toolbar.

C#
public string HDButtonToolTip { get; set; }

Gets or Sets the Path of the Media Files

C#
public string HDSource { get; set; }

Gets or sets a value indicating where RadMediaPlayer will look for its .resx localization file. By default this file should be in the App_GlobalResources folder. However, if you cannot put the resource file in the default location or .resx files compilation is disabled for some reason (e.g. in a DotNetNuke environment), this property should be set to the location of the resource file.

C#
public string LocalizationPath { get; set; }
Property Value:

A relative path to the dialogs location. For example: "~/controls/RadMediaPlayerResources/".

If specified, the LocalizationPath property will allow you to load the grid localization file from any location in the web application.

Gets or sets a flag that indicates if the media file will automatically repeat when playback ends

C#
public bool Loop { get; set; }

Gets/sets the mime type of the source media file to play

C#
public string MimeType { get; set; }

Gets/sets whether the media has been muted

C#
public bool Muted { get; set; }

Gets or sets the name of the JavaScript function which handles the ended client-side event.

C#
[ClientControlEvent]
[ClientPropertyName("ended")]
public string OnClientEnded { get; set; }

The load event occurs when the media has reached the end.

Gets or sets the name of the JavaScript function which handles the paused client-side event.

C#
[ClientControlEvent]
[ClientPropertyName("paused")]
public string OnClientPaused { get; set; }

The paused event occurs when the media has been paused.

Gets or sets the name of the JavaScript function which handles the load play event.

C#
[ClientControlEvent]
[ClientPropertyName("play")]
public string OnClientPlay { get; set; }

The load event occurs when the media has started playing.

Gets or sets the name of the JavaScript function which handles the load client-side event.

C#
[ClientControlEvent]
[ClientPropertyName("ready")]
public string OnClientReady { get; set; }

The load event occurs when the media has loaded its metadata and the player is ready to start playing.

Gets or sets the name of the JavaScript function which handles the seek start client-side event.

C#
[ClientControlEvent]
[ClientPropertyName("seekStart")]
public string OnClientSeekStart { get; set; }

The paused event occurs when the player is seeking new time position into the media.

Gets or sets the name of the JavaScript function which handles the volume changed client-side event.

C#
[ClientControlEvent]
[ClientPropertyName("volumeChanged")]
public string OnClientVolumeChanged { get; set; }

The paused event occurs when the volume of the media has been changed.

Gets or sets the text of the pause button.

C#
public virtual string PauseButtonToolTip { get; set; }

Gets or sets the text of the play button.

C#
public virtual string PlayButtonToolTip { get; set; }

Gets a collection of MediaPlayerFile objects.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public MediaPlayerFilesCollection Playlist { get; }

Gets or sets the RadMediaPlayer settings for the Playlist functionality.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
[TypeConverter(typeof(ExpandableObjectConverter))]
public MediaPlayerPlaylistSettings PlaylistSettings { get; }

Gets/sets the path to the poster for the media

C#
public string Poster { get; set; }

Gets or sets the skin name for the control user interface.

C#
public override string Skin { get; set; }
Property Value:

A string containing the skin name for the control user interface. The default is string.Empty.

Overrides: RadWebControl.Skin

If this property is not set, the control will render using the skin named "Default". If EnableEmbeddedSkins is set to false, the control will not render skin.

Gets/sets the path to the source media file to play

C#
public string Source { get; set; }

Gets a collection of MediaPlayerSource objects.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public MediaPlayerSourcesCollection Sources { get; }

Gets or sets the start time for the media player

C#
public double StartTime { get; set; }

Gets or sets the start volume for the media player

C#
public int StartVolume { get; set; }

Gets/sets the path to the subtitles file

C#
public string Subtitles { get; set; }

Gets or sets the tooltip for the Show/Hide Subtitles button on the media player toolbar.

C#
public string SubtitlesButtonToolTip { get; set; }
C#
protected override bool SupportsRenderingMode { get; }

Overrides: RadWebControl.SupportsRenderingMode

C#
protected override HtmlTextWriterTag TagKey { get; }

Overrides: WebControl.TagKey

Gets/sets the title for the media file

C#
public string Title { get; set; }

Gets a reference to RadMediaPlayer's title bar.

C#
public MediaPlayerTitlebar TitleBar { get; }

Gets or sets the tooltip of the share button on the media player titlebar.

C#
public string TitleBarShareToolTip { get; set; }

Gets a reference to RadMediaPlayer's tool bar.

C#
public MediaPlayerToolbar ToolBar { get; }

Gets or sets a flag that indicates if the toolbar will be docked to the control

C#
public bool ToolbarDocked { get; set; }

Gets or sets the tooltip for the volume button on the media player toolbar.

C#
public string VolumeButtonToolTip { get; set; }
C#
public string YoutubeApiKey { get; set; }

Methods

C#
protected override void CreateChildControls()

Overrides: Control.CreateChildControls()

C#
protected override void DescribeClientEvents(IScriptDescriptor descriptor)
Parameters:descriptorIScriptDescriptor

Overrides: RadWebControl.DescribeClientEvents(IScriptDescriptor)

C#
protected override void DescribeClientProperties(IScriptDescriptor descriptor)
Parameters:descriptorIScriptDescriptor

Overrides: RadWebControl.DescribeClientProperties(IScriptDescriptor)

C#
protected override IEnumerable<ScriptReference> GetScriptReferences()
Returns:

IEnumerable<ScriptReference>

Overrides: RadWebControl.GetScriptReferences()

Loads the client state data

C#
protected override void LoadClientState(Dictionary<string, object> clientState)
Parameters:clientStateDictionary<string, object>

Overrides: RadWebControl.LoadClientState(Dictionary<string, object>)

C#
protected override void LoadViewState(object savedState)
Parameters:savedStateobject

Overrides: WebControl.LoadViewState(object)

C#
public void RaisePostBackEvent(string eventArgument)
Parameters:eventArgumentstring

Implements: IPostBackEventHandler.RaisePostBackEvent(string)

Executed when post data changes should invoke a changed event

C#
protected override void RaisePostDataChangedEvent()

Overrides: RadWebControl.RaisePostDataChangedEvent()

C#
protected override void Render(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

Overrides: RadWebControl.Render(HtmlTextWriter)

C#
protected override object SaveViewState()
Returns:

object

Overrides: WebControl.SaveViewState()

C#
protected override void TrackViewState()

Overrides: WebControl.TrackViewState()