Closed SmartASCII closed 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:
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 😁
Would there be a possibility for a work-around where there's basically a "title" field but provided by the plugin?
Yes, and no.
In the form of buttons, the SDK allows plug-ins to control two graphical things;
setImage
- Sets the icon of the action; this call is ignored if the user has specified an image in the Stream Deck application.setTitle
- Sets the title of the action; this call is ignored if the user has specified a title in the Stream Deck application.With this knowledge, going back to your question: the plug-in could...
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
.
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! 🤞
Thanks for the detailed explanation!
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!