Skip to content

get iOS audio output working again#45

Merged
badaix merged 1 commit intosnapcast:reactfrom
curiousercreative:react
Oct 6, 2023
Merged

get iOS audio output working again#45
badaix merged 1 commit intosnapcast:reactfrom
curiousercreative:react

Conversation

@curiousercreative
Copy link
Contributor

@curiousercreative curiousercreative commented May 10, 2023

Attempts to resolve #18 for the react app by:

  1. Leverage the standardized-audio-context ponyfill
  2. Never recreate the audio context, even when we think we're not on iOS

Effort 1 above required a lot of typing and perhaps can be done better, I'm no TS super wiz. There's also a couple of whitespace changes (traliing whitespace trimmed), sorry about the noise.

@daredoes
Copy link

@curiousercreative how does this affect other platforms? Was that tested?

@curiousercreative
Copy link
Contributor Author

curiousercreative commented Jun 25, 2023

how does this affect other platforms? Was that tested?

I host snapweb with these patches. I don't have any permanent clients connected, but I'll occasionally connect using my Android phone on Firefox, and two different iOS phones via Safari (I think) and all works well.

@daredoes
Copy link

I don't have the power to merge this. I manage a version of snapcast hosted on Unraid Community Apps. I'll probably use your fork on my instances as well until this gets merged though!

From one iOS user to another, thank you.

@curiousercreative
Copy link
Contributor Author

From one iOS user to another, thank you.

I am NOT an iOS user, I just love one. We are nothing alike... jk. My partner is an iOS user and her prior (now discarded) iPhone we use as a home control device. I initially tried using it as the snapcast client for one room since it had analog audio out (6S), but our WiFi wasn't strong enough and I eventually had to use an SBC with a dedicated WiFi dongle.

@daredoes
Copy link

@curiousercreative I used to be like you. Then I took an android to the knee...

I like to use the Fire HD 8 Plus. They go on sale multiple times a year for 40-50% off. Get the ad-supported version, and use FireToolbox to remove all the bloatware. Analog out, usb-c, bluetooth, and wireless charging. like $60 bucks.

@daredoes
Copy link

@curiousercreative I did some extra testing, and the big issue with iOS is that it won't let the websocket connection run in the background to keep the music stream alive.

@curiousercreative
Copy link
Contributor Author

curiousercreative commented Jul 10, 2023

@curiousercreative I did some extra testing, and the big issue with iOS is that it won't let the websocket connection run in the background to keep the music stream alive.

@daredoes Are you saying this branch doesn't play audio in the background on iOS? Or are you sharing troubleshooting from a release branch?

@daredoes
Copy link

@curiousercreative this branch, well a modification of this branch with some of your other PRs tied in (like changing the host URL via env var)

@badaix
Copy link
Member

badaix commented Oct 6, 2023

Thanks! I have to test a bit the recreation of the audio context. According to my old comment, not recreating it will cause trouble when the sample rate of the stream changes. But maybe this is not an issue anymore with the standardized audio context

@badaix badaix merged commit 40590af into snapcast:react Oct 6, 2023
badaix pushed a commit that referenced this pull request Feb 24, 2024
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

Successfully merging this pull request may close these issues.

3 participants