HTML videoWidth and videoHeight report the media’s natural dimensions in CSS pixels. Before those dimensions are known, their values can be zero. These properties differ from the page’s chosen playback-area size. A zero early reading or a smaller displayed rectangle therefore needs timing and field names before it becomes a source-resolution finding.
Follow metadata arrival
Imagine a page creating its video element before the media metadata has arrived. The element can already occupy a visible rectangle, while videoWidth and videoHeight still report zero. The HTML getter rules return zero at HAVE_NOTHING. Reading the fields once during page setup does not establish that the selected programme contains no picture or has a permanently zero-sized video track.
Compare natural and layout dimensions
A page might display a video in a 640 by 360 area while its natural dimensions are 1920 by 1080. Both can be correct descriptions of different layers. The CSS layout determines the area on the page, while the media properties describe its natural dimensions after the format’s relevant adjustments. Neither number alone states the television panel’s physical resolution or certifies perceived sharpness.
Allow for later changes
The natural dimensions can change, for example when the selected video track changes. HTML defines a resize event for changes outside HAVE_NOTHING. A diagnostic panel should refresh its recorded dimensions at the appropriate events, rather than permanently display the earliest value. A stale readout can make a successful rendition change look as though the source never changed.
Give support the stage and measurement
Record the property names, values, readiness state and whether the reading preceded or followed metadata and a track change. A viewer can provide the displayed quality label and visible symptom without interpreting internal dimensions. Developers can compare natural media dimensions with layout separately. This identifies an observation-timing or display-sizing issue without confusing a page rectangle, a poster image, encoded storage dimensions and the actual media track in one unsupported resolution claim.
