Code Monkey home page Code Monkey logo

beefweb's Introduction

beefweb

Web interface plugin for DeaDBeeF and foobar2000 music players.

License Build Status

Features

  • Lightweight web user interface
  • Playback control
  • Playlist management
  • Music directory browser
  • Real-time UI updates
  • Mobile-friendly responsive design
  • REST-like API for controlling player from your application

Browser support

  • Any recent browser should work
  • Due to high development effort required Internet Explorer of any version is not supported

Downloads

Check out releases section.

How to install

DeaDBeeF

Unpack ddb_beefweb-*.tar.gz to $HOME/.local/lib/deadbeef.

foobar2000

Open foo_beefweb-*.fb2k-component with foobar2000, you will be asked to install the plugin.

How to use

Point your browser to http://localhost:8880 and enjoy your web interface.

If you've enabled remote connections on plugin configuration screen you'll be able to connect from remote machines as well.

To allow browsing and adding files via web interface specify music directories in plugin configuration screen. For DeaDBeeF multiple music directories should be separated with ;.

See advanced configuration guide to unlock hidden developer features.

Donations

If you like this project feel free to donate. Any amount is appreciated.

Screenshots

Main web interface on Linux

Configuration screen for DeaDBeeF

Main web interface on Windows

Configuration screen for foobar2000

How to build

DeaDBeeF

Beefweb has two distinctive parts: server plugin and web user interface. To build server you'll need a descent C++ compiler such as gcc or clang and a recent version of cmake. To build web UI you'll need node runtime and yarn package manager.

The following command will build server, ui and .tar.gz package:

$ scripts/build.sh --all --release

Get ddb_beefweb-*.tar.gz from build/release directory.

You could also build debug version by switching --release to --debug.

foobar2000

You'll need to install Visual Studio (currently tested with VS2022 Community).

The following programs should be installed in addition:

  • git version control system
  • node runtime
  • yarn package manager (npm i -g yarn)
  • cmake build system (could be installed with Visual Studio or separately)
  • 7z archiver

These programs should be available in PATH.

Open Visual Studio command prompt, navigate to project directory, run the following command:

> msbuild scripts\build.proj /p:Configuration=Release

Get foo_beefweb-*.fb2k-component from build\release directory.

You could also build debug version by switching /p:Configuration=Release to /p:Configuration=Debug

HTTP API

Swagger API definition is available.

beefweb's People

Contributors

augustjanse avatar courtarro avatar dependabot[bot] avatar hyperblast avatar sir-photch avatar stengerh 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

beefweb's Issues

Add integration tests for API

Considering we already use nodejs for building client using it for API tests would not introduce additional dependencies.

Periodic segfault in 32-bit builds

beefweb: listening on [ipv4:127.0.0.1]:8879
beefweb: failed to bind to address [ipv6:::1]:8879: Cannot assign requested address
Segmentation Fault
backtrace() returned 17 addresses
/home/travis/build/hyperblast/beefweb/tools/deadbeef.x86/deadbeef() [0x804b1e2]
[0xf76decb0]
/tmp/api-tests-38526J6e33X8q48bP/.local/lib/deadbeef/beefweb.so(+0xccac) [0xf71b6cac]
/tmp/api-tests-38526J6e33X8q48bP/.local/lib/deadbeef/beefweb.so(+0x4148b) [0xf71eb48b]
/tmp/api-tests-38526J6e33X8q48bP/.local/lib/deadbeef/beefweb.so(+0x48323) [0xf71f2323]
/tmp/api-tests-38526J6e33X8q48bP/.local/lib/deadbeef/beefweb.so(+0x482c3) [0xf71f22c3]
/tmp/api-tests-38526J6e33X8q48bP/.local/lib/deadbeef/beefweb.so(+0x57eec) [0xf7201eec]
/tmp/api-tests-38526J6e33X8q48bP/.local/lib/deadbeef/beefweb.so(+0x58dfc) [0xf7202dfc]
/tmp/api-tests-38526J6e33X8q48bP/.local/lib/deadbeef/beefweb.so(+0x5890c) [0xf720290c]
/tmp/api-tests-38526J6e33X8q48bP/.local/lib/deadbeef/beefweb.so(+0x5802d) [0xf720202d]
/tmp/api-tests-38526J6e33X8q48bP/.local/lib/deadbeef/beefweb.so(+0x59a6d) [0xf7203a6d]
/tmp/api-tests-38526J6e33X8q48bP/.local/lib/deadbeef/beefweb.so(+0x68457) [0xf7212457]
/tmp/api-tests-38526J6e33X8q48bP/.local/lib/deadbeef/beefweb.so(+0x60df0) [0xf720adf0]
/tmp/api-tests-38526J6e33X8q48bP/.local/lib/deadbeef/beefweb.so(+0x64d45) [0xf720ed45]
/tmp/api-tests-38526J6e33X8q48bP/.local/lib/deadbeef/beefweb.so(+0x683a4) [0xf72123a4]
/tmp/api-tests-38526J6e33X8q48bP/.local/lib/deadbeef/beefweb.so(+0x62cec) [0xf720ccec]
/tmp/api-tests-38526J6e33X8q48bP/.local/lib/deadbeef/beefweb.so(+0x89f1a) [0xf7233f1a]

