Viewer and Editor Exemple in PHP (without CMS)

Hello !

I read on your site that H5P only work with CMS, but after many search I finded, it can work with PHP only. (https://h5p.test.schulcloud-thueringen.de/creating-your-own-h5p-plugin).

Even if I follow the instruction, the player doesn't work for me :

  • TypeError: undefined is not an object (evaluating 'window.H5PIntegration.contents')
  • TypeError: undefined is not an object (evaluating 'H5PIntegration.contents['cid-' + contentId]')

 

And nothing is written for the Editor yet.

 

So, somebody have an example for guide me ?

 

Thank you!

tomaj's picture

It's currently not a trivial task to embed h5p into pages outside the CMS'.

I would recommend you open the console in your browser, and try to study those object that you are missing, on e.g h5p.test.schulcloud-thueringen.de.

H5PIntegration is an object created in JS, that holds the configuration of H5P, and config for each piece of content on the page.

The only examples existing are the 3 plugins:

  • https://github.com/h5p/h5p-moodle-plugin
  • https://github.com/h5p/h5p-wordpress-plugin
  • http://cgit.drupalcode.org/h5p/log/

- Tom

Oh :/

Nobody have integrate H5P without CMS :(

I take my day to try this, thank you