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

Kendo UI MediaPlayer TagHelper MediaPlayerTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("kendo-mediaplayer")]
[RestrictChildren("media", new string[] { "messages" })]
public class MediaPlayerTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent

Inheritance: objectTagHelperTagHelperBaseMediaPlayerTagHelper

Implements: ITagHelperITagHelperComponent

Inherited Members TagHelperBase.MinimumValidatorTagHelperBase.MaximumValidatorTagHelperBase.Init(TagHelperContext)TagHelperBase.Process(TagHelperContext, TagHelperOutput)TagHelperBase.GetInitializator()TagHelperBase.VerifySettings()TagHelperBase.SerializeTemplates()TagHelperBase.GenerateId(TagHelperOutput)TagHelperBase.CreateHandler(string)TagHelperBase.GetRangeValidationParameter<TValue>(ModelExplorer, string)TagHelperBase.ExtractEditFormat(string)TagHelperBase.ToDictionaryHandler(IDictionary<string, string>)TagHelperBase.AddSelfToTemplate(TagHelperContext)TagHelperBase.ViewContextTagHelperBase.GeneratorTagHelperBase.InitializerTagHelperBase.WriterTagHelperBase.ScriptAttributesTagHelperBase.NameTagHelperBase.IdTagHelperBase.SelectorTagHelperBase.IdPrefixTagHelperBase.IsInClientTemplateTagHelperBase.DeferredTagHelperBase.AsModuleTagHelper.Orderobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Example:

csharp
@addTagHelper *, Kendo.Mvc

<kendo-mediaplayer name="mediaplayer" auto-play="true">
</kendo-mediaplayer>

Child Tagsmediamessages

Constructors

Initializes a new instance of the MediaPlayerTagHelper class.

C#
public MediaPlayerTagHelper(IKendoHtmlGenerator generator)
Parameters:generatorIKendoHtmlGenerator

Properties

If set to true, the widget will start playing the video or videos after initializing.Note Some browser do not allow autoplay and will block this feature. A common solution is to mute the video or disable the browser's autoplay policy.

C#
public bool? AutoPlay { get; set; }

If set to true, the widget will start playing the video or videos after initializing.

C#
public bool? AutoRepeat { get; set; }

If set to false, the user will be prevented from seeking the video forward.

C#
public bool? ForwardSeek { get; set; }

If set to true, the widget will enter fullscreen mode.

C#
public bool? FullScreen { get; set; }

If set to true, the video will be played without sound.

C#
public bool? Mute { get; set; }

If set to true, the option enables the keyboard navigation for the widget.

C#
public bool? Navigatable { get; set; }

The name of the JavaScript function that will handle the end event. Fires when the media finishes playing.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnEnd { get; set; }

The name of the JavaScript function that will handle the kendoKeydown event. Triggered when the user presses a keyboard key while the MediaPlayer is focused.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnKendoKeydown { get; set; }

The name of the JavaScript function that will handle the pause event. Fires when the media is paused.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnPause { get; set; }

The name of the JavaScript function that will handle the play event. Fires when the media begins playing.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnPlay { get; set; }

The name of the JavaScript function that will handle the ready event. Fires when loading is over and the widget is ready to start playing the media.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnReady { get; set; }

The name of the JavaScript function that will handle the timeChange event. Fires when the user selects a new play time.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnTimeChange { get; set; }

The name of the JavaScript function that will handle the volumeChange event. This event is fired upon changing the volume level.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnVolumeChange { get; set; }

A value between 0 and 100 that specifies the volume of the video.

C#
public double? Volume { get; set; }

Methods

Gets the initialization script.

C#
protected override string GetInitializationScript()
Returns:

string

The initialization script.

Overrides: TagHelperBase.GetInitializationScript()

C#
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters:contextTagHelperContextoutputTagHelperOutputReturns:

Task

Overrides: TagHelper.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the defined settings.

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: TagHelperBase.Serialize()

SerializeEvents method.

C#
protected override Dictionary<string, object> SerializeEvents()
Returns:

Dictionary<string, object>

Overrides: TagHelperBase.SerializeEvents()

SerializeSettings method.

C#
protected override Dictionary<string, object> SerializeSettings()
Returns:

Dictionary<string, object>

Overrides: TagHelperBase.SerializeSettings()

Writes the HTML output.

C#
protected override void WriteHtml(TagHelperOutput output)
Parameters:outputTagHelperOutput

The TagHelper output.

Overrides: TagHelperBase.WriteHtml(TagHelperOutput)