feat(embeds): inline YouTube/Vimeo players + media-forward video tiles
Video link tiles (YouTube, Shorts, Vimeo) now play in place instead of only opening a browser tab. Adds a media-forward 16:9 (9:16 for Shorts) tile with a privacy-friendly click-to-play facade: the homeserver's cached og:image thumbnail + a play button, and only on click does it swap in the cookie-less youtube-nocookie / player.vimeo iframe — so nothing loads from Google/Vimeo until the user presses play. Gated by a new 'Inline Media Players' setting (default on); when off it falls back to a link that opens the video in a new tab. Also sources YouTube thumbnails from the homeserver og:image instead of img.youtube.com, which fixes the existing broken YouTube thumbnails on the web build (nginx img-src has no YouTube host) and removes the pre-click Google request. Pure URL parsing + embed-URL building moved to utils/videoEmbed.ts (unit-tested). Note: the desktop app's Tauri CSP frame-src must allow the video hosts (separate commit in cinny-desktop). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -182,6 +182,7 @@ export interface Settings {
|
||||
mediaAutoLoad: boolean;
|
||||
urlPreview: boolean;
|
||||
encUrlPreview: boolean;
|
||||
inlineMediaEmbeds: boolean;
|
||||
showHiddenEvents: boolean;
|
||||
// [MSC1763] Opt-in: permanently redact your OWN messages once a room's
|
||||
// retention window passes (default off — nothing auto-deletes by surprise).
|
||||
@@ -290,6 +291,7 @@ const defaultSettings: Settings = {
|
||||
mediaAutoLoad: true,
|
||||
urlPreview: true,
|
||||
encUrlPreview: true,
|
||||
inlineMediaEmbeds: true,
|
||||
showHiddenEvents: false,
|
||||
enforceRetentionLocally: false,
|
||||
legacyUsernameColor: false,
|
||||
|
||||
Reference in New Issue
Block a user