supervision-js
    Preparing search index...

    Type Alias MediaRendererDepthInput

    MediaRendererDepthInput:
        | { map: DepthMap; manifest?: undefined; baseUrl?: undefined }
        | {
            manifest: string | URL | DepthManifest;
            baseUrl?: string | URL;
            map?: undefined;
        }

    Depth for the media a renderer presents: a map you already hold, or a depth.json manifest the session loads.

    A map is one still depth map drawn under every frame, stretched over the media rectangle; it must have the media's aspect ratio within 1 %. The session keeps the map's arrays for readouts and never copies them.

    A manifest is the URL of a depth.json, or its parseDepthManifest output. The session fetches the 16-bit PNG it names, and the confidence PNG when there is one.

    A clip manifest (frames) pairs one PNG with each video frame, so it needs media with a frame index: a URL or file, or createWebVideoEngineMediaRendererSource(). Other media, and a preview whose frames are not the video's by count or by time, are refused with a RangeError. During playback the session draws the exact frames or the manifest's 8-bit preview video as renderPreparation.depth.playback picks: by default the exact frames while they keep up and the preview otherwise; a clip without a preview plays its exact frames. Once playback rests, the session fetches the exact frame on screen, then its neighbours, so stepping shows depth at once.

    Type Declaration

    • { map: DepthMap; manifest?: undefined; baseUrl?: undefined }
    • {
          manifest: string | URL | DepthManifest;
          baseUrl?: string | URL;
          map?: undefined;
      }
      • Readonlymanifest: string | URL | DepthManifest
      • Optional ReadonlybaseUrl?: string | URL

        What a relative manifest URL, or the files of a manifest passed as an object, resolve against. Files of a fetched manifest resolve against the manifest's own URL.

      • Optional Readonlymap?: undefined