How to embed H5P on an external Drupal website?

Hi,

I am using h5p on a drupal website. When trying to embed h5p content to another drupal website, the iframe remains empty. It seems that hml is not loaded. if embedding the content on the same website, everything works fine. How can I achieve embedding h5p content on an external drupal website?

Thanks.

Nele

 

I found out one thing, which might help other people, who do have the same problem:

The proposed embed code from the h5p content from the other website is given without www in the url by default. If I add this 'www' manually in the embed code, everything works finde ...

icc's picture

Hi! The plugin uses Drupal's url() function when generating the embed code, so if the URL is wrong that means that your site is probably misconfigured, e.g. settings.php might be setting another URL than the one you're using.

Also, if you are using Drupal >7.50 you should be aware that it disallows other sites from embedding by setting the X-Frame-Options header. You can read more about that here: https://www.drupal.org/node/2735873