swingmx / swingmusic

Swing Music is a beautiful, self-hosted music player for your local audio files. Like a cooler Spotify ... but bring your own music.
https://swingmx.com
MIT License
678 stars 41 forks source link

PWA support? #140

Closed Ronald-Diemicke closed 10 months ago

Ronald-Diemicke commented 11 months ago

This project seems awesome... One thing it is missing is PWA (Progressive Web App) support. It'd be cool to see a way too that you could 'pull' music to your local device temporarily (maybe some sort of cache storage?).

cwilvx commented 11 months ago

The PWA for mobile and desktop is already implemented and will be available for the next release. But, it's just a windowed version of the page you access in the browser.

The app does not process any files on the client, it does so on the server. So it's not possible to have the second part of your request.

Ronald-Diemicke commented 11 months ago

The app does not process any files on the client, it does so on the server. So it's not possible to have the second part of your request.

So that confuses me a bit... My music library is being used... the server is presumably just "serving" the files (either streaming them or sending the MP3 to the device) and these are being played on the client, no?

In either case, the browser has native mp3 playback capability - so wouldn't it be possible to cache the files and use a service worker to 'proxy' these back to the application when in an offline state?

cwilvx commented 11 months ago

The client just streams the files. Basically, the app can't work without the server. It can't be partially functional. It's either the server is running or not.

The server doesn't only serve files, it does a lot of things. Caching and all that would only introduce a lot of complications.

So, I don't it's possible to have what you're requesting.