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

Defines the fluent API for configuring the Kendo UI MediaPlayer for ASP.NET MVC events.

Definition

Constructors

C#
public MediaPlayerEventBuilder(IDictionary<string, object> events)
Parameters:eventsIDictionary<string, object>

Methods

Fires when the media finishes playing.The event handler function context (available via the this keyword) will be set to the component instance.

C#
public MediaPlayerEventBuilder End(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

MediaPlayerEventBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("mediaPlayer")
.Events(e =&gt; e.End(
@&lt;text&gt;
function(e) {
// event handling code
}
&lt;/text&gt;
))
)

Fires when the media finishes playing.The event handler function context (available via the this keyword) will be set to the component instance.

C#
public MediaPlayerEventBuilder End(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the end event.

Returns:

MediaPlayerEventBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("mediaPlayer")
.Events(e =&gt; e.End("onEnd"))
)

Defines the inline handler of the KendoKeydown client-side event

C#
public virtual MediaPlayerEventBuilder KendoKeydown(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag (Razor syntax).

Returns:

MediaPlayerEventBuilder

Defines the name of the JavaScript function that will handle the KendoKeydown client-side event.

C#
public virtual MediaPlayerEventBuilder KendoKeydown(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the event.

Returns:

MediaPlayerEventBuilder

Fires when the media is paused.The event handler function context (available via the this keyword) will be set to the component instance.

C#
public MediaPlayerEventBuilder Pause(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

MediaPlayerEventBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("mediaPlayer")
.Events(e =&gt; e.Pause(
@&lt;text&gt;
function(e) {
// event handling code
}
&lt;/text&gt;
))
)

Fires when the media is paused.The event handler function context (available via the this keyword) will be set to the component instance.

C#
public MediaPlayerEventBuilder Pause(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the pause event.

Returns:

MediaPlayerEventBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("mediaPlayer")
.Events(e =&gt; e.Pause("onPause"))
)

Fires when the media begins playing.The event handler function context (available via the this keyword) will be set to the component instance.

C#
public MediaPlayerEventBuilder Play(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

MediaPlayerEventBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("mediaPlayer")
.Events(e =&gt; e.Play(
@&lt;text&gt;
function(e) {
// event handling code
}
&lt;/text&gt;
))
)

Fires when the media begins playing.The event handler function context (available via the this keyword) will be set to the component instance.

C#
public MediaPlayerEventBuilder Play(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the play event.

Returns:

MediaPlayerEventBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("mediaPlayer")
.Events(e =&gt; e.Play("onPlay"))
)

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

C#
public MediaPlayerEventBuilder Ready(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

MediaPlayerEventBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("mediaPlayer")
.Events(e =&gt; e.Ready(
@&lt;text&gt;
function(e) {
// event handling code
}
&lt;/text&gt;
))
)

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

C#
public MediaPlayerEventBuilder Ready(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ready event.

Returns:

MediaPlayerEventBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("mediaPlayer")
.Events(e =&gt; e.Ready("onReady"))
)

Fires when the user selects a new play time.The event handler function context (available via the this keyword) will be set to the component instance.

C#
public MediaPlayerEventBuilder TimeChange(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

MediaPlayerEventBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("mediaPlayer")
.Events(e =&gt; e.TimeChange(
@&lt;text&gt;
function(e) {
// event handling code
}
&lt;/text&gt;
))
)

Fires when the user selects a new play time.The event handler function context (available via the this keyword) will be set to the component instance.

C#
public MediaPlayerEventBuilder TimeChange(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the timeChange event.

Returns:

MediaPlayerEventBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("mediaPlayer")
.Events(e =&gt; e.TimeChange("onTimeChange"))
)

This event if fired upon changing the volume level.The event handler function context (available via the this keyword) will be set to the component instance.

C#
public MediaPlayerEventBuilder VolumeChange(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

MediaPlayerEventBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("mediaPlayer")
.Events(e =&gt; e.VolumeChange(
@&lt;text&gt;
function(e) {
// event handling code
}
&lt;/text&gt;
))
)

This event if fired upon changing the volume level.The event handler function context (available via the this keyword) will be set to the component instance.

C#
public MediaPlayerEventBuilder VolumeChange(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the volumeChange event.

Returns:

MediaPlayerEventBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("mediaPlayer")
.Events(e =&gt; e.VolumeChange("onVolumeChange"))
)