-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
getVideoData is not a function #709
Comments
Yep ! I faced similar situation and i am able to see YouTube Iframe API has removed that function from their list. Not able to see in their deprecation list though :( |
Well, it seemed to be an undocumented function which is why they can do as they please without any warning and anytime to roll. |
I can confirm the issue with youtube videos |
Same thing as of today for me:
|
facing the same issue in production. For now applied a check for that function in my forked repo. |
the same for me since yesterday :( |
I have the same problem. How can I fix it? |
@jayprakash1 after the fix, does it work with youtube videos? |
That's the same fix I suggested. Check if the function is available before using it, should be pretty safe but I'm unsure if that's what @sampotts would want |
Yes. Checking function against |
me too |
please how to apply this fix and does it work with YouTube videos? |
@arrowthemes this fix jayprakash1@b336379 worked for me |
Sorry fellas, update to v2.0.18 and you should be all good 👍 https://github.com/sampotts/plyr/blob/master/src/js/plyr.js#L1771 |
Thanks heaps! |
@sampotts awesome bro it works |
Excellent. Sorry about the issue. |
@sampotts thanks again... |
Thanks for the quick fix - with holiday around the corner it's unfortunate Google felt the need to make this change without advance communication to the community regardless of it being undocumented. Let's hope we don't see anymore surprises over the next few months. |
I've been recently observing a really high number of errors that are happening on our pages and all are within the lines of the following:
Doing a bit of Google search I found the link you can see below which warns about
getVideoData
not being a supported function. I can't find it in the docs either. I guess YouTube is releasing a new API version and removing deprecated/unsupported functions yet I can't see it on my machine. I do have several reports though so, it's definitely an issue.I'd be happy to put time into making a PR with some fix. Let me know if you'd like that.
A quick workaround would be to do a check if the function exists, and it's a function, before actually calling this. This would be beneficial especially if it starts affecting more people.
I've checked and there's no simple way to obtain the title from YouTube, not unless you have an API Key (unless I'm missing something).
Expected behavior
Plyr could try to play safer by checking if
getVideoData
is defined.Actual behavior
getVideoData
fails some times.Environment
N/A
Players affected:
Steps to reproduce
Get the video to load. Sometimes that error will pop up.
Relevant links
Bounteous-Inc/youtube-google-analytics#36
The text was updated successfully, but these errors were encountered: