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

how to play audio background, when switch to another app or lock screen #182

Open
assmdx opened this issue Jul 21, 2023 · 1 comment
Open

Comments

@assmdx
Copy link

assmdx commented Jul 21, 2023

currently my code is:

let url = URL(string: msg!)!
SAPlayer.shared.startRemoteAudio(withRemoteUrl: url)
SAPlayer.shared.play()
@demenik
Copy link

demenik commented Jan 19, 2024

this package just plays the audio. you need to set a few options to continue playing when your app is not open.
see: https://stackoverflow.com/a/30280699

also see this, if you also want the lockscreen music controls

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

2 participants