• Josh

    (@josh-stopper)


    Hi Support

    We are experiencing an issue where the dirty check in the plugin javascript file is not working due to the window.YT.loaded property always returning undefined. In testing in chrome using overrides, changing the window.YT.loaded check to windows.YT.Player resulted in the yotuwp.init function being called.

    This issue manifests when the Youtube iFrame API is already injected in the page, and when the window.onYouTubeIframeAPIReady event has been missed.

    An example of the working code is:

    var yotu_check = setInterval(function() {
    console.log(window.YT.Player);
    if (typeof window.YT !== 'undefined' && window.YT.Player) {
    if (!yotuwp.ready)
    yotuwp.init()
    }
    }, 10);
  • You must be logged in to reply to this topic.