-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
How can I store the number of frames played by the previous piece of data during the progressive animated webp download process? #2350
Comments
I found a way that I think is acceptable. I store the frame number data in AbstractDraweeController and set it to the next Drawable. This way requires creating an interface in the Drawee module, and AnimatorDrawable2 implements this interface. |
Awesome that you'd like to contribute to Fresco. In general, adding clean support for this is quite cumbersome since the whole pipeline wasn't really designed to support this. |
Reusing the drawable is a good idea. Another problem, I need to add an Animator parameter to the |
Changing public APIs, especially for listeners that are widely used is something that we try to avoid so that we don't break all users of Fresco and need to bump our major version number. An alternative would be: The whole animated image rendering pipeline uses |
You are right, changing the listener is not a suitable way, I will try the custom view in the next few days, thank you very much for your advice! |
Thanks to your help, I have completed this feature and submitted a pull request. I would like to ask when my code will be reviewed? Or what else do I need to do? |
Description
I want to add animated webp progressive loading to Fresco so that I can play the animation during the download process. But there is a problem that has been bothering me for a long time, how can I store the number of frames played by the previous piece of data. During the download process, each piece of data will continue to play from the last frame of the previous piece of data, but each piece of data will generate a separate EncodeImage and CloseableAnimatedImage. These data structures do not have uri field, so I can't map the number of frames to the data source. Is adding uri to these data structures elegant? Or is there any other better way?
The text was updated successfully, but these errors were encountered: