Auto mark complete unit on Media Finish

a. Go to WP Admin -> Plugins -> Editor -> WPLMS Customizer ->wplms-customizer.php
b. And add following code in it :

PHP Code:
add_action('wp_footer','add_unit_auto_complete');

 

function add_unit_auto_complete(){
echo "<script>

jQuery(document).ready(function($){

$( 'body' ).delegate( '#mark-complete', 'media_complete', function(event){ 

  event.preventDefault();

  $('#mark-complete').trigger('click');

});

});

</script>";
}

Note: You need to enable Unit Media lock for this and this would only work for self hosted videos.