zachomedia / apple-music-webplayer Goto Github PK
View Code? Open in Web Editor NEWWeb player for Apple Music (using MusicKit JS)
Home Page: https://music.zacharyseguin.ca
License: MIT License
Web player for Apple Music (using MusicKit JS)
Home Page: https://music.zacharyseguin.ca
License: MIT License
just login as usual music library not loaded
https://screenshotscdn.firefoxusercontent.com/images/2c250f32-84fa-4824-94b5-8e8310265428.png
Sometime playlist stop playing on next song and log this errors:
Uncaught (in promise) DOMException: Failed to read the 'buffered' property from 'SourceBuffer': This SourceBuffer has been removed from the parent media source.
at Buffer.get [as endBufferedTime] (https://js-cdn.music.apple.com/musickit/v1/musickit.js:13:124407)
at https://js-cdn.music.apple.com/musickit/v1/musickit.js:13:126279
at new Promise (<anonymous>)
at https://js-cdn.music.apple.com/musickit/v1/musickit.js:13:126215
at Buffer.<anonymous> (https://js-cdn.music.apple.com/musickit/v1/musickit.js:13:125856)
at https://js-cdn.music.apple.com/musickit/v1/musickit.js:13:14390
at Object.next (https://js-cdn.music.apple.com/musickit/v1/musickit.js:13:14495)
at https://js-cdn.music.apple.com/musickit/v1/musickit.js:13:13411
at new Promise (<anonymous>)
at __awaiter (https://js-cdn.music.apple.com/musickit/v1/musickit.js:13:13146)
at Buffer.dequeueBufferAction (https://js-cdn.music.apple.com/musickit/v1/musickit.js:13:125622)
at SourceBuffer.i (https://music.zacharyseguin.ca/static/js/vendor.e775b0f607ff1d577284.js:12:31208)
musickit.js:13 Uncaught (in promise) DOMException: The play() request was interrupted by a new load request. https://goo.gl/LdLk22
Navigator: Chrome Version 67.0.3396.99 (Build officiel) (32 bits) / Windows
Not tested on my mac
As the app is currently slightly messy, it might be useful to start accepting simple design mockups. If you do, I can try to contribute myself.
I can see my up next but there is no way to clear the queue or manipulate it (move songs around in the queue).
This is needed for Apples bad habit of adding all tracks in a playlist/album if its played via double-click vs. using specifically "play next" "play after" that does build a queue one track at a time. Maybe also add an option to defeat that functionality so double click plays just the selected track only.
It would be better for the homepage to show something more than the current welcome message, as having to go to Recommendations for example each time is slightly counterintuitive. I'd suggest to show recently listened songs on the homepage, and keep the welcome message below.
Music that has been purchased by the user will show up in the library listing, but uppon clicking on any song, the following errors are logged in the console:
I'm specifically talking about music that has been purchased, and is not available otherwise. For instance, I'm trying to listen to King Crimson's In the Court of the Crimson King, which is only available throught purchase.
First: thanks for building this, it's awesome! I'm using it on Linux, and it's super slick.
I tend to love/dislike songs to affect Apple's recommendations, but don't see a way to do that in the webplayer yet. I'm not familiar with Apple's APIs for this, but it looks like it's possible to do this via the API? https://developer.apple.com/documentation/applemusicapi/add_a_personal_song_rating
As the title says.
When clicking next or previous, and that song is not available, it always stays on the same song.
The previous and next buttons should go forward and backwards until a playable song is found.
A really great feature would be to add last.fm integration to the player.
I have songs that are no longer on my Apple Music, who's album title, with a blank cover show on the albums section. Furthermore, when I click on them, there are no tracks.
Right now if someone wants to run this project locally, they need to either have their own Apple developer account and generate their own token, or pull up the compiled source from the production build on music.zacharyseguin.ca and find your token there.
The token was designed to be shipped in client-side code, so I don't see any huge concerns with publishing it in the repository. If someone wants to abuse the API with your token they can scrape the token from the built code anyway, so not publishing it here doesn't really give you much additional protection.
(Similarly with the Sentry plugin - right now you have to either delete the privateConfig import or create a new file before it will build)
Tracks longer than 10 minutes stop playing at 9:59 minutes. Nothing gets logged to the console.
All the artwork from matched or uploaded songs in my library take too long to load.
I've noticed that all artworks that are not from the store are loaded in the .png format.
However, none of the songs in my library (matched or uploaded) have .png artwork.
This seems incredibly wasteful, slow and unnecessary.
When i change my settings, player reset current playing song.
I'll be cool if current song whould be keeping 😊
PS: thx for your work. Just a awesome idea 👍 ! I'll make PR soon for features and bugs fixed !
URL for Library: https://music.zacharyseguin.ca/library/search?q=
URL for Apple Music: https://music.zacharyseguin.ca/search?q=
The included url results in an "Unexpected error" in the UI, for both for Apple Music, and Library queries.
The first error is with Apple Music and the second with the library.
On attempting to play anything in Safari 11.1.2 for Mac, it just sits there spinning and logs:
Refused to load *url* because it does not appear in the media-src directive of the Content Security Policy.
I believe this is trivially solved by adding a <meta http-equiv="Content-Security-Policy">
to the header of each page, allowing access to Apple's AWS.
Add playlist to library button stays enabled even after the playlist is added to library. That button should be removed after the playlist is added to library.
About 1.29GB of unique album art data (assuming duplicate data is not served by the MusicKit.js API) is associated for the around 10.000 songs in my Music Library.
The tab crashes on Chrome when about a third if data is loaded, when viewing the list of songs. The app may be hitting memory limits (it crashes at around 4GB) as this is reproduced in a computer with 8GB of RAM.
I am working on converting this into a native electron app (see this release) but I'm running into some bugs for which I'll have to run my own instance first, so how shall I do this?
The same song keeps playing, even though the thumbnail and the title being changed.
It takes time to change, and suddenly all the previous clicks are recorded and songs go way ahead than the very next one.
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://play.itunes.apple.com/WebObjects/MZPlay.woa/wa/widevineCert. (Reason: CORS header ‘Access-Control-Allow-Origin’ does not match ‘https://embed.music.apple.com’).
Firefox, problem occurs without any add-ons enabled. Apple Music toolbox works fine.
It would be awesome if we could get an Electron version or something with Photon.css or an Apple-like CSS system for native integration.
I might do one myself based off of this, but I'd at least like to throw in a suggestion.
Not sure what I am doing wrong here, but when I select a song, it appears at the top of the screen but does not begin playing. Previews of songs would play fine before I logged in (the 30 second clips), but after logging in, no songs play. My playlists and library do show up fine.
A key feature that seems to be missing (or at least very hard to discover) is loop and shuffle.
The "PLAY ALL" button can clearly keep track of all the tracks listed when displaying a playlist, album or an artist's discography, so I imagine it can't be too hard to get it to loop and shuffle manually if Apple's API doesn't already provide that option.
On iOS and iTunes, the library page shows the most recently added songs/albums to the library for quick access. It'd a good addition to the web app if this is possible.
A newly added playlist does not show up in library playlist view until user hit refresh. Expect to refresh the library playlist section immediately after adding any container to library.
It would be awesome to have access to beats one and other radio stations through the web player, I'd really love to be able to use this as a complete replacement of itunes. Is radio support part of the API currently or is this not possible?
I tried adding this song to Library https://itunes.apple.com/br/album/they-long-to-be-close-to-you/14172524?i=14172565&l=en.
Instead of adding that song, it added another version from a generic compilation album that is not available in my location. So while streaming is fine and works, the version that was added is wrong and does not play.
When I try to play the song added it gives "unexpected error" message.
Great tool you are creating, congratulations!
One thing I noticed though is that the songs are only streamed at a low bitrate (64kbps). The Music Kit JS API allows you to select between 64kbps (normal quality) and 256kbps (high quality) (https://developer.apple.com/documentation/musickitjs/musickit/playbackbitrate)
Is it possible to switch to better quality?
Thanks and keep up the good work!! :)
As this is a project that likely has a lot of public appeal, it would be nice if the codebase was as accessible as possible for modification. Typescript helps fill that role, making it much simpler to debug and develop Javascript applications by forcing types.
Would a PR converting the system to Typescript be acceptable?
I have 2 "smart" playlists and they do not show up on your web player.
As documented in other bug reports, MusicKit.js has problems loading artwork timely.
One thing I noticed is that often, for the same album, it will re-download the same artwork multiple times, from different locations (the URL of each asset is different) when displaying the songs list.
But when I checked the SHA1 of the file, they match, which means that the same file is being downloaded twice and therefore it is a waste of data.
It also severely slows down the application.
This happens with an incredibly annoying frequency in files in my Library, both matched and uploaded.
It also does not happen with some albums, both matched and uploaded.
After running npm install on windows I get teh following warnings
npm install
npm WARN [email protected] requires a peer of [email protected] - 3 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
audited 11834 packages in 8.416s
found 0 vulnerabilities
Then when running
npm run build
ERROR Failed to compile with 1 errors 17:48:53
This relative module was not found:
* ./private in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=script&lang=js
ERROR Build failed with errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `vue-cli-service build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Adam\AppData\Roaming\npm-cache\_logs\2018-06-17T16_48_53_700Z-debug.log
PS E:\Users\Adam\Documents\GitHub\apple-music-webplayer2>
I'm not that familiar with node & npm but I'm pretty sure something here isn't quite right .
I completely love it in the browser though!
Google Chrome v67.0.3396.99 (Official Build) (64-bit)
Manjaro Linux KDE
After signing into the auth window that pops up, the pop up window shows a blank white page. Closing that window does not do anything either. Neither does refreshing the page.
Every time I try to play a song which has been added from Apple Music, I get a "Not Playable" error at the bottom of the page.
For the current song, add a "Go to album" link.
All links in the footer must have target blank to keep music playing
(allways keep user on the app 😉)
This results in you having to logout / log back in.
Two issues:
I use the genre sorting to listen to my music and it would be great to see it on this web player.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.