Status Update
Comments
el...@google.com <el...@google.com> #2
This issue is acknowledged. Kindly give us some to look into your concern. Thanks
el...@google.com <el...@google.com> #3
Hi,
From the error you're seeing it looks like this is an issue with the target origin being https. You would need to change the url of the file you are trying to embed to https.
Kindly try to change it from https to http.
Check this SO link below:
Thanks!
as...@gmail.com <as...@gmail.com> #4
I believe your reply isn't consistent.
You wrote:
You would need to change the url of the file you are trying to embed to https.
And also:
Kindly try to change it from https to http.
Which one should it be?
Anyway, I've tried them both, and the issue remains with both.
When removing either loading="lazy" or enablejsapi there are no console errors.
From this fact, it can be concluded the issue isn't with the URL.
The issue is with loading="lazy" and enablejsapi not working properly together. They should work together, as they are both essential. For this reason, I opened the ticket.
I've read every related Stack Overflow question before opening this issue.
el...@google.com <el...@google.com> #5
Oops. Apologies, as simple typographical error means a lot in my previous comment regarding https and http.
Nonetheless, I'll escalate this issue to our internal team, and I'll get back to you whenever there's an update. I'm afraid I can't give you specific dates or timeline when this might be prioritized. Rest assured that I am closely monitoring this issue.
Thanks!
as...@gmail.com <as...@gmail.com> #6
el...@google.com <el...@google.com>
as...@gmail.com <as...@gmail.com> #7
It can be reproduced.
How did you try to reproduce it?
Description
*** Please don't be quick to mark the issue as "Won't fix (Not reproducible)". It is reproducible ***
*** The issue relates to the YouTube IFrame Player API, so I do believe it is relevant for this channel. If not, please direct me to the relevant channel ***
Summary of the issue:
- When the enablejsapi parameter and the loading="lazy" attribute are being used together, error consoles are showing up (repeatedly).
- The error: Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('
Further information:
- This is an example of a URL I'm using:
- The video IS loading. But I'm afraid the repeated console error indicates or can cause an issue, especially as they can repeat hundreds and thousands of times
- The origin is explicitly set both with the "origin", and "widget_referrer" parameters
- The error comes from: www-widgetapi.js:1244
- The video is embedded in a WordPress page
- Multiple videos are embedded in the page
- The videos are below the fold
- If one of the two, enablejsapi or loading="lazy", are removed
- the console errors stop showing up
- When trying to reproduce the issue, please make sure the sandbox is connected to a GA4 property, and tracking is enabled. Otherwise, the JS API won't trigger and the issue won't show up
- There are multiple reports for this issue out there, so please don't be quick to dismiss it
Please, make sure you understand the issue before closing it.
If something isn't clear, please ask me before closing the issue.