Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing

Thank you for contributing to `h5p-offline-player`.
Thank you for contributing to `h5p-toolkit`.

## Before you start

Expand All @@ -24,8 +24,8 @@ dedicated worker. For architectural constraints and security boundaries, read
## Local setup

```bash
git clone https://github.com/missing-elements/h5p-offline-player.git
cd h5p-offline-player
git clone https://github.com/missing-elements/h5p-toolkit.git
cd h5p-toolkit
pnpm install --frozen-lockfile
pnpm --filter @missing-elements/h5p-offline-player exec playwright install chromium
```
Expand Down
112 changes: 56 additions & 56 deletions README.md

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions apps/demo/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"offers": { "@type": "Offer", "price": "0", "priceCurrency": "USD" },
"isAccessibleForFree": true,
"featureList": ["Plays .h5p files with no network once installed", "Opens .h5p files from the file manager", "Carries the H5P libraries for every H5P hub content type", "Nothing is uploaded"],
"sameAs": ["https://github.com/missing-elements/h5p-offline-player"],
"sameAs": ["https://github.com/missing-elements/h5p-toolkit"],
"author": { "@type": "Organization", "name": "missing-elements", "url": "https://github.com/missing-elements" }
}
</script>
Expand Down Expand Up @@ -164,16 +164,16 @@ <h3>What it keeps on this device, and what it does not</h3>
<li>Where you were. When a file is open, the content saves its own state — the slide or chapter reached, the answers given so far, the position in a video, whatever that content type keeps — in this browser's storage, on this device only. Open the same file again (same name, size and date) and it picks up there; <strong>Start over</strong>, the circular arrow at the top, forgets it. On a shared device, the next person to open the file finds where the last one left it, so press Start over first. The app sends none of it anywhere. A package's own scripts can read it, though, including what other packages saved here, so the app asks before opening a package from another site's link; open only packages you trust.</li>
<li>The files you opened. The list of recent files names each one and when it was opened, and unless the app was installed from Chrome or Edge on the desktop, it holds a copy of each file, its size beside it. Remove a file from the list, or clear the list, and the copy goes with it; on a shared device, clear it before you hand the device on. Like the saved state, it stays on this device, and a package's own scripts can read it.</li>
<li>Not results. The scores and completions the content reports as xAPI statements are neither stored on this device nor sent anywhere, so nothing here is a record that a course was completed.</li>
<li>For results that are recorded — a class, a course, a compliance record — wrap the file as a <a href="https://github.com/missing-elements/h5p-offline-player/tree/main/packages/embed#a-scorm-package-for-an-lms" rel="noopener">SCORM package</a> for your LMS, which Moodle, ILIAS, OpenOLAT and Chamilo grade, or use the <a href="/demo/setup.html">player component</a> on a site that sends its xAPI statements to an LRS or an LMS.</li>
<li>For results that are recorded — a class, a course, a compliance record — wrap the file as a <a href="https://github.com/missing-elements/h5p-toolkit/tree/main/packages/embed#a-scorm-package-for-an-lms" rel="noopener">SCORM package</a> for your LMS, which Moodle, ILIAS, OpenOLAT and Chamilo grade, or use the <a href="/demo/setup.html">player component</a> on a site that sends its xAPI statements to an LRS or an LMS.</li>
</ul>
</section>

