-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Fix image loop counter on iOS 14 #30744
Conversation
Base commit: 65975dd |
Base commit: 65975dd |
"repeat twice" is misleading imo, it doesn't "repeat" twice, it "plays" twice - right? |
Yup, correct. Did I write „repeat twice“ somewhere? :o |
@comvenger-brandon no, I'm just referring to this comment, maybe you can change that as well :) |
Ah, you're right. Let's just change that as well, while we're at it. |
Just so I understand clearly, previously: A gif that should loop once would go twice. With this fix, infinite loops still work, and gifs that go once/twice/thrice go the correct number of times. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PeteTheHeat has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Correct. |
@PeteTheHeat merged this pull request in 17aa1e3. |
if(@available(iOS 14, *)) { after using the above code, still gif animating twice |
Same for me |
Care to share the gif file in question? I will have a look. |
Screen.Recording.2021-02-16.at.8.24.35.PM.mov
yes it's 14.4 |
The shared image only plays once when I test it on iOS 14.4 (iPhone 12). Are you sure you correctly applied the patch (via patch-package for example)? This change is not yet live in RN stable. |
hey can you explain how to do that, iam using expo on my project |
Yes, I applied it. EDIT: I'm using managed workflow, if that can affect this |
Summary
Animated gifs, which do not loop, currently animate twice on iOS 14.
See: #30147
Changelog
[iOS] [Fixed] - Animated images without loop no longer animate twice
Test Plan
Run the example app with any animated gif. I attached a gif, which is affected.