Embedded H5P (iframe) does not show in a book

Embedded H5P (iframe) does not show in a book

by Aline Paiva -
Number of replies: 8

I create H5P content as an activity in a section, then I paste the code provided (like this: <iframe src = "https://acolh.activemoodle.com/mod/hvp/embed.php?id=596" width = " 1077 "height =" 424 "frameborder =" 0 "allowfullscreen =" allowfullscreen "> </iframe> <script src =" https://acolh.activemoodle.com/mod/hvp/library/js/h5p-resizer.js "charset =" UTF-8 "> </script>) on a book page using Atto's html editor, and nothing happens. The activity almost loads and sometimes the content is very long in the left corner. Could someone please help me?

Average of ratings: -
In reply to Aline Paiva

Re: Embedded H5P (iframe) does not show in a book

by John Provasnik -
Picture of Particularly helpful Moodlers Picture of Testers

I suggest first removing the script tags and then adjust the width to something smaller. See if that resolves the wonky loading. 

In reply to John Provasnik

Re: Embedded H5P (iframe) does not show in a book

by Aline Paiva -
Thank you very much for the quick response.
I tried to do that, but it didn't work. Please, any other suggestions?
In reply to Aline Paiva

Re: Embedded H5P (iframe) does not show in a book

by Stuart Mealor -
I would do two things first.
1. Check with 3 different browsers (both inserting and viewing)
2. Check with administrator that iframes are permitted on your site (they are usually off by default)
Oh, and of course check you are adding the code in HTML view, and not just the normal editor view.
In reply to Stuart Mealor

Re: Embedded H5P (iframe) does not show in a book

by Aline Paiva -
Thanks for the reply!
I tried all of that, but unfortunately it didn't work.
I can embed H5P activities hosted on h5p.org without problem. I cannot use only the activities hosted on our website.
Any idea?
In reply to Aline Paiva

Re: Embedded H5P (iframe) does not show in a book

by John Provasnik -
Picture of Particularly helpful Moodlers Picture of Testers
A few other questions to consider:
Can you 'view' the H5P activity directly with success?
Does the iframe work in other areas, such as the Page module.
Can you successfully embed other iframes into your book module, such as to a youtube video, or is H5P the only issue
Do you have 'Content cleaning everywhere' enabled in your site Experimental settings
In reply to John Provasnik

Re: Embedded H5P (iframe) does not show in a book

by sushumna rao -
I have similar issue. Not able to embed the H5P content into the Q and A forum. While adding in edit mode I can see, but when I save it's not displaying.

I tried embedding a H5P content type - Single choice set in Book module its working. When I embed the same in the forum its not displaying.

I gave Allowed sources as https://subdomain.domain.in/content/[id]/embed

Do I need to change this? Am I doing correct? Please help me understand the issue and solve it.
In reply to John Provasnik

Re: Embedded H5P (iframe) does not show in a book

by Sunny Leo M -
Hi, I was having a similar issue, and following your suggestion, I was able to confirm that:
1. Yes, I can 'view' the H5P activity directly.
2. No Iframe doesn't work on other areas also - like a page module.
3. I cant embed youtube videos as well using the iframe.


So, I am guessing there is some setting that is not allowing iframe on my moodle... I am trying to look it up. If you are aware of it, or if the solution is something different, please share.

Thank you.
In reply to Sunny Leo M

Re: Embedded H5P (iframe) does not show in a book

by Gemma Lesterhuis -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
hi Sunny

It could be that your provider placed a header on the server that is preventing this: x-frame-option: deny

If that is not the issue - even though it is a LTI provider setting you could try this: enable 'Allow frame embedding' (in "Site Administration > Security > HTTP security")

Gem