Skip to content

System Tray application for the "Vibin" StreamMagic music streaming controller

License

Notifications You must be signed in to change notification settings

mjoblin/weevibin

Repository files navigation

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.

About

System Tray application for the "Vibin" StreamMagic music streaming controller

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published