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

Playlists

The Telerik UI for ASP.NET MVC MediaPlayer enables you to create your own playlists and to enable or disable the seeking forward.

Creating Playlists

Players usually feature a different video based on user action. To implement your own Playlist structures, change the source of the MediaPlayer dynamically. For a runnable example, refer to the demo on creating your own playlists in the MediaPlayer which uses the ListView to create a list that holds the videos right next to the MediaPlayer element.

To change the existing source of the MediaPlayer, use the MediaPlayer client-side media() method.

    <script>
        function buttonClick() {
            var player = $("#mediaplayer").data("kendoMediaPlayer");
            player.media({
                title: "Our Company Culture - Lesson 2",
                source: "Video/video2.mp4"
            });
        }
    </script>    

Seeking Forward

Some applications enforce the user to watch only the currently loaded content without the option to jump forward. The MediaPlayer provides the ForwardSeek() configuration method, which helps you to achieve this requirement.

    @(Html.Kendo().MediaPlayer()
        .Name("mediaPlayer")
        .AutoPlay(true)
        .ForwardSeek(true)
    )

See Also

In this article