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

Events

The MediaPlayer exposes various convenient events](/api/kendo.mvc.ui.fluent/mediaplayereventbuilder) that you can handle.

For a complete example on basic MediaPlayer events, refer to the demo on using the events of the MediaPlayer.

Handling by Handler Name

The following example demonstrates how to subscribe to events by a handler name.

        @(Html.Kendo().MediaPlayer()
          .Name("mediaplayer")
          .Events(e => e
                .Pause("mediaplayer_pause")
          )
        )
        <script>
        function mediaplayer_pause() {
            // Handle the pause event.
        }
        </script>

Handling by Template Delegate

The following example demonstrates how to subscribe to events by a template delegate.

  @(Html.Kendo().MediaPlayer()
    .Name("mediaplayer")
    .Events(e => e
        .Pause(@<text>
          function() {
              // Handle the pause event inline.
          }
        </text>)
    )
  )

Next Steps

See Also

In this article