feat: Add reliable animated image support for both the configuration UI and physical device output
…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 #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
gifandwebpdecoding support in the Rust backend (imagecrate 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.
- Frame-by-frame decoding via
- 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✅
Please could you check the compliance of this pull request with the Jellyfin LLM/"AI" Development Policy, recently adopted by the OpenDeck project?
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.
I just tried to run this PR locally, but using an animated GIF as the image still only displays the first frame.
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?
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
I believe it was EndeavourOS with KDE Plasma that I tested it on, but there's a chance it was on macOS as well.