Skip to content

Add plugin OSD control API#16

Open
xal3xhx wants to merge 26 commits intoprgmitchell:mainfrom
xal3xhx:feat/plugin-osd-control
Open

Add plugin OSD control API#16
xal3xhx wants to merge 26 commits intoprgmitchell:mainfrom
xal3xhx:feat/plugin-osd-control

Conversation

@xal3xhx
Copy link
Copy Markdown
Contributor

@xal3xhx xal3xhx commented Apr 17, 2026

Summary

  • New ctx.osd namespace lets plugins render OSD cards directly: showVolume, showMute, hide, getSettings, onSettingsChanged.
  • Backed by two new Tauri commands (plugin_show_osd, plugin_hide_osd) that handle window show + topmost + emit, respecting the user's global OSD toggle.
  • OSD render options: opts.showBar / opts.showValue (both default true) for text-only status cards.
  • Integration-target bindings skip the default volume_update / mute_update OSD emit so a plugin fully owns the OSD for its own targets (no duplicate cards). Slider sync is preserved via set_binding_feedback.
  • Docs: new section 6.6 in PLUGIN_DEVELOPER_GUIDE.md, existing sections renumbered.

Test plan

  • Build backend (cargo tauri dev) and reload frontend.
  • Register a plugin integration target, bind it to a button/knob, trigger it:
    • Only one OSD card renders (no duplicate from the native path).
    • opts.showBar: false, showValue: false produces a text-only card.
    • Repeated triggers reuse a single card (stable key via data.label).
  • ctx.osd.hide() clears active cards.
  • Toggle OSD off in settings: plugin calls silently drop.
  • Change OSD anchor/monitor: ctx.osd.onSettingsChanged fires.
  • Sanity: non-integration bindings (Master / Session / Device) still show their default OSD cards unchanged.

xal3xhx and others added 26 commits April 12, 2026 21:16
Remove hardcoded per-integration button action logic from targets.js
and replace it with a plugin-driven resolution chain:
per-target buttonActions > integration-level buttonActions > defaults.

Plugins now declare their own actions in registerIntegration() and
per-target in getTargetOptions(), so new integrations no longer require
changes to the core app code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Enable the tauri devtools feature and add support for opening the
webview inspector via --devtools CLI flag or MIDIMASTER_DEVTOOLS=1
environment variable. Useful for plugin development and debugging.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- New plugin_show_osd / plugin_hide_osd Tauri commands with show_bar /
  show_value flags so plugins can render text-only OSD cards.
- osd_settings_changed event emitted from apply_osd_settings so plugins
  can react to OSD enable/anchor/monitor changes.
- Skip default volume_update / mute_update OSD emits for Integration
  targets so a plugin fully owns the OSD for its own targets (no
  duplicate cards). Slider sync is preserved via set_binding_feedback.
- plugin_host: ctx.osd.{showVolume, showMute, hide, getSettings,
  onSettingsChanged}.
- osd feature: showVolumeOsd / showMuteOsd honor opts.showBar and
  opts.showValue for text-only rendering.
- Docs updated (section 6.6, existing sections renumbered).
@prgmitchell
Copy link
Copy Markdown
Owner

This PR has bugs, a few I immediately noticed when testing:

  1. the wave link sources OSD no longer shows
  2. volume bars in the in-app UI seem to jump randomly when I am moving unrelated bindings

There may be others but after those I stopped testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants