Repository navigation
feat(author): ask YouTube and Vimeo whether they have a hosted video - #258
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
1 issue found across 8 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="design/author.md">
<violation number="1" location="design/author.md:95">
P3: The `check` bullet lists its network effects (media downloads) but omits the new oEmbed request. `build --check` now sends YouTube and Vimeo addresses to those hosts too, so add that to this bullet.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
… status was seen to mean (#218)
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
…its type, and a silent host leaves the other asked (#218)
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
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.
Part of #218: item 4, "A YouTube or Vimeo address is checked to exist, where the network is there". Items 5 and 6 and the open question stay in #218.
What changes
A build asks YouTube's or Vimeo's oEmbed whether it has the video. Before, an address was held to its form only, so a made-up id built and showed a dead player.
What a status means is each host's own list, as seen on real videos on 2026-11-20:
Only the host's own answer counts. A sandbox's proxy or a school's filter answers for the host, which would otherwise refuse a build with no way round or put a note on every video. Each host sends a status that is no video in a way of its own: YouTube that status's words alone (
Bad Request,Not Found,Forbidden) under its JSON type, Vimeo a page of them (404 Not Found,text/html). A status counts only when it comes so. A page of the box's own, the words under another type, or another status's words say nothing. A box that copied both the words and the type would still pass for the host; none was seen. If a host changes how it answers, the check goes quiet, not wrong.A host that does not answer costs ten seconds once. After the first video with no answer, that host is not asked again in that build; the other still is. One video named twice is asked once.
YouTube is asked by the video's watch address. Its oEmbed answers 404 for the
/embed/and/v/forms of a video it has.Panopto and Echo360 have no public endpoint and are not asked. A read asks nothing.
It runs on the build page too: each endpoint sent CORS headers with a 200 and with a refusal, and the page's policy allows any
connect-src.The MCP server asks through
publicFetch, which passes the timeout's signal on.Privacy
A build now sends a hosted video's address to that site. The author README, the MCP README,
SECURITY.mdanddesign/author.mdsay so.Tests
text/plain, another status's words, and two for Vimeo); no network, each host asked once for four videos; and one host down with the other still refusing its missing video.tests/helpers/oembed.ts) answers oEmbed requests for the author's Node project, and a test passes its ownfetchto say otherwise.vimeo.com/1is refused, and real videos on both build with nothing said.Self-review, 2026-11-20
The first version trusted any 400, 401, 403 or 404, called 401 and 403 "private or let to some sites only" for both hosts without having seen either, and waited ten seconds a video with no network. All three are changed above.