Viewing H5p into HTML


Hello I'm trying to implement H5P into my website and I'm having a bit of a difficulty following the instructions of the Platform Integration Development guide. Specifically I'm having problems viewing the H5P content. Now correct me if I'm wrong but I believe all that's needed in viewing is loading the h5p-library (got it from ) and using javascript for the H5PIntegration. I saved an example content I made in the h5p site (a simple fill in the blanks example) and tried viewing it in html but to no success. I uploaded my file in this post . From what I understand I don't load the correct libraries or something. Can you guys help me find what's missing? (examples of how it should be are welcomed)



Edit : solved it. For anyone wondering there were 2 mistakes in my code :

1) window.H5PIntegration.contents['0'] = {} should be like this : window.H5PIntegration.contents ={  'cid-0': {.......}}

2) I didn't include the js files needed to view the content. For my specific example I should include every js file described in the preloadedDependencies libraries(h5p.blanks,fontawesome,h5p.question, h5p.joubelUI, h5p.textutilities, h5p.editor.rangelist )

BV52's picture

Hi Dimitris,

I'm glad you got it working and thank you for sharing this to the community.


Mitt94's picture

Hello Dmitris , i am doing my intern project on h5p integration but have not succeded yet it would be great help if you provide me your source code .so i can understand where am i stucking.thank you very much , have a nice day.

Happy to help. Keep in mind my code has some unsolved issues that I haven't fixed yet. (The code is in txt format since the site doesn't let me upload php files so just rename it.)

Mitt94's picture

I willl update you once i try the code.have a nice day.

Hello, I see that years have passed, I am trying to implement the code shared by you for my university project, however I am not successful, I have already completed all the configuration, both importing the file, extracting, installing, etc. But I can't see the activity.

Has anyone had success and can share the solution? It's already become a headache and I can't find anything online. Please.

I am use PHP + HTML.

otacke's picture


Well, what exactly are you trying to achieve? If you want to render H5P content via PHP, you can use H5P Standalone. If you just want to display H5P content in a page (without running an H5P integration), you can use Lumi Desktop and export H5P content into a single HTML file that contains everything needed to run the content.