Skip to content

Commit

Permalink
Add documentation for SetVolume
Browse files Browse the repository at this point in the history
  • Loading branch information
Sinono3 committed Jan 30, 2024
1 parent fc88dfb commit 6abc535
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ Types of changes:

## [Unreleased]

### Added

- Documentation for `MediaControlEvent::SetVolume` #47

## [0.7.2]

### Changed
Expand Down
7 changes: 6 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ 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.
/// Sets the volume. The value is intended to be from 0.0 to 1.0.
/// But other values are also accepted. **It is up to the user to
/// set constraints on this value.**
/// **NOTE**: If the volume event was received and correctly handled,
/// the user must call [`MediaControls::set_volume`]. Note that
/// this must be done only with the MPRIS backend.
SetVolume(f64),
/// Open the URI in the media player.
OpenUri(String),
Expand Down

0 comments on commit 6abc535

Please sign in to comment.