JavaScript interaction with hosting on h5p.org

Forums: 

Hello, I am developing a system that displays videos hosted on Vimeo, YouTube, and H5P (where there will be interactions with the video). With YouTube and Vimeo, I can use an iframe to obtain data such as the watched time of the video and whether it is playing or paused. With H5P, when it is hosted on h5p.org, is it possible to obtain this information?

When using an iframe, I do not have access to the H5P object, and therefore I do not have access to the APIs to retrieve this data.

 

In my case, how can I obtain this data when the content is hosted on h5p.org and the video and interactions are running inside an iframe?

Cheers,

otacke's picture

  1. You'll not be able to get information from any remote iframe, because that would be a security / privacy loophole. That's why browsers do not allow that.
  2. H5P.org is not meant to store your content, but to test things only. Host H5P yourself, and you can communicate with H5P.Video to retrieve information or control behavior.