HTMLVideoElement

HTMLVideoElement интерфейс предоставляет специальные свойства и методы для манипулирования видео объектов. Он также наследует свойства и методы HTMLMediaElement и HTMLElement.

Список поддерживаемых форматов медиа варьируются из одного браузера в другой. Вы должны либо предоставить ваше видео в одном формате которые поддерживаются всеми актуальными браузерами, или предоставить множественные источники видео в достаточно разных форматах чтобы все браузеры которые вам нужны поддерживали их.

Свойства

Inherits properties from its parent, HTMLMediaElement, and HTMLElement.

HTMLVideoElement.height (en-US)

Is a DOMString that reflects the height HTML attribute, which specifies the height of the display area, in CSS pixels.

HTMLVideoElement.poster (en-US)

Is a DOMString that reflects the poster HTML attribute, which specifies an image to show while no video data is available.

HTMLVideoElement.videoHeight (en-US) Только для чтения

Returns an unsigned long containing the intrinsic height of the resource in CSS pixels, taking into account the dimensions, aspect ratio, clean aperture, resolution, and so forth, as defined for the format used by the resource. If the element's ready state is HAVE_NOTHING, the value is 0.

HTMLVideoElement.videoWidth (en-US) Только для чтения

Returns an unsigned long containing the intrinsic width of the resource in CSS pixels, taking into account the dimensions, aspect ratio, clean aperture, resolution, and so forth, as defined for the format used by the resource. If the element's ready state is HAVE_NOTHING, the value is 0.

HTMLVideoElement.width (en-US)

Is a DOMString that reflects the width HTML attribute, which specifies the width of the display area, in CSS pixels.

Gecko-специфичные свойства

HTMLVideoElement.mozParsedFrames Только для чтения Non-standard

Returns an unsigned long with the count of video frames that have been parsed from the media resource.

HTMLVideoElement.mozDecodedFrames Только для чтения Non-standard

Returns an unsigned long with the count of parsed video frames that have been decoded into images.

HTMLVideoElement.mozPresentedFrames Только для чтения Non-standard

Returns an unsigned long with the count of decoded frames that have been presented to the rendering pipeline for painting.

HTMLVideoElement.mozPaintedFrames Только для чтения Non-standard

Returns an unsigned long with the count of presented frames which were painted on the screen.

HTMLVideoElement.mozFrameDelay Только для чтения Non-standard

Returns an double with the time which the last painted video frame was late by, in seconds.

HTMLVideoElement.mozHasAudio Только для чтения Non-standard

Returns a Boolean (en-US) indicating if there is some audio associated with the video.

Методы

Inherits methods from its parent, HTMLMediaElement, and HTMLElement.

HTMLVideoElement.getVideoPlaybackQuality() (en-US) Экспериментальная возможность

Returns a VideoPlaybackQuality (en-US) objects that contains the current playback metrics.

Спецификации

Specification
HTML Standard
# htmlvideoelement

Совместимость с браузерами

BCD tables only load in the browser

Смотрите также