-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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(youtube-player): handle API interactions before API has loaded #18368
fix(youtube-player): handle API interactions before API has loaded #18368
Conversation
Currently if the user tries to interact with the API before the YouTube API has loaded (e.g. by calling `playVideo`) their method call will be ignored. These changes add some logic that will store the state and replay it once the player has been initialized. Fixes angular#18279.
@crisbeto - thank-you for jumping in and helping with this issue... Your PR did however give me insight into what was going on. Is there any reason we wouldn't just move the ready event to be triggered by the playerObs?
and of course remove the current trigger for ready...
|
I'm not the one that set up the component initially so I don't have all the context, but I think that it's written this way, because we bind to the |
From the point of view of a external component, I consider the component to be ready when I can interact with the player... I can see it's coming from the iFrame player, but I'm not entirely sure what the current ready event gives me as I can't yet interact with the player. Perhaps two events would be the right solution? onIFramePlayerReadyEvent, and onReady? |
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
…ngular#18368) Currently if the user tries to interact with the API before the YouTube API has loaded (e.g. by calling `playVideo`) their method call will be ignored. These changes add some logic that will store the state and replay it once the player has been initialized. Fixes angular#18279.
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. |
Currently if the user tries to interact with the API before the YouTube API has loaded (e.g. by calling
playVideo
) their method call will be ignored. These changes add some logic that will store the state and replay it once the player has been initialized.Fixes #18279.