弃用
This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the
兼容性表格
at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
VideoPlaybackQuality
interface's read-only
corruptedVideoFrames
property the number of corrupted video frames that have been received since the
<video>
element was last loaded or reloaded.
corruptFrameFount = videoPlaybackQuality.corruptedVideoFrames;
The number of corrupted video frames that have been received since the
<video>
element was last loaded or reloaded.
It is up to the
用户代理
to determine whether or not to display a corrupted video frame. If a corrupted frame is dropped, then both
corruptedVideoFrames
and
droppedVideoFrames
are incremented.
This example determines the percentage of frames which have been corrupted, and if the value is greater than 5%, calls a funciton called
downgradeVideo()
that would be implemented to switch to a different video that might tax the network less.
var videoElem = document.getElementById("my_vid");
var quality = videoElem.getVideoPlaybackQuality();
if (quality.corruptedVideoFrames/quality.totalVideoFrames > 0.05) {
downgradeVideo(videoElem);
}
| 规范 | 状态 | 注释 |
|---|---|---|
|
Media Playback Quality
The definition of 'VideoPlaybackQuality: corruptedVideoFrames' in that specification. |
编者草案 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
corruptedVideoFrames
弃用
非标
|
Chrome 80 | Edge 12 |
Firefox
不支持
42 — 73
|
IE 11 | Opera 67 | Safari 8 | WebView Android 80 | Chrome Android 80 | Firefox Android 不支持 No | Opera Android 不支持 No | Safari iOS 不支持 No | Samsung Internet Android 不支持 No |
完整支持
不支持
非标。预期跨浏览器支持较差。
弃用。不要用于新网站。
见实现注意事项。
用户必须明确启用此特征。
HTMLVideoElement.getVideoPlaybackQuality()
method for constructing and returning this interface
VideoPlaybackQuality
corruptedVideoFrames
creationTime
droppedVideoFrames
totalFrameDelay
totalVideoFrames
BeforeUnloadEvent
DOMStringMap
ErrorEvent
GlobalEventHandlers
HTMLAnchorElement
HTMLAreaElement
HTMLAudioElement
HTMLBRElement
HTMLBaseElement
HTMLBaseFontElement
HTMLBodyElement
HTMLButtonElement
HTMLCanvasElement
HTMLContentElement
HTMLDListElement
HTMLDataElement
HTMLDataListElement
HTMLDialogElement
HTMLDivElement
HTMLDocument
HTMLElement
HTMLEmbedElement
HTMLFieldSetElement
HTMLFormControlsCollection
HTMLFormElement
HTMLFrameSetElement
HTMLHRElement
HTMLHeadElement
HTMLHeadingElement
HTMLHtmlElement
HTMLIFrameElement
HTMLImageElement
HTMLInputElement
HTMLIsIndexElement
HTMLKeygenElement
HTMLLIElement
HTMLLabelElement
HTMLLegendElement
HTMLLinkElement
HTMLMapElement
HTMLMediaElement
HTMLMetaElement
HTMLMeterElement
HTMLModElement
HTMLOListElement
HTMLObjectElement
HTMLOptGroupElement
HTMLOptionElement
HTMLOptionsCollection
HTMLOutputElement
HTMLParagraphElement
HTMLParamElement
HTMLPictureElement
HTMLPreElement
HTMLProgressElement
HTMLQuoteElement
HTMLScriptElement
HTMLSelectElement
HTMLShadowElement
HTMLSourceElement
HTMLSpanElement
HTMLStyleElement
HTMLTableCaptionElement
HTMLTableCellElement
HTMLTableColElement
HTMLTableDataCellElement
HTMLTableElement
HTMLTableHeaderCellElement
HTMLTableRowElement
HTMLTableSectionElement
HTMLTemplateElement
HTMLTextAreaElement
HTMLTimeElement
HTMLTitleElement
HTMLTrackElement
HTMLUListElement
HTMLUnknownElement
HTMLVideoElement
HashChangeEvent
历史
ImageData
定位
MessageChannel
MessageEvent
MessagePort
Navigator
NavigatorGeolocation
NavigatorID
NavigatorLanguage
NavigatorOnLine
NavigatorPlugins
PageTransitionEvent
Plugin
PluginArray
PopStateEvent
PortCollection
PromiseRejectionEvent
RadioNodeList
Transferable
ValidityState
Window
WindowBase64
WindowEventHandlers
WindowTimers