docs(embeds): SoundCloud short links already embed via og:url (#200)
CI / Build & Quality Checks (push) Successful in 4m47s
CI / Docker image build & smoke test (push) Skipped
CI / Secret scan (gitleaks) (push) Successful in 17s
CI / Trigger Desktop Build (push) Successful in 6s
CI / Playwright smoke (e2e) (push) Canceled after 4m39s

The comment said on.soundcloud.com links need an oEmbed round-trip. They
don't: Synapse follows the redirect for the preview and the og:url
fallback re-parses the canonical track URL. Checked with a real short
link (the play facade loads the w.soundcloud player).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
This commit is contained in:
Lotus CI
2026-09-23 22:09:34 -04:00
co-authored by Claude Opus 5.5
parent 146ba4d2ff
commit 76929a8763
+5 -3
View File
@@ -363,9 +363,11 @@ const SOUNDCLOUD_PROFILE_TABS = new Set([
export function isSoundCloudTrack(url: string): boolean {
try {
const { hostname, pathname } = new URL(url);
// NOTE: on.soundcloud.com short links are NOT handled here the w.soundcloud
// widget resolver doesn't follow the redirect; supporting them needs an oEmbed
// round-trip (soundcloud.com/oembed is CORS-enabled) to get the canonical URL.
// on.soundcloud.com short links are not matched here (the w.soundcloud widget
// doesn't follow the redirect), but they still embed: Synapse follows the
// redirect when building the preview, and UrlPreviewCard's og:url fallback
// re-parses the canonical soundcloud.com/<artist>/<track> URL (verified with
// a real short link, Gitea #200).
if (hostname.replace(/^www\./, '') !== 'soundcloud.com') return false;
// /<artist>/<track|sets/set> — at least two segments, not a bare profile
const parts = pathname