Post not yet marked as solved
I was listing the library artists and couldn't figure out a way to show the artist artwork. Is there a way to fetch it?
Under Artist music item, I couldn't find an artwork instance property.
Is it due to copyright/legal issues?
Post not yet marked as solved
In Xcode 13 beta 4, the Sample Code Using MusicKit to Integrate with Apple Music has compiler errors around the player.play() calls in handleTrackSelected and handlePlayButtonSelected. The error is "async call in a function that does not support concurrency / call can throw, but is not marked with try and the error is not handled"
Would it be possible to include a fix for this error in the sample code - or could somebody share a fix here in the forums?
Thanks so much!
Hi there!
I'm working on an Apple Music client and stuck on creating the now playing screen. I've set up all the buttons but struggling to observe the value of playbackTime to update the current playback time label and the progress bar accordingly.
Like you can observe the value of playbackRate and playbackState by making the player's state value as an @ObservedObject, how can I observe this value?
Thanks in advance!
Hi,
I know MusicKit is in beta, but after having talked to an engineer at a WWDC lab, it seems to be feature complete for now. I really enjoy the framework and it helps wrap the Apple Music API nicely.
However, the types it provides are missing some properties that are relevant to any music item (song, album, music video) such as the releaseDate, contentRating, durationInMillis and url.
This is the JSON response from a /tracks relationship of an album:
"previews": [
{
"url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview115/v4/e6/84/62/e6846266-2779-4527-902b-0a3b6f73be75/mzaf_18277320986443617976.plus.aac.p.m4a"
}
],
"artwork": {
"width": 3000,
"height": 3000,
"url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c4/7a/01/c47a01c2-2b04-a327-12bd-c726ae076c7f/886447823545.jpg/{w}x{h}bb.jpeg",
"bgColor": "1c1c1c",
"textColor1": "fafafa",
"textColor2": "e1e1e1",
"textColor3": "cdcdcd",
"textColor4": "b9b9b9"
},
"artistName": "Kollegah",
"url": "https://music.apple.com/de/album/alpha/1477896577?i=1477896820",
"discNumber": 1,
"genreNames": [
"Hip-Hop/Rap",
"Musik"
],
"durationInMillis": 141827,
"releaseDate": "2014-05-09",
"name": "Alpha",
"isrc": "DEDG61400001",
"hasLyrics": true,
"albumName": "King",
"playParams": {
"id": "1477896820",
"kind": "song"
},
"trackNumber": 1,
"composerName": "Kai Engelmann, Phillip Herwig, Alexis Papadimitriou, Daniel Coros, Yunus Cimen & Sadik Kalyon",
"contentRating": "explicit"
}
As you can see, the releaseDate, durationInMillis, url, contentRating, etc. are missing from the struct Song : MusicItem in the MusicKit.
I was wondering if we can extend MusicKit as developers in a way to include the releaseDate and other types or are we making a choice between using custom models and custom requests vs. using MusicKit?
Thanks
Post not yet marked as solved
Is it possible to get an album from a song in MusicKit? I haven't been able to find a way to do so currently. I have tried using .with() but it appears that album is not supported.
What I am looking for is properties on the Song like what is present on MPMediaItem such as albumTitle, genre, etc.
Post not yet marked as solved
Hi,
MusicKit is a particularly good example for teaching aspects of async coding. The API does many things very nicely.
It would be nice if developers could access their Music libraries in the simulator as that would make this API a great teaching tool. Requiring new devs to deploy an app to a device in a workshop is a bit much for some.
I have no idea if this is something you can practically enable - but I thought it was worth suggesting.
Thanks,
Daniel