Closed vikramjit575 closed 6 years ago
Thanks for pointing out your issue! I'm wondering a few things that will help me diagnose this:
still
prop? (It's fine not to, but the calculated still frame won't be available until the gif has fully loaded).Thanks again
Hi
1.Yes i am specifying a still prop and its value is still image of the gif
Here is how i used it
<GifPlayer gif="public/images/GuruRamDass.gif" still="public/images/GuruRamDass.jpg" />
3.No it keeps on playing by its own
I tested it after removing still props.It works fine after that:)
Glad you found something that's working for you! 🙂 However I'm still a bit confused about the issue you're experiencing when you do specify the still frame. I'd love to help solve it - is there any way you could provide a repo demoing the problem?
I should add, not specifying a still
probably does look fine while you're testing locally, but it may look less good on a slow internet connection.
yes thanks a lot for addressing my concern and i will update my repo very soon:)
Thanks I look forward to it! Please keep me posted.
@vikramjit575 I'd still love to see your code example when available. Will you still have one soon?
When I have both gif and still set to the same .gif I want to use, it autoplays - which is the behavior I want anyway.
@andrewjroyce hm, that would be expected behavior. There's no validation on the image source you provide for either prop, so providing your gif as the still
would mean the gif would play.
However that seems undesirable - you won't have a "paused" state to go back to.
Do you think there should be a defaultPaused
prop (true
by default)?
I've combined this with a tooltip, so it automatically plays on hover (tooltip opens) and stops on leave (tooltip closes) I don't see a need for that as a prop as the default is already paused, and that behavior can be circumvented with the method I described.
@andrewjroyce just to humor me, could you provide a code snippet demonstrating what you've just described? I'm curious, and also not sure I'm totally following.
Closing as there's been no followup and the autoplay
prop is introduced in v0.3.0. Please comment if you believe something here hasn't been addressed! :slightly_smiling_face:
I am using the same code and when my page loads gif starts playing by itself without click event