goldfire / howler.js

Javascript audio library for the modern web.
https://howlerjs.com
MIT License
23.87k stars 2.23k forks source link

onplay error not firing #1725

Open GiooRomanadze opened 4 months ago

GiooRomanadze commented 4 months ago

The Problem

The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu

i have this error in console but onplayerror listener not firing

const sound = new Howl({
  src: ['/audios/betting.mp3'],
  autoplay: false,
  loop: false,
  muted: true,

  onplayerror: function () {
    console.log('error');
  },

  onunlock: function () {
    console.log(sound.initTime);
    console.log('unlocked');
  },
});

also i not have play() function called but this issue still there. also tried Howler.autoUnlock = false; but same result

Reproducible Example

No response

Reproduction Steps

i want to fire error because i want to make logic to resume(continue where audio should be) the audio. i want to start audio when load and if there will be interaction error want to continue when will be click.

Possible Solution

No response

Context

No response

Howler.js Version

v2.2.4

Affected Browser(s)/Versiuon(s)

No response