I’ve tried looking through other methods people tried such as the Audio Tag and using audio ref to control the pause and play functionalities but I keep getting the following error 3750 Uncaught TypeError: Cannot read properties of undefined (reading ‘play’).
Code showing how audioref is not working..
error keeps complaining that my play method is undefined
so I scraped that method and went for Audio.play/audio.pause now the music plays which is great but it won’t register when I pause it.Audio.pause not working
spit back no errors and when I console.log to see if it’s running into the code it does give me my message and even sets the PlayStatus but completely ignores the pause method.
anyone have any ideas or alternative methods to adding pause and play functions.
using: React Vite, JSX files.
Bdonk is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.