Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3718

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('') does not match the recipient window's origin ('')

$
0
0

I'm getting this error: Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('<URL>') does not match the recipient window's origin ('<URL>').

My page operates as I'd hoped (I don't notice any unwanted behavior), but I never like ignoring errors in my console, especially if I don't even understand the root cause.

My question is NOT A DUPLICATE because I've already studied all of these questions but none of the answers worked:

I'm already using https.

I've already tried setting playerVars to {origin: window.location.origin}.

I've already tried setting host.

I've already tried changing the visibility of the iframe.

And so on.

var playerVars = {origin: window.location.origin};//https://stackoverflow.com/a/50518247/470749window.onYouTubeIframeAPIReady = function () {    for (var i = 0; i < youtube.length; i++) {        var youtubeLazyEl = youtube[i];        var videoId = youtubeLazyEl.dataset.v;        players[videoId] = new YT.Player(videoId, {            videoId: videoId,            //host: 'https://www.youtube.com', //https://stackoverflow.com/a/47914456/470749            //playerVars: playerVars,        });    }};

Ideas?


Viewing all articles
Browse latest Browse all 3718

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>