Trigger an Event when H5P content is completed ?

I'm usisng the video-interaction with wordpress. I use Vimeo for my videos.

Everything is working fine.

However, I would like to capture the video completion event, when the H5P video is ended. For example, Triggering to next module after 5 seconds when the video is completed. and mark unit as complete.

Something like this 

<script>jQuery('body').delegate('#mark-complete','media_complete',function(event){
jQuery('#mark-complete').trigger('click');
setTimeout(function(){
   jQuery('#next_unit').trigger('click'); 
},3000)});
</script>

Which event is triggered and how i can use it when the H5P media is completed ?

I know I need to use xAPI events, but I'm not able to listen to media complete event?

Is there some way I can get the status of the video to determine if it's completed??

Summary: 
Trigger an Event when H5P content is completed ?
Content types: 
BV52's picture

Hi ahsan,

Please see my answer here.

-BV52

Hi All,

I am developing an elearning course. I am using WordPress. I would like to trigger a completion event to mark complete in my LMS.

Please describe me a completion solution.

otacke's picture

Hi!

Was that supposed to be a ChatGPT prompt?

Best,

Oliver