import { ReactNode } from "react"; import { BrandPill } from "@/components/layout/BrandPill"; import { Player } from "@/components/player"; import { useShouldShowControls } from "@/components/player/hooks/useShouldShowControls"; import { useIsMobile } from "@/hooks/useIsMobile"; import { PlayerMeta, playerStatus } from "@/stores/player/slices/source"; import { usePlayerStore } from "@/stores/player/store"; export interface PlayerPartProps { children?: ReactNode; backUrl: string; onLoad?: () => void; onMetaChange?: (meta: PlayerMeta) => void; } export function PlayerPart(props: PlayerPartProps) { const { showTargets, showTouchTargets } = useShouldShowControls(); const status = usePlayerStore((s) => s.status); const { isMobile } = useIsMobile(); const isLoading = usePlayerStore((s) => s.mediaPlaying.isLoading); return ( {props.children} {status === playerStatus.PLAYING ? ( <> ) : null}
/
{status === playerStatus.PLAYING ? ( <> ) : null}
{status === playerStatus.PLAYING ? ( <> {isMobile ? : null} ) : null}
{status === playerStatus.PLAYING ? ( <> ) : null}
{status === playerStatus.PLAYING ? ( <> ) : null} {status === playerStatus.PLAYBACK_ERROR || status === playerStatus.PLAYING ? ( ) : null}
{status === playerStatus.PLAYING ? : null} {status === playerStatus.PLAYING ? : null}
); }