Document event stream APIs

Swagger currently does not support that, but we still can add it somehow.
Probably pretend to be regular JSON, but describe actual behavior in comments.

Consider migration to boost beast

This has several advantages over existing solution:

  • Single implementation for all platforms
  • Nothing to build because library is header-only and we already using boost
  • Supports web sockets
  • No special configuration is required for Windows platform (unlike HTTP server API and its URL reservations)

Use same units for durations in APIs

Currently we use seconds when dumping player status (e.g. current track duration, position).
However when changing current position milliseconds are used.

Windows port

  • Minimally builds on Windows with MSVC
  • Platform specific functions are implemented
  • HTTP server is implemented
  • Continuous integration via AppVeyor or other service
  • Final clean up

libevhtp fails to build with -m32

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LIB_DL
    linked by target "test_vhost" in directory /home/data/works/beefweb/server/build/debug/deps/root/src/libevhtp/examples
    linked by target "test_client" in directory /home/data/works/beefweb/server/build/debug/deps/root/src/libevhtp/examples
    linked by target "test" in directory /home/data/works/beefweb/server/build/debug/deps/root/src/libevhtp/examples
    linked by target "test_query" in directory /home/data/works/beefweb/server/build/debug/deps/root/src/libevhtp/examples
    linked by target "test_perf" in directory /home/data/works/beefweb/server/build/debug/deps/root/src/libevhtp/examples
    linked by target "test_basic" in directory /home/data/works/beefweb/server/build/debug/deps/root/src/libevhtp/examples
LIB_RT
    linked by target "test_vhost" in directory /home/data/works/beefweb/server/build/debug/deps/root/src/libevhtp/examples
    linked by target "test_client" in directory /home/data/works/beefweb/server/build/debug/deps/root/src/libevhtp/examples
    linked by target "test" in directory /home/data/works/beefweb/server/build/debug/deps/root/src/libevhtp/examples
    linked by target "test_query" in directory /home/data/works/beefweb/server/build/debug/deps/root/src/libevhtp/examples
    linked by target "test_perf" in directory /home/data/works/beefweb/server/build/debug/deps/root/src/libevhtp/examples
    linked by target "test_basic" in directory /home/data/works/beefweb/server/build/debug/deps/root/src/libevhtp/examples

Rework artwork API

We should reference playlist items rather than file names on disk, e.g.

/api/artwork/:plref/:item

If no artwork was found default artwork should be provided unless overridden by ?allowDefault=false

Default artwork should be available via explicit query:

/api/artwork/default

TypeError: rows is undefined

Steps to reproduce:

  • Start playback
  • Switch to playlist browser
  • Try to switch back
  • Nothing happens, error is displayed in console

Rework setting model

Introduce object model for various setting types (boolean, enum, etc). Those should be self-describing to allow more automatic UI generation. For example setting description, default value, enum names could be defined in setting metadata.

Each setting could be persistent or non-persistent. Second option is useful for global options that are defined by environment. For example "touch support" or "compact UI layout" for small screens.

Persistence should be extracted to separate class. It is useful for testing.

Existing TouchSupport class could be converted to controller that dynamically updates setting depending on browser capabilities.

MediaSizeController similarly should use this new setting model.

Improve server threading correctness

  • All callbacks should capture this via weak reference
  • doPollEventSources() should use work queue of corresponding request handler
  • Current async restart model probably could be simplified: if settings are changed server is destroyed and created with new settings

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.