meerkat-dashboard / meerkat

Drag-and-drop dashboards for Icinga
https://meerkat.run
GNU Affero General Public License v3.0
18 stars 2 forks source link

Video elements not filling container #151

Closed ollytom closed 1 year ago

ollytom commented 1 year ago

Video dashboard elements do not fill their container when rendered. Maybe something to do with default padding or margin?

Need to investigate with browser inspector.

ollytom commented 1 year ago

Unlike all other dashboard elements, you can't click anywhere on a video element to select it in the editor. That's because the video HTML element exposes controls that are meant to be able to be clicked.

The simplest thing I could think of at the time was to create a user-selectable area by shrink the video to 90% size of its parent container.

<video
    style="width: 90%; height: 90%"
    ref={videoRef}
    src={options.source}
></video>

Other ways around this I can think of:

Because this is the only dashboard element with this problem, and it's a relatively rarely used element, that single style attribute style="width: 90%; height: 90%" has stuck.

For now I'll remove this from the v3 milestone as I don't think it's a real show-stopper.

sol1-matt commented 1 year ago

video currently working in the same way as v2 meerkat