feat(verify): warn of a video or a recording the browser could not play (#218)
Merged
AL
12h ago+76+76+01234567890123456789-5-5-0123456789
Part of #218: item 3. With #228, items 1 and 2, this is step 4 of #219's plan.
What changes
- A video or a recording the browser gave up on is a warning. After the settle, each
<video>and<audio>in the frame with aMediaErroris named by its path in the package, with what the error says:
warning: video does not play: videos/big-buck-bunny.mp4: it is no format this browser plays
Before, #218's package, an Interactive Video whose mp4 was a wiki's web page, passed with nothing said. Only its screenshot showed "Video format not supported." - A warning, not a failure: the rest of the content plays, as it would on a site. A codec the check's browser lacks is not always the file's fault.
- Where the browser plays no H.264, or for a recording no AAC, an mp4, m4v or m4a failure says so, as
video not checked: … this browser plays no H.264; Chrome or Edge does, instead of blaming the file. Playwright's own browser is now Chrome for Testing, which plays both, so this is for a--browserwithout them. - A file's path in the package names it; one with an escape that is not one,
%zz, is named as written. - The h5p-verify skill's table gains both warnings, with what to do about each.
design/verify.mdgets its rule once the owner's uncommitted edit of that file is in, to avoid a conflict.
Testing
- verify, 29 tests. A new one plays the demo's Interactive Video with its mp4 replaced by a web page and gets the warning; the demo's own video plays with none; the page under the name
odd%zz.mp4is named as written. All the others pass unchanged. - By hand, in Chrome and in Playwright's Chrome for Testing: the demo's video gives no warning, the page-for-video package gives the warning in both.
- skills: the four type files with media (Audio, Dictation, Interactive Video, Video) still build and play both ways with no warnings.
- Haiku, given the skill and a report with each warning:
- "does not play": it said the video is not verified, and to replace the file with an H.264 mp4, rebuild and check again;
- "not checked", for a video and for an m4a recording: it did not claim it plays, and said to check again in Chrome or Edge, or with
--browser.
Release
In verify 1.6.0, with #227's exports.
Summary by cubic
Warns when the browser can't play a video or recording in a verified package, instead of passing silently.
- Each
<video>and<audio>in the frame with aMediaErrorbecomes a warning naming the file by its path in the package and what the error says; a name like%zzthat is not a real escape is shown as written rather than losing the whole media warning. The rest of the content still plays. - Where the browser plays no H.264 (a video) or no AAC (a recording), a file's failure says "not checked" and points to Chrome or Edge instead of blaming the file, covering mp4, m4v and m4a.
- The h5p-verify skill's table documents both warnings and what to do about them.