Skip to main content
source/AppConstants.brs exposes a single function AppConstants() that returns an associative array of every tunable value in the application. Centralizing configuration here avoids magic numbers scattered across the codebase and makes it easy to audit and update values before a release.
source/AppConstants.brs
Call AppConstants() anywhere in BrightScript to get a fresh copy of the table. There is no global singleton — the AA is constructed on each call.

Server & endpoints

SERVER_LIST[0] (172.17.11.2:3333) is a LAN address intended for local development. In production environments the app selects the best available server from the list based on health-check results.

Ads backend

Timeouts & retries

Polling intervals

Registry keys

The Roku registry is persistent key-value storage that survives channel reinstalls. All GlobalTV registry entries are stored under the GlobalTV section.

Auth reason codes

These codes are returned by GTV_AuthClassifyFailure() to describe why an authentication attempt failed. They are used to drive the error messaging shown to the user.

Colors

All color values use Roku’s 0xRRGGBBAA hex format (8 digits including alpha). Fully opaque colors end in FF.

Typography

Font size values are integers representing points in the Roku design coordinate space (1920×1080).

UI & layout

The user-configured value is persisted to the registry under REG_KEY_SAFE_MARGIN and read back by GTV_GetSafeMarginPct() at runtime, which clamps it to [UI_SAFE_MARGIN_MIN_PCT, UI_SAFE_MARGIN_MAX_PCT].
Set any of these to true locally to trace layout or ads behavior. All three default to false and should remain false in production builds.