Repository navigation
feat(player): add a fullscreen button to the preview player - #7726
Merged
jrusso1020 merged 2 commits intoNov 16, 2026
Merged
Conversation
The button puts the whole player, controls included, in fullscreen and follows every fullscreen change. Set disable-fullscreen to hide it. It raises the player's package size budget. With pnpm 10.17.1, main packs to 158,705 bytes (544,891 unpacked) and this branch to 160,137 (549,402).
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
This was referenced Nov 14, 2026
Bring the branch up to date with upstream main (b54f207). The only conflict was the player line in scripts/package-size-budgets.json. Upstream raised the player's packed budget to 159000 for the slideshow island scan. The line now comes from a pnpm 10.17.1 measurement of the merged tree, 160299 bytes packed and 549865 unpacked, rounded up to the next 100.
jrusso1020
approved these changes
Nov 16, 2026
jrusso1020
left a comment
Collaborator
There was a problem hiding this comment.
Thanks, this is clean and small.
- Fullscreen behavior.
createFullscreenButton(packages/player/src/controls.ts:55-78) callsrequestFullscreen()on the host, so the shadow-root controls stay on screen. It re-reads:fullscreenon everyfullscreenchange, so Esc, or any exit the button didn't start, keeps the icon and label right. The listener is removed indestroy()(:451); deleting that line fails your "removes its fullscreenchange listener on destroy" test. - Accessibility. It's a real
<button type="button">whosearia-labelswitches between "Full screen" and "Exit full screen", so Enter and Space work.disable-fullscreenusesdisplay:none, which also takes it out of the tab order and the accessibility tree.stopPropagationkeeps the click from also triggering click-to-play. - Safari. The button appears only when
document.fullscreenEnabledis true. Safari 16.4+ has the unprefixed API and:fullscreen. Older Safari, with only thewebkitprefix, gets no button rather than a broken one. That's a reasonable trade. - Callers. Studio doesn't use these controls. The other caller,
cli play.ts:336, gets the button as described. - Tests and CI. The two test files pass (262), and CI is green (75 pass).
Nit: the body says the budget rises to 160,200 packed and 549,500 unpacked, but scripts/package-size-budgets.json:35-36 sets 160,300 and 549,900. Worth syncing one or the other.
Need ✅ · Size ✅ · Reuse ✅ (mute-button styles, slideshow labels) · Simpler ✅ · Structure ✅
Risk: low. It's additive, stays off where fullscreen isn't allowed, and has an opt-out attribute.
— Rames
Merged
robinebers
added a commit
to robinebers/hyperframes
that referenced
this pull request
Nov 16, 2026
Keep both sides where heygen-com#7726 (fullscreen button) and this branch both changed the player controls: the icon slot helper and the fullscreen button helper sit side by side in controls.ts, and controls.test.ts keeps both the glyph slot tests and the fullscreen tests. Resolve the scripts/package-size-budgets.json conflict on the @hyperframes/player line from a measurement of this merged tree with pnpm 10.17.1, the version CI uses: the player packs to 161371 bytes packed and 553009 unpacked, so its budget is 162000 and 554000.
robinebers
added a commit
to robinebers/hyperframes
that referenced
this pull request
Nov 16, 2026
Brings the branch up to date with upstream main at 95e4e7f, which adds the fullscreen button (heygen-com#7726) and the preview-freeze fix (heygen-com#7795). Two files conflicted, both by appending to the same place: - packages/player/src/controls.test.ts: this branch's scrubbing tests and main's fullscreen tests each added a describe block at the end. Both are kept. - scripts/package-size-budgets.json: the player budget. Packed with pnpm 10.17.1 as CI packs it, the merged player is 160733 bytes packed and 550893 unpacked; main's own player is 160355 and 550015. The packed budget is the merged size rounded up to the next hundred, 160800. The unpacked size stays inside its budget's 1% allowance.
7 tasks done
6 tasks done
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.
Why
A HyperFrames video embedded in a page plays at whatever size the page gives it. In a small preview, like a 512 × 268 side panel, the details are hard to see, and the player offers no way to make it bigger. People expect the fullscreen button they know from other video players, and it isn't there.
What changes
The control bar now ends with a fullscreen button.
allow="fullscreen", so the button stays out of the bar there.disable-fullscreen(or setsplayer.disableFullscreen = true).hyperframes playgets the button too, because its page uses the built-in controls.Before
A player embedded at 512 × 268 with
controlsandsandbox-origin="opaque". The bar has play, timeline, time, volume and speed, and nothing that makes the video bigger.After
The same embed. The bar ends with the fullscreen button.
One click later the player fills the screen, controls included (Chrome, 1920 × 1080).
A 13-second screen recording shows a click into fullscreen, playback there, and Esc back to the page, where the video keeps playing.
Test plan
controls.test.tsandhyperframes-player.test.tscover where the button appears, its names and icons, changes it didn't cause, a refused request (no unhandled rejection, name unchanged), cleanup on destroy, and that its click doesn't play the video.bun run --cwd packages/player testpasses all 589 tests.test:browser-security,test:browser-box) and the Studio tests that turn on player controls still pass.git diff --checkandbun run verify:packed-manifests(with pnpm 10.17.1) pass.docs/packages/player.mdxget the newcontrolswording, adisable-fullscreenrow, one paragraph and thedisableFullscreenproperty.Not checked: Safari, Firefox, and real iPhone and iPad devices.
How
requestFullscreen()on the<hyperframes-player>element, not on its iframe, so the controls in its shadow root stay on screen. When the player is already fullscreen it callsdocument.exitFullscreen().player.matches(":fullscreen")on everyfullscreenchange. That also covers a player inside another shadow root, wheredocument.fullscreenElementnames the outer host.document.fullscreenEnabledis true. A refused request still firesfullscreenerroron the player.disable-fullscreenis one CSS rule (:host([disable-fullscreen]) .hfp-fullscreen-btn { display: none }), so it works at any time without a new observed attribute.mainpacks to 158,705 bytes (544,891 unpacked) and this branch to 160,137 (549,402). The difference is about 1.3 KB in each of the three bundles and 575 bytes of README.Related work
No issue or PR covers fullscreen for the embeddable player. #997 added a fullscreen preview to Studio's own player controls, and the slideshow in this package already has a fullscreen button. Like the speed menu (#241) and the volume control (#651), the button is on by default, and the opt-out attribute follows
disable-click-to-play(#4505).