All Projects → Mange → mpris-rs

Mange / mpris-rs

Licence: Apache-2.0 license
Idiomatic MPRIS D-Bus interface library for Rust

Programming Languages

rust
11053 projects
shell
77523 projects

Projects that are alternatives of or similar to mpris-rs

cast control
📺 Control Chromecasts from Linux and D-Bus
Stars: ✭ 443 (+1097.3%)
Mutual labels:  mpris, d-bus
mpris-ctl
Basic mpris player control for linux command line
Stars: ✭ 31 (-16.22%)
Mutual labels:  mpris, mpris-ctl
dbussy
Python binding for D-Bus using asyncio
Stars: ✭ 88 (+137.84%)
Mutual labels:  dbus, d-bus
mailparse
Rust library to parse mail files
Stars: ✭ 148 (+300%)
Mutual labels:  rust-library
webbrowser-rs
Rust library to open URLs in the web browsers available on a platform
Stars: ✭ 150 (+305.41%)
Mutual labels:  rust-library
InputBot
A Rust library for creating global hotkeys, and emulating inputs.
Stars: ✭ 246 (+564.86%)
Mutual labels:  rust-library
lcs-image-diff-rs
🖼 Image diff tool with LCS algorithm
Stars: ✭ 67 (+81.08%)
Mutual labels:  rust-library
rdp
A library providing FFI access to fast Ramer–Douglas–Peucker and Visvalingam-Whyatt line simplification algorithms
Stars: ✭ 20 (-45.95%)
Mutual labels:  rust-library
ctrs
Category Theory For Programmers (Bartosz Milewski)
Stars: ✭ 62 (+67.57%)
Mutual labels:  rust-library
waihona
Rust crate for performing cloud storage CRUD actions across major cloud providers e.g aws
Stars: ✭ 46 (+24.32%)
Mutual labels:  rust-library
pinto
Query builder (SQL) in Rust
Stars: ✭ 23 (-37.84%)
Mutual labels:  rust-library
cdc
A library for performing Content-Defined Chunking (CDC) on data streams.
Stars: ✭ 18 (-51.35%)
Mutual labels:  rust-library
twang
Library for pure Rust advanced audio synthesis.
Stars: ✭ 83 (+124.32%)
Mutual labels:  rust-library
NetworkManager-WiFi-WebUI
Web interface (python2/twisted) for NetworkManager daemon to manage WiFi connections
Stars: ✭ 42 (+13.51%)
Mutual labels:  dbus
intersection-wasm
Mesh-Mesh and Triangle-Triangle Intersection tests based on the algorithm by Tomas Akenine-Möller
Stars: ✭ 17 (-54.05%)
Mutual labels:  rust-library
awesome-power widget
A Power widget for the Awesome Window Manager
Stars: ✭ 25 (-32.43%)
Mutual labels:  dbus
hassle-rs
🦀 This crate provides an FFI layer and idiomatic rust wrappers for the new DirectXShaderCompiler library.
Stars: ✭ 34 (-8.11%)
Mutual labels:  rust-library
whoami
Rust crate to get the current user and environment.
Stars: ✭ 68 (+83.78%)
Mutual labels:  rust-library
bluez-dbus
bluetooth library for linux OSes using DBus and bluez (http://www.bluez.org/).
Stars: ✭ 49 (+32.43%)
Mutual labels:  dbus
cala
Cross-platform system interface for hardware IO
Stars: ✭ 46 (+24.32%)
Mutual labels:  rust-library

mpris

A Rust library for dealing with MPRIS2-compatible players over D-Bus.

Crates.io Documentation Build Status Actively developed

NOTE: Until it is possible to mark a minimum Rust version in the crate manifest, this library is only officially supported for "the latest stable Rust".

What is MPRIS2?

The Media Player Remote Interfacing Specification is a standard D-Bus interface which aims to provide a common programmatic API for controlling media players.

It provides a mechanism for discovery, querying and basic playback control of compliant media players, as well as a tracklist interface which is used to add context to the active media item.

From About, in the MPRIS2 specification.

Basically, you can use it to control media players on your computer. This is most commonly used to build media player applets, UIs or to pause other players before your own software performs some action.

You can also use it in order to query metadata about what is currently playing, or if something is playing.

How to use

use mpris::PlayerFinder;

// Pauses currently playing media and prints metadata information about that
// media.
// If no player is running, exits with an error.
fn main() {
  let player = PlayerFinder::new()
    .expect("Could not connect to D-Bus")
    .find_active()
    .expect("Could not find any player");

  player.pause().expect("Could not pause");

  let metadata = player.get_metadata().expect("Could not get metadata for player");
  println!("{:#?}", metadata);
}

See the examples directory for more examples.

License

Copyright 2017-2018 Magnus Bergmark

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].