gennix-videoConfiguration guide0.1.0

Full width.
Limited height.

The box follows 16/9 until it reaches 80% of the visible viewport height. The contained video uses the whole available height when height is the limiting dimension. The close icon adds no top margin.

<gennix-video size="fullwidth" aspect-ratio="16/9"
  max-height="80dvh" background="poster"
  provider="youtube" src="HuACikeyg0c">
</gennix-video>

Subtract a header

The height cap is the visible viewport minus 80 pixels. The offset is subtracted from the cap, not from the ratio-derived height.

<gennix-video size="fullwidth" aspect-ratio="16/9" max-height="100dvh" viewport-offset="80" background="poster" provider="youtube" src="HuACikeyg0c"></gennix-video>

A pixel limit

Also supports px, vh and svh. dvh follows mobile browser bars; svh stays at the smaller visible viewport. Without a limit, fullwidth follows its ratio.

<gennix-video size="fullwidth" aspect-ratio="16/9" max-height="400" background="poster" provider="native" src="assets/sample.mp4" poster="assets/sample-poster.jpg"></gennix-video>