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

Howler.js 2.2.0 won't play on Safari Mac OS or Safari iOS 14 #1406

Closed
inglesuniversal opened this issue Oct 7, 2020 · 14 comments
Closed

Howler.js 2.2.0 won't play on Safari Mac OS or Safari iOS 14 #1406

inglesuniversal opened this issue Oct 7, 2020 · 14 comments

Comments

@inglesuniversal
Copy link

Sample LINK provided below:

https://inglesuniversal.com/share/?r=20201007094154638

It was working fine until apple updated Safari on both Mac and iOS 14.0.1

No errors shown inside Safari console

Best regards

@AitorG
Copy link

AitorG commented Oct 21, 2020

Having the same issue here, at least in iOS 14 (could not test on Mac). iOS 14.1 didn't fix it. Activating Modern Web Audio API on safari settings in iOS also does NOT solve the problem :(.

@goldfire
Copy link
Owner

Are you using WAV? If so, #1415 fixes the issue. However, the link you provided is working on Safari 14 for me.

@goldfire
Copy link
Owner

I'll close this in favor of duplicate issue #1406.

@AitorG
Copy link

AitorG commented Oct 24, 2020

@goldfire I am sorry to say that sounds are still not working on iOS 14. My sounds are WAV files, I'm using howler in master branch where you merged the solution for WAV files and sounds are still not working on iOS 14 even activating Modern Web Audio API on safari settings.

EDIT: mp3 files are working fine. WAV files still not working

@goldfire
Copy link
Owner

@AitorG Can you provide an example? All of the examples in the repo are working fine for me when switched to WAV.

@AitorG
Copy link

AitorG commented Oct 25, 2020

My game is made in phaser and it's not easy to make and example about my code, but I do something like this:

this.stepSounds = [
  new Howl({
    src: ['sound/steps/23.wav'],
    volume: 1
  }), 
  new Howl({
    src: ['sound/steps/24.wav'],
    volume: 1
  })
]

after, when needed, I do something like
this.stepSounds[0].volume(0.25).play()

I don't know if it's enought, I have iPhone Xs with iOS 14.1

I tested debugging audioTest.canPlayType('audio/wav').replace... as you changed in core and it returns true, but still not playing the sounds.

In iOS 13 it was all working fine :(

@goldfire
Copy link
Owner

Are you playing after user input and with the mute switch off?

@AitorG
Copy link

AitorG commented Oct 25, 2020

Sure mate, it's a more than one year developing this game and always run OK in iOS 13, I know how to make it works xD. I can provide you a link but in PROD mode you will maybe not able to debug it

@AitorG
Copy link

AitorG commented Oct 25, 2020

I change one resource to mp3 and it sounds fine at the same time other button plays wav sound and it does not work

@AitorG
Copy link

AitorG commented Oct 25, 2020

Ok just please forget all my comments while I'm stupid and even using this "howler": "git://github.com/goldfire/howler.js.git#master", on NPM dependences seems like not using ur last commit on master :-/

@goldfire
Copy link
Owner

Ah, good to hear. I'll have 2.2.1 out with that fix fairly soon, just trying to wrap up a few other issues first.

@AitorG
Copy link

AitorG commented Oct 25, 2020

Can you commit compiled files to use the #commit in npm dependence and then test in on mobile? so I could, if possible, get it working on production :)

@goldfire
Copy link
Owner

@AitorG v2.2.1 is now available on npm with this fix.

@kahoot-karl
Copy link

I'm still having problems with playing webm files. Is that confirmed to work with Safari 14.1? mp3 works fine

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

No branches or pull requests

4 participants