<footer>
<p class="credit">
The player's own code is MIT; the H5P core runtime it loads is GPL-3.0, see
<a href="https://github.com/missing-elements/h5p-offline-player/blob/main/packages/runtime/NOTICE.md" rel="noopener">NOTICE.md</a>.
<a href="https://github.com/missing-elements/h5p-toolkit/blob/main/packages/runtime/NOTICE.md" rel="noopener">NOTICE.md</a>.
The libraries it carries are listed with their licences in
<a class="libraries-notice" href="https://github.com/missing-elements/h5p-offline-player/blob/main/packages/libraries/libraries.txt">libraries.txt</a>.
<a class="libraries-notice" href="https://github.com/missing-elements/h5p-toolkit/blob/main/packages/libraries/libraries.txt">libraries.txt</a>.
</p>
</footer>
</main>
Expand All @@ -191,11 +191,11 @@ <h2 id="about-dialog-title">H5P Offline Player by Missing Elements</h2>
installed from Chrome or Edge on the desktop, it keeps a copy of each, and removing one
from the list deletes its copy. It keeps no scores and sends nothing anywhere.</p>
<p class="credit">The player's own code is MIT; the H5P runtime it loads is GPL-3.0, see
<a href="https://github.com/missing-elements/h5p-offline-player/blob/main/packages/runtime/NOTICE.md" rel="noopener">NOTICE.md</a>.
<a href="https://github.com/missing-elements/h5p-toolkit/blob/main/packages/runtime/NOTICE.md" rel="noopener">NOTICE.md</a>.
The H5P libraries it carries are listed with their licences in
<a class="libraries-notice" href="https://github.com/missing-elements/h5p-offline-player/blob/main/packages/libraries/libraries.txt">libraries.txt</a>.</p>
<a class="libraries-notice" href="https://github.com/missing-elements/h5p-toolkit/blob/main/packages/libraries/libraries.txt">libraries.txt</a>.</p>
<form method="dialog" class="dialog-actions">
<a href="https://github.com/missing-elements/h5p-offline-player" rel="noopener">Source code</a>
<a href="https://github.com/missing-elements/h5p-toolkit" rel="noopener">Source code</a>
<button type="submit" class="primary">Close</button>
</form>
</dialog>
Expand Down
12 changes: 6 additions & 6 deletions apps/demo/demo/compare.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ <h2>What only this player does</h2>
<ul class="list">
<li><strong>A <code>.h5p</code> plays as it is.</strong> No unzipping, no upload step, no folder per package: a URL to the file, or a file picked from disk. A 300 MB package starts after a few kilobytes on a host that honours <code>Range</code>, and on one that does not it starts as soon as its libraries have arrived.</li>
<li><strong>Offline, with nothing but a browser.</strong> <a href="/app/">The installable app</a> opens a <code>.h5p</code> file on a computer or a phone and plays it with no network, the libraries included: no account, no site to sign in to, nothing to install from an app store.</li>
<li><strong>Every statement names its build.</strong> Each xAPI statement carries <code>context.revision</code>, a fingerprint of the package it came from, so a completion record says which version the learner finished. <a href="https://github.com/missing-elements/h5p-offline-player/blob/main/docs/revision.md" rel="noopener">How</a>.</li>
<li><strong>Every statement names its build.</strong> Each xAPI statement carries <code>context.revision</code>, a fingerprint of the package it came from, so a completion record says which version the learner finished. <a href="https://github.com/missing-elements/h5p-toolkit/blob/main/docs/revision.md" rel="noopener">How</a>.</li>
<li><strong>cmi5, without an H5P server.</strong> The package stays on a static host and an LMS launches it as an assignable unit, checked against ADL&rsquo;s CATAPULT. <a href="/demo/cmi5.html">The cmi5 example</a>.</li>
<li><strong>Tools for packages made by machine.</strong> <code>h5p-verify</code> plays a package headless and says whether it works; <code>h5p-normalize</code> rewrites one so its video streams. Both are commands, both have agent skills.</li>
<li><strong>MIT, with the GPL kept apart.</strong> The H5P core runtime is GPL-3.0; it is a package of its own, so the element in your bundle is MIT alone.</li>
Expand All @@ -100,7 +100,7 @@ <h2>When to choose something else</h2>
<li><strong>You need to edit content.</strong> This is a player. Author in Lumi, on h5p.com or in a site with the H5P plugin, export the <code>.h5p</code>, and play it here &mdash; the two work together.</li>
<li><strong>Your site already runs Moodle.</strong> Its built-in H5P plays and edits content, records scores in the gradebook, and plays offline in the Moodle app. Use it.</li>
<li><strong>You want it managed for you.</strong> h5p.com hosts, edits, reports and integrates with LMSs, with support, for a subscription. This player needs someone to deploy and update it.</li>
<li><strong>You want scores stored per learner with no code.</strong> The H5P plugins for WordPress, Drupal and Moodle keep results per user out of the box. Here results are events: your page, an LRS or cmi5 decides where they go. For an LMS such as Moodle, ILIAS, OpenOLAT or Chamilo, <a href="https://github.com/missing-elements/h5p-offline-player/tree/main/packages/embed#a-scorm-package-for-an-lms" rel="noopener"><code>h5p-embed --scorm</code></a> wraps a package as a SCORM zip that reports the score and the learner&rsquo;s place to it.</li>
<li><strong>You want scores stored per learner with no code.</strong> The H5P plugins for WordPress, Drupal and Moodle keep results per user out of the box. Here results are events: your page, an LRS or cmi5 decides where they go. For an LMS such as Moodle, ILIAS, OpenOLAT or Chamilo, <a href="https://github.com/missing-elements/h5p-toolkit/tree/main/packages/embed#a-scorm-package-for-an-lms" rel="noopener"><code>h5p-embed --scorm</code></a> wraps a package as a SCORM zip that reports the score and the learner&rsquo;s place to it.</li>
<li><strong>Your users upload content types the library pack lacks.</strong> The H5P plugins install new library code from an administrator&rsquo;s upload; here a package played <code>untrusted</code> gets its libraries from a pack pinned per release, and one that needs a newer library waits for the next pack. <em>Data and trust</em>, below, has what the check covers.</li>
<li><strong>You have a few packages and are happy to unzip them.</strong> h5p-standalone is smaller and has been around longer; served from static files, media streams from the host directly.</li>
</ul>
Expand All @@ -114,7 +114,7 @@ <h2>Data and trust</h2>
player keeps, in the browser on that device, the packages&rsquo; files and a list of what was
played, and the content&rsquo;s own saved state only when <code>resume</code> is set.
Statements are not stored at all.
<a href="https://github.com/missing-elements/h5p-offline-player/blob/main/docs/privacy.md" rel="noopener">What is stored and sent</a>
<a href="https://github.com/missing-elements/h5p-toolkit/blob/main/docs/privacy.md" rel="noopener">What is stored and sent</a>
has the details.
</p>
<p>
Expand All @@ -131,7 +131,7 @@ <h2>Data and trust</h2>
from the pack you chose, its content folder serves the plugins&rsquo; list of file types and
nothing else, and its content is checked against each library&rsquo;s field definitions by a
port of the plugins&rsquo; own validator, compared with the original on 98 cases.
<a href="https://github.com/missing-elements/h5p-offline-player/blob/main/docs/untrusted.md" rel="noopener">Packages you did not make</a>
<a href="https://github.com/missing-elements/h5p-toolkit/blob/main/docs/untrusted.md" rel="noopener">Packages you did not make</a>
has the details. Embed adds a domain on top: a package then runs apart from your site
altogether, where a hostile one cannot touch your logins, though it can read what other
packages stored on that domain.
Expand All @@ -140,7 +140,7 @@ <h2>Data and trust</h2>
<p>
Facts about the other options are from their documentation as of October 2026 and may have
changed; corrections are welcome as
<a href="https://github.com/missing-elements/h5p-offline-player/issues" rel="noopener">issues</a>.
<a href="https://github.com/missing-elements/h5p-toolkit/issues" rel="noopener">issues</a>.
</p>

