vue-youtube: Failed to execute 'postMessage' on 'DOMWindow'

Embedding video to the page causes this error in the console: Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://www.youtube.com') does not match the recipient window's origin (*host name*)

You can even see this error in the console on the demo page of the plugin.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 7
  • Comments: 17 (4 by maintainers)

Most upvoted comments

@Demy , Turn off AdBlock

Literally the dumbest comment made in Github. Turning off adblock does ABSOLUTELY NOTHING. Knowing that, I turned off Adblock anyways, and confirmed that it did ABSOLUTELY nothing. This is a place for developers, not dickheads, so get a life and get the f**k out of here.

@TheJadeEmperor for your information, I had the same problem and before I posted it I checked multiply times that turning off AdBlock solved issue, but later, for some reason the issue came back.

This is a place for developers, not dickheads

Fully agree

so get a life

Already done

and get the f**k out of here.

I will choose myself where I would like to be. When I need anyone’s advice I will ask for that somewhere else, because This is a place for developers, not dickheads

@Demy , Turn off AdBlock. Does not work any more. 😕

@anteriovieira ,this is still happening for me on 1.4.0 as well, unfortunately. Both locally in development and on a production server with SSL.

Can anyone check the next:

    <youtube
      ref="youtube"
      ...
      :player-vars="playerVars"
    />

    playerVars: {
      ...
      origin: window.location.origin // or http(S)://your.domain.com
    }

Taken from here.