Use distinct backgrounds for MPC transport presets
This commit is contained in:
parent
3caec10c6c
commit
4a5c09dbe3
|
|
@ -46,16 +46,16 @@ their selected version until you explicitly change them.
|
|||
Open **Presets → MPC_DEV → Transport & timing** and drag the buttons onto a
|
||||
spare page. These presets already include their feedback and variable references:
|
||||
|
||||
| Preset | Behavior |
|
||||
| --------------------- | ---------------------------------------------------------------------------- |
|
||||
| ▶ Play | Green text while waiting; green background while playing, amber while paused |
|
||||
| ■ Stop | Stop command; red while the player reports stopped |
|
||||
| ◀◀ Previous / ▶▶ Next | Previous/next **playlist item**, not chapter or seek |
|
||||
| Mute | Toggle mute; red **MUTED** when the player mute switch is on |
|
||||
| Pause | Pause command; amber while paused |
|
||||
| Remaining | Live media countdown and progress bar |
|
||||
| Elapsed | Live elapsed media time and progress bar |
|
||||
| Playback state | Playing, paused, stopped, idle, or offline with matching colors |
|
||||
| Preset | Behavior |
|
||||
| --------------------- | -------------------------------------------------------------------------- |
|
||||
| ▶ Play | Dark green while waiting; brighter green while playing, amber while paused |
|
||||
| ■ Stop | Stop command; red while the player reports stopped |
|
||||
| ◀◀ Previous / ▶▶ Next | Previous/next **playlist item**, not chapter or seek |
|
||||
| Mute | Toggle mute; red **MUTED** when the player mute switch is on |
|
||||
| Pause | Pause command; amber while paused |
|
||||
| Remaining | Live media countdown and progress bar |
|
||||
| Elapsed | Live elapsed media time and progress bar |
|
||||
| Playback state | Playing, paused, stopped, idle, or offline with matching colors |
|
||||
|
||||
The Previous/Next transport presets use command IDs verified against this
|
||||
player's `/commands.json`: Previous → `919`, Next → `920`. The old catalog was
|
||||
|
|
@ -64,6 +64,11 @@ Navigation-related labels are corrected; numeric action IDs still send their
|
|||
same numeric commands. Re-add copied presets to existing buttons to apply
|
||||
this correction; linked presets follow the module update.
|
||||
|
||||
Transport buttons use white icons/text on colored backgrounds: green Play,
|
||||
burgundy Stop, ochre Pause, blue Previous/Next, and purple Mute. Timing displays
|
||||
use teal. Active states brighten the background; paused feedback uses dark text
|
||||
on amber for contrast, and mute changes to red **MUTED**. Offline remains grey.
|
||||
|
||||
The progress bar fills from left to right. It turns amber with 10 seconds left
|
||||
and red with 5 seconds left. Timing displays are passive: pressing them does
|
||||
not send a player command. Transport presets use symbols, colors, and labels;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ in this connection. Allow remote access from the Companion computer if needed.
|
|||
|
||||
Choose **Transport & timing** in this connection's Presets:
|
||||
|
||||
- **Play**: green text while waiting; white text on green while playing; amber while paused. Press to play/resume.
|
||||
- **Play**: white text on dark green while waiting; brighter green while playing; amber while paused. Press to play/resume.
|
||||
- **Stop**: red while stopped.
|
||||
- **Previous / Next**: navigate playlist items (verified command IDs 919/920).
|
||||
These load and start playback; the web API has no reliable open-next-paused
|
||||
|
|
@ -22,6 +22,10 @@ The bar fills left to right, turning amber with 10 media seconds left and red
|
|||
with 5 seconds left. All 138 original command presets remain in **All commands**.
|
||||
Open File opens a dialog on the player computer; it does not upload a file.
|
||||
|
||||
Transport backgrounds identify controls: green Play, burgundy Stop, ochre Pause,
|
||||
blue Previous/Next, purple Mute, and teal timing displays. Active feedback uses
|
||||
brighter backgrounds; paused feedback uses dark text on amber for contrast.
|
||||
|
||||
## Optional backup
|
||||
|
||||
Configure a backup host and port to send commands to both players. Leave the host
|
||||
|
|
|
|||
|
|
@ -49,12 +49,12 @@ export function presets(label = 'MPC_DEV') {
|
|||
const active = (feedbackId, bgcolor, text) => ({
|
||||
feedbackId,
|
||||
options: {},
|
||||
style: { bgcolor, color: colors.white, ...(text ? { text } : {}) },
|
||||
style: { bgcolor, color: bgcolor === colors.amber ? colors.dark : colors.white, ...(text ? { text } : {}) },
|
||||
})
|
||||
const button = (name, text, id, feedback = [], size = '18', color = colors.white) => ({
|
||||
const button = (name, text, id, feedback = [], size = '18', bgcolor = colors.dark) => ({
|
||||
type: 'simple',
|
||||
name,
|
||||
style: { text, size, color, bgcolor: colors.dark, show_topbar: false },
|
||||
style: { text, size, color: colors.white, bgcolor, show_topbar: false },
|
||||
steps: [{ down: id ? [{ actionId: id, options: { target: 'both' } }] : [], up: [] }],
|
||||
feedbacks: [...feedback, offline],
|
||||
})
|
||||
|
|
@ -72,23 +72,50 @@ export function presets(label = 'MPC_DEV') {
|
|||
'887',
|
||||
[active('playing', colors.green), active('paused', colors.amber, 'Ⅱ\nPAUSED')],
|
||||
'18',
|
||||
0x4ade80,
|
||||
0x14532d,
|
||||
),
|
||||
transport_stop: button(
|
||||
'Stop — red while stopped',
|
||||
'■\nSTOP',
|
||||
'890',
|
||||
[active('stopped', colors.red)],
|
||||
'18',
|
||||
0x682536,
|
||||
),
|
||||
transport_stop: button('Stop — red while stopped', '■\nSTOP', '890', [active('stopped', colors.red)]),
|
||||
// Verified against MPC-HC 2.8.5's /commands.json: 918 is an after-playback setting.
|
||||
transport_previous: button('Previous playlist item', '◀◀\nPREV', '919'),
|
||||
transport_next: button('Next playlist item', '▶▶\nNEXT', '920'),
|
||||
transport_mute: button('Toggle mute — red while muted', 'MUTE', '909', [active('muted', colors.red, 'MUTED')]),
|
||||
transport_pause: button('Pause — amber while paused', 'Ⅱ\nPAUSE', '888', [active('paused', colors.amber)]),
|
||||
transport_remaining: button('Remaining time and progress', `LEFT\n$(${label}:remaining)`, null, [
|
||||
{ feedbackId: 'progress_bar', options: {} },
|
||||
]),
|
||||
transport_previous: button('Previous playlist item', '◀◀\nPREV', '919', [], '18', 0x234e82),
|
||||
transport_next: button('Next playlist item', '▶▶\nNEXT', '920', [], '18', 0x234e82),
|
||||
transport_mute: button(
|
||||
'Toggle mute — red while muted',
|
||||
'MUTE',
|
||||
'909',
|
||||
[active('muted', colors.red, 'MUTED')],
|
||||
'18',
|
||||
0x583578,
|
||||
),
|
||||
transport_pause: button(
|
||||
'Pause — amber while paused',
|
||||
'Ⅱ\nPAUSE',
|
||||
'888',
|
||||
[active('paused', colors.amber)],
|
||||
'18',
|
||||
0x78500e,
|
||||
),
|
||||
transport_remaining: button(
|
||||
'Remaining time and progress',
|
||||
`LEFT\n$(${label}:remaining)`,
|
||||
null,
|
||||
[{ feedbackId: 'progress_bar', options: {} }],
|
||||
'18',
|
||||
0x164b56,
|
||||
),
|
||||
transport_elapsed: button(
|
||||
'Elapsed time and progress',
|
||||
`ELAPSED\n$(${label}:elapsed)`,
|
||||
null,
|
||||
[{ feedbackId: 'progress_bar', options: {} }],
|
||||
'14',
|
||||
0x164b56,
|
||||
),
|
||||
transport_state: button(
|
||||
'Playback state',
|
||||
|
|
|
|||
Loading…
Reference in New Issue