diff --git a/companion-modules/media-player-classic/README.md b/companion-modules/media-player-classic/README.md index 9869650..436a717 100644 --- a/companion-modules/media-player-classic/README.md +++ b/companion-modules/media-player-classic/README.md @@ -103,7 +103,7 @@ would not preload it in MPC-HC and is not implemented here. ## Variables and custom feedback -The elapsed preset uses the compact label **ELAP.** to avoid wrapping. The +The elapsed preset uses **ELAPSED** with size 14 text to avoid wrapping. The playback-state preset displays **Playing**, **Paused**, **Stopped**, or **Idle**. These are connection/module variables, not button-local variables. With the diff --git a/companion-modules/media-player-classic/src/definitions.js b/companion-modules/media-player-classic/src/definitions.js index 0580770..974928c 100644 --- a/companion-modules/media-player-classic/src/definitions.js +++ b/companion-modules/media-player-classic/src/definitions.js @@ -38,10 +38,10 @@ export function presets(label = 'MPC_DEV') { options: {}, style: { bgcolor, color: colors.white, ...(text ? { text } : {}) }, }) - const button = (name, text, id, feedback = []) => ({ + const button = (name, text, id, feedback = [], size = '18') => ({ type: 'simple', name, - style: { text, size: '18', color: colors.white, bgcolor: colors.dark, show_topbar: false }, + style: { text, size, color: colors.white, bgcolor: colors.dark, show_topbar: false }, steps: [{ down: id ? [{ actionId: id, options: {} }] : [], up: [] }], feedbacks: [...feedback, offline], }) @@ -59,9 +59,13 @@ export function presets(label = 'MPC_DEV') { transport_remaining: button('Remaining time and progress', `LEFT\n$(${label}:remaining)`, null, [ { feedbackId: 'progress_bar', options: {} }, ]), - transport_elapsed: button('Elapsed time and progress', `ELAP.\n$(${label}:elapsed)`, null, [ - { feedbackId: 'progress_bar', options: {} }, - ]), + transport_elapsed: button( + 'Elapsed time and progress', + `ELAPSED\n$(${label}:elapsed)`, + null, + [{ feedbackId: 'progress_bar', options: {} }], + '14', + ), transport_state: button('Playback state', `$(${label}:state_label)`, null, [ active('playing', colors.green), active('paused', colors.amber),