H5P Video - Wordpress - Video Completion

Forums: 

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: 
H5P Video - Wordpress - Video Completion
Content types: 
BV52's picture

Hi ahsan,

I think a visit to this page can help:

https://h5p.org/documentation/for-authors/analyzing-results-and-answers

-BV52

otacke's picture

Hi ahsan!

BV already gave you a good link for starters. For Interactive Video in particular, you might want to look at the list ox xAPI verbs that are supported by this content type.

Best,
Oliver