SettingsScreen is a modal panel that overlays the player. It is opened by pressing OK twice while watching a channel. It provides account and display settings, and a hidden server management section for technical administration.
How to access settings
Press OK once while watching a channel
The player banner shows “En vivo” and a hint label appears: “Presiona OK otra vez para abrir configuracion”. A 1.2-second timer arms the shortcut.
Press OK a second time before the timer expires
PlayerScreen sets m.top.openSettings = true. MainScene observes this and shows SettingsScreen.If OK is not pressed a second time within 1.2 seconds, the shortcut resets and the hint disappears.
Main menu items
The screen starts inMODE_MAIN with these items:
Safe area margin
The safe area margin compensates for TV overscan. It is adjustable from 0% to 10% using Left/Right keys when the “Área segura” item is focused:REG_KEY_SAFE_MARGIN = "uiSafeMarginPct". MainScene observes the safeAreaChanged counter and reapplies the layout to all visible screens.
Default value at first launch is 0% (
UI_SAFE_MARGIN_PCT = 0 in AppConstants). Most modern TVs do not need adjustment.Channel refresh
Selecting “Actualizar canales” incrementsrefreshChannelsRequested:
MainScene observes this field and re-runs PlaylistTask using the current session credentials, then updates MainScreen.channels with the new result.
Logout
Selecting “Cerrar sesión” setslogoutRequested = true. MainScene handles this by:
- Clearing saved credentials from the registry
- Stopping the player
- Navigating back to
OnboardingScreenorLoginScreen
Server management panel
The server manager is hidden behind a tap-unlock mechanism. It becomes available after pressing OK on “Acerca de GlobalTV” five times:Server modes
The panel has three modes managed bym.mode:
| Mode | Constant | Description |
|---|---|---|
| Main settings | MODE_MAIN | Default view with all standard options |
| Server list | MODE_SERVERS | Lists all saved server profiles |
| Server actions | MODE_ACTIONS | Actions for a selected server |
Server actions
When a server is selected inMODE_SERVERS, the panel enters MODE_ACTIONS with these options:
applyServer) emits applyServerId and sets applyServerRequested = true. MainScene observes this and restarts the handshake, auth, and playlist pipeline using the new server.
Test connection (testServer) runs a ServerProbeTask against the selected server’s health endpoint without changing the active session.
Add/Edit server opens a two-step StandardKeyboardDialog flow: first asks for the server name, then the base URL. The URL is validated and deduplicated before saving.
Server profiles storage
Server profiles are serialized to JSON and stored in the Roku registry underREG_KEY_SERVER_PROFILES = "serverProfiles". The ServerManager utility (source/utils/ServerManager.brs) provides all CRUD operations.