-
-
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
onReady doesn't work for Facebook in ssr (different playerID) #788
Comments
Thanks for the fix. And amazing project (I've been using it for years). |
Sorry, I should’ve followed this up after merging. I'm not sure It could maybe be fixed without additional code by using Lazy players are coming in |
Hey, onReady doesn't work for FB player when loaded in ssr.
From debugging I found that two playerIDs are generated, one in ssr and one in client.
@cookpete What do you think about adding
componentDidMount() { this.playerId = ref.id }
If it was loaded in ssr it will change the playerId to the one the div has. Otherwise it will have no affect.
I can make pr for this.
Quick workaround is to remount reactPlayer in client (changing the key in componentDidMount)
The text was updated successfully, but these errors were encountered: