GeekyEggo / SoundDeck

Sound Deck is a powerful audio-focused plugin for the Elgato Stream Deck.
GNU General Public License v3.0
45 stars 5 forks source link

Playback remainder timer #113

Closed SmartASCII closed 1 year ago

SmartASCII commented 1 year ago

I'd love to be able to glance at the button for the track playing and see a timer of how many seconds are left in the current playback!

GeekyEggo commented 1 year ago

Hey @SmartASCII, good news, this is currently available! There's a small caveat though, it does require the title field to be empty. Sadly this is a design feature that's enforced by the Stream Deck SDK, whereby the user-specified title takes precedent over the plug-ins preferred title.

If you set the title of the action to be empty, it should display the remaining time for the current audio file being played, like so:

image

SmartASCII commented 1 year ago

Yuck, that's quite a restrictive caveat! I wish they'd allow it to function like their built-in sound board action.

Would there be a possibility for a work-around where there's basically a "title" field but provided by the plugin? That way you're not overriding the system-defined "user title", but just another field given by the plugin itself?

It's not a perfect solution, but it's not as messy as making me create 100+ icons with sound names on them 😁

GeekyEggo commented 1 year ago

Would there be a possibility for a work-around where there's basically a "title" field but provided by the plugin?

Yes, and no.

Background

In the form of buttons, the SDK allows plug-ins to control two graphical things;

Question at hand

With this knowledge, going back to your question: the plug-in could...

  1. Offer a text input that prompted the user for a "custom" title.
  2. Generate a new icon using the action's default icon, and the "custom" title.
  3. Call setImage with this generated icon that includes the "custom" title stamped into it.

This sadly means that users wouldn't be able to assign custom icons themselves, and we enter a similar problem that we did with setTitle.

Future

Excitingly, with the release of the Stream Deck+, the SDK introduces the concept of "layouts", where plug-ins have much greater flexibility with how an action can be graphically represented by the plug-in. At this time, layouts are only available as part of the SD+'s touch screen. Moving forwards, I'm hopeful that they layouts will be available for standard "button" actions; should that happen, I'll look into this further! 🤞

SmartASCII commented 1 year ago

Thanks for the detailed explanation!