[wp-trac] [WordPress Trac] #44610: Allow Youtube-Player to use youtube-nocookie.com URLS to avoid setting cookies.

WordPress Trac noreply at wordpress.org
Fri Feb 28 12:33:14 UTC 2025


#44610: Allow Youtube-Player to use youtube-nocookie.com URLS to avoid setting
cookies.
-------------------------+-----------------------
 Reporter:  jepperask    |       Owner:  audrasjb
     Type:  enhancement  |      Status:  reopened
 Priority:  normal       |   Milestone:  6.8
Component:  Embeds       |     Version:  4.9.7
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |     Focuses:  privacy
-------------------------+-----------------------
Changes (by swissspidy):

 * keywords:  has-patch => needs-patch
 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 @audrasjb I'm actually having trouble understanding [59883] at all. Has
 this actually been tested?

 Basically what this change does/means:

 When someone goes great lengths to extract the `https://www.youtube-
 nocookie.com/embed/...` URL from the `<iframe>` embed code YouTube gives
 you (who does that?) and paste that into WordPress, WordPress on the
 server will now pass the URL to the oEmbed endpoint at
 `https://www.youtube.com/oembed` to get an embed code for that video.

 Normally you'd do this with normal video URLs, e.g.
 `https://www.youtube.com/oembed?format=json&url=https://www.youtube.com/watch?v=1iG0x_HpPKc`,
 or maybe with a YouTube Shorts video like
 `https://www.youtube.com/oembed?format=json&url=https://www.youtube.com/shorts/crP2RHf0BcQ`.
 Then WordPress will get back the `<iframe>` embed code to embed the video.

 But those `https://www.youtube-nocookie.com/embed/...` URLs the oEmbed
 endpoint actually doesn't support. So you will get a 404 and no embed code
 and nothing will be embedded.

 Please correct me if I'm wrong, but this change doesn't actually work at
 all. It doesn't do anything and should get reverted.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44610#comment:82>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list