Skip to content

Conversation

@bc-alexsaiannyi
Copy link
Contributor

@bc-alexsaiannyi bc-alexsaiannyi commented Jan 20, 2026

What?

This PR fixes YouTube video playback failures in Safari on Product pages.

Why?

YouTube videos failed to load in Safari (Error 153) due to missing the Referer header. We fixed this by setting referrerpolicy before the iframe's first request. However, lazy loading means src is only set when the video enters the viewport—by then Safari may have already processed the iframe without respecting the policy. To ensure the policy is respected from the begining, we bypass lazy loading in Safari by setting src directly after referrerpolicy, while other browsers continue using data-src for lazy loading.

Requirements

  • CHANGELOG.md entry added (required for code changes only)

Tickets / Documentation

Screenshots (if appropriate)

Before

before_fix.mov

After

after_fix.mov

@bc-alexsaiannyi bc-alexsaiannyi marked this pull request as ready for review January 20, 2026 14:40
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: faf3925a6e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants