Some live streams (html5) buffer forever on Safari iOS 17.4
The Problem
Some radio streams buffer forever, never play.
This seems unrelated to
- http or https
- whether there are redirects to follow
- format (aac or mp3)
Reproducible Example
No response
Reproduction Steps
- clone the repo, serve it
- edit examples/radio/radio.js, replace one station with
http://chirpradio.org/stream(wonderful station from Chicago). - visit examples/radio on iOS 17.4 Safari
- click play - it just idles
- DevTools network tab shows that the request is consuming bytes at the the expected rate/bandwidth
Possible Solution
Naive analysis:
- for some reason the initial Audio node (which is
load()ed) doesn't receivecanplaythrough, butsuspendinstead - the event queue is never kicked off
- the node is stuck in a suspended limbo
Naive solution (fork incoming)
- do not rely merely on
canplaythrough - detect suspended ndoes
Better theoretical solution
Less complex Audio node setup?
Context
For some streams I tested, pre-following redirects helped. So maybe when the initial connection takes too long this trips up whatever changed in iOS 17.4.
Howler.js Version
v2.2.4
Affected Browser(s)/Versiuon(s)
Safari iOS 17.4
We also experience this (or a similar) issue with Howler.js 2.2.4 and iOS 17.4. Would be great to get a fix as we are blocked right now ...
@goldfire I see a considerable amount of bugs in the issue list in this repo and little activity in the recent past. Also I see some recent PRs which are not accepted/merged or commented. Can we expect this library to be reasonably maintained in the future?
@tobias-graf-p just in case & and all, see my commit linked above for a ~~possible fix~~ workaround. It works for us, but I don't know if there are any side effects or unwanted consequences.
@bikubi Thanks a lot! We are currently testing your fix. Will give you a quick feedback whether it solved our issue as well and/or whether we experience side effects.
Same problem.
@bikubi Your solution helped, thanks!
@tobias-graf-p
I see a considerable amount of bugs in the issue list in this repo and little activity in the recent past. Also I see some recent PRs which are not accepted/merged or commented. Can we expect this library to be reasonably maintained in the future?
FWIW one of my (trivial) fixes was merged recently.
For general analysis regarding Howler vs. live streams you might want to read my question on s/o.
@bikubi Thanks again a lot for your workaround/fix. Unfortunately it didn't solve our issue completely. While audio was being played again, some wired issues still remained, but we are not sure whether they originated from iOS, Howler.js or our own code ... Meanwhile we replaced Howler.js with the native Html5 audio tag in our project.
Can confirm. iOS 17.3 was working fine. Upgrade it to 17.4, not working now.
Reporting the same issue in 17.4 and 17.4.1, I changed to native HTML5 audio in 4 sites.
same problem,Is there a way to solve this?
Any update about this bug? 😵💫
Hi! I generated a patch based on the commit 8bb0610 that applies the change directly on the dist/howler.js so I could use it in a Drupal project. If someone else needs it, here's the file:
After that change was applied, the player started to work again, so thanks @bikubi !! Still need further testing, but it will help us for now!
@bretth18 thanks for your repo:
yarn remove howler && yarn add https://github.com/catalogworks/howler.js worked like a charm
I only had to change the import: import {Howl, Howler} from '@catalogworks/howler';
Problem solved!
@lustremedia and all, please note that i would not consider my workaround a fix!! @bretth18's repo adds some comments, a .gitignore and a version bump, which might give you trouble in the future.
It's nice that you can simply change your package.json, but for the "problem" to be "solved" somebody with more familiarity with Howler will need to properly fix the core issue!
Of course it is just a workaround, but it fixes the issue at hand, atm.
You can easily roll back once howler starts properly fixing the issue. In the meantime, I and also my listeners with iOS devices are greatly appreciating the work you put in -> @bikubi and @bretth18! Thank you!
@bretth18 thanks for your repo:
yarn remove howler && yarn add https://github.com/catalogworks/howler.js worked like a charm
I only had to change the import: import {Howl, Howler} from '@catalogworks/howler';
Problem solved!
I did this and it works. Thanks a lot for sharing!
is this library going to be maintained? ios new update is always so much headache
Hey all,
I just tested it with 17.5.1 and in my case both versions work. So when I have this in my package.json
"@catalogworks/howler": "github:catalogworks/howler.js",
the playback works. And also when I use
"howler": "~2.2.4",
it works with 17.5.1. Can somebody else confirm this? So it seems Apple fixed something in 17.5.