Unable to embed public H5P content across Moodle sites

I have a public course with many H5P nodes on a Moodle site. These nodes are visible to guests. I can embed these nodes anywhere on the same Moodle site, but when I use the same embed code on a different Moodle site I see a blank space instead of the node.

I wonder why I can't embed publicly available H5P nodes created in one Moodle site within other Moodle sites. Could anyone please help? Thank you.

BV52's picture

Hi ravim,

Can you please check the browser consoe for any errors. Also please share a URL or 2 so that we can also check.


The H5P node is here: http://moodle.inasp.info/mod/hvp/view.php?id=3908

And here's the page where I want to embed it:

There is indeed an error shown in the browser console!

Refused to display 'http://moodle.inasp.info/mod/hvp/embed.php?id=3908' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

This seems a similar issue to: https://tracker.moodle.org/browse/MDL-61787

Embedding content created in Moodle to an external site/platform. It looks like it's treating the app in the same way as it treats an external site in this example.

thomasmars's picture

this is a server setting that you must configure for your site. You can read more about X-Frame-Options at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options.