-
-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to execute postMessage on DOMWindow #66
Comments
Answer to myself and those who will face it. Autoplay will not work. Play right after a load will not work. this._player = new YTPlayer('#player', {
width: '100%',
height: '100%',
autoplay: true,
caption: false,
controls: false,
keyboard: false,
fullscreen: true,
annotations: false,
modestBranding: true,
related: false,
mute: 1,
host: 'https://www.youtube-nocookie.com',
showInfo: false,
origin: 'https://www.soniawiederatherton.com'
})
this._player.mute()
this._player.load(this._YTVideoID)
this._player.play() However, if you mute the sound before playing the video, you'll be ok. I still don't know why we get a Source: https://developers.google.com/web/updates/2017/09/autoplay-policy-changes |
The previous solutions for autoplay did not work for me but I eventually found a solution that did. Instead of turning on autoplay on YTPlayer, specify it on load. Source: Read the docs |
Was there ever a solution to this, I keep getting these error messages over and over |
Hi !
The following error keeps showing up constantly for a few days.
window.location.origin
)Tested on Chrome, Firefox and Safari.
The code is as follow:
Did I miss something?
The text was updated successfully, but these errors were encountered: