Closed mas-iota closed 4 years ago
I'm having a similar problem. My GIF won't start on page load. The Stop Start buttons from the example code work fine. I've tried all variations of:
//manual.toggle(); //manual.stop(); manual.start(); document.querySelector('.start').click();
Page here: https://maxdatabook.com/staticpages/docaa_example01.html
@maxrottersman I gave up using the autoplay, however, I think what interrupts the autoplay is the responsive: true
option. When it gets scaled to width: 100% interruption occurs. Try to disable the responsive option and see if it gets fixed, then do a workaround to make it scale 100% width.
here's what I ended up with: https://trends.jawab.app/Mahmoud-8o/post/5f60d859357c0
Thanks! Yes, when I set responsive: false it runs on page load, but then I can't get the buttons to work, even if I try to set responsive back to true multiple ways. I'm no js expert.
I'm wondering what you are hoping to accomplish here. If you are looking to autoplay the gif, and then allow the user to pause it on click, that is a new feature that will have to be considered in the core library, mainly because the default control mechanism is hover, which doesn't really fit an autoplay model.
I don't look a gift-horse in the mouth ;) Yes, I want it to start as autoplay and then have some way for a person to "freeze" the frame so they can look at it more closely. My animated GIFs are charts. If they have to hit a button to start, I'd just as soon create HTML movies or JS slide shows. Anyway, I've moved on. But if the developer creates this feature I'll revisit.
@nickforddesign Nothing much, except for (I will write the same issue again):
It's up to you not to add such a feature, but I think it's important to fix issues found in the "core library" cheers
An important limitation of this library is that it is not able to actually "pause" a gif on a frame other than the first frame. This is due to browser security in regards to CORS and while not all gifs are hosted on a different domain than your own, it is an important enough use-case for us to keep it simple.
If this limitation is a deal breaker for you, I will probably close the issue. If not, let me know and I can add an autoplay feature that allows for clicking to "pause" gif (albeit on the first frame).
Thanks for the update! I would need it to pause on the frame they're looking at. It seems yes, you should close this issue, but I hope you put these issues in your documentation or that example page. Maybe say you can't have a GIF auto-start and then pause it. But you can use your great library to play and pause them if one likes. Here's the piece I wrote on creating animated GIFs in Excel, though I pulled back and mostly cover creating stand alone GIFs.
Again, thanks for the library! It may still come in handy for me one day!
No problem getting back to the first frame in my case. Thanks for the efforts!
Fair enough, I will add more clarification to the documentation! Maybe at some point if I have time I can create a special version of Freezeframe intended for gifs that you host on your own domain, which would allow for actual frame parsing and pausing on a specific frame.
I've added a ticket to update the docs: https://github.com/ctrl-freaks/freezeframe.js/projects/1#card-47483175
Thanks! Lmk if there's anything else we can do to help.
I am using vue-freezeframe, I cannot find an option to autoplay GIF, I tried to call the component's start function, it does autoplay then after re-scaling it gets paused. Please see below GIF