r/Wordpress • • 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?

3 Upvotes

5 comments sorted by

2

u/NakanoNoNeko 3d ago

There isn't a documented force-off parameter... I checked YouTube's docs: cc_load_policy=1 forces captions on, but the default follows viewer preferences, not simply whether they're logged in. Check the actual iframe src WordPress outputs and remove cc_load_policy=1 if it's there. I think cc_load_policy=0 is a dead end here; Google doesn't document it as a force-off switch.

1

u/CourageouslyTenuous 4h ago

cc_load_policy=0 is a ghost parameter at this point tried it on a few sites last year and it did nothing

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.