Edit and add hotspots and timecodes
Submitted by Olle on Tue, 10/02/2018 - 08:44
Forums:
We have a long video file with hundreds of repeating interactive hotspots and timecodes. We can edit the hotspots and timecodes via the interface, but is there any way to edit and add hotspots and timecodes by editing text/code? We could then export cliplists (timecodes) from Adobe Premiere and copy/paste the timecodes into H5P.
Is there any possible way to do this?
Olle
otacke
Tue, 10/02/2018 - 09:44
Permalink
Hi Olle!H5P uses open
Hi Olle!
H5P uses open standards and stores content parameters as json data inside a table of your host systems' database (field json_content in h5p_contents on WordPress, hvp on moodle, h5p_nodes on Drupal) and inside the H5P files that you can download (it's just a zip file, look for h5p.json), so you should be able to generate those automatically.
The structure of these data is defined by the semantics definition of a content type, but since it's plain text, you should also be able to figure out how data for subcontent is stored just by looking at the (unminified) json data. Need some specs?
Please note that when you save content in the editor or upload a file, H5P will validate/sanitize the contents and maintain the field filtered inside the database table that I mentioned above. This field will be used when tha data is loaded for viewing. This validation will not take place if you modify the database directly and you must/should do that yourself, so the best approach for you probably would be to create master content using the H5P editor, download the file, programatically inject your changes into the file and upload the final modified H5P content.
Best,
Oliver