pixijs / sound

WebAudio API playback library, with filters. Modern audio playback for modern browsers.
https://pixijs.io/sound/examples/
MIT License
406 stars 68 forks source link

Sound stops on iOS 15.0.2 #174

Open prubie opened 3 years ago

prubie commented 3 years ago

We've had customers report issues with sound in the latest version of iOS. Sound stops at unpredictable times. Myself and a colleague can reproduce by clicking the buttons on the Pixi sound demo page: https://pixijs.io/sound/examples, though it can take some time to occur.

bigtimebuddy commented 3 years ago

This is so frustrating Apple! Ugh. We've had lots of issues on WebGL in iOS 15. Does this behavior show up on any other audio libraries, like Howler?

prubie commented 3 years ago

I haven't tried anything else I'm afraid. Is there any hope that it might be looked into soon? Thanks for the reply.

teejayhh commented 3 years ago

We have and iOS app with webview content were we use pixijs for a bunch of interactives. Unfortunately we have issues with sound as well, but they are more related to changes in the audio output. If you have headphones on and unplug/disconnect them the canvas app loses sound almost all the time and I am forced to reload the entire page, which is bad because progress is can be lost. Old createjs interactives (canvas games) do not suffer the issue.

The issue is reproducible on the https://pixijs.io/sound/examples page. Just use headphones and play the sounds, then disconnect and you won't be able to play the sound anymore. (that in ios14 btw)

bigtimebuddy commented 3 years ago

Are you able to isolate if this is a webaudio issue? Like, if you can find another pure webaudio example that still behaves incorrectly?

teejayhh commented 3 years ago

Well I tried howlr examples with an iPad and headphones and there its the same problem. Switching to headphones works, going back to speakers doesnt. In howlr I tried the Music Player where I need to press pause and play again to regain sound. It doesnt do that automatically.

bigtimebuddy commented 3 years ago

Looking at the howler issues on GitHub, seems like a lot of the same: tons of iOS 15 issues. If forcing HTML Audio works, that might have to be a workaround for the moment.

manico commented 2 years ago

Have the same issue of not being able to play sounds in iphone 15.3. Any workaround?

JoeMGomes commented 1 year ago

I have the same problem. Works in an iPad 6th generation iOS 15.5 but not in iPhone7 iOS 15.7.3. Works correctly with Howler.js.

EDIT: Scratch that, the physical sound button was turned to silence mode >:(

zj12357 commented 7 months ago

import { PlayOptions, Sound, sound } from '@pixi/sound'; import { isIOS, pageVisibilityChange } from '@shared/utils/tools'; import { gsap } from 'gsap'; import { resolveAndKillTweens } from './animation';

/**

我已经修复好了

zj12357 commented 7 months ago

image