[GH-ISSUE #410] Feature request: PlayerEvents for VolUp and VolDown #262

Closed
opened 2026-02-27 19:29:42 +03:00 by kerem · 3 comments
Owner

Originally created by @Muffexx on GitHub (Dec 12, 2019).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/410

Hi,
since there are PlayerEvents (player.rs) for started, changed and stopped, would it be possible to add events for VolUp and VolDown? This way I could control the volume of my receiver by running scripts that use HDMI-CEC (https://github.com/Pulse-Eight/libcec).

Even better would be to directly integrate HDMI-CEC-support, but I assume this would consume too much time.

Thanks for your reply.

Kind regards

Originally created by @Muffexx on GitHub (Dec 12, 2019). Original GitHub issue: https://github.com/librespot-org/librespot/issues/410 Hi, since there are PlayerEvents (player.rs) for **started**, **changed** and **stopped**, would it be possible to add events for **VolUp** and **VolDown?** This way I could control the volume of my receiver by running scripts that use HDMI-CEC (https://github.com/Pulse-Eight/libcec). Even better would be to directly integrate HDMI-CEC-support, but I assume this would consume too much time. Thanks for your reply. Kind regards
kerem closed this issue 2026-02-27 19:29:43 +03:00
Author
Owner

@michaelherger commented on GitHub (Dec 13, 2019):

I have something similar added to my branch: github.com/michaelherger/librespot@fb7b8d7230. It would trigger a volume change event with the actual value sent to the event handler. Ignore the self.lms.is_configured condition - that's specific to my application. And the lms.rs is my custom event handler implementation. That change would belong in player_event_handler.rs.

<!-- gh-comment-id:565371935 --> @michaelherger commented on GitHub (Dec 13, 2019): I have something similar added to my branch: https://github.com/michaelherger/librespot/commit/fb7b8d7230d0c9f3ccc862801297d5ab575b994a. It would trigger a volume change event with the actual value sent to the event handler. Ignore the `self.lms.is_configured` condition - that's specific to my application. And the `lms.rs` is my custom event handler implementation. That change would belong in `player_event_handler.rs`.
Author
Owner

@delMar43 commented on GitHub (Jan 29, 2020):

Even better would be to directly integrate HDMI-CEC-support, but I assume this would consume too much time.

I like the idea of just exposing the event. That leaves me with the possibility to either change volume of the AVR via HDMI-CEC, or via API (in case I decide to connect via TOS-Link or analog, instead of HDMI)

Alongside the new volume-change events, we'd probably also need a way to suppress volume changes of the internal player, as that volume should stay at eg 75 or 100%.

In case it's relevant, I'd like to vote for merging this.

<!-- gh-comment-id:579714091 --> @delMar43 commented on GitHub (Jan 29, 2020): > Even better would be to directly integrate HDMI-CEC-support, but I assume this would consume too much time. I like the idea of just exposing the event. That leaves me with the possibility to either change volume of the AVR via HDMI-CEC, or via API (in case I decide to connect via TOS-Link or analog, instead of HDMI) Alongside the new volume-change events, we'd probably also need a way to suppress volume changes of the internal player, as that volume should stay at eg 75 or 100%. In case it's relevant, I'd like to vote for merging this.
Author
Owner

@Muffexx commented on GitHub (Jan 29, 2020):

Alongside the new volume-change events, we'd probably also need a way to suppress volume changes of the internal player, as that volume should stay at eg 75 or 100%.

This would be even better.

<!-- gh-comment-id:579735899 --> @Muffexx commented on GitHub (Jan 29, 2020): > Alongside the new volume-change events, we'd probably also need a way to **suppress volume changes of the internal player**, as that volume should stay at eg 75 or 100%. This would be even better.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#262
No description provided.