Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GIF image set minimum frame duration (-> 100ms) #988

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

LOCKEDFILE
Copy link

@LOCKEDFILE LOCKEDFILE commented Nov 15, 2024

✨ What kind of change does this PR introduce? (Bug fix, feature, docs update...)

  • Adds a configuration option to set the minimum frame time for GIF images.
  if (_frameDuration! <= const Duration(milliseconds: 10)) {
    _frameDuration = const Duration(milliseconds: 100);
  }

in multi_image_stream_completer.dart

⤵️ What is the current behavior?

  • Currently, GIF images do not have a configurable minimum frame time, which can lead to inconsistent or overly rapid playback on some devices.

🆕 What is the new behavior (if this is a feature change)?

  • This PR introduces a feature to configure the minimum frame time for GIF images, allowing smoother playback and control over animation speed, especially on platforms that impose minimum frame rate limits.

💥 Does this PR introduce a breaking change?

No

🐛 Recommendations for testing

Test GIF playback with various minimum frame times to ensure the configuration functions as expected.
Confirm that the feature works across different devices and platforms, including browsers with built-in frame rate limits like Chrome.

📝 Links to relevant issues/docs

  • the Chrome browser enforces a minimum GIF frame time of 100ms by default, which limits playback speed for faster animations. (See source)

🤔 Checklist before submitting

  • All projects build
  • Follows style guide lines (code style guide)
  • Relevant documentation was updated
  • Rebased onto current develop

@LOCKEDFILE LOCKEDFILE changed the title Set minimum frame duration (-> 100ms) GIF image set minimum frame duration (-> 100ms) Nov 15, 2024
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