youtube - Where can I find the latest /jsbin/www-widgetapi file? -
i'm loading youtube api so:
$(function () { // code trigger onyoutubeplayerapiready $('<script>', { src: 'https://s.ytimg.com/yts/jsbin/www-widgetapi-vflwt8qcf.js', async: true }).insertbefore($('script:first')); });
i looking @ youtube demo page, https://developers.google.com/youtube/youtube_player_demo, , noticed in source using different url load widget api:
<script src="https://s.ytimg.com/yts/jsbin/www-widgetapi-vfl4qcmf3.js" async></script>
i thought might more up-to-date version of api. so, swapped out, receive error message:
uncaught referenceerror: ytconfig not defined
i'm left wondering of these correct location, if either, loading date widgetapi data from. there location info?
to latest api version suggest use example yt reference:
var tag = document.createelement('script'); tag.src = "https://www.youtube.com/iframe_api"; var firstscripttag = document.getelementsbytagname('script')[0]; firstscripttag.parentnode.insertbefore(tag, firstscripttag);
this'll make sure latest version being loaded
if need grab latest version reason check url:
https://www.youtube.com/iframe_api
and source code
Comments
Post a Comment