Repository navigation
feat(play): a video from the chat plays from its link at once, and is fetched whole only for Download (#92) - #93
Merged
Merged
Conversation
… fetched whole only for Download (#92) The page that frames the play page can give a video's or a recording's address instead of its bytes ({ type: 'links' }). The activity is built with it left there (h5p-author 0.16.0's linked) and plays at once. Such a package is a preview, its address expiring, so Download asks the framing page for the bytes ({ type: 'needs-bytes' }), shows them coming under the stage while the activity plays on, builds the package with the file in it, saves it and sends it as built. While a framing page may still answer, the question for the person's file waits a moment, so it does not flash up. The author pin moves to 0.16.0.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
All reported issues were addressed across 6 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
… time, and a late file does not start the activity again (#92) Found in a review of the change: - Files the framing page sent while a preview played, unasked, saved a download nobody pressed for. They now make Download a link to the whole package, with nothing shown. - Files from the person and from the framing page at once built and saved two packages. One is built at a time. - A file that came after the package with its files in it was built, from a framing page still bringing what the person chose themselves meanwhile, started the activity again. It now changes nothing. - 'Try again' after a build that failed asked the framing page for bytes the page already held. - A count of a file on its way, sent in the moment the question for the file is held back, was dropped, so the question flashed up before the count. - An address given while a build with every file was running started that build again. - The preview's Download linked to '#download', a damaged link where opened in a new tab. It links to the page itself. - A build that failed is told a screen reader, and its bar goes.
The stage rounded its corners in every state, and so cut the corners of the activity playing in it. It rounds only what the page itself draws there: the loader, the question for a file, a problem.
…not take the place of the one it is built from (#92)
This was referenced Nov 23, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #92. Part of missing-elements/h5p-toolkit#210.
A video or a recording attached in a chat now plays in the play page at once, from its link, instead of after the whole file has come. The whole file is fetched only when the person presses Download.
For the page that frames this one
All optional; a framing page that sends
filesas before is served as before.{ type: 'links', links: { 'clip.mp4': 'https://…' } }linked) and plays at once. A picture, or an address that is not http(s), is left out.{ type: 'needs-bytes', names }files.progressmessages meanwhile are drawn under the stage. Sent once, however often Download is pressed.files, while a preview playsfiles, once the package with its files in it playsbuiltWhat a person sees
Review
A review of the first commit found these, fixed in the second; the first two cubic found too.
#download, a damaged link where opened in a new tab; it links to the page itself.Testing
By hand, as this repository has no page tests: the built site served locally and framed by a page of another origin acting as the card, with a store on a third origin that answers for parts and sends no CORS header to a video element.
readyin 1.0–1.3 s. The player's only request to the store isbytes=0-, a request for part of the file; nothing is fetched whole before Download.needs-bytes; the count drawn; one package with the video saved, 6.3 MB, asconstruction-site-walkthrough.h5p; onebuilt; the activity stillready, never started again.needs-bytes, one package saved, onebuilt, and nothing happens when the card's copy comes.built, Download a link to the 6.3 MB package, which a press then saves.fetching, thenbuilding, thenready; the question is never shown.pnpm buildandpnpm typecheckpass. Screenshots of each state looked at.Not verified
linksand answerneeds-bytesfirst, the next step of h5p-toolkit#210.built.needs-bytesleaves "Preparing…" and the row, with the choice of the file from the computer.Summary by cubic
A video or a recording attached in a chat now plays in the play page immediately, from the address the framing page provides, instead of after the whole file has downloaded. The whole file is fetched only when the person presses Download.
For the framing page
linksmessage gives a video's or a recording's address instead of its bytes; the activity is built with it left in and plays at once. A picture, or an address that is not http(s), is left out.needs-bytesfor the preview's files, and the page drawsprogressunder the stage while the activity plays on.builtis not sent for a preview, since its address expires; it is sent once the package with the files in it is built.What a person sees
@missing-elements/h5p-authormoves to 0.16.0.Written for commit ae1a864. Summary will update on new commits.