Repository navigation
Play videos in place over the slide's still - #408
Merged
Merged
Conversation
Pressing play in the swiper now pins the player over the exact rectangle the poster occupies, with no backdrop, so the still turns into the moving picture without resizing. Navigation leaves the video: the swiper's arrows, the arrow/Page keys and a swipe across the video close the player and move to the neighbouring slide. Grid tiles play in their tile too (localStorage photomap.gridVideoInTile=false restores the lightbox). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…in place Dropping the Control/Search panels beneath the video looked broken where it covered only part of one, and the browser gives no way to move the native control bar above them. Fade them out for the duration instead. The playing slide's favourites star is hidden too: on a grid tile it sat under the player's close button. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Entering fullscreen from the native controls resizes the window, which makes the grid discard every tile and its Swiper instance. The follow loop saw its tile vanish and closed the player while the video was still the fullscreen element, leaving an invisible top-layer element over the page that swallowed every click. - Closing the player now exits fullscreen first. - While the player is fullscreen, rebuilds, slideChanged, and the navigate-away keys/swipe are ignored (the arrows seek again). - A vanished poster is looked up again by global index in the same swiper container, for a few seconds, and the player re-pins to it and adopts the new Swiper instance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The resize handler reset the slides before creating the new Swiper instance. The reset built the pages at the old geometry and scrolled past the page it prepends; the instance created afterwards started at slide 0, i.e. that previous page, and because creating it clears loadedImageIndices but keeps the slides, the batch loads that followed appended a duplicate of every tile. Any resize that changed the grid's shape - including entering and leaving fullscreen - brought the grid back one page early. Create the instance first, then reset, as the thumbnail-size handler does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A poster that is found but off screen is waited for, like a missing one, instead of closing at once: a grid rebuild puts its new instance at slide 0 over the old slides before the reset settles. Real navigation still closes immediately via slideChanged. - Playing a grid tile selects it, so rebuilds reopen on its page and the drawer describes the clip that is playing. - Keep the keyboard of whatever Swiper instance now owns the container disabled, every frame, in lightbox mode and fullscreen too; a recreated grid instance otherwise paged the grid on the arrows meant to seek. - Open as a lightbox when the poster has no on-screen picture, instead of closing synchronously and leaving an invisible, audible player. - Leaving a video by navigating no longer resumes a paused slideshow; only an explicit dismissal does. - Capture a mouse drag once it moves so a swipe can end outside a small tile; scale the control-bar exclusion to the frame. - The panel fade-in transition rule has zero specificity, so it no longer overrides .hidden-fullscreen's transition. - Test reset clears body/slide classes and returns the close button. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
The video player no longer jumps to a different size when you press play, and moving to another slide no longer takes two steps.
Swiper view. The player is pinned over the exact on-screen rectangle of the poster's picture (letterboxing excluded), with no backdrop, so the still turns into the moving picture in place. It follows the slide on resize, drawer changes and partial drags. Navigating closes the player and moves on in one step: the swiper's ◀ ▶ buttons, ←/→/PageUp/PageDown, or a horizontal swipe/drag across the video (drags starting on the native control bar are left to scrubbing). × / Esc / Backspace still close without moving.
Grid view. Videos play in their tile the same way. Pressing play on a tile also selects it.
localStorage["photomap.gridVideoInTile"] = "false"restores the lightbox for comparison.While a video plays in place:
Fullscreen from the native controls.
slideChanged, swipes and the navigate-away keys are ignored, so the arrows seek again.Grid resize fix (pre-existing bug). Any resize that changed the grid's shape, including entering and leaving fullscreen, brought the grid back one page early and left a duplicate of every tile. The cause: the resize handler reset the slides before creating the new Swiper instance, so the new instance started at slide 0, on the prepended previous page. It now creates the instance first, then resets, the same order the thumbnail-size handler uses. As a side effect this also stops the handler passing a global index where
loadBatchexpects a search index.Test plan
npm test: 952 pass, including new tests for in-place pinning, following, grace/re-pin, keyboard and swipe navigation, fullscreen, the slideshow-resume rule and badge selection. Lint and format are clean.🤖 Generated with Claude Code