From 9dc2811d8a19c6e28e596e4c15527ab2b81b423a Mon Sep 17 00:00:00 2001 From: youenn Date: Tue, 15 Apr 2025 12:02:36 +0200 Subject: [PATCH] Make a more explicit call to fetch, including options such as destination and mode. --- index.bs | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/index.bs b/index.bs index 0d2df30..f520e2d 100644 --- a/index.bs +++ b/index.bs @@ -273,14 +273,13 @@ platform UI or media keys, thereby improving the user experience.
  • If the user agent wants to display an [=MediaMetadata/artwork image=], - it is RECOMMENDED to run the fetch image algorithm. + the user agent MUST run the fetch image algorithm.
  • - The RECOMMENDED fetch image algorithm is as follows: + The fetch image algorithm is as follows:
      -
    1. If there are other fetch image algorithms running, cancel existing algorithm execution instances. @@ -294,18 +293,22 @@ platform UI or media keys, thereby improving the user experience. preferred artwork image from metadata's {{MediaMetadata/artwork}} of the active media session.
    2. +
    3. Let request be a new [=request=] whose [=request/URL=] is the + preferred artwork image's {{MediaImage/src}}, [=request/destination=] + is "image", [=request/mode=] is "no-cors", [=request/credentials mode=] is "include", + and whose [=request/use-URL-credentials flag=] is set. +
    4. - [=Fetch=] the preferred artwork image's {{MediaImage/src}}. - - Then, in parallel: - + [=Fetch=] request with the following steps executed + as the fetch's [=processResponse=] algorithm.
        -
      1. - Wait for the [=/response=]. +
      2. + Let response be the [=response=] given to the fetch's + [=processResponse=] algorithm.
      3. - If the [=/response=]'s [=response/type=] is - {{ResponseType/"default"}}, attempt to decode the resource as an + If response's [=response/type=] is not + {{ResponseType/"error"}}, attempt to decode response's [=body=] as an image.