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

Unable to resume audio on iOS 17 #199

Open
sravman opened this issue Apr 19, 2024 · 2 comments
Open

Unable to resume audio on iOS 17 #199

sravman opened this issue Apr 19, 2024 · 2 comments

Comments

@sravman
Copy link

sravman commented Apr 19, 2024

I am receiving the following error in console when the audio player is interrupted (stopped) by another application or if playback is stopped and the webpage is out of focus for an extended period of time:

icecast-metadata-js: "Failed to start the AudioContext. WebAudio playback will not be possible." InvalidStateError: Failed to start the audio device

When attempting to restart the stream within the same session, no audio playback is heard. The only solution I have found currently is to force a reload of the webpage.

I was also able to reproduce this behavior using the demo

Device: iPhone 15 Pro
OS: iOS 17.4.1
Method: Web Audio

@rustyhodge
Copy link

Confirming this behavior.

@eshaz
Copy link
Owner

eshaz commented Nov 30, 2024

If someone would like to help out feel free. I don't have an iPhone to test and simulate this behavior with. On the simulated iPhone I use, the stream plays fine overnight with no problems.

I'm thinking if the audio context fails to start, maybe it could be removed from the audio element, reattached or recreated, and then restarted using the existing code. I should note, you have to click somewhere on the web page to start the audio context. It needs to be triggered directly from a user event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants