Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(media_player): add support of media player #270

Merged
merged 14 commits into from
Apr 14, 2022

Conversation

acesyde
Copy link
Contributor

@acesyde acesyde commented Apr 10, 2022

  • Basic controls
  • Dynamic icons (source)
  • Volume control

@piitaya
Copy link
Owner

piitaya commented Apr 10, 2022

Cool 🙂
You don't need to translate I to all languages. Only english is needed. You can also translate to french because it's your native language 😅 Native speakers will do PR to add missing keys in others files 🙂

@acesyde
Copy link
Contributor Author

acesyde commented Apr 10, 2022

Cool 🙂
You don't need to translate I to all languages. Only english is needed. You can also translate to french because it's your native language 😅 Native speakers will do PR to add missing keys in others files 🙂

Google translate is my friend 😂

@piitaya
Copy link
Owner

piitaya commented Apr 10, 2022

Cool 🙂
You don't need to translate I to all languages. Only english is needed. You can also translate to french because it's your native language 😅 Native speakers will do PR to add missing keys in others files 🙂

Google translate is my friend 😂

We all known that 😂
But no translation is better than wrong translation 😅

@acesyde
Copy link
Contributor Author

acesyde commented Apr 10, 2022

@piitaya I think I have finished but I don't know how to change the background of the card when the enable_background_art is set to true can you help me ?

@acesyde
Copy link
Contributor Author

acesyde commented Apr 10, 2022

@piitaya I think I have finished but I don't know how to change the background of the card when the enable_background_art is set to true can you help me ?

I have try something

image

@piitaya
Copy link
Owner

piitaya commented Apr 10, 2022

Mushroom card has only one line of control. I think it's better to add a button to switch between volume controls and media controls like cover card for example for consistency. It's better to stack cards in a grid if they have the same size.

For the background, it's a good idea! Maybe we can add it in avatar for now like to person card.
Background image can be hard to manage when there is text on it 😅 maybe there is something to do with css filter. But we can update the card later, it's not a must have for the first version 😉

@acesyde
Copy link
Contributor Author

acesyde commented Apr 10, 2022

Mushroom card has only one line of control. I think it's better to add a button to switch between volume controls and media controls like cover card for example for consistency. It's better to stack cards in a grid if they have the same size.

For the background, it's a good idea! Maybe we can add it in avatar for now like to person card.
Background image can be hard to manage when there is text on it 😅 maybe there is something to do with css filter. But we can update the card later, it's not a must have for the first version 😉

Ok I will remove the background for the moment and add a switch control between buttons and volume 👍

@acesyde acesyde marked this pull request as ready for review April 10, 2022 19:36
Copy link
Owner

@piitaya piitaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool 👍 Great job !

src/translations/fr.json Outdated Show resolved Hide resolved
Comment on lines +90 to +93
supportsPrevious(entity) ||
supportsPlay(entity) ||
supportsPause(entity) ||
supportsNext(entity);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you can directly use supportsFeature ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to use the computeSupport and unitary supportsX in the buttons-control so I prefer reuse supportsX instead of rewrite again the same logic :)

README.md Outdated Show resolved Hide resolved
src/cards/media-player-card/media-player-card.ts Outdated Show resolved Hide resolved
@acesyde acesyde changed the title Feature/media player feat(media_player): add support of media player Apr 14, 2022
@piitaya piitaya added the enhancement New feature or request label Apr 14, 2022
@piitaya piitaya merged commit 7c09335 into piitaya:main Apr 14, 2022
@acesyde acesyde deleted the feature/media_player branch April 16, 2022 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants