MusicKit JS

RSS for tag

Add an Apple Music player to your web app using MusicKit JS.

Posts under MusicKit JS tag

120 Posts

Post

Replies

Boosts

Views

Activity

Musickit on the web
Hello everyone, I'm currently working on some projects in React that involve using MusicKit on the web. However, I've been having some trouble finding a package that works with React. I've noticed that there's a beta version of MusicKit for web available, but I'm not sure if Apple has released an npm package for it yet. If there isn't an npm package available, is it still possible to use MusicKit on the web using just HTML and JavaScript? I'd appreciate any guidance or advice on how to get started with this. Thank you in advance for your help! Best regards.
0
0
743
May ’23
Can I integrate MusicKit in a SAAS?
Hi, I'm developing a web app that integrates various widgets into a single page to boost users productivity. I would like to link to integrate Apple Music too using the MusicKit JS SDK. I'll monetize the web app through monthly subscriptions. There they get access to all the widgets. So my question is whether it is allowed? If not, is there any other way I can still give my users ability to play Apple Music from the web app? Thanks
0
0
589
May ’23
Does apple music api provide featured artists information of a song?
Hey. now I'm using apple music api to collect music informations. but I've noticed that I couldn't get the featured artists information from a song. guess there's a song Foo - Bar (Feat. Baz). In spotify API, we can retrieve featured artist information something like this: { // ... "artists": [ "Foo", // <-- primary artist "Baz" // <-- featured artist ] // ... } but as I see in documentation, there is no API (or relationship with a song) for get all the artists (including featured artists) of a song. GET https://api.music.apple.com/v1/catalog/kr/songs/1544411971 { "data": [ { // ... "attributes": { // ... "name": "36.5 (feat. Hwaji)", // ... }, "relationships": { // ... "artists": { "href": "/v1/catalog/kr/songs/1544411971/artists", "data": [ { "id": "1297171788", "type": "artists", "href": "/v1/catalog/kr/artists/1297171788" } ] } } } ] } as you can see here, there's only one artist relationship object in artists.data array even if the target song have featuring artist. Is there any way to get featured artists information of a song?
1
0
1.5k
Apr ’23
MusicKit web 403 error issue
Hello! I am currently working on a react.js application that is integrating with the MusicKit v3 library. I have followed the documentation to generate a JWT for MusicKit and add the library to my application. Using my token I am able to successfully retrieve song information from the Apple Music API, but I am having trouble with authentication. When I call music.authorize() and successfully go through the Apple sign in popup, I am receiving the following 403 error: https://play.itunes.apple.com/WebObjects/MZPlay.woa/wa/webPlayerLogout 403 musickit.js:44 Uncaught (in promise) AUTHORIZATION_ERROR: Unauthorized After stepping through the music kit API and login popup with breakpoints, I am seeing that the music user token is null, despite the login popup succeeding and returning a proper token/response: {"isAppleMusicSubscriber":"true","musicUserToken":"Ak4ItOgRRRG2y6xgA/OeWQPK0RqPQ/esAJkRN0B/Ua/AWLT52tLhd2TfzMK6uhH+Nczvd7wjYDM1UewG/NledKtimwlrR+s5tdQPk/FG28zqhBqXZ12q6LC516w8ELZDwv5T61kV8xiJ1KSO1q4pGi01JO7SuPMtOqB/QsycYj+xNnrYUEwlP5tm/zxfg7bWmvuWMwfUruYR+A1U9FdXZsdIITVmxCjiHg8ro9xXRzl6Txhsag\u003d\u003d","cid":"REDACTED","itre":"REDACTED","supported":"REDACTED"} I have tested my application with multiple Apple Music users who have paid subscriptions. All accounts are receiving this same error. I have tried regenerating my JWT token multiple times following various guides. My latest attempt used the following node library and parameters: var jwt = require('jsonwebtoken'); var fs = require('fs'); var privateKey = fs.readFileSync('./AuthKey_MYKEY.p8'); let now = new Date(); let nextMonth = new Date(now.getFullYear(), now.getMonth() + 1, now.getDate()); let nowEpoch = Math.round(now.getTime() / 1000); // number of seconds since Epoch, in UTC let nextMonthEpoch = Math.round(nextMonth.getTime() / 1000); // number of seconds since Epoch, in UTC var payload = {     iss: 'REDACTED', // TEAM ID     iat: nowEpoch,     exp: nextMonthEpoch }; var options = {     algorithm: 'ES256',     header: {         alg: 'ES256',         kid: 'REDACTED' // KEY ID     } }; jwt.sign(payload, privateKey, options, function(error, token) {     console.log(error);     console.log(token); }); I have a valid App Identifier created with the MusicKit App Service enabled. I am stuck! I have no other ideas on the possible root cause here. Is there something I am missing? I have a mobile app currently in Test Flight - does this app need to be released to the app store? I am out of guesses! Any support here would be greatly appreciated! Thank you for your time. Patrick
9
1
3.8k
Mar ’23
Is there a way to get a unique identifier for a user from MusicKit JS?
Hello! I'm trying out MusicKit JS and am able to log in and retrieve songs from my library, but I want to be able to store some information tied to myself as a user between sessions. I can't seem to find any unique identifier for a user besides maybe the musicUserToken?, which I assume will change at some point. I also can't seem to find any direction on how to get any user information like name/apple id/etc. without also getting an auth token from apple id and then sending the id token back for information. I was just thinking, since they already log in to apple to authorize MusicKit JS, there must be some way to get some unique identifier to tie the logged in user to itself across sessions. Am I missing something or do i need to make another call to get an auth token? Thanks
0
0
933
Mar ’23
Authorize to Apple Music via In-App Browser (FB Messanger,Instaram,Twitter))
We're using  https://developer.apple.com/documentation/musickitjs to authorize Apple music, on Desktop it opens a new window to authorize to apple. But It's NOT working on mobile In-App Browser (both iOS &amp; Android), probably because on mobile messenger, it's not possible to allow the opening of multiple windows. Are we missing something here? Any workaround for it? Has anyone done that?
3
0
2.6k
Mar ’23
Is Apple going to stop people from abusing MusicKit developer token taken from music.apple.com
Many developers know that you can easily get a MusicKit developer token from music.apple.com. Just go to the console of the browser and input "MusicKit.getInstance().developerToken". As of now, the token is eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IldlYlBsYXlLaWQifQ.eyJpc3MiOiJBTVBXZWJQbGF5IiwiaWF0IjoxNjQ2NDM1NTgxLCJleHAiOjE2NjE5ODc1ODF9.Ob5bfZBWLDlDkR4r5fNXIjp1Y1G0qY5mP9MVBm1mDFjG701_6AcZS6nwjk-CMJE2b8VLv1JWxKR5j5BDkKxQ7w This token is not like the one we developers generate ourselves that has many limitations. Instead, it is a privileged one that has some powerful features and is able to invoke some "private" API as follows: Deleting users' resources (for example, DELETE method on https://amp-api.music.apple.com/v1/me/library/songs/{id}) Getting and showing lyrics Rename playlist, reordering songs in a playlist Many other features that music.apple.com could do but your apps couldn't I think it's fine to use it privately and do not be evil, but Apple failed to stop people from abusing it. I already spotted one app selling on Microsoft Apps Store(https://apps.microsoft.com/store/detail/cider-alpha/9P21XJ9D9G66) that is taking advantage of this "privileged" token. Proofs are as follows: fetch the privileged developer token https://github.com/ciderapp/Cider/blob/912a1816de01cbfc55e00a48f187d635d65c0e9c/src/renderer/index.js#L3665 removeFromLibrary https://github.com/ciderapp/Cider/blob/912a1816de01cbfc55e00a48f187d635d65c0e9c/src/renderer/index.js#L2254 load official AM lyrics https://github.com/ciderapp/Cider/blob/912a1816de01cbfc55e00a48f187d635d65c0e9c/src/renderer/index.js#L2237 They get the token for free, take the source code from music.apple.com with some modification, put it into an electron app. Then sell it and beat other competitor apps because it's more "powerful". And this makes me a developer obeying the rules like a stupid fool because I pay $99 for ADP to get the developer token, while they get it for free I got a token that has limited features, while theirs are far more powerful I already submitted it to Apple but got no response. Apple should really start to do something, otherwise It's like telling every developer that: Stop paying $99 for ADP to get your developer token, just grab it from music.apple.com. It's free yet super powerful to call private APIs and bypass limitations.
9
0
7.0k
Feb ’23
Apple Music Terms of Use / Guidelines
Hi, I'm working on a web application that uses Apple Music API, but after reading the terms of use and guidelines, it's still shady if what I want to achieve is allowed or not. The core functionality is: users are able to host a "listen party" where everyone can listen to the same song together (using their subscription, no streaming). Just the host can control the music playback. The web app is "freemium". This means that free and paid users can access the same content, there's no paywall. What are the gotchas, in regards to the Terms of Use and Guidelines, when it comes to an app like the one I've just mentioned? What about the copyrights related to the artists/songs? Best Regards, Ricardo
1
0
1.2k
Jan ’23
MusicKit JS v1 token not set in storage
Hello! I'm working to integrate my web application with MusicKit JS. I am experiencing an issue with the authentication flow where the proper localStorage key is not set with the music token after authenticating successfully. The expected output after going through the authentication flow is a localStorage key to be set with a name similar to "music.r4p2h4kf4l.u". I have tested my developer token using a simple HTML file, and after successfully authenticating, the localStorage key is set successfully. My web application that I am developing and experiencing this issue on is built using strapi/reactjs. I have dug into this issue much deeper in the vendor JS code and have possibly narrowed the issue down to immediately after inputting the 6 digit security code. When testing using my simple JS file, a sessionStorage key named "ac" is set to my app's URL (in this example, localhost:3000). When I test using my strapi/react application, this sessionStorage key is not set, and thus I believe this is preventing calls to postMessage and localStorage to not function properly. I have confirmed that when initially opening the auth dialog, the /woa endpoint is called and the referrer parameter is properly set. Does anyone have any idea why this wouldn't work for a reactjs/strapi app? My actual authentication is succeeding and I see a music user token being successfully retrieved in the console within the auth popup. I have spent a lot of time on this and am running out of ideas!
1
0
1.1k
Jan ’23
How to query for an artists latest release using Apple Music API
Hi all - quick question regarding the Apple Music API. I would like to query for an artists most recent album so that I can feature that release more prominently within my app. Looking at the API docs, I could hit an endpoint such as this: https://api.music.apple.com/v1/catalog/us/artists/669831761/albums and that would return all the albums related to that artist. However, it appears that the albums aren't sorted in chronological order, so it seems that I would have to paginate through every page and sort these results to find the most recent release. Is there a better method? I feel like this is a very ineffective practice and would like to hear any possible alternatives, thank you!
2
0
1.9k
Dec ’22
MusicKit playlist creation fails when number of songs is too large
I'm creating a playlist using the MusicKit endpoint and its failing with a generic error when I give it too many songs. [DataRequesting] Failed to perform MusicDataRequest.Context(  url: "https://api.music.apple.com/v1/me/library/playlists",  currentRetryCounts: [.other: 1] ) with MusicDataRequest.Error(  status: 500,  code: 50001,  title: "Upstream Service Error",  detailText: "Service failure: Cloud Library",  id: "NX5X43DEV3KH5NEK3Q7CEHJENM",  originalResponse: MusicDataResponse(   data: 153 bytes,   urlResponse: <NSHTTPURLResponse: 0x0000000280220080>  ) ). I tried setting a maximum of 500 songs and the request succeeded. Is there a known limit to how many songs can be added at once?
1
0
1.6k
Dec ’22
MusicKit Web Components not working
Hi, I noticed in the documentation that v3 supports web components if we pass the data-web-components attr, however this is not the case and no web component is loaded in https://js-cdn.music.apple.com/musickit/v3/musickit.js, should we be using https://js-cdn.music.apple.com/musickit/v3/components/musickit-components/musickit-components.esm.js instead? Thanks
1
1
869
Nov ’22
Playing a song from non-zero starting position
Summary I am trying to play a song starting at a non-zero starting position. For example, I would like to play a song starting at 10 seconds instead of at 0 seconds. Approach setQueue play seekToTime let music = window.MusicKit.getInstance(); // 1: setQueue music.setQueue({ song: "validSongID" }) .then(() = { // 2: play music.player.play() .then(() = { // 3: seekToTime const position = 10; music.player.seekToTime(position); }); }); Expected results The song should start playing at 10 seconds. Actual results ~4 out of every 5 times it works as expected. ~1 out of every 5 times I get the following error: Uncaught (in promise) TypeError: Failed to execute 'remove' on 'SourceBuffer': The end value provided (0) must be greater than the start value provided (0). See also the full error log attached: Error log - https://developer.apple.com/forums/content/attachment/e6252199-17b4-4497-8ee9-d8078cabd7c6 Further Impact The error that is being thrown does not create an mediaPlaybackError event, so I can't even handle the error properly in my application logic.
2
0
1.7k
Nov ’22
Apple Music
hello, I have the latest BETA IOS16 version, I could benefit from the 3-month Apple Music trial offer so I subscribed today and canceled because I had a message telling me that I could take advantage of the offer until January. Except that I no longer have access, do you have a solution or can I benefit from the offer? the goal is to be able to try and potentially subscribe to a definitive package thank!
2
0
863
Oct ’22
Musickit on the web
Hello everyone, I'm currently working on some projects in React that involve using MusicKit on the web. However, I've been having some trouble finding a package that works with React. I've noticed that there's a beta version of MusicKit for web available, but I'm not sure if Apple has released an npm package for it yet. If there isn't an npm package available, is it still possible to use MusicKit on the web using just HTML and JavaScript? I'd appreciate any guidance or advice on how to get started with this. Thank you in advance for your help! Best regards.
Replies
0
Boosts
0
Views
743
Activity
May ’23
Can I integrate MusicKit in a SAAS?
Hi, I'm developing a web app that integrates various widgets into a single page to boost users productivity. I would like to link to integrate Apple Music too using the MusicKit JS SDK. I'll monetize the web app through monthly subscriptions. There they get access to all the widgets. So my question is whether it is allowed? If not, is there any other way I can still give my users ability to play Apple Music from the web app? Thanks
Replies
0
Boosts
0
Views
589
Activity
May ’23
Delete/Remove song (Apple Music For artist)
How can I remove my songs on Apple Music for artist as admin. Is it possible to delete/remove uploaded song on Apple Music for artist.
Replies
1
Boosts
0
Views
803
Activity
Apr ’23
[Apple Music API] What are extended attributes?
In many request you can include "extend" parameters. But there is nowhere list of extended attributes that I can apply to the request. I tried using various option but results are the same as without them.
Replies
1
Boosts
3
Views
1.5k
Activity
Apr ’23
Does apple music api provide featured artists information of a song?
Hey. now I'm using apple music api to collect music informations. but I've noticed that I couldn't get the featured artists information from a song. guess there's a song Foo - Bar (Feat. Baz). In spotify API, we can retrieve featured artist information something like this: { // ... "artists": [ "Foo", // <-- primary artist "Baz" // <-- featured artist ] // ... } but as I see in documentation, there is no API (or relationship with a song) for get all the artists (including featured artists) of a song. GET https://api.music.apple.com/v1/catalog/kr/songs/1544411971 { "data": [ { // ... "attributes": { // ... "name": "36.5 (feat. Hwaji)", // ... }, "relationships": { // ... "artists": { "href": "/v1/catalog/kr/songs/1544411971/artists", "data": [ { "id": "1297171788", "type": "artists", "href": "/v1/catalog/kr/artists/1297171788" } ] } } } ] } as you can see here, there's only one artist relationship object in artists.data array even if the target song have featuring artist. Is there any way to get featured artists information of a song?
Replies
1
Boosts
0
Views
1.5k
Activity
Apr ’23
MusicKit web 403 error issue
Hello! I am currently working on a react.js application that is integrating with the MusicKit v3 library. I have followed the documentation to generate a JWT for MusicKit and add the library to my application. Using my token I am able to successfully retrieve song information from the Apple Music API, but I am having trouble with authentication. When I call music.authorize() and successfully go through the Apple sign in popup, I am receiving the following 403 error: https://play.itunes.apple.com/WebObjects/MZPlay.woa/wa/webPlayerLogout 403 musickit.js:44 Uncaught (in promise) AUTHORIZATION_ERROR: Unauthorized After stepping through the music kit API and login popup with breakpoints, I am seeing that the music user token is null, despite the login popup succeeding and returning a proper token/response: {"isAppleMusicSubscriber":"true","musicUserToken":"Ak4ItOgRRRG2y6xgA/OeWQPK0RqPQ/esAJkRN0B/Ua/AWLT52tLhd2TfzMK6uhH+Nczvd7wjYDM1UewG/NledKtimwlrR+s5tdQPk/FG28zqhBqXZ12q6LC516w8ELZDwv5T61kV8xiJ1KSO1q4pGi01JO7SuPMtOqB/QsycYj+xNnrYUEwlP5tm/zxfg7bWmvuWMwfUruYR+A1U9FdXZsdIITVmxCjiHg8ro9xXRzl6Txhsag\u003d\u003d","cid":"REDACTED","itre":"REDACTED","supported":"REDACTED"} I have tested my application with multiple Apple Music users who have paid subscriptions. All accounts are receiving this same error. I have tried regenerating my JWT token multiple times following various guides. My latest attempt used the following node library and parameters: var jwt = require('jsonwebtoken'); var fs = require('fs'); var privateKey = fs.readFileSync('./AuthKey_MYKEY.p8'); let now = new Date(); let nextMonth = new Date(now.getFullYear(), now.getMonth() + 1, now.getDate()); let nowEpoch = Math.round(now.getTime() / 1000); // number of seconds since Epoch, in UTC let nextMonthEpoch = Math.round(nextMonth.getTime() / 1000); // number of seconds since Epoch, in UTC var payload = {     iss: 'REDACTED', // TEAM ID     iat: nowEpoch,     exp: nextMonthEpoch }; var options = {     algorithm: 'ES256',     header: {         alg: 'ES256',         kid: 'REDACTED' // KEY ID     } }; jwt.sign(payload, privateKey, options, function(error, token) {     console.log(error);     console.log(token); }); I have a valid App Identifier created with the MusicKit App Service enabled. I am stuck! I have no other ideas on the possible root cause here. Is there something I am missing? I have a mobile app currently in Test Flight - does this app need to be released to the app store? I am out of guesses! Any support here would be greatly appreciated! Thank you for your time. Patrick
Replies
9
Boosts
1
Views
3.8k
Activity
Mar ’23
Is there a way to get a unique identifier for a user from MusicKit JS?
Hello! I'm trying out MusicKit JS and am able to log in and retrieve songs from my library, but I want to be able to store some information tied to myself as a user between sessions. I can't seem to find any unique identifier for a user besides maybe the musicUserToken?, which I assume will change at some point. I also can't seem to find any direction on how to get any user information like name/apple id/etc. without also getting an auth token from apple id and then sending the id token back for information. I was just thinking, since they already log in to apple to authorize MusicKit JS, there must be some way to get some unique identifier to tie the logged in user to itself across sessions. Am I missing something or do i need to make another call to get an auth token? Thanks
Replies
0
Boosts
0
Views
933
Activity
Mar ’23
Authorize to Apple Music via In-App Browser (FB Messanger,Instaram,Twitter))
We're using  https://developer.apple.com/documentation/musickitjs to authorize Apple music, on Desktop it opens a new window to authorize to apple. But It's NOT working on mobile In-App Browser (both iOS &amp; Android), probably because on mobile messenger, it's not possible to allow the opening of multiple windows. Are we missing something here? Any workaround for it? Has anyone done that?
Replies
3
Boosts
0
Views
2.6k
Activity
Mar ’23
Is Apple going to stop people from abusing MusicKit developer token taken from music.apple.com
Many developers know that you can easily get a MusicKit developer token from music.apple.com. Just go to the console of the browser and input "MusicKit.getInstance().developerToken". As of now, the token is eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IldlYlBsYXlLaWQifQ.eyJpc3MiOiJBTVBXZWJQbGF5IiwiaWF0IjoxNjQ2NDM1NTgxLCJleHAiOjE2NjE5ODc1ODF9.Ob5bfZBWLDlDkR4r5fNXIjp1Y1G0qY5mP9MVBm1mDFjG701_6AcZS6nwjk-CMJE2b8VLv1JWxKR5j5BDkKxQ7w This token is not like the one we developers generate ourselves that has many limitations. Instead, it is a privileged one that has some powerful features and is able to invoke some "private" API as follows: Deleting users' resources (for example, DELETE method on https://amp-api.music.apple.com/v1/me/library/songs/{id}) Getting and showing lyrics Rename playlist, reordering songs in a playlist Many other features that music.apple.com could do but your apps couldn't I think it's fine to use it privately and do not be evil, but Apple failed to stop people from abusing it. I already spotted one app selling on Microsoft Apps Store(https://apps.microsoft.com/store/detail/cider-alpha/9P21XJ9D9G66) that is taking advantage of this "privileged" token. Proofs are as follows: fetch the privileged developer token https://github.com/ciderapp/Cider/blob/912a1816de01cbfc55e00a48f187d635d65c0e9c/src/renderer/index.js#L3665 removeFromLibrary https://github.com/ciderapp/Cider/blob/912a1816de01cbfc55e00a48f187d635d65c0e9c/src/renderer/index.js#L2254 load official AM lyrics https://github.com/ciderapp/Cider/blob/912a1816de01cbfc55e00a48f187d635d65c0e9c/src/renderer/index.js#L2237 They get the token for free, take the source code from music.apple.com with some modification, put it into an electron app. Then sell it and beat other competitor apps because it's more "powerful". And this makes me a developer obeying the rules like a stupid fool because I pay $99 for ADP to get the developer token, while they get it for free I got a token that has limited features, while theirs are far more powerful I already submitted it to Apple but got no response. Apple should really start to do something, otherwise It's like telling every developer that: Stop paying $99 for ADP to get your developer token, just grab it from music.apple.com. It's free yet super powerful to call private APIs and bypass limitations.
Replies
9
Boosts
0
Views
7.0k
Activity
Feb ’23
How to set music user token expiration?
I would like to create presave feature on my app with Apple Music API. On this article, developer token has an option to set expiration date but music user token don't. Does music user token has an option to set expiration date? If not, how do I know expiration date on music user token?
Replies
2
Boosts
0
Views
2.3k
Activity
Feb ’23
When does a Music User token expire?
After how much time does a Music User token expire? For my use case I am unable to reauth the user using MusicKit JS, so I would like to know how long I can use the User token.
Replies
2
Boosts
0
Views
2.0k
Activity
Feb ’23
Apple Music Terms of Use / Guidelines
Hi, I'm working on a web application that uses Apple Music API, but after reading the terms of use and guidelines, it's still shady if what I want to achieve is allowed or not. The core functionality is: users are able to host a "listen party" where everyone can listen to the same song together (using their subscription, no streaming). Just the host can control the music playback. The web app is "freemium". This means that free and paid users can access the same content, there's no paywall. What are the gotchas, in regards to the Terms of Use and Guidelines, when it comes to an app like the one I've just mentioned? What about the copyrights related to the artists/songs? Best Regards, Ricardo
Replies
1
Boosts
0
Views
1.2k
Activity
Jan ’23
MusicKit JS v1 token not set in storage
Hello! I'm working to integrate my web application with MusicKit JS. I am experiencing an issue with the authentication flow where the proper localStorage key is not set with the music token after authenticating successfully. The expected output after going through the authentication flow is a localStorage key to be set with a name similar to "music.r4p2h4kf4l.u". I have tested my developer token using a simple HTML file, and after successfully authenticating, the localStorage key is set successfully. My web application that I am developing and experiencing this issue on is built using strapi/reactjs. I have dug into this issue much deeper in the vendor JS code and have possibly narrowed the issue down to immediately after inputting the 6 digit security code. When testing using my simple JS file, a sessionStorage key named "ac" is set to my app's URL (in this example, localhost:3000). When I test using my strapi/react application, this sessionStorage key is not set, and thus I believe this is preventing calls to postMessage and localStorage to not function properly. I have confirmed that when initially opening the auth dialog, the /woa endpoint is called and the referrer parameter is properly set. Does anyone have any idea why this wouldn't work for a reactjs/strapi app? My actual authentication is succeeding and I see a music user token being successfully retrieved in the console within the auth popup. I have spent a lot of time on this and am running out of ideas!
Replies
1
Boosts
0
Views
1.1k
Activity
Jan ’23
How to query for an artists latest release using Apple Music API
Hi all - quick question regarding the Apple Music API. I would like to query for an artists most recent album so that I can feature that release more prominently within my app. Looking at the API docs, I could hit an endpoint such as this: https://api.music.apple.com/v1/catalog/us/artists/669831761/albums and that would return all the albums related to that artist. However, it appears that the albums aren't sorted in chronological order, so it seems that I would have to paginate through every page and sort these results to find the most recent release. Is there a better method? I feel like this is a very ineffective practice and would like to hear any possible alternatives, thank you!
Replies
2
Boosts
0
Views
1.9k
Activity
Dec ’22
MusicKit playlist creation fails when number of songs is too large
I'm creating a playlist using the MusicKit endpoint and its failing with a generic error when I give it too many songs. [DataRequesting] Failed to perform MusicDataRequest.Context(  url: "https://api.music.apple.com/v1/me/library/playlists",  currentRetryCounts: [.other: 1] ) with MusicDataRequest.Error(  status: 500,  code: 50001,  title: "Upstream Service Error",  detailText: "Service failure: Cloud Library",  id: "NX5X43DEV3KH5NEK3Q7CEHJENM",  originalResponse: MusicDataResponse(   data: 153 bytes,   urlResponse: <NSHTTPURLResponse: 0x0000000280220080>  ) ). I tried setting a maximum of 500 songs and the request succeeded. Is there a known limit to how many songs can be added at once?
Replies
1
Boosts
0
Views
1.6k
Activity
Dec ’22
Change my App icon and developers name on the app store
Can someone help me how I can change my app icon to another good image. And can someone help me on how I can change the developer name in the app store. Thank you guy.
Replies
1
Boosts
0
Views
1.2k
Activity
Dec ’22
MusicKit Web Components not working
Hi, I noticed in the documentation that v3 supports web components if we pass the data-web-components attr, however this is not the case and no web component is loaded in https://js-cdn.music.apple.com/musickit/v3/musickit.js, should we be using https://js-cdn.music.apple.com/musickit/v3/components/musickit-components/musickit-components.esm.js instead? Thanks
Replies
1
Boosts
1
Views
869
Activity
Nov ’22
High-resolution support for MusicKit.JS
I'm very happy that Apple Music now supports lossless audio. However, the applications we have created using MusicKit and MusicKit JS currently do not seem to play in lossless or high-resolution formats. When will we developers be able to use MusicKit and MusicKit JS to play songs in lossless and hi-res formats?
Replies
4
Boosts
2
Views
4.0k
Activity
Nov ’22
Playing a song from non-zero starting position
Summary I am trying to play a song starting at a non-zero starting position. For example, I would like to play a song starting at 10 seconds instead of at 0 seconds. Approach setQueue play seekToTime let music = window.MusicKit.getInstance(); // 1: setQueue music.setQueue({ song: "validSongID" }) .then(() = { // 2: play music.player.play() .then(() = { // 3: seekToTime const position = 10; music.player.seekToTime(position); }); }); Expected results The song should start playing at 10 seconds. Actual results ~4 out of every 5 times it works as expected. ~1 out of every 5 times I get the following error: Uncaught (in promise) TypeError: Failed to execute 'remove' on 'SourceBuffer': The end value provided (0) must be greater than the start value provided (0). See also the full error log attached: Error log - https://developer.apple.com/forums/content/attachment/e6252199-17b4-4497-8ee9-d8078cabd7c6 Further Impact The error that is being thrown does not create an mediaPlaybackError event, so I can't even handle the error properly in my application logic.
Replies
2
Boosts
0
Views
1.7k
Activity
Nov ’22
Apple Music
hello, I have the latest BETA IOS16 version, I could benefit from the 3-month Apple Music trial offer so I subscribed today and canceled because I had a message telling me that I could take advantage of the offer until January. Except that I no longer have access, do you have a solution or can I benefit from the offer? the goal is to be able to try and potentially subscribe to a definitive package thank!
Replies
2
Boosts
0
Views
863
Activity
Oct ’22