Giter Club home page Giter Club logo

diffuse's Introduction

Diffuse

A music player that connects to your cloud/distributed storage, in the form of a static, serverless, web application.

๐Ÿ“ Available at diffuse.sh and for download.


Integrations

Music layer for music storage. User layer for user-data storage.

Music layer

User layer


Hosting on your own server

Diffuse is a static web application, which means it's just HTML, CSS, and Javascript. No REST API, database, or anything backend-related involved. The app uses a hash (aka. fragment-based) routing system, so you don't need any special server rules for routing. You can download a pre-build web-only version of Diffuse on the releases page. Diffuse uses service workers, so you may need HTTPS for it to work smoothly in certain browsers.

I should also note that some source services use OAuth, so you'll need to use your own application credentials (eg. Google Drive client ID + secret). That said, if you're working locally, you can use http://localhost:8000 or http://127.0.0.1:44999 to use the default ones, that's what the old Electron app was using.

In short:

  • Diffuse is a static, serverless web application
  • Routing is done using hashes/fragments (eg. diffuse.sh/#/sources)
  • Download a web build on the releases page
  • Uses service workers (use HTTPS if possible)
  • May need own OAuth application credentials for some source services

Building it yourself

This project can be built with Node.js.

# ๐Ÿฑ

# 1. Install dependencies
npm install

# 2. Build
npx just build

# 3. Start static-file server
npx just server

# 4. Watch for changes (requires [watchexec](https://github.com/watchexec/watchexec/) to be installed)
npx just watch

# Alternatively, to build, serve & watch:
npx just

diffuse's People

Contributors

adrianoferrari avatar bentranter avatar borewit avatar icidasset avatar netherquark avatar toraritte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

diffuse's Issues

Add more playlists features

  • Add ability to reorder tracks in playlists with drag n' drop
  • Add ability to select multiple tracks and add them to a playlist in one go (use Shift + click to select multiple)

The name

Will be Isotach for the next few months, after that I'll think again about renaming it.

Suggestions:

  • Tapes (based on my original idea Audiotapes)
  • Soundstack

Add audio normalizer

Optimize fonts

  • Create custom icon font for the two icons (favourite/heart icons) we use from the Material Icons set, as opposed to loading the entire thing. Note that this font is only used for those two icons, in the other places we use SVG because the browser renders fonts way faster.
  • Place the Montserrat font in the project and don't load it from the Google CDN, so that it's available for offline use. Note: There may also be some other fonts (about page and stuff).

Improve source-processing performance

When the user has a large collection (ie. like my 10000 tracks collection) and the sources are processing, the app doesn't perform that well. After the processing is completed it works fine though.

Possible solutions:

  • Move more stuff to web workers?
  • Use an XML decoder with better performance?
  • ...

Improve indexedDB usage

At the moment we're using indexedDB, which works ok-ish, but every time we want to change something in the data structure the user loses his data and has the re-authenticate. This is because for indexedDB you have to define a database schema and for every change to this schema you have to write migrations to get from state A to B.

Currently, we don't write these migrations and that's why the user loses all of his/her data. Which obviously is a bummer, so we need to find a way to get around this.

Ideas

Store all of the user data as a JSON blob in the database

This sounds like a good idea, but seems like a non-trivial thing to do with indexedDB.

Fix search

When you type in the search-text field, it stores the user's settings and that blocks the app if you have a lot of tracks.

Add file upload

Loads of work to do for this one:

  • Implement uploaders for each service
  • Handle form uploading
  • Handle file dropzones

Cannot process any music on iOS

Tested on the Chrome iOS client with a Amazon S3 source.

// XHR Generic error
// https://github.com/aadsm/jsmediatags/blob/master/src/XhrFileReader.js#L221
XHR.status = 0
XHR.readyState = 4

Most likely a CORS issue.

Which services should we integrate with?

๐Ÿ’ Suggestions are welcome!

Music storage

Maybe someday (if possible):

Cannot implement:

  • One Drive
    Too much of a hassle, requires use of an iframe and doesn't allow CORS with the code flow (refresh-token flow). Using an iframe is currently impossible and would mean rewriting a large part of the app.

Authentication / Information storage

  • Blockstack
  • IndexedDB
  • IPFS (v2)
  • RemoteStorage
  • Solid (postponed, not enough tooling yet)
  • Textile (v2)

Get rid of remoteStorage warning

WARNING: please call remoteStorage.access.claim('/isotach/', 'r') (read only) or remoteStorage.access.claim('/isotach/', 'rw') (read/write) first

Currently playing track isn't always indicated

The now-playing state tends to dissapear when the tracks collection changes after a track's been inserted (ie. it's already playing). For example, start playing a track and then change the sorting method.

