We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Could you please give an example on how to use the player with local mp3 file?
That’ll be awesome!
The text was updated successfully, but these errors were encountered:
Sure 👍 Here is an example when using the DefaultAudioItem struct.
let item = DefaultAudioItem(audioUrl: "PathToYourSoundFile", sourceType: .file) try? audioPlayer.load(item)
This of course requires you to find the correct path to your mp3 file.
Sorry, something went wrong.
Just a note, don't include scheme in your path It's wrong: file:///var/container/......./music.mp3, you have to remove file://
scheme
file:///var/container/......./music.mp3
file://
Alright. Works perfectly.
I’m getting the path now like this:
let path: String = Bundle.main.path(forResource: "soundfile", ofType: "mp3")!
Thank you so much.
No branches or pull requests
Could you please give an example on how to use the player with local mp3 file?
That’ll be awesome!
The text was updated successfully, but these errors were encountered: