Skip to content

comark/media/invalid-size

Give a video's width and height together, in pixels

width and height are a video's size in pixels, so the page keeps its room before the video loads. They only give the room together, so one without the other, or one that isn't a whole number of pixels, is dropped. Supply both sides. media({ size: true }) can read remote dimensions for trusted documents. A player is never wider than the page, whatever its width.

Incorrect

0:000:00SpeedLoop

![A tour of the duck pond](/pond-tour.mp4){width="640"}
md

Correct

0:000:00SpeedLoop

![A tour of the duck pond](/pond-tour.mp4){width=1280 height=720}
md