Force open Video on Full screen when user clicks on play

This fix only for self hosted videos or videos using the WP Medialements.

Copy below code and paste/append it in WPLMS options panel – Footer – Google analytics code

 

<script>
jQuery(document).ready(function($){
  jQuery('.unit_content').on('unit_traverse',function(){ 
    $('video').each(function(){ 
          player = new MediaElementPlayer('video');
        $('video').on("play", function() {
            player.enterFullScreen();
        });
    });
 
  });
});
</script>

Result :

When user clicks on Play, the player would automatically open in full screen mode :

Was this article helpful?

Related Articles

Leave A Comment?