question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Setting `[Player].playing = false` does not pause playback

See original GitHub issue

The docs say on the playing property:

Set to true or false to pause or play the media

However, setting to true or false on the react-player instance doesn’t change the player state. Is this supposed to mean “Set to true to autoplay. Set to false to start in a paused state”? If so, this is confusingly worded, along with other similar options. The wording seems to imply that this is how you control the player instance after it has been created.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
matthew-deancommented, Jul 12, 2018

@cookpete Ohhh derp, of course, I didn’t think about tying it to state to get React to re-render. I was confused about how to think about the problem because there are other cross-platform methods like seekTo(), but no method for play() or pause().

0reactions
JH175commented, Nov 12, 2022

@cookpete thanks for that snippet… also, this package is amazing… solid work!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Setting [Player].playing = false does not pause playback #441
The docs say on the playing property: Set to true or false to pause or play the media However, setting to true or...
Read more >
React-player How to handle Play Pause state with autoplay
Now the problem is when the user clicks on the play button, state doesn't change because it is already true, the solution is...
Read more >
Only change from Play to Pause if the audio link is working
Start by removing the playPauseIcon(true) from the then() handler, and uncomment your player.onloadstart thing. next page →.
Read more >
MediaPlayer - Android Developers
Playback can be paused and stopped, and the current playback position can be ... If the looping mode was set to false ,...
Read more >
Troubleshooting YouTube Music - Google Support
Try these steps: Make sure your device's operating system is updated. · Try these steps: Pause playback on one device if you're trying...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found