christoph-heinrich / mpv-quality-menu

A userscript for MPV that allows you to change the streamed video and audio quality (ytdl-format) on the fly.
GNU General Public License v2.0
153 stars 4 forks source link

[Feature Request]: Add badges to control buttons (uosc) #11

Closed NaiveInvestigator closed 2 years ago

NaiveInvestigator commented 2 years ago

If we could add badges similar to how it works on the inbuilt subtitle, audio, video button, would be awesome! image

Edit: Sorry if this was already implemented, I couldn't figure out how to do so sadly after much experimentation.

christoph-heinrich commented 2 years ago

I don't think that is currently possible. Maybe ask over on uosc if adding such functionality is an option.

tomasklaen commented 2 years ago

Make the script set the value of foo to 1.

mp.commandv('script-message-to', 'uosc', 'set', 'foo', 1)

This property can now be used as a control button badge by prefixing it with @.

controls=command:icon_name:command_name#@foo?My foo button