Uh oh!
There was an error while loading. Please reload this page.
Use source's native media attribute - #78
Conversation
It’s now available to use
Electron didn’t respect the media attribute
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
✅ Deploy Preview for react-visual canceled.
|
There was a problem hiding this comment.
Pull request overview
Uses native <source media> handling for responsive videos, improving SSR and reducing client-side logic.
Changes:
- Renders responsive video sources natively and reloads on media-query changes.
- Removes
@react-hook/media-query. - Attempts to configure Cypress to use Chrome.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
packages/react/src/LazyVideo/LazyVideoClient.tsx | Implements native responsive video sources. |
packages/react/package.json | Removes the media-query dependency. |
yarn.lock | Removes the dependency lock entry. |
packages/react/cypress.config.ts | Adds an invalid Chrome selection option. |
packages/next/cypress.config.ts | Adds an invalid Chrome selection option. |
packages/contentful/cypress.config.ts | Adds an invalid Chrome selection option. |
packages/sanity-next/cypress.config.ts | Adds an invalid Chrome selection option. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Related to this: https://bkwld.slack.com/archives/C07FD2HUDHC/p1786994959971829
This is better for SSR and getting videos playing faster. And removes a JS dep (and JS logic)