LocalStorage quota for anonymous mode

Is being exceeded way too quick and everything breaks when it does.

Solutions:

  • Use index_db or whatever that thing is called
  • Disable album_art in anonymous mode (not cool)

mp3 files with a side data stream can't be added

While trying to figure out why some of my audio tracks weren't being imported into the OR track list, I noticed that the mp3 files that weren't be imported were the ones with an embedded side data stream (like album art). These mp3s play fine in the browser if accessed directly, but they seem to be getting filtered out while processing the sources.

I can provide an example if needed, but I hesitate to put a hash pointing to a copyrighted song in this GitHub issue.

Here's an example of a file that cannot be added (as seen by ffprobe):

Input #0, mp3, from '04 Blankets of Night.mp3':
  ...
  Duration: 00:07:59.74, start: 0.025056, bitrate: 259 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 255 kb/s
    Metadata:
      encoder         : LAME3.97 
    Side data:
      replaygain: track gain - -6.900000, track peak - unknown, album gain - unknown, album peak - unknown, 
    Stream #0:1: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 600x600 [SAR 1:1 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
    Metadata:
      comment         : Cover (front)

Here's an example of a file that can be added:

Input #0, mp3, from '01 Before the Storm.mp3':
  ...
  Duration: 00:01:09.09, start: 0.025057, bitrate: 320 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
    Metadata:
      encoder         : LAME3.93 

Add a better processing indicator

Possibly something that's visible on all pages, or, a big block below the sources "info" in color. Either way, it should also be able to show you the progress.

Volume control

I think a volume control would be handy.

I'm not sure if this is already planned, or if maybe there's an ideological opposition to volume controls (like Bandcamp's answer to "where's the volume control?").

IndexedDB resets (anonymous mode) out of nowhere

Which isn't supposed to happen.
I could be imagining things though ๐Ÿค”
Everything seems to work fine for a day and then the next day the data is gone ๐Ÿคฆโ€โ™‚๏ธ

Electron integration

Basic electron version has been added + support for local files.

Still needs:

  • Support for media keys

Add better mobile support

Todo:

  • Fix favicons, remove transparent border (empty space)
  • Indexeddb doesn't seem to work on mobile
  • Safari version added to homescreen crashes

Audio visualisations

Idea:
Add peak meters, the left channel on the left and vice versa.
Add setting to disable.
Peak meters are hidden when the window is too small.

One possible look is the one from v1:
https://github.com/icidasset/ongaku-ryoho-v1/blob/master/app/assets/javascripts/application/views/visualizations_view.js.coffee

Much like ...

but then without colors (work with transparency), smaller bars (1 or 2 px) and vertical.

Other possible look is just a thin vertical line, left and right from the track list.
Similar to the style of the progress bar, but thinner.

Other idea:
Minimalist equivalent of loudspeakers animation.
https://img.buzzfeed.com/buzzfeed-static/static/2014-12/12/19/enhanced/webdr09/anigif_enhanced-27488-1418430525-2.gif?downsize=800:*&output-format=auto&output-quality=auto
http://www.netanimations.net/deep-blue-bass-speaker-thumping-pounding-vibrating.gif
https://img.buzzfeed.com/buzzfeed-static/static/2014-12/12/19/enhanced/webdr09/anigif_enhanced-27563-1418430720-3.gif?downsize=800:*&output-format=auto&output-quality=auto

https://www.youtube.com/watch?v=KAemN7spRfw

RemoteStorage integration - please ping me

In working on a fork of RS.js to use SAFE Network (see maidsafe.net) as a backend and to test /demo that in gathering together as many RS compatible apps as I can. So would like to include o-r.

Please let me know (here) when you have a version working with RS. Thanks. Mark

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.