-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Playing prop not changing when setting state #1469
Comments
I believe I might be having a similar issue and I have found that it's due to changing the state whilst updating the video url. See a codesandbox example here: https://codesandbox.io/s/distracted-resonance-kc0ylj?file=/src/App.tsx All I am doing is:
Update: I noticed that if you set the |
I've faced the same issue and I don't know how to fix it. The |
OMG I found a solution for my case! I added this: <ReactPlayer
....
onPlay={() => {this.setState({playing: true})}}
....
/> It looks like when user starts the video, my variable |
I was having the same issue, what you need to do is - It will work. Thanks |
I am facing same issue. I m also trying to do realtime - play|puase using state and websocket When I play the video, video doesn't play in another browser site but state changed. |
Current Behavior
Playing prop not changing when setting state. Initial state is set to true. All streams are mapped as user searches.
Expected Behavior
I'm trying to play/pause all twitch streams on button click. In the console I can see my initial state as true on load. When clicked the state goes to false but nothing is happening.
Environment
The text was updated successfully, but these errors were encountered: