-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Constrain the view port (only) to a fixed aspect ratio #1581
Comments
I think you want to set the camera aspect-ratio, but not the card, with this: type: custom:frigate-card
cameras:
- camera_entity: camera.office
dimensions:
aspect_ratio: '4:3'
# Not this, as this sets it for the whole card
# dimensions:
# aspect_ratio: '4:3'
menu:
style: outside Does this do what you want, or do I misunderstand? |
Yes and no. Check this: With card fixed aspect ratio: chrome_42oXrJMAN7.mp4With camera fixed aspect ratio: chrome_ndCzKA74cD.mp4Notice how the first video starts already with its final size. Notice how the latter one starts small and takes a while to figure out its final size. If you play both clips at 0.5x it should be a lot easier to spot. |
Ah, yes. That's while the card is loading, the view (which may or may not be a camera) is not yet loaded, so camera-level aspect_ratio cannot be enforced.
Views that are not just a simple camera come to mind (e.g. gallery, or grid of multiple cameras). Let me think on this! |
I found a (very lucky) solution for this: dimensions:
aspect_ratio_mode: static
aspect_ratio: "3:2" This seems to be the exact ratio I need to fit both the external menu and a 16:9 camera. chrome_6liSLb5a9g.mp4@dermotduffy, if you believe this cannot be fixed otherwise, I'm ok closing it. |
But for some other cases, with more customizations like menu height, it's a bit more challenging to find an aspect ratio that works in all conditions. It would be great if this could be calculated by the card itself. Perhaps based on:
|
Is your feature request related to a problem? Please describe.
In 5.2.0 I was able to constrain the view port to 16:9 with:
But the same configuration now will constrain the whole card, including the external menu, to 16:9.
Instead of:
It now looks like:
Which is not optimal, as it is very hard to predict the card aspect ratio when taking into consideration the menu.
The reason why I want to constrain the card is to make the dashboard loading look a bit better. For example, the following:
In favor of:
Describe the solution you'd like
Perhaps...
Or maybe just make it the default with no ability to configure? I wonder if there is a use case to constrain the card beyond the view port.
Describe alternatives you've considered
I was playing with the camera dimensions configuration, but that doesn't seem to have the effect I wanted.
Additional context
The text was updated successfully, but these errors were encountered: