This document is extracted from the [[media-source]] specification in order to work on the playback quality problematic in a larger scope.
Each {{HTMLVideoElement}} MUST maintain a total video frame count variable keeping track of the total number of frames that have been displayed and dropped. It MUST follow these rules:
Each {{HTMLVideoElement}} MUST maintain a dropped video frame count variable keeping track of the total number of frames that have been dropped. It MUST follow these rules:
The following corrupted video frame count concept and associated interfaces are deprecated. They may or may not be present in current implementations.
Each {{HTMLVideoElement}} MUST maintain a corrupted video frame count variable keeping track of the total number of corrupted frames detected. It MUST follow these rules:
It is up to the implementation to determine whether to display or drop a corrupted frame. However, regardless of the choice made, the total video frame count and dropped video frame count MUST be updated appropriately.
partial interface HTMLVideoElement { VideoPlaybackQuality getVideoPlaybackQuality(); };
When getVideoPlaybackQuality() method is called, the user agent MUST run the following steps:
[Exposed=Window] interface VideoPlaybackQuality { readonly attribute DOMHighResTimeStamp creationTime; readonly attribute unsigned long droppedVideoFrames; readonly attribute unsigned long totalVideoFrames; // Deprecated! readonly attribute unsigned long corruptedVideoFrames; };
The creationTime attribute MUST return the current high resolution time for when object was created.
The droppedVideoFrames attribute MUST return the total number of frames dropped predecode or dropped because the frame missed its display deadline.
The totalVideoFrames attribute MUST return the total number of frames that would have been displayed if no frames are dropped.
[DEPRECATED] The corruptedVideoFrames attribute MUST return the total number of corrupted frames that have been detected.