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

fix: shouldResetPlayer options spread #284

Merged
merged 1 commit into from
Mar 13, 2021

Conversation

staff0rd
Copy link
Contributor

@staff0rd staff0rd commented Mar 1, 2021

Reset is currently broken, mostly due to the position of the playerVars spread. I also added a test to prove this.

Prior to this fix, any change to start was still resulting in a player reset.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 1, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit c8beb15:

Sandbox Source
Vanilla Configuration

@ruisaraiva19 ruisaraiva19 requested a review from tjallingt March 13, 2021 11:07
@ruisaraiva19 ruisaraiva19 changed the title fix reset fix: shouldResetPlayer options spread Mar 13, 2021
@ruisaraiva19
Copy link
Collaborator

@staff0rd This looks good. Let's wait for #278 to be merged first.

Copy link
Owner

@tjallingt tjallingt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@ruisaraiva19
Copy link
Collaborator

@staff0rd can you sync your fork with the latest changes from this repo before I can merge this?

@ruisaraiva19 ruisaraiva19 merged commit fc423ea into tjallingt:canary Mar 13, 2021
@staff0rd staff0rd deleted the fix-reset branch March 13, 2021 11:37
@github-actions
Copy link
Contributor

🎉 This PR is included in version 7.13.1-canary.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Contributor

🎉 This PR is included in version 7.13.2-canary.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Contributor

github-actions bot commented Jan 4, 2022

🎉 This PR is included in version 7.14.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@iyzana
Copy link

iyzana commented Apr 23, 2023

@staff0rd Do you still know why you added prevProps.videoId !== props.videoId to shouldResetPlayer?
From what I've observed, changing just the videoId works perfectly fine without resetting the player.
With this check the player unnecessarily leaves fullscreen when the video changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants