Skip to content

v0.5.1

Choose a tag to compare

@alekswebnet alekswebnet released this 09 Oct 12:52
· 227 commits to main since this release

What the element tells a page about the package

Three read-only properties, also carried on the ready event's detail beside pkgId and
revision, so a page can describe what it is playing without a second request:

  • source — how the package is read, as the probe classified it: range-http (streams in
    place), chunked (downloaded whole, the host ignores Range) or file, with the size.
  • metadata — h5p.json's title, licence, authors and the rest, plus mainLibrary, the
    content type.
  • libraryBundle — for a package that did not carry its libraries, which bundle supplied them
    and whether it came from a copy downloaded earlier (fromCache), so a page can say whether
    anything was fetched from a third party.

All three are null before a package is loaded and again after src is removed. The worker's
indexed reply now carries the manifest's metadata and mainLibrary; a worker older than the
element sends neither, and metadata then stays null, so update h5p-sw.js with the element
on Setup B.

Full Changelog: v0.5.0...v0.5.1