Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onplay error not firing #1725

Open
GiooRomanadze opened this issue May 26, 2024 · 0 comments
Open

onplay error not firing #1725

GiooRomanadze opened this issue May 26, 2024 · 0 comments
Labels

Comments

@GiooRomanadze
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant