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 https://github.com/h5p/h5p-php-library ) 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
Mon, 04/22/2019 - 09:28
Permalink
Hi Dimitris,I'm glad you got
Hi Dimitris,
I'm glad you got it working and thank you for sharing this to the community.
-BV52
Mitt94
Thu, 06/06/2019 - 13:47
Permalink
Can you please provide your integration source code.
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.
Dimitris
Tue, 06/18/2019 - 08:57
Permalink
Here you go
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
Wed, 06/19/2019 - 11:39
Permalink
Thank you very much Dimitris.
I willl update you once i try the code.have a nice day.