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

Audio doesnt play if i set html5 to true and audio doesnt play on background if i set html5 to false, Iphone latest ios version #1721

Closed
AashirBhusal opened this issue Apr 28, 2024 · 9 comments
Labels

Comments

@AashirBhusal
Copy link

AashirBhusal commented Apr 28, 2024

The Problem

Audio doesnt play if i set html5 to true and audio doesnt play on background and only plays on safari if i set html5 to false. it was working fine before by setting html 5 to true but suddenly updated to new ios version and now the audio doesnt play at all. how do i fix this and make it so like before it plays and also plays background its huge headache.

Reproducible Example

No response

Reproduction Steps

set html 5 to true and play audio on safari with 17.4.1 ios version.

Possible Solution

dont know

Context

No response

Howler.js Version

latest

Affected Browser(s)/Versiuon(s)

No response

@AashirBhusal AashirBhusal changed the title Audio doesnt play if i set html5 to true and audio doesnt play on background if i set html5 to false Audio doesnt play if i set html5 to true and audio doesnt play on background if i set html5 to false, Iphone latest ios version Apr 28, 2024
@Supplementing
Copy link

Im also having the same issue. Audio has worked fine for years with my app but as of a recent iOS update, it is no longer playing as intended. FWIW, im using Ionic & capacitor which renders a webview that the audio is being played inside of.

@mischa78
Copy link

mischa78 commented May 2, 2024

I have the same issue. For now I am using html5: false on iOS 17.4, but I hope this can get fixed properly in Howler.

@Timtam
Copy link

Timtam commented May 7, 2024

Having the same issue here. For some weird reason I can't get html5: false to work under Chrome on desktop nor iOS, so I guess i'm doing something wrong here. Basically creating the Howl with src and format the same way it works with html5: true, then set volume and hit play(), but that doesn't play. How do you make it work under Desktop + iOS?

@mischa78
Copy link

mischa78 commented May 7, 2024

@Timtam I did this to only use html5: false on iPhone with iOS 17.4:

html5: /iPhone OS 17_4/.test(window.navigator.userAgent) ? false : true,

@Timtam
Copy link

Timtam commented May 7, 2024

Interesting, I'll have to try if that works on iOS but it certainly doesn't work on other browsers if html5 is false. As a side note, for some weird reason, the old playback behaviour on iOS 17.4.1 still works for me with really short files (about 200 kb each and just 3 seconds long). A huge file (at least 2 minutes long and more) doesn't work though, and as far as I can see the state remains at "unloaded" all the time, or something like that (don't know about the Howler internals yet).

@AashirBhusal
Copy link
Author

the issue is similar to #1711 but the fix doesn't apply to me, waiting for official fix

@Timtam
Copy link

Timtam commented May 8, 2024

You are right, I found it just an hour before your message came in. I successfully switched to the @catalogworks/howler.js branch with html5: true and it fixed it in my use-case. It'd be great to have an official release which addresses this issue at some point, but its better than nothing for sure.

@jamesharding
Copy link

Seems to be fixed in iOS 17.5 for me!

@AashirBhusal
Copy link
Author

yup its fixed its working correctly for me now.

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

5 participants