Navigation In Kendo Media Player

Introduction

Kendo media player is used to play the videos from a static resource or online YouTube videos. It provides a rich UI for our Website. In this blog, we are going to see how to work with navigation in Kendo media player.
 
Kendo Media Player with streams online YouTube videos

Create a new HTML page in your application and write the code, as shown below. 
  1. <!DOCTYPE html>  
  2. <html>  
  3. <head>  
  4.     <meta charset="utf-8" />  
  5.     <title>Kendo UI Snippet</title>  
  6.     <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.3.1028/styles/kendo.common.min.css" />  
  7.     <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.3.1028/styles/kendo.rtl.min.css" />  
  8.     <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.3.1028/styles/kendo.silver.min.css" />  
  9.     <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.3.1028/styles/kendo.mobile.all.min.css" />  
  10.   
  11.     <script src="http://code.jquery.com/jquery-1.12.4.min.js"></script>  
  12.     <script src="http://kendo.cdn.telerik.com/2016.3.1028/js/kendo.all.min.js"></script>    
  13. </head>  
  14. <body>  
  15.     <h3> Kendo Media Player </h3>  
  16.     <br />  
  17.     <div id="mediaplayer1" style="width:640px; height: 360px;"></div>  
  18.     <script>  
  19.     $("#mediaplayer1").kendoMediaPlayer({  
  20.         autoPlay: true,  
  21.         navigatable: true,  
  22.         media: {  
  23.             title: "Cooking with ASP.NET Core and Angular 2",  
  24.             source: "https://www.youtube.com/watch?v=1Fe-L6pd3gw"  
  25.         }  
  26.     });  
  27.     $(document).on("keydown.mediaplayer1"function (e) {  
  28.         if (e.altKey && e.keyCode === 87 ) {  
  29.             $("#mediaplayer1").focus();  
  30.         }  
  31.     });  
  32.     </script>  
  33. </body>  
  34. </html>  
We have seen the use of autoplay and media properties functionality in Kendo media player from my last blog. In this blog, we are going to see a navigation property functionality of Kendo media player.
 
To enable the navigation in Kendo media player, set the navigation property as true while initializing Kendo media player.
 
Keyboard action in Kendo media player
 
1. Alt +W  -> It is used to focus the media player, which is written with the help of the code, as shown below.   
 
  1. $(document).on("keydown.mediaplayer1"function (e) {    
  2.         if (e.altKey && e.keyCode === 87 ) {    
  3.             $("#mediaplayer1").focus();    
  4.         }    
2. Space -> Toggles between play and pause. 
 
 
 
3. M -> Toggles between Mute and UnMute
 
 
 
4. Enter and Esc -> Enter key opens the video in full screen mode and Esc is used to exit the full screen mode.
 
 
 
Conclusion

The navigation in Kendo media player plays a vital role to make the Application more user friendly with rich UI. I hope you have enjoyed this blog. Your valuable feedback, questions or comments about this blog are always welcome.