Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbus module refactor + Volume implementation #42

Merged
merged 7 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ dbus-crossroads = { version = "0.5.0", optional = true }
zbus = { version = "3.9", optional = true }
zvariant = { version = "3.10", optional = true }
pollster = { version = "0.3", optional = true }
thiserror = "1.0"

[features]
default = ["use_dbus"]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ A cross-platform library for handling OS media controls and metadata. One abstra
```shell
# In one shell
$ cd souvlaki
$ cargo run --example example
$ cargo run --example window

# In another shell
$ playerctl metadata
Expand Down
File renamed without changes.
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub struct MediaMetadata<'a> {
}

/// Events sent by the OS media controls.
#[derive(Clone, PartialEq, Eq, Debug)]
#[derive(Clone, PartialEq, Debug)]
pub enum MediaControlEvent {
Play,
Pause,
Expand All @@ -42,6 +42,8 @@ pub enum MediaControlEvent {
SeekBy(SeekDirection, Duration),
/// Set the position/progress of the currently playing media item.
SetPosition(MediaPosition),
/// Sets the volume from 0.0 to 1.0.
SetVolume(f64),
/// Open the URI in the media player.
OpenUri(String),

Expand Down
Loading
Loading