deps: h5p-author 0.15.0, and the build page saves the source it built

Merged
AL
2d ago
+40-14

Closes #84.

What changes

  • @missing-elements/h5p-author 0.14.0 → 0.15.0, which brings h5p-normalize 1.5.0 with it. The build page, the sample, the type files, the skill's zips and /h5p/bundles/ all come from it, as before.
  • The build page's play step has "Download its source" beside "Download the .h5p". It saves <name>.source.json, the source as the build took it, with builtWith naming the version of its content type. The box keeps the text as the person wrote it. A hint under the buttons says to keep the source with the file, and why.
  • The "Privacy first" card adds one sentence: where a source names a picture or a video by web address, the page asks that address's site for it, and YouTube or Vimeo whether the video is there. "Nothing you make is sent to us" still holds.
  • The guide's step 4 names the source's button beside the download.

What 0.15.0 changes in the page's build without code here:

  • a made-up YouTube id, a taken-down video, and vimeo.com/1 are refused, with what to give instead;
  • a stored mp4 or m4a has its index moved to the front.

Checked, on 0.15.0 from npm

  • pnpm run build passes. /h5p/bundles/h5p-author.mjs reports 0.15.0 and is byte-equal to the package's dist/. The archive's tool reports 0.15.0, builds a True/False from parts/, and writes its .source.json with "builtWith": "H5P.TrueFalse 1.8".
  • The page in Chromium:
    • The sample builds and plays.
    • "Download its source" saves writing-learning-objectives-with-bloom-s-taxonomy.source.json, starting type, builtWith: "H5P.CoursePresentation 1.27".
    • That file opened and built again says nothing; with builtWith set to 1.26 it gives the note.
    • A real YouTube video builds. youtu.be/aaaaaaaaaaa and vimeo.com/1 are refused with the messages above, asked of each site's oEmbed from the page.
    • No horizontal overflow at 390 px; the two buttons stack there.

Summary by cubic

Closes #84: upgrades @missing-elements/h5p-author to 0.15.0 (bringing h5p-normalize 1.5.0) and lets the build page save the source it built as <name>.source.json.

  • Adds "Download its source" beside "Download the .h5p"; the file names the version of the content type it was built with, with a hint to keep it with the file for later rebuilding.
  • The "Privacy first" card and the guide note that the page asks external sites about web-addressed media, and the guide names the source button by its label.