feat(embeds): fullscreen, wider cards, Instagram/Tidal/Reddit; fix TikTok/X/Twitch
Feedback fixes + new platforms: - Fullscreen: add a universal 'Fullscreen' button on video embeds (requests fullscreen on the media container) so Shorts/TikTok/etc. can go fullscreen regardless of each player's own controls. Portrait media enlarged (220->300). - Drop the iframe sandbox (CSP-allowlisted trusted hosts; sandbox was breaking player features and likely TikTok). - Wider, responsive embed/tweet cards (min(34rem,92vw)) so Twitch player chrome isn't cramped and X posts stop getting clipped. - Instagram (p/reel/tv), Tidal (track/album/playlist/video), and Reddit posts now embed. Reddit uses redditmedia.com to bypass the homeserver's blocked preview (Reddit serves it a bot-check 'please wait for verification' page); a bot-wall title filter keeps that garbage out of any caption. New pure parsers unit-tested (videoEmbed.test.ts, 17 cases). Desktop + live web CSP frame-src updated for instagram.com, embed.tidal.com, redditmedia.com. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,13 @@ export const UrlPreview = style([
|
||||
},
|
||||
]);
|
||||
|
||||
// Wider, responsive card for interactive embeds (video players, tweets, posts)
|
||||
// so the player chrome / tweet content isn't cramped or clipped. Defined after
|
||||
// UrlPreview so its width wins the cascade.
|
||||
export const UrlPreviewWide = style({
|
||||
width: 'min(34rem, 92vw)',
|
||||
});
|
||||
|
||||
export const UrlPreviewImg = style([
|
||||
DefaultReset,
|
||||
{
|
||||
@@ -209,6 +216,9 @@ export const EmbedMediaLandscape = style([
|
||||
aspectRatio: '16 / 9',
|
||||
overflow: 'hidden',
|
||||
backgroundColor: color.Surface.Container,
|
||||
selectors: {
|
||||
'&:fullscreen': { width: '100vw', height: '100vh', aspectRatio: 'auto' },
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
@@ -216,12 +226,15 @@ export const EmbedMediaPortrait = style([
|
||||
DefaultReset,
|
||||
{
|
||||
position: 'relative',
|
||||
width: toRem(220),
|
||||
width: toRem(300),
|
||||
maxWidth: '100%',
|
||||
aspectRatio: '9 / 16',
|
||||
margin: '0 auto',
|
||||
overflow: 'hidden',
|
||||
backgroundColor: color.Surface.Container,
|
||||
selectors: {
|
||||
'&:fullscreen': { width: '100vw', height: '100vh', aspectRatio: 'auto', margin: 0 },
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
@@ -430,6 +443,16 @@ export const BadgeAppleMusic = style({
|
||||
color: '#ffffff',
|
||||
});
|
||||
|
||||
export const BadgeInstagram = style({
|
||||
backgroundColor: '#e1306c',
|
||||
color: '#ffffff',
|
||||
});
|
||||
|
||||
export const BadgeTidal = style({
|
||||
backgroundColor: '#000000',
|
||||
color: '#ffffff',
|
||||
});
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Twitch LIVE badge
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user