Youtube IFrame API stopped working in WordPress 3.9.1

Few months ago both the Youtube Iframe Api and audio/video was working . However after updating my worpress to 3.9.1 which has better audio and video plugin i decided to use the plugin instead of my own html5 player code. But doing this the youtube api stop working. the only solution i can think of is to embed my html5 player through Iframe and displayed it at frontend. my site is here if you scroll down you will see the player from another page through iframe.

== Thinking ==
this the code that load the api

Read More
<script>
     if (!window['YT']) {var YT = {loading: 0,loaded: 0};}if (!window['YTConfig']) {var YTConfig = {'host': 'http://www.youtube.com'};}if (!YT.loading) {YT.loading = 1;(function(){var l = [];YT.ready = function(f) {if (YT.loaded) {f();} else {l.push(f);}};window.onYTReady = function() {YT.loaded = 1;for (var i = 0; i < l.length; i++) {try {l[i]();} catch (e) {}}};YT.setConfig = function(c) {for (var k in c) {if (c.hasOwnProperty(k)) {YTConfig[k] = c[k];}}};var a = document.createElement('script');a.id = 'www-widgetapi-script';a.src = 'https:' + '//s.ytimg.com/yts/jsbin/www-widgetapi-vflHmEgKs.js';a.async = true;var b = document.getElementsByTagName('script')[0];b.parentNode.insertBefore(a, b);})();}

</script>

I am wondering if this line : a.async = true; is the issue?

Any thought?

Related posts

Leave a Reply