[Feature Request]: Streamdeck plugin #1345

Open
opened 2023-10-23 08:00:32 +00:00 by darkmatterdavson · 2 comments
darkmatterdavson commented 2023-10-23 08:00:32 +00:00 (Migrated from github.com)

Preflight Checklist

  • I use the latest version of YouTube Music (Application).
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Problem Description

It would also be cool to make a plugin for Streamdeck that would allow convenient playback without alt-tabbing and folding into a window via PC.

Proposed Solution

.Do something similar to the YTMD Connector but for this version. Functions: Play-Pause, Next, Prev, Like, Dislike, Mute Volume Up, Volume Down, Track Info, Shuffle, Repeat.

Alternatives Considered

.

Additional Information

image

### Preflight Checklist - [X] I use the latest version of YouTube Music (Application). - [X] I have searched the [issue tracker](https://github.com/th-ch/youtube-music/issues) for a feature request that matches the one I want to file, without success. ### Problem Description It would also be cool to make a plugin for Streamdeck that would allow convenient playback without alt-tabbing and folding into a window via PC. ### Proposed Solution .Do something similar to the YTMD Connector but for this version. Functions: Play-Pause, Next, Prev, Like, Dislike, Mute Volume Up, Volume Down, Track Info, Shuffle, Repeat. ### Alternatives Considered . ### Additional Information ![image](https://github.com/th-ch/youtube-music/assets/40635601/19fedba9-77db-48c8-901d-c1d54896ea38)
kimjammer commented 2024-12-28 00:38:07 +00:00 (Migrated from github.com)

For people w/ StreamDecks right now:

You can use kimjammer/youtube-music-controller and details provided in this discussion to get most of the features of YTMD-StreamDeck but for th-ch/youtube-music

For developers:

I really wanted this too! And I completely agree with #1650 that support for this API should be added to YTMD-StreamDeck instead of another plugin being created and published. However, when I attempted that in the past few days, I ran into a few too many blockers, so I just threw together kimjammer/youtube-music-controller mainly so I could get the Song Info feature (I'm impatient).

For the benefit of everyone in the future, here's the blockers/rough requirements for integration

Requirements for XeroxDev/YTMD-StreamDeck support of th-ch/youtube-music

  • Websocket/Server-Sent API
    • The server should send all info about the current playing track whenever any state changes (like, repeat, pause, etc). YTMD-StreamDeck listens for these state changes and updates the toggle state of buttons accordingly.
  • API to get on/off status of like, dislike, mute
  • API to get current volume level
  • YTMD-StreamDeck support for both APIs
    • YTMD-StreamDeck is tightly coupled to ytmdesktop-ts-companion, and it's again fairly tightly coupled to ytmdesktop, making this not trivial.
    • Ex: in youtube-music, there are different endpoints for "/play, /next, etc" while in ytmdesktop there is only "/command" endpoint and {"command": "play, next, etc"} is passed. Mapping the REST APIs to each other shouldn't be too hard, since no return values are expected.
    • youtube-music has close to full feature coverage of APIs used by YTMD-StreamDeck, but it does NOT have coverage of the full ytmdesktop API (which makes reimplementing ytmdesktop-ts-companion trickier - only implement a subset?).
    • ytmdesktop's auth strategy is request security code -> match security code -> request token ->provide token, while youtube-music's auth strategy is request token -> approve connection request -> provide token

Decision Points

  • What is the best way to add dual API support to YTMD-StreamDeck?
    • Reimplement ytmdesktop-ts-companion or Refactor YTMD-StreamDeck (probably necessary anyway for auth differences)
## For people w/ StreamDecks right now: You can use [kimjammer/youtube-music-controller](https://github.com/kimjammer/youtube-music-controller) and details provided in [this discussion](https://github.com/th-ch/youtube-music/issues/2042#issuecomment-2132436902) to get most of the features of YTMD-StreamDeck but for th-ch/youtube-music ## For developers: I really wanted this too! And I completely agree with #1650 that support for this API should be added to [YTMD-StreamDeck](https://github.com/XeroxDev/YTMD-StreamDeck) instead of another plugin being created and published. However, when I attempted that in the past few days, I ran into a few too many blockers, so I just threw together [kimjammer/youtube-music-controller](https://github.com/kimjammer/youtube-music-controller) mainly so I could get the Song Info feature (I'm impatient). For the benefit of everyone in the future, here's the blockers/rough requirements for integration #### Requirements for XeroxDev/YTMD-StreamDeck support of th-ch/youtube-music - Websocket/Server-Sent API - The server should send all info about the current playing track whenever any state changes (like, repeat, pause, etc). YTMD-StreamDeck listens for these state changes and updates the toggle state of buttons accordingly. - API to get on/off status of like, dislike, mute - API to get current volume level - YTMD-StreamDeck support for both APIs - YTMD-StreamDeck is tightly coupled to ytmdesktop-ts-companion, and it's again fairly tightly coupled to ytmdesktop, making this not trivial. - ~~Ex: in youtube-music, there are different endpoints for "/play, /next, etc" while in ytmdesktop there is only "/command" endpoint and {"command": "play, next, etc"} is passed.~~ Mapping the REST APIs to each other shouldn't be too hard, since no return values are expected. - youtube-music has close to full feature coverage of APIs used by YTMD-StreamDeck, but it does NOT have coverage of the full ytmdesktop API (which makes reimplementing ytmdesktop-ts-companion trickier - only implement a subset?). - ytmdesktop's auth strategy is request security code -> match security code -> request token ->provide token, while youtube-music's auth strategy is request token -> approve connection request -> provide token #### Decision Points - What is the best way to add dual API support to YTMD-StreamDeck? - Reimplement ytmdesktop-ts-companion or Refactor YTMD-StreamDeck (probably necessary anyway for auth differences)
kimjammer commented 2025-09-12 05:31:44 +00:00 (Migrated from github.com)

Update

Hello! With the addition of the websocket endpoint, I published v1.0.0.0 of kimjammer/youtube-music-controller, integrating it. It now has near feature-parity (still need like/dislike status from ws), but it's now at the point where I would now recommend my plugin as the best way to interact with th-ch/youtube-music from a stream deck!

Maintainers: I would personally consider this feature request fulfilled, if you would like to consider my plugin the ""officially endorsed"" solution.

## Update Hello! With the addition of the websocket endpoint, I published v1.0.0.0 of [kimjammer/youtube-music-controller](https://github.com/kimjammer/youtube-music-controller), integrating it. It now has near feature-parity (still need like/dislike status from ws), but it's now at the point where I would now recommend my plugin as the best way to interact with th-ch/youtube-music from a stream deck! Maintainers: I would personally consider this feature request fulfilled, if you would like to consider my plugin the ""officially endorsed"" solution.
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: YTMD/youtube-music#1345
No description provided.