Git Product home page Git Product logo

cyp's Introduction

CYP: Control Your Player

CYP is a web-based frontend for MPD, the Music Player Daemon. You can use it to control the playback without having to install native application(s). It works in modern web browsers, both desktop and mobile.

Screenshots

Features

  • Control the playback, queue, volume
  • Save and load playlists
  • Browse the library by artists/albums/directories
  • Display album art via native MPD calls (no need to access the library; requires MPD >= 0.21)
  • Youtube-dl integration
  • Dark/Light themes

Installation

Make sure you have a working MPD setup first and Node version >= 10

git clone https://github.com/ondras/cyp.git && cd cyp
npm i
node .

Point your browser to http://localhost:8080 to open the interface. Specify a custom MPD address via a server querystring argument (?server=localhost:6655).

Instalation - Docker

Alternatively, you can use Docker to run CYP.

git clone https://github.com/ondras/cyp.git && cd cyp
docker build -t cyp .
docker run --network=host cyp

Youtube-dl integration

You will need a working youtube-dl installation. Audio files are downloaded into the _youtube directory, so make sure it is available to your MPD library (use a symlink).

If you use Docker, you need to mount the _youtube directory into the image:

docker run --network=host -v "$(pwd)"/_youtube:/cyp/_youtube cyp

Changing the port

...is done via the PORT environment variable. If you use Docker, the -e switch does the trick:

docker run --network=host -e PORT=12345 cyp

Password-protected MPD

Create a passwords.json file in CYPs home directory. Specify passwords for available MPD servers:

{
  "localhost:6600": "my-pass-1",
  "some.other.server.or.ip:12345": "my-pass-2
}

Make sure that hostnames and ports match those specified via the server querystring argument (defaults to localhost:6600).

Technology

  • Connected to MPD via WebSockets (using the ws2mpd bridge)
  • Token-based access to the WebSocket endpoint (better than an Origin check)
  • Written using Custom Elements
  • Responsive layout via Flexbox
  • CSS Custom Properties
  • SVG icons (Material Design)
  • Can spawn Youtube-dl to search/download audio files
  • Album art retrieved directly from MPD (and cached via localStorage)

cyp's People

Contributors

jfox-sk avatar ondras avatar supersandro2000 avatar tincho avatar

Watchers

 avatar

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.