Skip to content

v0.1.9

Choose a tag to compare

@alekswebnet alekswebnet released this 28 Sep 21:45
· 318 commits to main since this release

A fix for packages exported without their own libraries.

Fixed

  • Inner content of a package without libraries now loads. Exports from h5p.com and h5p.org
    often carry no libraries, and their h5p.json names only the main content type. When a bundle
    was attached through libraries, the player loaded that content type but not the ones used
    inside it, such as the questions in a Question Set. The content then started and failed with
    "Unable to find constructor for: H5P.Text". The player now reads the libraries the content
    itself uses from content/content.json and loads those too.
  • A bundle may carry a newer minor version. When the content asks for H5P.MultiChoice 1.16
    and the bundle has 1.17, the bundle's copy is used, by the rule H5P uses for minor versions.
    Before, such a library was left out.

Nothing changes for packages that carry their own libraries.

A ready-made library bundle

The repository now has
libraries.h5p:
the H5P hub's runtime libraries for every content type it serves, 98 libraries in about 10 MB.
Their licences and authors are listed in
libraries.txt.
Serve both files from your own site:

<h5p-player src="course.h5p" libraries="/h5p/libraries.h5p"></h5p-player>

A package that needs a newer minor version than the bundle carries is still refused, with the
missing libraries named. The installable app now
carries this bundle, so packages without their own libraries play there offline from the first
open.

Full Changelog: v0.1.8...v0.1.9