A pnpm workspace: packages/player, packages/runtime, packages/libraries,
packages/normalize, packages/verify, packages/author, packages/mcp, packages/cmi5,
packages/embed, packages/vscode, the demo site in apps/demo, and in apps/skills the tests of the agent
skills, run from a project the way a skill's user runs them: every h5p-author type file's example
built and played, and the h5p-to-scorm skill's commands run and their zips played under a stand-in
LMS.
pnpm install
pnpm --filter @missing-elements/h5p-offline-player exec playwright install chromium # once, for the browser tests
pnpm dev # the demo player page on http://localhost:5173
pnpm test # every package's tests, the player's browser suite included
H5P_TEST_BROWSER=webkit pnpm test:engine # the player's browser suite and the app's tests in webkit or firefox;
# `playwright install webkit firefox` in the player first
pnpm build # the player package, building the runtime package on the way
pnpm normalize course.h5p # rewrite a package so it streams (docs/streaming-video.md)
pnpm verify course.h5p # play a package headless and report whether it works
pnpm build:demo # the hosted demo, as Vercel builds it, into apps/demo/dist-demo/
pnpm preview:demo # serve it locally with the production headers
pnpm demo:content # rebuild the demo's content packages from their sources
pnpm demo:icons # re-render the installable app's icons
pnpm libraries # rebuild packages/libraries from the H5P hub: the pack, its parts, the index
pnpm sweep # play every content type in the pack, after pnpm build
pnpm l10n # take H5P's own strings from Moodle's language packs againpnpm dev serves the player page with real content, plus, in dev only, generated test archives
under /fixtures/. /demo/ links the other ways to host it: xAPI, cmi5, a file from disk, a
framed player page, two players on one page.
The demo deploys to Vercel from vercel.json. Its /app/ page is the player as an installable
app that plays .h5p files with no network, libraries included; /app/?src=<url of a .h5p>
opens a package from the web in it.
Working on the code? Start with AGENTS.md.