refactor: remove unused isPlaying state and use arrayBuffer
This commit is contained in:
@ -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(() => {
|
||||
|
@ -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();
|
||||
|
Reference in New Issue
Block a user