HTMLVideoElement to add
new features that can be used to detect the user perceived playback
quality.
The following concepts and interfaces are defined in [[!HTML]]:
The following concepts and interfaces are defined in [[!hr-time]]:
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:
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.
HTMLVideoElement
partial interface HTMLVideoElement {
VideoPlaybackQuality getVideoPlaybackQuality();
};
When getVideoPlaybackQuality() method is called, the user agent MUST run the following steps:
Performance.now().
VideoPlaybackQuality interface
interface VideoPlaybackQuality {
readonly attribute DOMHighResTimeStamp creationTime;
readonly attribute unsigned long corruptedVideoFrames;
readonly attribute unsigned long droppedVideoFrames;
readonly attribute unsigned long totalVideoFrames;
};
The creationTime attribute MUST return
the timestamp returned by Performance.now() when the
object was created.
The corruptedVideoFrames attribute MUST return the total number of corrupted frames that have been detected.
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.