Hi thanks for the feedback ! This is a personal project that i made to learn about css (sass) and vue. This is just something i made for fun and is not meant to replace apple's official website in any way. And i also wanted lyrics and youtube video integration, and genius api also has a really cool feature where you can select a part of a lyrics and it gives you really detailed description about that part, so i wanted a player with that feature built in. I dont think apple would implement something like that for legal reasons (?)
Shallow and negative dismissal aside, if this project doesn’t randomly get stuck and force a refresh, that would be an improvement over beta.music.apple.com.
I regularly click on another song during a playlist only to have it just hang forever.
Well one thing it offers is that the layout isn't broken, like Apples site's seems to be in my browser. Also in terms of basic functionality, you can search for a song name and click the album title to go to the whole album, which seems to be not possible on Apple's site. So that's something.
This comment breaks both the HN guidelines and the more specific guidelines for Show HN. Could you please read them and stick to the rules when posting? We're trying not to be the nasty sort of internet place here.
The scss files are compiled by webpack to normal css at build time using sass loader, I used vue-cli to automate the webpack configuration https://cli.vuejs.org/ process
Oh and the poss css file is just a leftover config file for a package
that i decided not to use ( Ant Design )
It’s always nice to see a full application as a reference (vs small snippets in docs/blogs), when you have those questions “I wonder how they solved this?”.
I quite like Apple’s decision to expose a streaming API. I’m still a bit unsure about the terms and monetising any app you write over it, but it looks like a good way to get native Linux support and also add on things like Spotify style discovery.
The only thing stopping me switching is Spotify’s ability to show me music I might like. Apple mostly gives you the top hits.
They expose an API, you can write against it in Swift with the right libraries. No reason why you can't write against the same API in Linux using your language of choice.
Apple only provides bindings for Swift/JS/Obj-C though, so it'd be a bit of work.
Last time I checked (a few months ago) there was no access to the audio outside of the browser i.e. DRM protected. Accessing the rest of the API is presumably simple but not very interesting.
A friend of mine worked on a similar web player for Apple Music that got a lot of attention, Musish [0]. If I remember right, they were working on it before Apple released their web player. It's totally open source as well, so you might be able to take some inspiration from their work too!
This looks good and functions very nicely. However, the playhead in the progress bar moves in discreet steps. It'd be better if its movement is smoother. the playhead inside https://beta.music.apple.com unfortunately behaves the same way.
Now that you point it out it does look kind of weird... Maybe be i should create a new component for the play progress which increments in very tiny scale. Thank you for the feedback!
The best way I’ve found is to update the DOM in an requestAnimationFrame loop, polling the Audio Element’s currentTime, since its events don’t fire reliably.
Very nice, thanks for sharing! One suggestion: music player applications benefit greatly from virtual scrolling, since lists of songs or albums can potentially be very, very long. Nonetheless, fantastic job!
32 comments
[ 4.5 ms ] story [ 98.2 ms ] threadLatest commit X 8 months ago, 8 months from now.
That's awesome, and I'm glad they did! Why give them a hard time for that?
Who's life are you improving with that comment?
I regularly click on another song during a playlist only to have it just hang forever.
https://news.ycombinator.com/newsguidelines.html
https://news.ycombinator.com/showhn.html
This shows a good way to learn Vue, Sass, and how to integrate with YouTube and the Genius API for lyrics.
What do you use PostCSS for?
How are the the scss files actually compiled?
The scss files are compiled by webpack to normal css at build time using sass loader, I used vue-cli to automate the webpack configuration https://cli.vuejs.org/ process
Oh and the poss css file is just a leftover config file for a package that i decided not to use ( Ant Design )
Thanks for putting this out there!!
The only thing stopping me switching is Spotify’s ability to show me music I might like. Apple mostly gives you the top hits.
Apple only provides bindings for Swift/JS/Obj-C though, so it'd be a bit of work.
A friend of mine worked on a similar web player for Apple Music that got a lot of attention, Musish [0]. If I remember right, they were working on it before Apple released their web player. It's totally open source as well, so you might be able to take some inspiration from their work too!
[0]: https://github.com/Musish/Musish
The articles mentioned here were very interesting, and im actually looking forward to Vue 3