Skip to content

onReady doesn't work for Facebook in ssr (different playerID) #788

Closed
@shaulgo

Description

@shaulgo

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions