scaleForDeviceResolution

Workaround to scale the size based on the device resolution

import { scaleForDeviceResolution } from "@roku-sdk/components/helpers";
scaleForDeviceResolution(size: Accessor<Vector2D>): Accessor<Vector2D>

Description

Workaround to scale the size based on the device resolution. Used to fix the lack of autoscaling when the device resolution is not FHD. Resolution-related properties of some SceneGraph nodes do not autoscale when the resolution is not FHD, even when autoscaling is enabled (manifest has FHD resolution only).

Parameters

NameTypeDescription
sizeAccessor<Vector2D>The size accessor to apply the workaround to.

Return values

The autoscaled size accessor.


What’s Next

Did this page help you?