Skip to content

feat: Add reliable animated image support for both the configuration UI and physical device output#293

Open
flagadajones wants to merge 3 commits into
nekename:mainfrom
flagadajones:animated-images
Open

feat: Add reliable animated image support for both the configuration UI and physical device output#293
flagadajones wants to merge 3 commits into
nekename:mainfrom
flagadajones:animated-images

Conversation

@flagadajones

Copy link
Copy Markdown

…g logic

Preflight checklist

  • [X ] I understand that if this pull request is about support for non-Elgato or non-Tacto hardware, it will be closed without explanation, as per issue Statement regarding device support #38.
  • [X ] I have ensured that I have run the appropriate formatter on my changes and that my code produces no linter violations.
  • [X ] I have thoroughly reviewed the diff of my changes and ensured that I have neither introduced any unrelated additions, nor differences in unmodified code.
  • [X ] I will keep "Allow edits from maintainers" enabled for this pull request.

Goal

Add reliable animated image support for both the configuration UI and physical device output, while hardening the rendering pipeline.

Main Changes

  • Enabled gif and webp decoding support in the Rust backend (image crate features).
  • Preserved animated uploads (avoids flattening animated files into a single static frame).
  • Reworked frontend rendering:
    • Frame-by-frame decoding via ImageDecoder (WebCodecs) when available.
    • Time-driven animation loop that respects per-frame durations.
    • Shared global animation clock to keep all animated keys on the same page synchronized.
  • Improved device update path:
    • Dedicated throttled device rendering/send flow.
    • Backpressure to prevent overlapping frame sends and reduce flip/flop artifacts.
    • Separate canvas for device output to isolate UI rendering from hardware updates.
  • Lifecycle cleanup improvements:
    • Explicit animation cleanup on rerender/state changes/component destroy.
  • Updated editor preview handling to match the new renderer return type.

Expected Outcome

  • Animated GIF/WebP files render correctly in the configuration UI.
  • More stable and consistent animation behavior on hardware.
  • Animations on the same page stay synchronized.
  • Fewer visual artifacts caused by update burst/ordering issues.

Impact

  • 5 files changed

Validation

  • deno task check
  • deno lint

@CLAassistant

CLAassistant commented Apr 1, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@flagadajones flagadajones changed the title Add reliable animated image support for both the configuration UI and physical device output feat: Add reliable animated image support for both the configuration UI and physical device output Apr 1, 2026
@nekename

Copy link
Copy Markdown
Owner

Please could you check the compliance of this pull request with the Jellyfin LLM/"AI" Development Policy, recently adopted by the OpenDeck project?

@flagadajones

Copy link
Copy Markdown
Author

J'ai utilisé un LLM (Claude Sonnet) pour m'aider dans la réalisation de cette gestion des animations, mais j'ai validé l'entièreté du code pour garantir que la synchronisation soit bonne dans le rendu des frame des images animées.
Le texte de la PR a été écrit par mes soins mais traduite en anglais par Claude.
ce commentaire est traduit par google translate

I used an LLM (Claude Sonnet) to help me with this animation management, but I validated the entire code to ensure proper synchronization in the rendering of animated image frames.

The PR text was written by me but translated into English by Claude.

This comment was translated by Google Translate.

@nekename

nekename commented Jun 3, 2026

Copy link
Copy Markdown
Owner

I just tried to run this PR locally, but using an animated GIF as the image still only displays the first frame.

@nekename

Copy link
Copy Markdown
Owner

I just tried to run this PR locally, but using an animated GIF as the image still only displays the first frame.

Do you have an update on this?

@flagadajones

Copy link
Copy Markdown
Author

Sorry i haven't any time this week. I can check it next week. Can you send me your test conditions ( os, device)? This PR work's fine on my side

@nekename

Copy link
Copy Markdown
Owner

I believe it was EndeavourOS with KDE Plasma that I tested it on, but there's a chance it was on macOS as well.

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.

3 participants