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

MediaPlayerEventBuilder

Methods

End(System.String)

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

For more information see End event.

Parameters

handler - System.String

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

Example


               @(Html.Kendo().MediaPlayer()
                   .Name("mediaPlayer")
                   .Events(e => e.End("onEnd"))
               )

End(System.Func)

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

For more information see End event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


               @(Html.Kendo().MediaPlayer()
                   .Name("mediaPlayer")
                   .Events(e => e.End(
                        @<text>
                            function(e) {
                               // event handling code
                            }
                        </text>
                    ))
               )

Pause(System.String)

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

For more information see Pause event.

Parameters

handler - System.String

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

Example


               @(Html.Kendo().MediaPlayer()
                   .Name("mediaPlayer")
                   .Events(e => e.Pause("onPause"))
               )

Pause(System.Func)

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

For more information see Pause event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


               @(Html.Kendo().MediaPlayer()
                   .Name("mediaPlayer")
                   .Events(e => e.Pause(
                        @<text>
                            function(e) {
                               // event handling code
                            }
                        </text>
                    ))
               )

Play(System.String)

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

For more information see Play event.

Parameters

handler - System.String

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

Example


               @(Html.Kendo().MediaPlayer()
                   .Name("mediaPlayer")
                   .Events(e => e.Play("onPlay"))
               )

Play(System.Func)

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

For more information see Play event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


               @(Html.Kendo().MediaPlayer()
                   .Name("mediaPlayer")
                   .Events(e => e.Play(
                        @<text>
                            function(e) {
                               // event handling code
                            }
                        </text>
                    ))
               )

Ready(System.String)

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.

For more information see Ready event.

Parameters

handler - System.String

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

Example


               @(Html.Kendo().MediaPlayer()
                   .Name("mediaPlayer")
                   .Events(e => e.Ready("onReady"))
               )

Ready(System.Func)

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.

For more information see Ready event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


               @(Html.Kendo().MediaPlayer()
                   .Name("mediaPlayer")
                   .Events(e => e.Ready(
                        @<text>
                            function(e) {
                               // event handling code
                            }
                        </text>
                    ))
               )

TimeChange(System.String)

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.

For more information see TimeChange event.

Parameters

handler - System.String

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

Example


               @(Html.Kendo().MediaPlayer()
                   .Name("mediaPlayer")
                   .Events(e => e.TimeChange("onTimeChange"))
               )

TimeChange(System.Func)

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.

For more information see TimeChange event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


               @(Html.Kendo().MediaPlayer()
                   .Name("mediaPlayer")
                   .Events(e => e.TimeChange(
                        @<text>
                            function(e) {
                               // event handling code
                            }
                        </text>
                    ))
               )

VolumeChange(System.String)

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

For more information see VolumeChange event.

Parameters

handler - System.String

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

Example


               @(Html.Kendo().MediaPlayer()
                   .Name("mediaPlayer")
                   .Events(e => e.VolumeChange("onVolumeChange"))
               )

VolumeChange(System.Func)

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

For more information see VolumeChange event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


               @(Html.Kendo().MediaPlayer()
                   .Name("mediaPlayer")
                   .Events(e => e.VolumeChange(
                        @<text>
                            function(e) {
                               // event handling code
                            }
                        </text>
                    ))
               )

In this article
Not finding the help you need?