Skip to content

v1.1.0

Choose a tag to compare

@alekswebnet alekswebnet released this 20 Oct 13:16

@missing-elements/h5p-offline-player 1.1.0. The runtime, the libraries, the verifier, cmi5 and the normalizer stay at 1.0.0, and @missing-elements/h5p-embed at 1.0.1.

Changed: H5P's own strings follow the content's language (#55)

This changes what the documented lang attribute does, so it comes first.

H5P's own buttons and dialogs, the fullscreen button, "Rights of use" and the licence names in it, the "this content has changed" dialog, followed the element's lang, usually inherited from the page. The content's own text, its questions and its Check and Retry buttons, is in the language its author wrote it in. So a page in another language showed two at once: "Vollbild" and "Nutzungsrechte" around an English quiz.

Now the frame's language is the content's, and H5P's strings are in it:

  1. defaultLanguage in the package's h5p.json, which H5P's own exports write and which H5P itself uses for the iframe it makes.
  2. The element's lang, its own or inherited from the page, for a package that names no language or says und.
  3. English.

Nothing changes for a site whose pages and packages are in one language. If your site set lang to put the interface in a language other than the content's, that no longer works: a package that names its language gets its strings in that language, and there is no switch for it. The embed page's &lang= is the same fallback.

The change is in the Service Worker, so a site gets it with the new h5p-sw.js.

@missing-elements/h5p-embed

No release: the page is unchanged. Embed 1.0.1 installs player 1.1.0 on its own, so a site written again with --force and deployed gets the new worker. Its README's row on lang= reads as before on npm and is updated in the repository.

Upgrading

  • On a CDN, change the player's URL to @missing-elements/h5p-offline-player@1.1.0 and copy its dist/h5p-sw.js onto your site again. The runtime's URL stays at 1.0.0.
  • With a bundler, update @missing-elements/h5p-offline-player. The bundler emits the new worker.
  • With your own Service Worker that mounts the player (mountH5P), build and deploy it again.
  • With copied folders, copy dist/ again.

Full Changelog: v1.0.1...v1.1.0