diff --git a/src/pages/Player/PlaybackControls.tsx b/src/pages/Player/PlaybackControls.tsx index bb1c4fb..b8b653a 100644 --- a/src/pages/Player/PlaybackControls.tsx +++ b/src/pages/Player/PlaybackControls.tsx @@ -14,70 +14,81 @@ type PlaybackControlsProps = { onSpeedChange: (value: number) => void; }; -const BACKEND_LABELS: Record = { - mpv: "mpv", - none: "none", -}; - export function PlaybackControls(props: PlaybackControlsProps) { const { theme } = useTheme(); return ( - - [Prev] + {/* transport buttons — wrap as a unit, centered on their own line */} + + + [Prev] + + + {props.isPlaying ? "[Pause]" : "[Play]"} + + + [Next] + + {/* status group — always follows the buttons; wrap point is here */} - {props.isPlaying ? "[Pause]" : "[Play]"} - - - [Next] - - Vol {Math.round(props.volume * 100)}% ↑↓ - - - Speed - {props.speed}x - s - - {props.backendName && props.backendName !== "none" && ( - via - {BACKEND_LABELS[props.backendName]} + Speed + {props.speed}x + s - )} - {props.backendName === "none" && ( - - No audio player found - - )} - {props.hasAudioUrl === false && ( - - No audio URL + + {/* audio warnings — wrap to their own (3rd) line when the row is tight */} + {(props.backendName === "none" || props.hasAudioUrl === false) && ( + + {props.backendName === "none" && ( + + No audio player found + + )} + {props.hasAudioUrl === false && ( + + No audio URL + + )} )}