react-insta-stories
react-insta-stories copied to clipboard
How to set isPaused as true
i.e. how to set isPaused as true across all stories in
<Stories
stories={stories}
/>
Currently if you set isPaused
to true
in <Stories>
it only affects the first story in the sequence and it skips it altogether and moves on to the second story.
I feel like this is necessary to start to enable video stories to play with sound on iOS. The goal would be for the stories to load but are paused, and at first action from the user, proceeds as normal.
for reference. this PR #103 fixed it so that videos play but without sound (instead of a black screen)
Create your local state and change it value according to your requirements and pass it as variable
const [paused, setPaused] = useState(false);
and in component
return <Stories stories={tData} defaultInterval={5000} isPaused={paused} width="100%" height="100%" />;
Create your local state and change it value according to your requirements and pass it as variable
const [paused, setPaused] = useState(false);
and in component
return <Stories stories={tData} defaultInterval={5000} isPaused={paused} width="100%" height="100%" />;
This doesn't appear to have any effect on my stories. Event by setting isPaused={true}
it still autoplays.
I fixed this in https://github.com/mohitk05/react-insta-stories/pull/240, but awaiting merge
fantastic work with the fix @ReiiYuki . This would be super useful for visual diffing for example where you want the animations to be paused. Any change this can be reviewed and released @mohitk05 ?
When does it supposed to be merged?