"use client"; import { Button } from "@/components/ui/Button"; import { Play, Pause, Book } from "lucide-react"; interface PlayControlsProps { audiobook: any; isThisBookPlaying: boolean; isPlaying: boolean; currentTime: number; onPlayPause: () => void; formatTime: (seconds: number) => string; } export function PlayControls({ audiobook, isThisBookPlaying, isPlaying, currentTime, onPlayPause, formatTime, }: PlayControlsProps) { const hasProgress = audiobook.progress && audiobook.progress.progress > 0; const isFinished = audiobook.progress?.isFinished; return (
{hasProgress && !isFinished && (
Continue listening
{formatTime( isThisBookPlaying ? currentTime : audiobook.progress.currentTime )}{" "} / {formatTime(audiobook.duration)}
)} {isFinished && (
Finished
)}

Use the player controls in the sidebar or bottom bar for playback speed, seeking, and volume.

); }