-
-
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
Unavailable This video can't be embedded. #464
Comments
The bug is occurring because of this logic to prevent issues when switching quickly between URLs. Annoyingly, Facebook's Video Player API doesn't trigger any events when the video can't be embedded, so we can't set I hacky fix for the meantime would be to manually set the flag on the internal class Player extends Component {
state = {
url: null
}
load (url) {
if (this.rp.player) {
this.rp.player.isLoading = false
}
this.setState({ url })
}
render () {
return (
<div>
<ReactPlayer
ref={rp => this.rp = rp}
url={this.state.url}
/>
<button onClick={() => this.load(EMBEDDABLE_URL)} />
<button onClick={() => this.load(NON_EMBEDDABLE_URL)} />
</div>
)
}
} |
Manually set isLoading to false when we know the FB SDK has loaded, even if onReady/onPlay hasn't been called (like when a video is non-embeddable) #464
Hopefully this is fixed in |
Manually set isLoading to false when we know the FB SDK has loaded, even if onReady/onPlay hasn't been called (like when a video is non-embeddable) cookpete/react-player#464
Manually set isLoading to false when we know the FB SDK has loaded, even if onReady/onPlay hasn't been called (like when a video is non-embeddable) cookpete/react-player#464
Manually set isLoading to false when we know the FB SDK has loaded, even if onReady/onPlay hasn't been called (like when a video is non-embeddable) cookpete/react-player#464
Manually set isLoading to false when we know the FB SDK has loaded, even if onReady/onPlay hasn't been called (like when a video is non-embeddable) cookpete/react-player#464
Manually set isLoading to false when we know the FB SDK has loaded, even if onReady/onPlay hasn't been called (like when a video is non-embeddable) cookpete/react-player#464
I am using this URL, which says "This video can't be embedded because it may contain content owned by someone else." I can open this Video in incognito mode https://cookpete.github.io/react-player/ @cookpete Could you help here? |
Manually set isLoading to false when we know the FB SDK has loaded, even if onReady/onPlay hasn't been called (like when a video is non-embeddable) cookpete/react-player#464
Hi @cookpete ,
I'm experiencing a slight problem with
react-player
on some facebook videos.If a video cannot be embedded, it causes all the other videos to display the same message. In other words, the [ReactPlayer] fails to work properly and just throws the following message on changing a url, because it will never be loaded: Player.js:179 ReactPlayer: the attempt to load {video} is being deferred until the player has loaded
Also, the [ReactPlayer] doesn't throw any errors, so I cannot find a good workaround on that.
In order to avoid this problem, you could pass the
key
prop with, for example, a new video id. It will lead to unmounting and recreation and, therefore, let the problem go away, but it also leads to a slow performance.The facebook video ID is
2061408887454620
I'm using
react-player@1.6.4
Do you have any thoughts on how we can deal with that?
Thank you in advance
The text was updated successfully, but these errors were encountered: