YZarytskyi / react-voice-visualizer

React library for audio recording and visualization using the Web Audio API
https://www.npmjs.com/package/react-voice-visualizer
MIT License
98 stars 22 forks source link

Error playing audios on Safari #19

Open GolliAch opened 1 day ago

GolliAch commented 1 day ago

Describe the bug

We keep having issues in Safari Console: NotSupportedError: The operation is not supported.

This is the trace:

   Qt = () => {
            if (J.current && J.current.paused) {
                const A = J.current.play();
                A !== void 0 && A.catch(B => {
                    console.error(B),
                    s && s(B instanceof Error ? B : new Error("Error playing audio"))
                })

To Reproduce Steps to reproduce the behavior:

  1. Go to Safari
  2. Click on Play and audio

Expected behavior Audios playing

YZarytskyi commented 14 hours ago

Could you provide more details, please? I haven’t encountered this error in any scenario.