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
| Name | Type | Description |
|---|---|---|
size | Accessor<Vector2D> | The size accessor to apply the workaround to. |
Return values
The autoscaled size accessor.
Updated about 3 hours ago
What’s Next
Did this page help you?