I am getting the following error in console shortly after my website loads:
Uncaught TypeError: this.f.isExternalMethodAvailable is not a function
~ Error from file: www-embed-player.js, line number: 669
Which is occurring inside the iframe generated by Youtube so I can't do much about it but wanted to know if this error can be fixed from my end.
I am using following JS code to inject youtube iframe tag in multiple places in DOM
$(this).append('<iframe width="100%" height="100%" src="https://www.youtube.com/embed/' + youtubeVideoID + '?&controls=0&enablejsapi=1&mute=1&theme=dark&autoplay=' + autoPlay + '&autohide=1&modestbranding=0&fs=0&playlist=' + youtubeVideoID + '&showinfo=0&rel=0&iv_load_policy=3&loop=1&playsinline=1" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>');
$(this).parent().find('iframe')[0].contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}', '*');
$(this).parent().find('iframe').eq(0).on('load', function () {
this.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}', '*');
});