Skip to content

feat(play): a play page, the activity alone for a chat app's card - #87

Merged
alekswebnet merged 2 commits into
mainfrom
feat/play-page
Nov 20, 2026
Merged

alekswebnet merged 2 commits into
mainfrom
feat/play-page

Conversation

@alekswebnet

@alekswebnet alekswebnet commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Closes #86.

/h5p/play/#source=… is the activity on its own, for a chat app's card (missing-elements/h5p-toolkit#210). It builds the source in the browser just as the build page does, reusing build-source.ts and the same packages, and shows only the player, Download the .h5p, and Open in the build page.

Inside a frame, it posts two messages to its parent:

  • its height, which the card sizes itself to;
  • the built .h5p file, which the card can save its own way, since a host's sandbox may block a download from a frame.

A source with problems, or one that names files of the person's own, gets one sentence and the link to the build page, where those are handled.

Checked:

  • pnpm build passes.
  • In Chromium, an outer page stood in for ChatGPT and framed the probe's card, which framed this page from a local preview. The sample Course Presentation was ready 1.2 s after the frame was set, the card followed the page's height, the file reached the card, and the page threw no errors.
  • In ChatGPT itself it can't be tested before it's live: a free tunnel puts a caution page in front of browsers, and that page refuses to be framed. Once merged, the probe frames https://missing-elements.github.io/h5p/play/.

Summary by cubic

Adds /h5p/play/, a page that builds an H5P activity from the #source= in its link and plays it alone, for a chat app to embed in its reply as a frame. Closes #86.

New Features

  • Reuses the build page's browser-side building; beside the player it shows only Download the .h5p and Open in the build page.
  • When framed, posts its height and the built .h5p file to the parent, since a host's sandbox may block a frame download.
  • A source with problems, or one that names the person's own files, gets a short message and the link to the build page where those are handled.
  • No page links to it, and it is left out of the sitemap.

Written for commit 4fd4ace. Summary will update on new commits.

View guided diff Turn on auto-fix

/h5p/play/#source=… builds the source in the browser as the build page does and plays it, with
only its download and a way to the build page beside it. Framed, it tells its parent its height
and gives it the built file. No page links to it; it is not in the sitemap.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 5 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread src/assets/site.css Resolved
Comment thread src/assets/site.css Resolved
Comment thread README.md Resolved
Comment thread src/h5p/play/index.njk Resolved
@alekswebnet
alekswebnet merged commit 759cc61 into main Nov 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A play page: the activity alone, for a chat app's card

1 participant