7 ms·
MusicKit JS
- staticvar 7y agoYou can play your iTunes library online now?
- benbristow 7y agoDoesn’t seem like there’s an NPM package. Would be better if you could import it with Webpack and use await rather than callbacks etc.
- mrcarruthers 7y agoWell it's using promises, so you can just await those. But agreed, the documentation looks like it was written in 2014/2015.
- zodiakzz 7y agoThe "user's cloudAlbums" example is awful. Might as well use callbacks if you aren't gonna chain promises to avoid callback hell.
- tantalor 7y agoWhere is that? Link?
- zodiakzz 7y agoUnder the "JavaScript Methods" heading https://developer.apple.com/documentation/musickitjs#3004817 https://developer.apple.com/documentation/musickitjs#3004817 music.authorize().then(function() { music.api.library.albums.then(function(cloudAlbums) { // user's cloudAlbums }); }); Should be: music.authorize().then(function() { return music.api.library.albums; }).then(function (cloudAlbums) { // user's cloudAlbums });
- lqs469 7y agoIt looks like Apple doesn't want to use the NPM ecosystem.
- dawnerd 7y agoAbout time. Rdio has such an amazing embed api (I built the JS api for it at the time and a site that was really heavily used). Total shame when Apple bought and shut them down. Maybe I can bring that old site out from the dead. Hmm
- mackey 7y agoApple did not buy Rdio, they basically went out of business and sold what they left to Pandora.
- dawnerd 7y agoHmm it's been a while. I don't know why Apple stuck in my brain. Maybe it was another service similar... But still, I miss rdio.
- scarface74 7y agoAre you thinking about Lala? https://www.cultofmac.com/211126/the-inside-story-of-how-apple-bought-music-startup-lala-and-then-bought-it-again/ https://www.cultofmac.com/211126/the-inside-story-of-how-app...
- dawnerd 7y agoOh very likely. I don’t really remember the name but they interface looks so familiar.
- holler 7y agoI used to love using Rdio and thought their site was the best designed music app at the time! Was bummed when it shut down.
- kitsunesoba 7y agoProps to Apple for releasing this. The way Spotify has handled the deprecation of libspotify without a proper replacement and removing streaming/playback from their other SDKs has been extremely disappointing.
- DelightOne 7y agoI'm kinda late to the party and I wonder. With streaming/playback, do you mean player control, playing sound or other missing features? https://developer.spotify.com/documentation/web-playback-sdk/reference/#api-spotify-player-toggleplay https://developer.spotify.com/documentation/web-playback-sdk...
- kitsunesoba 7y agolibspotify and the old iOS Spotify SDK used to provide the ability to stream and play songs in your app, without having to play through a Spotify device or backgrounded Spotify app. This was particularly great in the case of libspotify because it was written in C, making it easy to bind to whichever language you preferred. It was complete enough to write an entire alternative client with. It looks like this web playback SDK works by creating a local Spotify Connect device to play to, which I guess would technically work, but it’d be much nicer if it just directly played songs as libspotify did and now MusicKit JS does.
- DelightOne 7y agoHmm that sounds indeed much better! Sadly not C, but cross-platform JavaScript is still nice to have. Is it possible to embed this in native apps with an embedded browser? Hmm sounds complicated, or is there a different way to integrate this (using the apis the library uses).
- kitsunesoba 7y agoEmbedding just the web player in native apps would be a pain due to communication between the native and web layer. If you just did the whole thing in JS (electron, etc) you’re barely any better off than the official client in terms of resource consumption, defeating much of the point of building an alternative client. There are reverse engineered libraries available (mainly librespot[1]) but they come with the caveat of violating the EULA and risking the accounts used with it. AFAIK Spotify hasn’t banned anybody for using it yet, but it’s always a possibility. [1] https://github.com/librespot-org/librespot https://github.com/librespot-org/librespot
- gyrgtyn 7y agocan a web app play music and run js with the screen off?
- parhamn 7y agoI've always wondered why Netflix and all don't have clip widgets that you can link/embed on other sites. It is essentially free mass embedded paywalls.
- GuiA 7y agoI can see the short term benefit, but inevitably some big content distributor would want to opt out on condition of providing their content to Netflix due to some disadvantage they perceive with it. From there more and more content providers would want to opt out (“Disney does it, we should do it too because it makes us more like Disney”) and then the feature becomes useless and people who use it get mad.
- jamsinclair 7y agoA 99 USD commercial web API. This one, and their other endpoints, require being part of paid Apple Developer program. I understand, but it's frustrating if you're wanting to play around or use in free open source.
- saagarjha 7y agoDo any competing platforms have a similar API with a less imposing barrier?
- mixedCase 7y agoSpotify and Deezer, OTOH.
- cptskippy 7y agoI'm ok with it. It deincentivizes abuse not unlike how SSL originally worked before it became a farming operation.
- devwastaken 7y agoI'm curious how SSL is being abused.
- cptskippy 7y agoOnce upon a time businesses had to submit paper work verifying their business to a registrar to get an SSL cert. It wasn't just about encryption but also identity. I remember as late as 2004 trying to scrounge up copies of our business license to fax or mail into our registrar. Today the SSL cert has lost it's identity aspect and is just a sign of secure communication, not trusted.
- nine_k 7y agoExtended validation certificates still exist, and do require the paperwork.
- PedroBatista 7y agoI don't get it. What's the use for this? ( in a mainstream product way, not in some cool personal private project way)
- deleted 7y ago[deleted]
- lqs469 7y agoPerhaps the place where you are most likely to see it is the showcase page for new Apple products, Just like ARkit before.
- gcb0 7y agoThis is the MID background music tag for IOS (as android users will likely not have an icloud account to begin with, or even if they have, i am sure apple login flow for those users will be annoying) I was expecting an app could do things like access to music data and do remixes or other things, but you can barely play/pause via their api.
- duskwuff 7y agoOne real-world use case is on Genius.com, where it can be used to play songs (or previews, for users without Apple Music) while reading an analysis of their lyrics.