There was an issue on IOS 14 that prevented the AudioCotext from starting, it’s state was suspended no matter what I tried, it was fixed in IOS 15 + and now in IOS 17 is back again.
Any ideas on how to start the damn AudioContext, I tried everything…
ios has to have one of the most erratic team of devs when it comes to shipping updates, there was a bunch of newly introduced webGL problems with 17 too that were also resolved from 14 to 15
have a look at this SO answer, it may be the same problem, looks like the bug has been looked into but not necissarily shipped yet
Can you test if this example is working on ios 17? If so you may be able to make a workaround with three’s PositionalAudio using .setRefDistance( 9999999 ) to an exceedingly high number or Infinity
yes totally, let me know if the example does work or not, i’d be suprised if it does but i was suggesting you could use the AudioListener.context which essentially just references the following…
_context = new ( window.AudioContext || window.webkitAudioContext )()
I tried with no luck, the issue is that the AudioContext state is suspended instead of running, this also prevents the audio from playing, which does not make sense.
I create the AudioContext when I click the play button so user interaction is present. It also works on all other IOS versions except IOS 17.
The way I fixed this is to add a dummy array for the visualizer with random values on IOS, this sucks but I spent a week trying to figure this out I tried everything possible, I don’t understand how in the previous version they fixed this and now in the latest version is back, makes no sense…
Apple always wanted to kill the browser and to switch everything to apps, they almost didi it in the flash days but it did not work… I guess they are still using this approach to mess up the browser as much as possible.
Is this for the entire time of songs playing? eg it’s never actually synced? That sounds a bit brutal for the issue only existing in ios 17, is there no way to check ios version and only do this for the non patched ios 17 build?
There is no point to check the version everybody is updating to v 17, there is no other option, the audio is also not starting because of this bug so no visualizer and no sound practically unasable…
I suppose everyone will do eventually, it may be worth looking at a few graphs here… Chart: iOS 17 Drops Support for iPhone 8 and X | Statista whereby devices below iPhone 8 and X will not be supported by ios17 and iOS versions market share in June 2023 | TelemetryDeck whereby a quick rough calculation in the market share of devices below these models is around ~16.5%, thats a substantial gap in support… I’m not sure it’s even possible to reliably…
but something like the following could be a basic polyfill
with the above snippet you will catch major, minor and patch versions eg “OS 17_x_x” where you could control the exact versions that are broken to patch with a random array of values…
It’s already been “fixed” by the looks of this, so essentially could be rolled out in a patch with ios 17.0.x for all we know, all i’m saying is if you have an array list of ios’ you know it doesn’t work with then you’d have a bit more control if and when things break in the future too but don’t get me wrong i completely understand your reluctancy to track the bugs of apple’s dev team in this way…
Apple have been doing this for years, way too many years.
I think Apple want us to just think their dev team is incompetent to hide the fact that they are trying to push devs to make apps if any non typical browser features/capabilities are needed, especially when building creative audio/visual experiences.
It’s all about making more money with that dev licence and pushing purchases of mac’s for xcode.
The first thing I say to clients who want a (RIA) browser based creative audio/visual experience is that apple devices will cause issues and that its stability or even the possibility of it even working will change with each release of their OS. Very few go for the app for iOS and browser experience for everything else.
Probably you are right, they did manage to kill Adobe Flash with a single later which was such a joke.
Adobe Flash was years ahead of the browser and an amazing technology even now there are so many things impossible to do in the browser that Flash could do but their phone was so slow it could not handle any animation just static stuff, the first iPhone because Flash was very popular and this was an issue selling the phone Steve Jobs wrote a letter and that’s it over night flash was not good anymore…
It is very frustrating… of course it is a different story with the browser, hopefully they will wake up!