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

Is it possible to load song image from a given url? #75

Closed
JhonnyTawk opened this issue Aug 19, 2019 · 1 comment
Closed

Is it possible to load song image from a given url? #75

JhonnyTawk opened this issue Aug 19, 2019 · 1 comment

Comments

@JhonnyTawk
Copy link

JhonnyTawk commented Aug 19, 2019

I want to load the song image from my database.
instead of
DefaultAudioItem(audioUrl: <String>, artist: <String?>, title: <String?>, albumTitle: <String?>, sourceType: <SourceType>, artwork: <UIImage?>)
can I use

`DefaultAudioItem(audioUrl: , artist: <String?>, title: <String?>, albumTitle: <String?>, sourceType: , artwork: <ImageLink?>)

`

@jorgenhenrichsen
Copy link
Owner

Hey,
In this case, you should implement the AudioItem- protocol in your own subclass and use that.
There you can implement the getArtwork(_ handler: @escaping (UIImage?) -> Void) - method, where you can fetch the image from your database, and then give it to the handler.

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