Giter Club home page Giter Club logo

weevibin's Introduction

weevibin

weevibin is a System Tray application for the vibin StreamMagic music streaming controller. weevibin is a scaled-back sibling of the full vibinui Web interface. weevibin and vibinui can be run independently.

Interface

In use

In use

Features

weevibin supports:

  • Display of current track information.
  • Transport controls (play, pause, repeat, shuffle, track seek, etc).
  • Amplifier controls (mute, volume).
  • Power on/off.
  • Shows when streamer is in standby mode.
  • Various audio sources (local media, AirPlay, Internet Radio, etc).
  • Ability to set the Vibin host.

Screenshots

Local media source

Local media source

AirPlay source

AirPlay source

Internet Radio source

Internet Radio source

Settings

Settings

Standby mode

Standby mode

Developers

weevibin is a Tauri application, using Svelte for the UI.

Local setup

See the Tauri Prerequisites for local development.

To develop in RustRover:

  1. Clone the repository.
  2. Run npm install.
  3. In the repository root, run npm run dev. This will run the Vite half of the app.
  4. In RustRover:
    • Attach the Cargo.toml.
    • Create a "Cargo" Run Configuration, set the "Working directory" to weevibin/src-tauri, and the "Command" to run --no-default-features.
    • Start the Run Configuration.

The application can also be developed in VS Code, although this has not been tested. See Debugging in VS Code for more details.

Building

The application can be built with npm run tauri build. For this to complete successfully, first edit tauri.conf.json and change the tauri.bundle.identifier to something other than "com.tauri.dev".

Application structure

The application is made up of:

  • A WebSocket connection to the Vibin backend, to receive information and updates related to playback state.
  • HTTP REST requests to invoke actions on the Vibin backend (pause, play, next track, mute, etc).
  • Local storage for the Vibin host name.

WebSocket

The Rust side receives regular Vibin updates over a WebSocket connection to the Vibin backend. These updates come in via a few different Vibin message types ("CurrentlyPlaying", "Position", "System", "TransportState"). The Rust side uses this information to update a single VibinState struct. The VibinState struct is essentially a simplified representation of the full Vibin state, containing just the pieces useful for weevibin. Updates to the VibinState struct are sent to the Svelte/UI half of the application using Tauri messaging. The Svelte UI can then use this information to render the UI.

NOTE: The WebSocket connection to vibin is managed on the Rust side using tokio-tungstenite. It could be managed in JavaScript instead, but I wanted to learn more Rust -- and this way the UI can focus on presentation.

REST

The Svelte UI issues REST requests directly to the Vibin backend (i.e. without going through Rust) to perform actions like pause, play, next track, volume controls, etc. If these actions result in backend Vibin state changes (like new track details), then these changes will be received via the WebSocket flow.

weevibin's People

Contributors

mjoblin avatar

Stargazers

 avatar Lance 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.