<footer>
Expand All @@ -149,7 +149,7 @@ <h2>Data and trust</h2>
<a href="/demo/setup.html">Setup</a>
<a href="/demo/">All examples</a>
<a href="https://www.npmjs.com/package/@missing-elements/h5p-offline-player" rel="noopener">On npm</a>
<a href="https://github.com/missing-elements/h5p-offline-player" rel="noopener">Source and README</a>
<a href="https://github.com/missing-elements/h5p-toolkit" rel="noopener">Source and README</a>
</nav>
</footer>
</main>
Expand Down
4 changes: 2 additions & 2 deletions apps/demo/demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ <h2>More ways to host it</h2>
<nav class="footer-links" aria-label="More on this site">
<a href="/">Player page</a>
<a href="https://www.npmjs.com/package/@missing-elements/h5p-offline-player" rel="noopener">On npm</a>
<a href="https://github.com/missing-elements/h5p-offline-player" rel="noopener">Source and README</a>
<a href="https://github.com/missing-elements/h5p-offline-player/blob/main/packages/player/NOTICE.md" rel="noopener">Licences</a>
<a href="https://github.com/missing-elements/h5p-toolkit" rel="noopener">Source and README</a>
<a href="https://github.com/missing-elements/h5p-toolkit/blob/main/packages/player/NOTICE.md" rel="noopener">Licences</a>
</nav>
</footer>
</main>
Expand Down
4 changes: 2 additions & 2 deletions apps/demo/demo/normalize.html
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ <h2>What normalizing cannot do</h2>
<p>
The details — what was measured, and why each rule is the way it is — are in the
repository's
<a href="https://github.com/missing-elements/h5p-offline-player/tree/main/design" rel="noopener">design notes</a>,
<a href="https://github.com/missing-elements/h5p-toolkit/tree/main/design" rel="noopener">design notes</a>,
in the normalizer's file and in the invariants about deflated video under serving archives.
</p>

