Repository navigation
feat(videoWindow): add VideoWindow component to the Essentials v3 branch - #112
andrew-welker wants to merge 4 commits into
Conversation
…nels Adds a single React component that shows a video stream on a TSW/TS panel or DGE, covering what ch5-video and ch5-background do in CH5: it sends the start/resize/stop requests to the panel and makes the page background see-through where the video is drawn. When the app is loaded in an iframe, requests and responses go through the parent page with postMessage (the touch panel wrapper app relays them). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018uDiZZz3jRd9CFVoYcPSJb
- restart the video when the page is restored from the back/forward cache - check the position of a running video every 250 ms, so a layout shift with no resize or scroll event still moves the video and the hole - copy both the html and body backgrounds onto the backdrop as two layers - tell the parent page which colour scheme the app uses, so the wrapper can match it on the iframe Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018uDiZZz3jRd9CFVoYcPSJb
VideoWindow talks to the panel through CrComLib. This branch does not have the Trilist/CrComLib work from main yet, so the dependency is added here at the same version main uses. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018uDiZZz3jRd9CFVoYcPSJb
|
🎉 This PR is included in version 1.25.0-feat-video-window-v3.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
There was a problem hiding this comment.
🟡 Changes recommended
Rounding both position and size upward can push a visible window beyond the screen boundary, causing the panel to reject its location despite a passing visibility check.
1 open issue
What changed in this PR
Brings VideoWindow from #111 to the Essentials v3 branch, allowing apps using the core library to display panel-decoded video on Crestron touch panels and DGEs.
Changes:
- Add playback controls, visibility and position tracking, and status callbacks.
- Manage transparent video backgrounds and support iframe playback through the wrapper-app relay.
- Export the component and add its CrComLib runtime dependency.
Real-panel testing remains outstanding, as noted in the PR.
| File | Description |
|---|---|
src/lib/shared/VideoWindow/VideoWindow.tsx |
Implements video playback, lifecycle handling, positioning, and status callbacks. |
src/lib/shared/VideoWindow/VideoWindow.module.scss |
Provides black fallback and transparent playback backgrounds. |
src/lib/shared/VideoWindow/videoTransport.ts |
Routes requests and responses through CrComLib or the iframe relay. |
src/lib/shared/VideoWindow/videoStatusMessages.ts |
Maps panel status codes to readable messages. |
src/lib/shared/VideoWindow/videoBackdrop.ts |
Creates video cutouts and restores page backgrounds after playback. |
src/lib/shared/VideoWindow/index.ts |
Exports the component, types, and status messages. |
src/lib/shared/index.ts |
Exposes VideoWindow through the shared library exports. |
package.json |
Adds the CrComLib runtime dependency. |
package-lock.json |
Locks CrComLib and updates its dependency tree. |
Review effort: Balanced
The position and the size were both rounded up, so a window ending at the edge of the screen with fractional coordinates could be sent as extending one pixel past it, which the panel can reject. The right and bottom edges are now rounded down and the size is worked out from the rounded edges. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018uDiZZz3jRd9CFVoYcPSJb
|
🎉 This PR is included in version 1.25.0-feat-video-window-v3.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
There was a problem hiding this comment.
🔵 Needs a closer look
Firmware-dependent native video, transparency, and iframe relaying remain unvalidated on real TSW/DGE hardware, and simulated testing was not repeated on this branch.
No open issues 🎉
1 resolved since last review
Review effort: Balanced

Summary
Brings the
VideoWindowcomponent, merged tomainin #111, onto the Essentials v3 branch.What changed and why
VideoWindowcommits frommainare cherry-picked unchanged. The files undersrc/lib/shared/VideoWindow/are identical tomain.@pepperdash/ch5-crcomlib-liteis added as a dependency, at the versionmainuses.VideoWindowtalks to the panel through CrComLib, and this branch does not have the Trilist/CrComLib work frommainyet.See #111 for how the component works. The wrapper-app half, needed when the app runs in an iframe, is PepperDash/mobile-control-touchpanel-wrapper-app#5.
Testing
npm run lintandnpm run buildpass on this branch, andnpm ci --dry-runis clean. The build prints the same type messages about.module.scssandimport.meta.envthat it prints onfeat/essentials-v3today; they do not fail it.main(see feat(videoWindow): add VideoWindow component for video on Crestron panels #111). That test was not repeated on this branch.Notes for reviewers
VideoWindow, the same as onmain. On a Crestron panel CrComLib takes over the functions the panel calls to deliver joins when it loads. An app on the v3 line that also loads its own copy of CrComLib could stop receiving joins in one of the two copies, depending on which loads last. Apps that do not use CrComLib themselves are not affected.package-lock.jsonwill conflict whenmainis next merged into this branch. Regenerate it then.dependenciesblock inpackage.jsonwas moved to the same place as onmain. Where it was, a later merge ofmainwould have produced twodependencieskeys with no conflict, and the second would have silently replaced the first. Nothing was declined.🤖 Generated with Claude Code
https://claude.ai/code/session_018uDiZZz3jRd9CFVoYcPSJb