Skip to content

feat(videoWindow): add VideoWindow component to the Essentials v3 branch - #112

Open
andrew-welker wants to merge 4 commits into
feat/essentials-v3from
feat/video-window-v3
Open

andrew-welker wants to merge 4 commits into
feat/essentials-v3from
feat/video-window-v3

Conversation

@andrew-welker

Copy link
Copy Markdown
Contributor

Summary

Brings the VideoWindow component, merged to main in #111, onto the Essentials v3 branch.

What changed and why

  • The two VideoWindow commits from main are cherry-picked unchanged. The files under src/lib/shared/VideoWindow/ are identical to main.
  • @pepperdash/ch5-crcomlib-lite is added as a dependency, at the version main uses. VideoWindow talks to the panel through CrComLib, and this branch does not have the Trilist/CrComLib work from main yet.

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 lint and npm run build pass on this branch, and npm ci --dry-run is clean. The build prints the same type messages about .module.scss and import.meta.env that it prints on feat/essentials-v3 today; they do not fail it.
  • The component was tested in a browser with a simulated panel on main (see feat(videoWindow): add VideoWindow component for video on Crestron panels #111). That test was not repeated on this branch.
  • Not tested on a real TSW or DGE, on either branch.

Notes for reviewers

  • Every v3 app now gets CrComLib in the bundle, whether or not it uses VideoWindow, the same as on main. 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.json will conflict when main is next merged into this branch. Regenerate it then.
  • Pre-PR review changed one thing: the dependencies block in package.json was moved to the same place as on main. Where it was, a later merge of main would have produced two dependencies keys 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

andrew-welker and others added 3 commits November 19, 2026 16:19
…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
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.25.0-feat-video-window-v3.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.25.0-feat-video-window-v3.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants