refactor: remove unused isPlaying state and use arrayBuffer

This commit is contained in:
2025-06-04 11:31:08 +09:00
parent 56320f125b
commit 93a5ff140f
2 changed files with 1 additions and 2 deletions

View File

@ -13,7 +13,6 @@ export default function EpisodePlayer() {
const [selectedEpisode, setSelectedEpisode] = useState<Episode | null>(null);
const [audioUrl, setAudioUrl] = useState<string | null>(null);
const [loading, setLoading] = useState(true);
const [isPlaying, setIsPlaying] = useState(false);
const [error, setError] = useState<string | null>(null);
useEffect(() => {

View File

@ -82,7 +82,7 @@ app.get("/podcast_audio/*", async (c) => {
const audioFilePath = path.join(podcastAudioDir, audioFileName);
const file = Bun.file(audioFilePath);
if (await file.exists()) {
const blob = await file.blob();
const blob = await file.arrayBuffer();
return c.body(blob, 200, { "Content-Type": "audio/mpeg" });
}
return c.notFound();