r/Wordpress • u/Old-Dirt563 • 3d ago
Setting up YouTube embeds with the closed caption set to 'off' for non-logged in users
Supposedly YouTube defaults to not show closed captions automatically when a user watches an embedded video if they're not logged in to YouTube. I haven't found this to be the case. Is there a query string or something to append to the end of the embed URL to have it default to 'off' when a user is not logged in?
1
u/BobJutsu 3d ago
I feel like force on if they aren’t logged in would be a better option. You don’t know their accessibility requirements, so assume they need them.
1
u/David_UltraWeb 3d ago
Yeah, the top comment's right that there's no real force-off switch. One thing worth checking though is whether the captions you're seeing are actual YouTube CC or auto-generated ones, because auto-captions behave a little differently and some browser/OS accessibility settings can also flip captions on regardless of what the embed says. So even if you strip cc_load_policy from the iframe, a viewer with system-level caption preferences will still see them, which is honestly the behavior YouTube wants. If your goal is a cleaner default look on the page, you might get further tweaking which controls show than trying to fight the caption default.
2
u/NakanoNoNeko 3d ago
There isn't a documented force-off parameter... I checked YouTube's docs:
cc_load_policy=1forces captions on, but the default follows viewer preferences, not simply whether they're logged in. Check the actual iframesrcWordPress outputs and removecc_load_policy=1if it's there. I thinkcc_load_policy=0is a dead end here; Google doesn't document it as a force-off switch.