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

feat:add support for manualReloadFromPropChanges prop #67

Merged
merged 2 commits into from
Jan 31, 2020

Conversation

bc-paul
Copy link
Contributor

@bc-paul bc-paul commented Jan 2, 2020

feat:add support for manualReloadFromPropChanges prop

This should help address issue #58.

  • Add support manualReloadFromPropChanges prop
  • Expose loadPlayer() method so the player can be manually reloaded
  • Skip prop comparisons of functions
  • Perform JSON.stringify() comparisons of objects

@bc-paul bc-paul requested a review from misteroneill January 2, 2020 16:11
@bc-paul bc-paul self-assigned this Jan 2, 2020
README.md Outdated
@@ -119,7 +128,7 @@ The following props will update the player's state _without_ a reload:
- `playlistVideoId`
- `videoId`

All other prop changes will cause a complete dispose/reload.
All other prop changes, excluding props that `function`'s, will cause a complete dispose/reload.
Copy link
Member

Choose a reason for hiding this comment

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

props that are?

src/index.js Outdated
return acc;
}

if (typeof current === 'object') {
Copy link
Member

Choose a reason for hiding this comment

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

Should make sure we don't error with null here because typeof null === 'object'.

@bc-paul bc-paul requested a review from misteroneill January 3, 2020 20:39
Copy link
Member

@misteroneill misteroneill left a comment

Choose a reason for hiding this comment

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

Looks good, thanks Paul!

@bc-paul bc-paul merged commit 756af85 into brightcove:master Jan 31, 2020
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