isEnded

Gets a value indicating whether the media has finished playing.

Example

<div id="mediaplayer"></div>
<button id="checkEnded">Check if ended</button>
<script>
$("#mediaplayer").kendoMediaPlayer({
    media: { title: "Kendo UI for jQuery: Welcome and Overview", source: "https://www.youtube.com/watch?v=UbkbVBNYZMc" }
});

$("#checkEnded").click(function() {
    var mediaplayer = $("#mediaplayer").data("kendoMediaPlayer");
    console.log("Media ended: " + mediaplayer.isEnded());
});
</script>

Returns

Boolean A value indicating whether the media has finished playing.

    <div id="mediaplayer" />
    <script>
          $("#mediaplayer").kendoMediaPlayer({
            autoPlay: true,
            media: {
              title: "Kendo UI for jQuery: Welcome and Overview",
              source: "https://www.youtube.com/watch?v=UbkbVBNYZMc",
            },
          });
          setTimeout(function () {
            var mediaPlayer = $("#mediaplayer").data("kendoMediaPlayer");
            // check if the video has finished
            console.log(mediaPlayer.isEnded());
          },1000);         
    </script>
In this article
isEnded
Not finding the help you need?
Contact Support