Add GIF Loop Count option for animated icons
本帖最后由 saliburlink 于 2026-9-4 07:50 编辑Hi Ulanzi team,I would like to request an option to control how many times an animated GIF is played on the Ulanzi Deck.Currently, even when a GIF file is configured to play only once, the Ulanzi Deck appears to continuously restart the animation.It would be useful to have a Loop Count option, for example:
[*]0 = infinite loop
[*]1 = play once and stop on the last frame
[*]2 = play twice
[*]N = play N times
Ideally, this could be supported both in Ulanzi Studio when selecting a GIF icon and in the Plugin SDK.For example, the SDK could support something similar to:
$UD.setGifPathIcon(context, "icon.gif", "", { loopCount: 1});
or:
$UD.setGifPathIcon(context, "icon.gif", "", 1);
After the requested number of loops is completed, the GIF should remain on its last frame instead of restarting.This would be very useful for button animations such as transitions, notifications, activation effects, and animated icons that are intended to run only once.Thank you!
Hello, your description of your requirements is very detailed. Could you please provide a bit more information about your use case? It would be very helpful for the review process. 本帖最后由 saliburlink 于 2026-9-2 06:34 编辑
Hello! Sure.My main use case is to use animated GIFs as visual feedback on the Ulanzi Deck, but with control over how many times the animation plays.One use case is when an action is executed. For example, I have buttons that open applications, control Home Assistant devices, or perform other actions. When I press one of these buttons, I would like the GIF icon to play its animation only once as a visual confirmation that the action was triggered, and then remain on the last frame.A practical example would be:
[*]The button normally stays static.
[*]I press the button.
[*]The GIF animation plays once.
[*]The animation ends and stays on the final frame.
Another very important use case would be to play the GIF only once when a page is opened.For example, when entering a page or folder on the Ulanzi Deck, the icons could play their small animations once and then remain static. This would create a nice page-entry effect without keeping multiple moving elements on the screen all the time.Currently, when several buttons use looping GIFs, they all keep moving continuously. This can create a lot of visual clutter and may distract the user.Allowing the animation to play only once when a page is opened would make the interface much cleaner and more elegant: the page appears, the icons perform a small entrance animation, and then remain static until the user interacts with them.This would make it possible to use animations in a more subtle way, similar to modern UI micro-animations, instead of having the whole page filled with GIFs that keep moving continuously.At the moment, even if the GIF file itself is created with a loop count of 1, the Ulanzi Deck restarts the GIF continuously. Because of this, it is not possible to use this type of animation properly.This feature would be useful for situations such as:
[*]Animations when opening a page or folder
[*]Application launch animations
[*]Visual feedback when activating Home Assistant devices
[*]Success or confirmation animations
[*]Notifications
[*]Toggle on/off effects
[*]Small transition animations
[*]Interfaces with subtle motion, without constant movement on the screen
Ideally, the Ulanzi Deck should respect the loop count already stored inside the GIF file.For example, if the GIF is configured with:Loop Count = 1then the Deck should play it once and remain on the last frame.If the GIF is configured for infinite looping, then it should continue playing normally.It would also be very useful to make this available through the Plugin SDK, for example:$UD.setGifPathIcon(context, "icon.gif", "", { loopCount: 1 });This would allow plugin developers to decide whether an animation should play:
[*]only once
[*]a specific number of times
[*]continuously
It could also be useful in the future to allow a plugin to restart the animation when needed. That way, the same GIF could play once when a page is opened, and play again when the user presses a specific button.For my use case, the two most important behaviors would be:Open a page → play the animation once → remain static.Press an action → play the animation once → remain static.This would make it possible to create interfaces that are much cleaner, more elegant, and more pleasant visually, using animation as feedback and transition, without the visual clutter caused by multiple GIFs playing continuously.Thank you very much for considering this suggestion!
页:
[1]