Play the platform music on the shared Learn page too
Reversing yesterday's call at Karti's direction. The provider moves from Shell up above the router in App, so a share-code visitor gets the same character as a member rather than a silent page. The reason that is safe is the same reason "autoplay" was never really autoplay: the browser refuses audio until the page has had a real gesture, so nothing plays the instant a link opens — it starts once someone is actually using the page. The anonymous page renders OUTSIDE Shell and therefore has no app header, so the mute control is added to its own chrome. Music with no way to stop it is the worst version of this feature, and a visitor who cannot find the switch does not conclude the site has taste. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -29,7 +29,6 @@ import { NavLink } from 'react-router-dom';
|
||||
import { useIdentity } from '@/lib/identity';
|
||||
import { useLayout } from '@/lib/layout';
|
||||
import { visibleNav, type NavItem } from '@/lib/nav';
|
||||
import { PlatformAudioProvider } from '@/lib/audio';
|
||||
import { AppHeader } from './AppHeader';
|
||||
import { AppSidebar } from './AppSidebar';
|
||||
import { PiggyDock } from './PiggyDock';
|
||||
@@ -45,14 +44,6 @@ export function Shell() {
|
||||
const items = visibleNav(identity);
|
||||
|
||||
return (
|
||||
/*
|
||||
* Music is mounted HERE rather than in App.tsx, so it wraps only the
|
||||
* signed-in application. The anonymous Learn page renders outside Shell,
|
||||
* and a share-code visitor opening a link someone sent them should not get
|
||||
* unexpected audio — that is the one context where it reads as a fault
|
||||
* rather than as character.
|
||||
*/
|
||||
<PlatformAudioProvider>
|
||||
<SidebarProvider
|
||||
open={sidebarOpen}
|
||||
onOpenChange={setSidebarOpen}
|
||||
@@ -98,7 +89,6 @@ export function Shell() {
|
||||
|
||||
<MobileTabBar items={items.filter((item) => item.primary)} />
|
||||
</SidebarProvider>
|
||||
</PlatformAudioProvider>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user