Expand All @@ -244,7 +244,7 @@ <h2>What normalizing cannot do</h2>
<a href="/">Player page</a>
<a href="/demo/setup.html">Setting it up</a>
<a href="/demo/">All examples</a>
<a href="https://github.com/missing-elements/h5p-offline-player" rel="noopener">Source and README</a>
<a href="https://github.com/missing-elements/h5p-toolkit" rel="noopener">Source and README</a>
</nav>
</footer>
</main>
Expand Down
Binary file modified apps/demo/demo/og-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion apps/demo/demo/player-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ for (const button of document.querySelectorAll('.samples button')) {
* issue is public. GitHub fills a form's fields from the query by their `id`; it refuses `labels`
* from a visitor who may not set them, and the form adds `bug` itself.
*/
const REPORT_FORM = 'https://github.com/missing-elements/h5p-offline-player/issues/new'
const REPORT_FORM = 'https://github.com/missing-elements/h5p-toolkit/issues/new'
/** GitHub answers a longer address with a 414, so the log is cut from its middle to fit. */
const REPORT_MAX_LENGTH = 7000

Expand Down
14 changes: 7 additions & 7 deletions apps/demo/demo/setup.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ <h2>Which setup</h2>
runs: it plays with the library pack's code, and its content is checked against each
library's field definitions before it is shown, as the H5P CMS plugins check an author's
upload, which makes it as contained as in an H5P plugin on the same site.
<a href="https://github.com/missing-elements/h5p-offline-player/blob/main/docs/untrusted.md" rel="noopener">Packages you did not make</a>
<a href="https://github.com/missing-elements/h5p-toolkit/blob/main/docs/untrusted.md" rel="noopener">Packages you did not make</a>
sets the two modes beside the plugins'. Embedded, a package runs on the player domain and never sees your page,
cookies, storage or APIs; results reach you as relayed xAPI, and storage is kept per
embedding site. In every setup the package is named by <code>src</code> — the element's
Expand Down Expand Up @@ -239,7 +239,7 @@ <h2 id="embed">Embed</h2>
<code>nginx.conf</code> and an <code>.htaccess</code> for a server of your own, and the
files Netlify, Cloudflare Pages and Vercel read. <code>--packages</code> limits
the hosts packages may come from, and <code>--ancestors</code> the sites that may frame it;
the <a href="https://github.com/missing-elements/h5p-offline-player/tree/main/packages/embed#readme" rel="noopener">package's README</a>
the <a href="https://github.com/missing-elements/h5p-toolkit/tree/main/packages/embed#readme" rel="noopener">package's README</a>
has the rest. Then, on your site:
</p>
<pre class="code" data-lang="html">&lt;iframe src="https://h5p-player.example.net/?src=https://alekswebnet.github.io/h5p/gh-normalized.h5p&amp;xapi=https://your-site.example"
Expand All @@ -264,7 +264,7 @@ <h2>Requirements</h2>
<li><code>h5p-sw.js</code> is on the page's own origin. With a bundler that is automatic.</li>
<li>The package's host sends CORS headers, or no browser can read the file. Without them the element reports <code>error: no-cors</code>, and your page can offer a file picker instead.</li>
<li><code>Range</code> support on the host is optional. With it a 300 MB package starts after a few kilobytes; without it the archive is downloaded once and played from the browser's cache, booting as soon as its libraries have arrived.</li>
<li>Licences: the player is MIT. The H5P core runtime it loads is GPL-3.0, which is why it is a package of its own, <code>@missing-elements/h5p-runtime</code>, whose <code>dist/</code> carries its <code>LICENSE.txt</code> and <code>NOTICE.txt</code>; keep them with it when you copy or serve it. The runtime's <a href="https://github.com/missing-elements/h5p-offline-player/blob/main/packages/runtime/NOTICE.md" rel="noopener">NOTICE.md</a> has the full account.</li>
<li>Licences: the player is MIT. The H5P core runtime it loads is GPL-3.0, which is why it is a package of its own, <code>@missing-elements/h5p-runtime</code>, whose <code>dist/</code> carries its <code>LICENSE.txt</code> and <code>NOTICE.txt</code>; keep them with it when you copy or serve it. The runtime's <a href="https://github.com/missing-elements/h5p-toolkit/blob/main/packages/runtime/NOTICE.md" rel="noopener">NOTICE.md</a> has the full account.</li>
</ul>

<h2>Listening to it</h2>
Expand Down Expand Up @@ -309,17 +309,17 @@ <h2>Attributes</h2>

<p>
The element's whole API is in
<a href="https://github.com/missing-elements/h5p-offline-player/blob/main/docs/api.md" rel="noopener">docs/api.md</a>; when something goes wrong, see
<a href="https://github.com/missing-elements/h5p-offline-player/blob/main/docs/troubleshooting.md" rel="noopener">Troubleshooting</a>, and for a site
with one Service Worker, <a href="https://github.com/missing-elements/h5p-offline-player/blob/main/docs/single-worker.md" rel="noopener">single-worker hosts</a>.
<a href="https://github.com/missing-elements/h5p-toolkit/blob/main/docs/api.md" rel="noopener">docs/api.md</a>; when something goes wrong, see
<a href="https://github.com/missing-elements/h5p-toolkit/blob/main/docs/troubleshooting.md" rel="noopener">Troubleshooting</a>, and for a site
with one Service Worker, <a href="https://github.com/missing-elements/h5p-toolkit/blob/main/docs/single-worker.md" rel="noopener">single-worker hosts</a>.
</p>

<footer>
<nav class="footer-links" aria-label="More on this site">
<a href="/">Player page</a>
<a href="/demo/">All examples</a>
<a href="https://www.npmjs.com/package/@missing-elements/h5p-offline-player" rel="noopener">On npm</a>
<a href="https://github.com/missing-elements/h5p-offline-player" rel="noopener">Source and README</a>
<a href="https://github.com/missing-elements/h5p-toolkit" rel="noopener">Source and README</a>
</nav>
</footer>
</main>
Expand Down
2 changes: 1 addition & 1 deletion apps/demo/demo/stars.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
;(() => {
if (matchMedia('(display-mode: standalone), (display-mode: window-controls-overlay)').matches) return

const API = 'https://api.github.com/repos/missing-elements/h5p-offline-player'
const API = 'https://api.github.com/repos/missing-elements/h5p-toolkit'
const KEY = 'h5p-demo-stars'
const FRESH_MS = 60 * 60 * 1000
const RETRY_MS = 10 * 60 * 1000
Expand Down
Loading
Loading