Skip to content

fix: empty src attr in StrictMode - #1538

Merged
cookpete merged 2 commits into
cookpete:masterfrom
Gerpea:fix-file-player
Feb 3, 2023
Merged

fix: empty src attr in StrictMode#1538
cookpete merged 2 commits into
cookpete:masterfrom
Gerpea:fix-file-player

Conversation

@Gerpea

@Gerpea Gerpea commented Nov 11, 2022

Copy link
Copy Markdown
Contributor

@tmilewski

Copy link
Copy Markdown

@cookpete This is blocking us as well, and we can confirm that @Gerpea's fix works. A merge and publish would be amazing. Thanks!

@willenglishiv

Copy link
Copy Markdown

same, experiencing the same issue here, fix would be awesome!

@masterdimar

Copy link
Copy Markdown

same problem here. the fix would be welcome

@Nicopa

Nicopa commented Dec 27, 2022

Copy link
Copy Markdown

I got the same problem and the fix works.

@Gerpea

Gerpea commented Jan 11, 2023

Copy link
Copy Markdown
Contributor Author

@cookpete Hi, we would appreciate it if you could review the fix

@Emmaccen

Copy link
Copy Markdown

Yup! This is the "Fix" 🚀

@AryanJ-NYC

Copy link
Copy Markdown

@cookpete ?

@AntonOfTheWoods

Copy link
Copy Markdown

Has anyone seen @cookpete on a ticket or git in the last few months? Maybe he has abandoned the repo (or is no longer able to manage it) and it's time to fork?

@cookpete

cookpete commented Feb 2, 2023

Copy link
Copy Markdown
Owner

I’m here. I’m alive.

It’s been over seven years since I started this project. I never thought it would become this popular. Life changes a lot in seven years. I have much less free time now. I would love to spend more time on this. I will try to in the future. Bear with me. Apologies to keep everyone waiting for so long.

@tmilewski

Copy link
Copy Markdown

@cookpete No worries, thanks a lot for your continued support!

@cookpete

cookpete commented Feb 3, 2023

Copy link
Copy Markdown
Owner

Thanks to @Gerpea for the original fix but it’s actually as simple as setting the src in the componentDidMount of FilePlayer.js

The original fix would have called load twice for every player, including calling getSDK twice, which loads all the third party scripts. It seemed quite bug prone so I simplified it a bit.

Regardless, thanks so much for the PR and pointing me in the right direction to fix this.

@cookpete
cookpete merged commit 5c7ffa2 into cookpete:master Feb 3, 2023
@Gerpea

Gerpea commented Feb 3, 2023

Copy link
Copy Markdown
Contributor Author

🎉 Thank you @cookpete

@Awais914

Awais914 commented Feb 6, 2023

Copy link
Copy Markdown

@cookpete Thank you for the fix. In which version will this fix come?

@cookpete

cookpete commented Feb 9, 2023

Copy link
Copy Markdown
Owner

Published in v2.11.1

anampartho added a commit to anampartho/react-player that referenced this pull request Apr 13, 2023
…urls

PR cookpete#1538 was setting the src of the video element to undefined. Because
of this, even if the users passed an array of urls, the video element
would not play becuase it got a `src` of `undefined`;

After fixing the undefined `src` issue, another PR was making a infinite
loop issue when user passed an array of urls. There, the author set the
`srcObject` to null. There as well, a check for `url` prop was missing.

This PR aims to fix both of these overlooked aspects.
cookpete pushed a commit to anampartho/react-player that referenced this pull request Aug 31, 2023
…urls

PR cookpete#1538 was setting the src of the video element to undefined. Because
of this, even if the users passed an array of urls, the video element
would not play becuase it got a `src` of `undefined`;

After fixing the undefined `src` issue, another PR was making a infinite
loop issue when user passed an array of urls. There, the author set the
`srcObject` to null. There as well, a check for `url` prop was missing.

This PR aims to fix both of these overlooked aspects.
cookpete pushed a commit that referenced this pull request Aug 31, 2023
)

PR #1538 was setting the src of the video element to undefined. Because
of this, even if the users passed an array of urls, the video element
would not play becuase it got a `src` of `undefined`;

After fixing the undefined `src` issue, another PR was making a infinite
loop issue when user passed an array of urls. There, the author set the
`srcObject` to null. There as well, a check for `url` prop was missing.

This PR aims to fix both of these overlooked aspects.
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.

v2.11.0 not playing MP4 URL files

10 participants