npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@missing-elements/h5p-runtime

v1.0.1

Published

The H5P core runtime and the frame boot script that @missing-elements/h5p-offline-player loads inside its frame. GPL-3.0, kept apart from the MIT player on purpose.

Readme

@missing-elements/h5p-runtime

The H5P core runtime and frame boot script that <h5p-player> loads in its frame. It is GPL-3.0-only, as the H5P core is, and kept apart from the MIT player. Keep LICENSE.txt and NOTICE.txt with every copy you serve. NOTICE.md says what is in here and where it came from.

Use

With a bundler:

import '@missing-elements/h5p-offline-player'
import { runtime } from '@missing-elements/h5p-runtime'

document.querySelector('h5p-player').runtime = runtime

Without one, point the element at a copy of dist/:

<h5p-player src="course.h5p"
            assets-base="https://cdn.jsdelivr.net/npm/@missing-elements/[email protected]/dist/"></h5p-player>

Or copy dist/ to frame-assets/ next to h5p-player.js, where the element looks by default.

dist/ holds frame.bundle.js (the H5P core's scripts, jQuery among them), h5p.css, fonts/, frame-boot.js, l10n.js, MANIFEST.json, LICENSE.txt and NOTICE.txt. Use a runtime version within the range the player names as its optional peer dependency.

The H5P core

The core is h5p-php-library's, the scripts and stylesheets an H5P site loads, at the commit vendor/h5p-core/SOURCE.json names, with the list of files and their order taken from H5PCore::$scripts and H5PCore::$styles at that commit. pnpm core:sync master in this package moves it to upstream's newest commit, pnpm core:sync <sha> to another, and the build joins the files as they are. The boot script builds the core's settings and loads each library's scripts and stylesheets in the order the player's Service Worker gives it, which is the order h5p-standalone loaded them in until this package dropped it.

Checking content

For a package the element plays untrusted, the boot script checks the content against the semantics.json of the libraries served before the runtime reads it, as the H5P platforms check an author's content: every field held to its type, text stripped to the tags the field allows and plain text escaped, numbers to their range, sub-content to the libraries a field names, anything the semantics do not name removed. It is a port of h5p-php-library's H5PContentValidator, and on the same content it gives the same result. Content whose main library has no semantics.json does not play. The player serves such a package's content.json only to a boot script that checks it, so untrusted needs this package at 0.2 or later.

Languages

l10n.js has the core's own strings — "Fullscreen", "Rights of use", the licence names, the "this content has changed" dialog — in more than fifty languages, taken from Moodle's language packs, where Moodle's translators keep them. The frame loads it when the element's lang, which the element inherits from the page like any other, is not English, and picks the language from it: <html lang="de"> shows them in German, de-AT gets de and nb gets Norwegian. A string a language lacks stays English, and so does a language with none. The file is about 50 kB compressed, fetched once; a page in English never asks for it. runtime.l10nJs names it for a bundler.

pnpm l10n in this package takes the strings from Moodle again, and a weekly workflow does the same and opens a pull request when a translation changed. A language added or corrected is a release of this package alone: the player knows no list of languages.