diff --git a/public/scripts/player.js b/public/scripts/player.js index 83ad5b6..a1a1a79 100644 --- a/public/scripts/player.js +++ b/public/scripts/player.js @@ -120,6 +120,7 @@ initialize = () => { const togglePlayback = () => { if (window.isPlaying) { sound.stop(); + sound.unload(); } else { sound.play(); } diff --git a/src/components/AudioPlayer.jsx b/src/components/AudioPlayer.jsx index 13d2074..b247cc0 100644 --- a/src/components/AudioPlayer.jsx +++ b/src/components/AudioPlayer.jsx @@ -2,7 +2,6 @@ import {useState, React} from "react"; import jQuery from "jquery"; import Play from '@mui/icons-material/PlayArrow'; import Pause from '@mui/icons-material/Pause'; -