Anyone else have problems with Swiftype embed code causing wierd behavior with Youtube Iframe API?

99 Views Asked by At

I have been having problems with my youtube iframe YT.player triggering the onReady callback twice. It took me about a week to find the source of the problem. All I know is there is some sort of bug when I use Swiftype embed code with the youtube iframe api. Has anyone out there run into this problem?

As soon as I remove my swiftype embed code the onReady only fires once like it is supposed to.

This is what I mean by Swiftype Embed Code

<script type="text/javascript">
(function(w,d,t,u,n,s,e){w['SwiftypeObject']=n;w[n]=w[n]||function(){
    (w[n].q=w[n].q||[]).push(arguments);};s=d.createElement(t);
    e=d.getElementsByTagName(t)    [0];s.async=1;s.src=u;e.parentNode.insertBefore(s,e);
})(window,document,'script','//s.swiftypecdn.com/install/v1/st.js','_st');
    _st('install','YOUR_INSTALL_KEY');
</script>
0

There are 0 best solutions below