You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
iframe allow list omits clipboard-write and web-share, breaking the player's Copy link / Share controls #331
This list omits clipboard-write and web-share. YouTube's in-player Copy link button (the chain-link icon shown when hovering a playing video) and the Share control call navigator.clipboard.writeText / navigator.share from inside the cross-origin youtube.com frame. Permissions Policy grants those features to a cross-origin frame only when the embedding <iframe> delegates them through its allow attribute, so both controls fail.
The player shows the toast "Unable to copy link to clipboard" and Chrome logs:
[Violation] Permissions policy violation: The Clipboard API has been blocked because of a permissions policy applied to the current document. See https://crbug.com/414348233 for more details.
YouTube's own embed snippet (Share → Embed on any video) uses:
Render <LiteYouTubeEmbed id="dQw4w9WgXcQ" title="Demo" /> and click to activate the player.
Hover the playing video so the top overlay appears, and click the chain-link Copy link icon at the bottom left.
Observe the "Unable to copy link to clipboard" toast and the Permissions Policy violation in the console.
Expected behavior
The video URL is copied to the clipboard, as it is with YouTube's default embed code.
Desktop
OS: Linux / Windows / macOS (any)
Browser: Chrome 140 (also applies to any browser enforcing Permissions Policy for clipboard-write)
Version: react-lite-youtube-embed 3.5.1 and 3.7.0
Additional context
There is currently no prop to customize the iframe allow attribute, so consumers cannot work around this without patching the package. Adding the two tokens to the hardcoded list matches YouTube's reference embed and is backward compatible. I have a PR ready.
Still relevant: the allow attribute on current main (137dc61) and in the latest release (3.7.0) still lacks clipboard-write and web-share, so the in-player Copy link button keeps failing with "Unable to copy link to clipboard".
The fix is ready in #332, rebased onto current main today.
Activity
github-actions commentedon Nov 18, 2026
👋 This issue has been automatically marked as stale because it has been inactive for 60 days.
It will be closed in 14 days if no further activity occurs.
If this issue is still relevant, please:
Thank you for your contributions! 🙏
kh-ruslan commentedon Nov 23, 2026
Still relevant: the
allowattribute on currentmain(137dc61) and in the latest release (3.7.0) still lacksclipboard-writeandweb-share, so the in-player Copy link button keeps failing with "Unable to copy link to clipboard".The fix is ready in #332, rebased onto current
maintoday.