-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat(youtube-player): Add width and height as inputs #16734
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
Conversation
74a3bdb
to
995d47e
Compare
heightObs: Observable<number> | ||
) { | ||
return combineLatest(playerObs, widthObs, heightObs) | ||
.subscribe(([player, width, height]) => player && player.setSize(width, height)); |
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.
Any reason not to just call setSize
in ngOnChanges
without the streams?
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.
Width and height are needed for the constructor of the player as well, and I think a stream fits better when managing the player initialization. I could use ngOnChanges for the setSize call, but that won't eliminate the streams entirely, so I think it'll just add complexity if we have two different means of monitoring changes on the same value.
995d47e
to
33a6e16
Compare
This PR is ready for review. |
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.
LGTM
Looks like there'a a build error on CI |
33a6e16
to
22d6fcc
Compare
PR is ready for review (I fixed the build errors). |
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.
LGTM
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
No description provided.