unfoldedcircle / feature-and-bug-tracker

Feature and bug tracker repository for Unfolded Circle products
21 stars 0 forks source link

[bug] Media Player image stretched beyond max size #350

Closed Talkabout closed 1 month ago

Talkabout commented 3 months ago

Is there an existing issue for this?

Description

Hi,

by using the media_image_url property of media_player entity, the image is stretched beyond its max size when it is not square. Although the requirement is documented to be a square it is quite common to have preview images that are not matching this requirement. If an image is not square the following behavior would be correct in my opinion:

  1. check the aspect ratio
  2. if width > height: stretch the image width to the available space and center it vertically
  3. if height > width: stretch the image height to the available space and center it horizontally

What also needs to be considered is the use case of having the media_title and media_duration controls being visible, because the media player component can be defined to fit the aspect ratio of the image, but then the controls are not visible.

Thanks!

How to Reproduce

  1. provide an image url to media_image_url property that is not square (in my case width > height)
  2. check on the remote how the image is shown (in my case the height is stretched to available space andn width extends available space)

Expected behavior

Also non-square images should be shown correctly and not extend outside of the visible area.

System version

1.7.5

What part of the system affected by the problem?

UI

Additional context

No response

martonborzak commented 2 months ago

Fixed in next release.

zehnm commented 1 month ago

Fixed in the just released 1.7.11 beta firmware.

martonborzak commented 1 month ago

Fixed in 1.7.12.