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

Some live streams (html5) buffer forever on Safari iOS 17.4 #1711

Open
bikubi opened this issue Mar 11, 2024 · 17 comments
Open

Some live streams (html5) buffer forever on Safari iOS 17.4 #1711

bikubi opened this issue Mar 11, 2024 · 17 comments
Labels

Comments

@bikubi
Copy link
Contributor

bikubi commented Mar 11, 2024

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 receive canplaythrough, but suspend instead
  • 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

@bikubi bikubi added the bug label Mar 11, 2024
bikubi added a commit to bikubi/howler.js that referenced this issue Mar 11, 2024
@tobias-graf-p
Copy link

tobias-graf-p commented Mar 12, 2024

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?

@bikubi
Copy link
Contributor Author

bikubi commented Mar 12, 2024

@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.

@tobias-graf-p
Copy link

tobias-graf-p commented Mar 12, 2024

@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.

@rgyph
Copy link

rgyph commented Mar 13, 2024

Same problem.

@bikubi Your solution helped, thanks!

@bikubi
Copy link
Contributor Author

bikubi commented Mar 13, 2024

@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.

@tobias-graf-p
Copy link

@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.

@MichalisDBA
Copy link

Can confirm. iOS 17.3 was working fine. Upgrade it to 17.4, not working now.

@deltayeisson
Copy link

Reporting the same issue in 17.4 and 17.4.1, I changed to native HTML5 audio in 4 sites.

@danieldai2003
Copy link

same problem,Is there a way to solve this?

@betanyeli
Copy link

Any update about this bug? 😵‍💫

@luzzardi
Copy link

luzzardi commented Apr 15, 2024

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:

1711-8bb0610.patch

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!

@lustremedia
Copy link

@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!

@bikubi
Copy link
Contributor Author

bikubi commented Apr 24, 2024

@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!

@lustremedia
Copy link

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!

@torbentschechne
Copy link

@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!

@AashirBhusal
Copy link

is this library going to be maintained? ios new update is always so much headache

@torbentschechne
Copy link

torbentschechne commented May 21, 2024

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.

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