-
Notifications
You must be signed in to change notification settings - Fork 134
Description
All embedded YouTube videos on the Eventyay Video component currently fail to load and display “Error 153” in the YouTube player.
The issue occurs across multiple videos, browsers, and events — suggesting a site-level configuration or embed integration error, not individual video settings.
Steps to Reproduce
-
Open any event session on Eventyay that includes a YouTube embed.
-
Observe that the video fails to load, showing the YouTube player error message:
“An error occurred. Please try again later. (Playback ID … | Error 153)”
-
Open the same video directly on YouTube — it plays normally.
Expected Behavior
- Embedded YouTube videos should play correctly within the Eventyay Video interface.
- No playback errors for valid, public, or unlisted YouTube videos.
Observed Behavior
- All YouTube videos embedded on Eventyay Video pages fail with Error 153.
- Works fine when opened directly on YouTube.
- Affects both logged-in and logged-out users.
Likely Cause
Since the issue affects all embedded YouTube videos, it is most likely caused by one or more of the following:
-
Overly restrictive
Content-Security-Policy(CSP)- Missing permissions for
frame-src https://www.youtube.com https://www.youtube-nocookie.com; - Missing
script-srcforwww.youtube.comorwww.gstatic.com.
- Missing permissions for
-
Incorrect or missing
originparameter when usingenablejsapi=1- YouTube’s embed API requires an
originmatching the exact eventyay domain (https://wikimedia.eventyay.comorhttps://eventyay.com). - Mismatch or missing parameter can cause HTTP 4xx/403 rejections internally.
- YouTube’s embed API requires an
-
Strict
Referrer-Policyor proxy header misconfiguration- A
Referrer-Policy: no-referreror incorrectX-Forwarded-Proto(HTTP instead of HTTPS) may block YouTube requests.
- A
-
Iframe sandbox or permission issues
- A
<iframe sandbox>tag without sufficient permissions (e.g. missingallow-scriptsorallow-same-origin) prevents the player from running.
- A
Suggested Fixes
✅ Update Embed Code
Use the canonical secure embed form:
<iframe
src="https://www.youtube.com/embed/VIDEO_ID?rel=0&modestbranding=1&enablejsapi=1&origin=https://wikimedia.eventyay.com"
title="YouTube video player"
allow="autoplay; encrypted-media; picture-in-picture; fullscreen"
allowfullscreen
loading="lazy">
</iframe>✅ Check Site Headers
-
Ensure CSP allows required sources:
frame-src https://www.youtube.com https://www.youtube-nocookie.com; script-src 'self' https://www.youtube.com https://www.gstatic.com; img-src 'self' data: https://i.ytimg.com https://*.ggpht.com; -
Ensure
Referrer-Policy: strict-origin-when-cross-origin(notno-referrer). -
Confirm
X-Forwarded-Proto: httpsif behind reverse proxy.
✅ Relax Iframe Sandbox if Used
If sandbox is required, include:
sandbox="allow-scripts allow-same-origin allow-popups allow-presentation"
Testing Checklist
- Verify YouTube videos load in Chrome, Firefox, and Safari.
- Confirm playback works for both public and unlisted videos.
- Test both logged-in and guest sessions.
- Check network console for blocked requests or CSP violations.
- Validate player API messages and iframe attributes.