-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Deprecate options #2229
Deprecate options #2229
Conversation
fixed issue with playbackRates option getter
@@ -186,6 +186,8 @@ class Component { | |||
* @return {Object} A NEW object of this.options_ and obj merged | |||
*/ | |||
options(obj) { | |||
log.warn('this.options() has been deprecated and will be moved to the constructor in 6.0'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to consider bringing in util-deprecate so warnings are only logged once. Not required for this PR.
@@ -76,11 +77,15 @@ class PlaybackRateMenuButton extends MenuButton { | |||
this.player().playbackRate(newRate); | |||
} | |||
|
|||
playbackRates() { | |||
return (this.options_.playerOptions && this.options_.playerOptions['playbackRates']) || this.options_['playbackRates']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: reverse this
A few small notes but this looks good to me. |
Component#options()
parentOptions
parentOptions
fromthis.options_
throughout tests / code base