Skip to content
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

Player is never initialized, and contentWindow is undefined #2

Closed
wants to merge 2 commits into from

Conversation

ruprict
Copy link

@ruprict ruprict commented Sep 8, 2015

I had 2 issues using this lib:

  1. In MediaPlayer, this.state.Player is never initialized for me componentWillReceiveProps is not called when I create the component. The component is part of a conditional render, so maybe that's the issue.
  2. iframe.contentWindow is undefined for me.

These two minor fixes allowed me to use the module. Any chance you could take a look and, if all's well, issue a new npm module?

@cookpete cookpete closed this in f912f13 Sep 10, 2015
cookpete added a commit that referenced this pull request Sep 10, 2015
@cookpete
Copy link
Owner

@ruprict Thanks for your help! This is fixed in 0.0.7. I hope you don't mind that I added some separate commits instead of merging this PR. npm run lint fails on your fork, so it just saved us going back and forth sorting that out.

iframe.contentWindow being undefined is quite worrying, as we then can't control the Vimeo player using external controls. What OS/browser did you see it happen on?

@ruprict
Copy link
Author

ruprict commented Sep 10, 2015

I am on Chrome 44.0.2403.157 (64-bit) and Mac OSX 10.10.5 (Yosemite). However, I think the postMessage function is called many times as the component is built, and it's only null up until the iframe is actually added to the DOM. My guess is while the iframe is in the virtual DOM, it's null. Once it's added to the real DOM, contentWindow is there. It's a total guess, though. Thoughts?

david-hub024 pushed a commit to david-hub024/React_VideoPlayer that referenced this pull request Dec 23, 2018
david-hub024 pushed a commit to david-hub024/React_VideoPlayer that referenced this pull request Dec 23, 2018
@mgw-sbex mgw-sbex mentioned this pull request Jan 25, 2019
david-hub024 pushed a commit to david-hub024/React_VideoPlayer that referenced this pull request May 23, 2020
david-hub024 pushed a commit to david-hub024/React_VideoPlayer that referenced this pull request May 23, 2020
albanqoku added a commit to albanqoku/react-player that referenced this pull request Feb 24, 2021
albanqoku added a commit to albanqoku/react-player that referenced this pull request Feb 24, 2021
Webmaster1116 added a commit to Webmaster1116/video-player that referenced this pull request May 20, 2021
Webmaster1116 added a commit to Webmaster1116/video-player that referenced this pull request May 20, 2021
webmiraclepro added a commit to webmiraclepro/video-player that referenced this pull request Sep 9, 2022
webmiraclepro added a commit to webmiraclepro/video-player that referenced this pull request Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants