0
Why does the youtube api_iframe not work?
I have the code from this side: https://codepen.io/imelgrat/pen/MrZRPe?editors=1000 there it works fine put not in my Visual studion and not here has anyone an idea https://code.sololearn.com/WAx3onbq09f4
8 odpowiedzi
+ 2
I'm including this so you can copy the onerror() function if you like.
https://code.sololearn.com/WY2xou48ucG4/?ref=app
+ 1
Well it looks like your trying to use jquery without having it loaded.
Copy and paste this code in the header.
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="https://jqueryui.com/resources/demos/style.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
+ 1
Well I found two things after looking at youtube api. First when it says tag.src you are saying https://youtube.com/iframe_api when it should be https://www.youtube.com/iframe_api. After that its just a matter of jquery trying to run before the page is loaded. I have a working version below.
https://code.sololearn.com/W0tqtyW204EI/#html
0
thanks:) there I was a bit blind
0
No problem! That's why you gotta ask questions
0
still not work hmm
0
thanks a lot for your help! it's so great if you struggling longer with a code and than you get hel:)