Repository navigation
v0.1.10
Save and resume
A new resume attribute lets content pick up where the learner left off:
<h5p-player src="course.h5p" resume></h5p-player>The content saves its own state the way it does on h5p.com or in Moodle — the slide reached, the answers so far, the position in a video — every ten seconds, three seconds after a completed or progressed statement, and as the frame goes away. The next load of the same package hands it back.
- Where it is kept. In the browser's storage for your site, on that device. It never leaves the device.
- Keyed by build. The state is stored with the package's
revision, the same one every statement carries, so a state from one version of a package is never handed to another. The content shows H5P's own "This content has changed since you last used it. You'll be starting over." and drops the old state. - Off by default. On a shared machine the state one person leaves is what the next one finds. A site that knows its users keeps the state itself with
resume="host": nothing is stored on the device, auserdataevent fires on every save, and the host hands the state back through theuserDataproperty before the next load. clearUserData()forgets what the device holds for the current package.
Without the attribute nothing changes. xAPI statements are never stored, in any mode.
Accessibility
- The iframe is named after the title in the package's
h5p.json, so a screen reader says which content the frame holds instead of "H5P content" for every package. - A keyboard-only run over seven content types found no focus trap and every task doable with keys alone. The results, and what the player handles versus what depends on the content type, are in ACCESSIBILITY.md.
Hardening
- A non-string
titleinh5p.jsonno longer breaks the load.
Demo site
- The installable app resumes files where you left them and has a Start over button. Its page says exactly what is kept on the device and what is not.
- The player page and the app show messages in a live region.
- A package missing its libraries is offered the site's bundle or h5p.org, instead of a checkbox.
Documentation
The README, the setup guide and the setup skill describe resume. Every statement about storage now distinguishes the default, where nothing is stored, from resume, where only the content's own state is kept on the device.
Full Changelog: v0.1.9...v0.1.10