GithubHelp home page GithubHelp logo

ondras / mp Goto Github PK

View Code? Open in Web Editor NEW
12.0 2.0 1.0 9.95 MB

Hybrid music player

Home Page: http://ondras.github.io/mp/dist/web/

Makefile 1.17% Shell 0.08% CSS 5.51% JavaScript 88.01% HTML 1.27% Batchfile 3.96%
desktop-app web-app

mp's Introduction

mp: a hybrid music player

Click here to try it online!

This is a music player built on web technologies. It can be used as a standalone cross-platform application (using nw.js or Electron) or as a web page.

The trick here is that the code base is shared: the very same application code that runs the web page is used in a standalone app.

Features, planned and implemented

  • Sound playback
    • Supported formats: all that your {browser,Electron,nw.js} supports
    • Routing to WebAudio graph
  • Playlist
    • Basic control
    • Recursive import
    • Repeat
    • Drag/drop reordering
    • Shuffle
  • Playback control & info
    • Waveform
    • Metadata parsing
      • ID3v1
      • ID3v2
      • Vorbis comments
      • m4a/mp4
    • Seeking
    • Album art
    • Global hotkeys
  • Miscellaneous
    • Realtime visuals
      • Spectrum analyser
      • Big Psyco from Visual Player for DOS
    • Single instance runtime playlist control
    • Single instance runtime playback control

Running

  1. Clone this project
  2. Run it:
  • adjust and run dist/electron/mp.sh [path-to-song-or-playlist]
  • adjust and run dist/nw/mp.sh [path-to-song-or-playlist]
  • launch dist/web/index.html

The web version is also hosted at GitHub pages.

Command line API

[-p] play1.mp3 play2.mp3 ... -q enqueue1.mp3 enqueue2.mp3 ... -c command1 command2

Where command is play, pause, prev or next.

Web version can be controlled by postMessage with the following data object:

{
  command: "control",
  argv: ["array", "of", "command", "line", "arguments"]
}

Compiling

  1. Clone this project
  2. npm install
  3. make

Achievements unlocked

  • Playback via HTMLAudioElement through Web Audio sound graph
  • Waveform visuals via decodeAudioData
  • Realtime visuals using AnalyserNode
  • Metadata parsing thanks to XHR2, ArrayBuffer, DataView and TextDecoder APIs
  • Written in ES2015, bundled using Rollup and good ol' Make
  • CSS compiled with LESS

mp's People

Contributors

ondras avatar

Stargazers

Vitor DevSP avatar  avatar Satinxs avatar Kim Giwon avatar  avatar Sam Curran avatar Ilya avatar Miki Oracle avatar Dylan Hassinger avatar Daniil Iastremskii avatar Ope Aina avatar Rastislav Lamos avatar

Watchers

 avatar  avatar

Forkers

bobbonesent

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.