HTMLVideoElement.videoWidth
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
HTMLVideoElement
接口提供只读的 videoWidth
属性,指示视频的 固有宽度,使用 css 的像素值表示。
简单来说,这是媒体的初始宽度。
参见 HTMLVideoElement.videoHeight
> About intrinsic width and height 查看更多细节。
属性
整数值,以 CSS 的像素值指定视频的固有宽度。
如果元素的 readyState
是HTMLMediaElement.HAVE_NOTHING
,则此属性的值为 0,因为视频和开头帧的大小并不能知道。
规范
Specification |
---|
HTML # dom-video-videowidth-dev |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
videoWidth |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.