fix: upgrade vimeo-video-element to 1.7.2 to support referrer policy (fixes #2029)#2039
Open
tonynguyenit18 wants to merge 1 commit into
Open
fix: upgrade vimeo-video-element to 1.7.2 to support referrer policy (fixes #2029)#2039tonynguyenit18 wants to merge 1 commit into
tonynguyenit18 wants to merge 1 commit into
Conversation
Vimeo videos configured with domain-level privacy (whitelist) settings fail to play with "Sorry. Because of its privacy settings, this video cannot be played here." when the page has a restrictive referrer policy. vimeo-video-element 1.7.2 adds `referrerpolicy` prop support on the underlying iframe (muxinc/media-elements#209), so users can now pass: config={{ vimeo: { referrerpolicy: 'strict-origin-when-cross-origin' } }} Fixes cookpete#2029
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
vimeo-video-elementfrom^1.6.1to^1.7.2Root cause
When a page sets a restrictive referrer policy (e.g.
<meta name="referrer" content="no-referrer">), the browser omits the origin from requests. Vimeo's domain-whitelist check then rejects the embed because it can't verify the referring domain.The fix lives upstream in
vimeo-video-element: PR muxinc/media-elements#209 added areferrerpolicyprop that is applied directly to the underlying iframe. This was released invimeo-video-element@1.7.1/1.7.2(see muxinc/media-elements#207).Usage (after this fix)
Users experiencing domain-whitelist errors can now pass:
The
referrerpolicyprop is fully typed viaVimeoVideoElement['config']— no type definition changes needed in react-player itself.Test plan
npm installresolves tovimeo-video-element@1.7.2with no peer-dependency conflictsnpm run build(TypeScript + ESM) passes cleanlynpm test— existing failures are pre-existing Node 24 /navigatorgetter incompatibility, unrelated to this change (reproducible onmasterwithout this diff)