diff --git a/source b/source index 8d94ff454c8..ca693489027 100644 --- a/source +++ b/source @@ -7342,14 +7342,14 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • Return false.

  • -

    Each img and iframe element has associated lazy load resumption - steps, initially null.

    +

    Each img, iframe, and video element has associated + lazy load resumption steps, initially null.

    -

    For img and iframe elements that will lazy load, these steps are run from the lazy load - intersection observer's callback or when their lazy loading attribute is set - to the Eager state. This causes the element to - continue loading.

    +

    For img, iframe, and video elements that + will lazy load, these steps are run from the + lazy load intersection observer's callback or when their lazy loading + attribute is set to the Eager state. This + causes the element to continue loading.

    Each Document has a lazy load intersection observer, initially set to null but can be set to an IntersectionObserver instance.

    @@ -33096,6 +33096,7 @@ interface HTMLObjectElement : HTMLElement {
    src
    crossorigin
    poster
    +
    posterloading
    preload
    autoplay
    playsinline
    @@ -33119,6 +33120,7 @@ interface HTMLVideoElement : HTMLMediaElement readonly attribute unsigned long videoWidth; readonly attribute unsigned long videoHeight; [CEReactions] attribute USVString poster; + [CEReactions] attribute DOMString posterLoading; [CEReactions] attribute boolean playsInline; }; @@ -33158,8 +33160,29 @@ interface HTMLVideoElement : HTMLMediaElement data is available. The attribute, if present, must contain a valid non-empty URL potentially surrounded by spaces.

    +

    The posterloading attribute is a lazy + loading attribute. Its purpose is to indicate the policy for loading the image given by the + poster attribute of video elements that are + outside the viewport.

    +
    +

    When the posterloading attribute's state is + changed to the Eager state, the user agent must run + these steps:

    + +
      +
    1. Let resumptionSteps be the video element's lazy load + resumption steps.

    2. + +
    3. If resumptionSteps is null, then return.

    4. + +
    5. Set the video's lazy load resumption steps to null.

    6. + +
    7. Invoke resumptionSteps.

    8. +
    +

    If the specified resource is to be used, then, when the element is created or when the poster attribute is set, changed, or removed, the user agent must run the following steps to determine the element's poster frame (regardless of the @@ -33187,8 +33210,38 @@ interface HTMLVideoElement : HTMLMediaElement credentials mode is "include", and whose use-URL-credentials flag is set. -

  • Fetch request. This must - delay the load event of the element's node document.

  • +
  • Let delay load event be true if the video's lazy loading + attribute is in the Eager state, or if + scripting is disabled for the video, and + false otherwise.

  • + +
  • +

    If the will lazy load element steps given the video return true, + then:

    + +
      +
    1. Set the video's lazy load resumption steps to the rest of this + algorithm starting with the step labeled fetch the poster image.

    2. + +
    3. Start intersection-observing a lazy loading element for the + video element.

    4. + +
    5. Return.

    6. +
    +
  • + +
  • + +

    Fetch the poster image: Fetch + request.

    + + +

    When delay load event is true, fetching the image must delay the load + event of the element's node document until the task that is queued by the + networking task source once the resource has been fetched has been run. +

    +
  • @@ -33401,6 +33454,11 @@ interface HTMLVideoElement : HTMLMediaElement IDL attribute must reflect the poster content attribute.

    +

    The posterLoading IDL attribute must + reflect the posterloading content + attribute, limited to only known values.

    +

    The playsInline IDL attribute must reflect the playsinline content attribute.

    @@ -128084,6 +128142,7 @@ interface External { src; crossorigin; poster; + posterloading; preload; autoplay; playsinline; @@ -129206,6 +129265,12 @@ interface External { video Poster frame to show prior to video playback Valid non-empty URL potentially surrounded by spaces + + posterloading + video + Used when determining loading deferral of the poster frame + "lazy"; + "eager" preload audio;