-
Notifications
You must be signed in to change notification settings - Fork 221
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
Why does the player reset when only the dimensions have changed? #247
Comments
@dancancro I don't think there is a rationale behind having @dancancro Can you open a PR with this small change 🙏 ? |
If we can avoid resetting we definitely should, probably never encountered this issue because I usually set width and height to 100% |
I can do a pull request but I'm stuck. My editor, VSCode, is removing spaces after "if"s and "switch"es. How do I get my editor, VSCode, to not automatically apply eslint fixes on save? This code in
|
@dancancro you can save changes without formating your code by running the VSCode command called |
I don't know how to run a VSCode command. I see menus and menu items that I can click. I don't see a menu item for saving without formatting. |
You can run "Command + Shift + P" to open the Command Palette and type "save without" until you see "File: Save without Formatting" command and use that. |
How do I fix this pull request? It's complaining about the format of the commit message of a previous commit. |
🎉 This issue has been resolved in version 7.13.1-canary.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version 7.13.2-canary.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I installed the new version and it still has this problem. When the player is resized while playing, it stops playing. |
🎉 This issue has been resolved in version 7.14.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@tjallingt I tried it again. It's not fixed. The player restarts when you resize the window. |
@tjallingt I somehow earlier missed the workaround you posted for setting height and width to 100% and then presumably having the containing element control the dimensions. That's reasonable, but there is an intervening div whose dimensions can't be set. This means that the iframe will fill the specified width but not the specified height. I tried setting height and width of the Youtube component's style, but the Youtube component only accepts a className, not a style. Is that a shortcoming that can be corrected? Since you mentioned that by setting the height and width to 100% you hadn't encountered this problem, I suspect that you did something else to handle dynamically changing dimensions. If so, what was that? |
@tjallingt okay, this is very odd. I tried setting the Youtube component's className to "youtube-player" and defining
and instead of putting this class on the containing |
@tjallingt okay, this is weird but works. I added the class to the outer div too.
|
If I pass in
opts.width
andopts.height
, and they change while the player is playing, the player completely resets. I modified the code to keep this from happening and it works fine. Was there some rationale behind having it work this way?The text was updated successfully, but these errors were encountered: