Skip to content

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

@Talkabout

Description

@Talkabout

Is there an existing issue for this?

  • I have searched the existing issues

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinguiUser interface related issue

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions