Hide YouTube player for custom songs

Skip YouTube attribution and player in both the song selector preview
and the game page when playing a custom (non-YouTube) track.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
main
name 2026-04-15 16:10:03 +00:00
parent 2a1f187c1b
commit f58e396a22
2 changed files with 10 additions and 6 deletions

View File

@ -88,9 +88,11 @@ export function SongSelectScreen() {
difficulty={activeSong.difficulty}
/>
<YouTubeAttribution>
<div ref={ytPreviewRef} className="song-select-screen__yt-preview" />
</YouTubeAttribution>
{!activeSong.isCustom && (
<YouTubeAttribution>
<div ref={ytPreviewRef} className="song-select-screen__yt-preview" />
</YouTubeAttribution>
)}
<div className="song-select-screen__content">
<header className="song-select-screen__header">

View File

@ -256,9 +256,11 @@ export function GamePage() {
<canvas ref={arCanvasRef} className="ar-overlay" />
{/* YouTube video player (visible to comply with YT ToS) */}
<YouTubeAttribution>
<div ref={ytHostRef} className={styles.ytPlayer} />
</YouTubeAttribution>
{!resolvedSong.isCustom && (
<YouTubeAttribution>
<div ref={ytHostRef} className={styles.ytPlayer} />
</YouTubeAttribution>
)}
{(calibrationStatus === 'framing') && (
<div className="framing-line" />