-
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
bug(Angular Youtube player: Getting YT is undefined in Pause video function #29030
Comments
It looks like that error is surfaced directly from the YouTube API. It's certainly odd that is cannot be reproduced either on your end. Its interesting you are only seeing an error like this on pause and not on initialization or play, so I doubt things are getting filtered out otherwise it would have failed before. Is this happening consistently for users who are seeing it? |
@amysorto Hi Amy, I have checked our logs and it happens mostly for 2 users, but one of the users triggers 90% of this error over the last 3 months, like every week. |
Random thought: could it be something like an ad blocker that is blocking the Youtube script? |
@crisbeto yes, that could very well be the case. I just want to make sure I look at all angles. |
…e API has been loaded Fixes a couple of issues: 1. We were using the `PlayerState` enum before the API has been loaded which will cause a runtime error because the enum is usually read off the `window`. 2. Fixes that calling the `playVideo` method wasn't load the YouTube API. Fixes angular#29030.
…e API has been loaded (#29127) Fixes a couple of issues: 1. We were using the `PlayerState` enum before the API has been loaded which will cause a runtime error because the enum is usually read off the `window`. 2. Fixes that calling the `playVideo` method wasn't load the YouTube API. Fixes #29030.
…e API has been loaded (#29127) Fixes a couple of issues: 1. We were using the `PlayerState` enum before the API has been loaded which will cause a runtime error because the enum is usually read off the `window`. 2. Fixes that calling the `playVideo` method wasn't load the YouTube API. Fixes #29030. (cherry picked from commit 883466e)
@crisbeto Does this mean using the latest version of this component or is the fix happening in youtube source code? |
And thank you for picking this up |
It should be fixed when you update |
@crisbeto Is this error related to the fix that was done?
We are gettting some of those messages since I upgrade to latest Angular Youtube component. |
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. |
Is this a regression?
The previous version in which this bug was not present was
No response
Description
For one of our clients we see a lot of errors like
YT is not definedReferenceError: YT is not defined
.When I check the source of the error, it is happening in
YT is not available somehow.
I haven;t been able to reproduce this error so I don't know if it is a firewall related issue, that some youtube code gets flittered out?
Reproduction
I can't reproduce this issue in Stackblitz because it is an internal source code issue.
the Code I use for using the player is:
Expected Behavior
No error when pausing video
Actual Behavior
Throwing YT is undefined error
Environment
The text was updated successfully, but these errors were encountered: