-
Notifications
You must be signed in to change notification settings - Fork 986
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
Youtube iframe embed: Uncaught ReferenceError: yt is not defined #151
Comments
What browsers is this in? IE?— On Tue, Dec 31, 2013 at 6:11 AM, hammertimedk [email protected]
|
Sry - Chrome - Ive edited the issue with a bit more info :-)
|
Same problem here. In IE 11 and chrome v33.0.17. It seems to be working ok in FF. Cheers, |
Any YouTube video on IE11 and Chrome 33? Example? |
Hey davatron5000, Cheers, |
I'm seeng this happen sporadically as well so that fits with what gubagu reports. |
If anyone can get a reproducible reduced test case for this, I'll buy you a beer. I've seen it happen but haven't been able to diagnose. Seems irregular and catastrophic. Here are all the possible explanations:
If it's the last one, we could just require a better version of jQuery. |
Having a similar issue here, embeds on our homepage are acting very sporadically in Chrome (Windows 8). Sometimes they'll work fine, other times it just loads a blank screen, other times there's no content at all. |
@ian12sm Blank screen? Hmmmm... It looks like you haven't upgraded to |
Will give these a try and come back with the results, thanks! |
Could it be because the iframe sometimes hasn't loaded fully, and our call to fitVids is done on documentready? Maybe $(window).load(...) helps. Experienced it once, first time I loaded my own page. No more... |
@bornemix |
I'm having a similar problem with YouTube embedded in a Bootstrap Modal window. It had been fine and then today, it started giving 'ytcfg is not defined' errors on page load, and on running the video. Using Chrome with Win8.1. |
I'm seeing this js error pop up sporadically (Chrome) and it's triggered by the line
I'm guessing this is when Fitvids wraps my iframe in some responsive magic, and the element then gets recreated on the page, or something like that? In any case, the only reference to this specific error I found online was: https://userscripts.org/topics/124302 - but that doesn't seem right as Fitvids doesn't seem to be referencing the yt variable/object in any way (neither does my code) - so I'm tempted to think this is a bug in Youtube's own js. Can't be sure though.
Here you can see it live (dev. site): http://skovstable.nes64.hammerti.me/
As mentioned, the error is sporadic and shows up rather randomly, so I'm also suspecting it has something to do with network/order of execution somewhere, which makes it even harder to pinpoint.
Anyhoo, here's hoping you've seen this before and know what this is all about :)
EDIT: Looked a bit closer and once Fitvids has done its thang, the iframe is loaded a second time (which makes sense). I'm thinking that sometimes, for some reason, the Youtube JS which the iframe contents depends on then sometimes doesn't get loaded/executed properly. Which may be a browser quirk, network problem at Youtube or simply crappy Youtube JS. Which basically means that Fitvids isn't responsible as such, except if there might be a way of wrapping the iframe with the Fitvids magic and not have the browser load the iframe twice?
The text was updated successfully, but these errors were encountered: