Summary
when viewing an uploaded .gif file on firefox, the gif will not loop, only playing once before disappearing. this doesnt happen in the image viewer, when you click on the gifSteps to reproduce
- upload any (?) .gif file
- look at it in chat using firefox
6 comments
Comment by @Solly-Bird
Play animation Stop animation 613437214-4b8046fc-813a-4ef6-88b5-406be9a3cd2e.gif
613437214-4b8046fc-813a-4ef6-88b5-406be9a3cd2e.gif
220×165 | 17 kB
Comment by @emiliatheworst
Play animation Stop animation 613438906-54792bcc-56d8-4095-bf49-26ca8cc7adf9.gif
613438906-54792bcc-56d8-4095-bf49-26ca8cc7adf9.gif
366×491 | 7.4 MB
Comment by @Solly-Bird
Comment by @Solly-Bird
fluxer_app/src/features/app/hooks/useAnimatedImageDecoder.ts. It seems that anything that exceedsmaxCachedFrameshas this problem (default of 24 frames). Not sure why that happens in Firefox but not Chrome though. If I setmaxedCachedFramesto 5, then this problem occurs with the GIF i uploaded too (since it has 12 frames). If I set it to 512, then your gif plays without issueComment by @Solly-Bird
image.close()line here. It calls.close()on the VideoFrame object after each loop through the GIF, so by the time it passes through the second time, there's nothing to render. Commenting out thatimage.close()line solves the issue on Firefox. I'm not sure why this happens on Firefox but not Chrome. I'm also not sure of the memory usage implications for this change, so I'll leave it to someone that knows frontend JS better than I doDeleted comment
Comment by Hampus