Skip to content

Add controls option to media player playback card feature#30338

Open
MindFreeze wants to merge 3 commits intodevfrom
media-player-playback-controls
Open

Add controls option to media player playback card feature#30338
MindFreeze wants to merge 3 commits intodevfrom
media-player-playback-controls

Conversation

@MindFreeze
Copy link
Copy Markdown
Member

@MindFreeze MindFreeze commented Mar 26, 2026

Proposed change

Add a controls configuration option to the media player playback card feature that allows users to choose which playback controls are displayed and in what order.

When controls are explicitly configured, each selected control is rendered as its own button in the specified order. When no controls are configured, the original default behavior is preserved.

Available controls: turn_on, turn_off, media_play, media_pause, media_play_pause, media_stop, media_previous_track, media_next_track.

Also includes a configuration editor for the feature (with multi-select, reorder support)

Screenshots

image

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:
  • Link to developer documentation pull request:
  • Link to backend pull request:

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

To help with the load of incoming pull requests:

Allow users to configure which playback controls are shown and in what
order. When controls are explicitly configured, each selected control
is rendered as its own button in the specified order. When no controls
are configured, the original default behavior is preserved.

Also adds a configuration editor for the feature and fixes inline
feature padding in the tile card container.
@MindFreeze MindFreeze requested a review from timmo001 March 26, 2026 08:22
@MindFreeze MindFreeze marked this pull request as ready for review March 26, 2026 08:22
@BBE-FR
Copy link
Copy Markdown

BBE-FR commented Mar 26, 2026

Would it be possible to have the additional option there for volume + and volume - button?

For the time being, if you want to have both media control and volume control, you need two lines, thus you canot have it "inline".

To have (on/off) (play/pause) (volume -) and (volume +) on the same line would be very versatile and not completely crazy from UX perspective.

This PR allowing to chose the button could make it possible.

@MindFreeze
Copy link
Copy Markdown
Member Author

Would it be possible to have the additional option there for volume + and volume - button?

For the time being, if you want to have both media control and volume control, you need two lines, thus you canot have it "inline".

To have (on/off) (play/pause) (volume -) and (volume +) on the same line would be very versatile and not completely crazy from UX perspective.

This PR allowing to chose the button could make it possible.

I did consider that but it would have to be a separate PR after this one goes through. Adding them to a "playback" feature by default doesn't seem great but as options for customization should be ok

@BBE-FR
Copy link
Copy Markdown

BBE-FR commented Mar 26, 2026

Exactly. As option ( not displayed by default) it would be great !

In this PR or another one, but this pr allowing to chose what to display is an enabler for this option !

Reuse the shared computeMediaControls function for the default (no
explicit controls) path instead of duplicating the logic. Apply the
narrow filter to both paths via a shared _filterNarrow method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants