Skip to content
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 to set isPaused as true #106

Open
BenRamins opened this issue Mar 19, 2021 · 5 comments
Open

How to set isPaused as true #106

BenRamins opened this issue Mar 19, 2021 · 5 comments

Comments

@BenRamins
Copy link

BenRamins commented Mar 19, 2021

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)

@HrithikMittal
Copy link

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%" />;

@KudMath
Copy link

KudMath commented Sep 12, 2022

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.

@ReiiYuki
Copy link

ReiiYuki commented Dec 2, 2022

I fixed this in #240, but awaiting merge

@fernando-noah
Copy link

fernando-noah commented Dec 8, 2022

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 ?

@Skriptach
Copy link

When does it supposed to be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants