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.

Issue when using multiple players

See original GitHub issue

Hi, I’m using react-jPlayer for playing various items inside the same page. Basically I want each player to have its own state and I’m giving it an id based on the element that it will be playing, the first time I load the players it works well, but once I go to a different page where additional players are loaded I get an error from mapStateToProps where it’s trying to get media from undefined, as if it was trying to access a player id that doesn’t exist from the reducer.

Here’s the error: TypeError: Cannot read property 'media' of undefined at Function.mapStateToProps [as mapToProps] (jPlayerContainer.js:36)

image

I’m wrapping the player inside a component that has additional logic for loading the files, but basically I’m initializing with the corresponding id on componentWillMount.

Issue Analytics

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

github_iconTop GitHub Comments

0reactions
jmvallejocommented, Dec 17, 2018

Nope, I stopped trying and implemented my own solution using a native player 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot play 2 player games - Microsoft Community
Hi we have an xbox s. We've setup 2 controllers and can use both controllers with no issues outside of a game. But...
Read more >
Troubleshoot multiplayer connection errors - Xbox Support
Find solutions for errors when you run the Xbox multiplayer connection test.
Read more >
People Are Controlling the Same Player / Co-Op ... - Parsec
If co-op controls aren't working and everyone is controlling player 1 in the game, check each of the reasons below. Multiplayer needs to...
Read more >
How to Fix COD: Modern Warfare Split Screen Not Working?
The fix, in this case, is to just uninstall the multiplayer packs before reinstalling them. Game installation inconsistency – If you're ...
Read more >
With multiple players, force only one player to be playing #470
Thus, if a player is playing and you press play on another player, then the first player stops. Currently, it will play any...
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