# Music section

Purpose: Give a site one place where people share music by pasting a link, and where others browse and play what was shared, while every track stays an ordinary thread.
Scenario: The `mitrapclub` profile sets `musicSection`. A visitor taps Music in the nav (after Gallery), pastes a YouTube, Spotify, SoundCloud, Bandcamp or TikTok link into the box at the top of `/music/` (the Board's one-line composer, which grows on focus) and taps Post. The track is a thread tagged `music`, signed or as guest like any post, and they land back on `/music/` with it first. Each row shows the title, who shared it, and the link's player, collapsed until tapped. A track shared without a title gets the provider's title, fetched when its row or thread is viewed.
Sources: [controller](../../src/ForumRewrite/Http/MusicPageController.php), [template](../../templates/pages/music.php), [row player slot](../../templates/partials/thread_row.php) (`rowPlayer`), [title beacon](../../templates/partials/media_embed_warm_beacon.php), [title fetchers](../../src/ForumRewrite/View/OembedTitleFetcher.php) and [preview controller](../../src/ForumRewrite/Http/MediaEmbedPreviewController.php), [site profiles](../../src/ForumRewrite/SiteProfileRegistry.php) (`musicSection`), [share return](../../src/ForumRewrite/Http/ComposeAndAccountKeyController.php) (`resolveComposeThreadReturnTo`), [tests](../../tests/MusicPageTest.php), [browser check](../../tests/browser/music_share.mjs), [plans](../plans/mitrapclub_music/mitrapclub_music_step3_development_plan.md).

Boundary: membership is the tag, exactly as `/tags/music` lists it ([tag browsing](tag_browsing.md)); a video that isn't tagged stays off the page, and removing the tag or retracting the thread takes a track off. Tracks still show on the Board and in Recent. The page renders live, the same HTML for every viewer, and reading, paging and sharing work without JavaScript. Players follow the media embed flags and never autoplay. A fetched title fills only an empty subject, through the same cache and one-hour retry as YouTube's; a failed fetch leaves the link as the title. By default a title is fetched only when the post is just the link; `FORUM_MEDIA_EMBEDS_FIRST_LINE_TITLES_ENABLED` also accepts a link alone on the first line followed by a note. A row shows the post's first line only, so such a note shows on the thread page. Sites without `musicSection` answer 404 at `/music/` and have no Music nav item.
