Skip to content

fix(reader): restore animated image playback on macOS - #1335

Merged
everpcpc merged 1 commit into
mainfrom
fix/macos-animated-playback
Nov 11, 2026
Merged

everpcpc merged 1 commit into
mainfrom
fix/macos-animated-playback

Conversation

@everpcpc

Copy link
Copy Markdown
Member

On macOS, animated WebP and GIF pages in the DIVINA reader showed only their first frame and never animated, including after turning to a new page.

Cause

AnimatedImagePlayerController.start(sourceFileURL:targetView:) stored targetView and then called startPlayback, which calls stop() to tear down the previous playback. stop() clears targetView, so when the first frame was ready beginDisplay had no view to create the NSView display link from and playback exited. iOS and tvOS create CADisplayLink without a view, so they were not affected.

Fix

The "already playing this source" check and stop() now run before the target view is assigned. startPlayback only sets up the new playback. iOS and tvOS use the same order.

Validation

  • make format
  • make build-macos, make build-ios, make build-tvos succeed
  • Not yet checked manually in the app

🤖 Generated with Claude Code

start(sourceFileURL:targetView:) stored the target view and then called startPlayback, whose stop() cleared it again, so beginDisplay could not create the NSView display link and playback exited after the poster frame. Run the dedupe check and stop() before assigning the target view.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@everpcpc
everpcpc marked this pull request as ready for review November 11, 2026 01:20
@everpcpc
everpcpc merged commit c65da8f into main Nov 11, 2026
3 checks passed
@everpcpc
everpcpc deleted the fix/macos-animated-playback branch November 11, 2026 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant