build(deps): bump @missing-elements/h5p-embed from 1.1.0 to 1.3.1

Merged
DE
3d ago
+33-7

Bumps @missing-elements/h5p-embed from 1.1.0 to 1.3.1.

Release notes

Sourced from @​missing-elements/h5p-embed's releases.

embed 1.3.1

@missing-elements/h5p-embed 1.3.1, with two fixes to --scorm. Nothing else changes: the player stays at 1.2.0, and the runtime and the libraries at 1.0.0.

SCORM Cloud imports the zips again (#92)

Every zip --scorm wrote from 1.2.0 to 1.3.0 failed to import in SCORM Cloud, with "IO Error processing zip". The package, the fonts and the library pack's parts are stored in the zip uncompressed, and the writer put their sizes after their data. Java's zip reader refuses that for an uncompressed entry, and SCORM Cloud reads uploads with it. 1.3.1 writes those sizes in front of the data, and still never holds the package in memory. Moodle and Frappe LMS read the zip's index instead, so they imported the older zips as they were. Other LMSs that read uploads with Java likely refused them too.

Checked in SCORM Cloud with zips from 1.3.1: the score, pass or fail, the time and the learner's place are recorded, and an export without its libraries plays from the parts in the zip.

ILIAS records the time of a session closed with the tab (#94)

The launch page saved the session's time, and that the session was left unfinished, as the page went away (pagehide). ILIAS sends what a closing page saves only during beforeunload, so a session the learner ended by closing the tab kept no time there. The score, the result and the learner's place were saved earlier, and were kept.

1.3.1 saves the time on beforeunload as well, and still ends the session as the page goes. So the content's own last save lands as before, and a learner who chooses to stay on the page keeps an open session. Moodle and SCORM Cloud record the same as before, and neither counts time twice.

Checked in more LMSs

The README now says what each LMS checked records:

  • Moodle 4.5: the score as the grade, pass or fail, the time and the learner's place.
  • Frappe LMS: the learner's place. It marks a lesson done only on a pass, keeps no score, and downloads the package whole rather than in ranges.
  • SCORM Cloud: the score, pass or fail, the time and the learner's place.
  • ILIAS 11: the same, once Learning Progress is on, which a fresh ILIAS has off. Turn it on in Administration, then choose "Collection of SCORM Items" in the module's Learning Progress settings and tick the item. Without it, ILIAS keeps the learner's place and drops every score and status.

Upgrading

  • A SCORM package: write it again with npx @missing-elements/h5p-embed@latest --scorm course.h5p and replace it in the LMS. It needs Node 22 or later. Written from the same .h5p, it is the same build to the launch page, so learners' saved places still apply.
  • An embed site: nothing changes.

Full Changelog: https://github.com/missing-elements/h5p-offline-player/compare/v1.2.0...embed-v1.3.1

v1.2.0

@missing-elements/h5p-offline-player 1.2.0, with @missing-elements/h5p-verify 1.4.0 and @missing-elements/h5p-embed 1.3.0. The runtime and the libraries stay at 1.0.0, cmi5 and normalize at 1.1.0. The VS Code extension's 0.2.0 is released separately, as h5p-preview-v0.2.0.

Content made for a newer library version plays on the newest older one

This changes a default. h5p.com gets a library's new minor version weeks before the H5P hub serves it, and the library pack follows the hub. So content made on h5p.com in those weeks can name a version no source has, such as Multiple Choice 1.17 where the pack has 1.16. Up to 1.1.2 the player refused such a package. When the newer version belonged to a part inside the content, such as a question in a Question Set, it booted the package instead and stopped with "Cannot read properties of undefined (reading 'on')", naming nothing.

Now, once every source in libraries has been tried for the version named, the content plays at the newest older minor of the same major that a source has, never across a major. A later source that has the version named still wins over an earlier one with an older version. A package that carries the newer version itself plays its own copy, trusted, as before.

Each library played older is listed in downgradedLibraries, on the element and in the ready event's detail, as { library, from, to }, and the console warns. downgrade-libraries="off" refuses such a package instead, naming the version it needs. That now covers a part inside the content too: its newer version is found before the frame boots, where it used to crash it.

Most minor versions only add fields, which the older code ignores. About one in four changes the shape of the content, which H5P marks with an upgrade step, and there a part can be missing or drawn wrong. Played untrusted, the content is still checked against the older version's fields. Content newer than the pack has the details.

@missing-elements/h5p-verify 1.4.0

The check plays such a package as the player does: it passes, with a warning for each library played older, and report.downgraded lists them. --no-downgrade-libraries, or downgradeLibraries: false in the API, fails it instead, and makes the preview refuse it too. Requires player 1.2.0.

@missing-elements/h5p-embed 1.3.0

... (truncated)

Commits
  • 59e9358 fix(package): bump version to 1.3.1
  • ab66f81 fix(embed): commit the session's time and exit on beforeunload in --scorm's b...
  • 67e2354 fix(embed): keep --scorm loading on Node 22.0 and 22.1, and check the stored ...
  • 7c48b32 fix(embed): write --scorm's stored entries with their sizes up front, for SCO...
  • ecbe452 chore: update package versions to 1.3.0 for h5p-embed, 1.2.0 for h5p-offline-...
  • 707dbb6 fix: report libraries played older on the load, not on the library bundle (#85)
  • f2b33bf feat: play content made for a newer library minor than any source has, on the...
  • efc144c chore: update package versions and improve troubleshooting documentation
  • b71c31b fix: update VS Code extension details in documentation and workflows
  • 47630bc feat: add SCORM 1.2 support with launch page and API integration
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)