supervision-js
    Preparing search index...

    Function viewportResolution

    • Decode at the on-screen size: canvas CSS width times devicePixelRatio. Best for fixed-size surfaces fed by a much larger source (frame sampler, inline players). Falls back to native while the box is unmeasured.

      The box it reads is the one bindCanvas measures, so this strategy resolves to native under presentation "frames", where the engine holds no canvas and nothing ever measures one. A frames-mode consumer passes displayBoxResolution instead.

      Parameters

      Returns DecodeResolutionStrategy