Closed jmbronson closed 5 years ago
Hi, This error is well known and it is generated by Youtube. There's no way to fix it other than Youtube itself. The script is already managing the protocol setting the HTTPS for SSL sites and HTTP for the other. On the next release, the inclusion of the iframe-api script will be asynchronous as explained here: https://issuetracker.google.com/issues/35174286. That should solve the problem.
All the best, Matteo
I get this error with the player in my developer console: "Failed to execute ‘postMessage’ on ‘DOMWindow’: The target origin provided (‘https://www.youtube.com’) does not match the recipient window’s origin (‘’)."
1). Some responses on the internet said to change all references of the Youtube link to https:// (example below) but this caused even more errors. 2). Another response said to add origin: 'https://mysiteurl.com' to the players paramVars, this had no effect on the error.
To explain #1 above, an example would be line #1936 of jquery.mb.TYPlayer.js "if (vURL.indexOf("http") < 0) vURL = jQuery.mbYTPlayer.locationProtocol + "//www.youtube.com/watch?v=" + YTPlayer.opt.videoURL;"
changed to:
if (vURL.indexOf("http") < 0) vURL = jQuery.mbYTPlayer.locationProtocol + "https://www.youtube.com/watch?v=" + YTPlayer.opt.videoURL;
Please fix this issue! The script works wonderfully but I am big on web standards and making things compliant and error-free.
Thanks!