Members
(static, constant) CHANNEL_PAGE_SIZE
Channels per page of the channel list.
- Default Value
- 25
(static, constant) GUIDE_VISIBLE_ROWS
Rows the guide shows at once, for when TimeGrid does not report numRows. Roku's TimeGrid reference does not list that field; both test devices report 6 (Roku OS 15.3.4, 2026-09-21).
- Default Value
- 6
Methods
(static) applyPrograms(byChannel, fetch) → {void}
Gives each channel row of fetch.block its programs, one write per row: REPLACE swaps what the row holds for them, LATER appends them and EARLIER inserts them ahead. The server's bounds are inclusive, so an extension repeats the programs the block already holds at its edge; those are dropped by id.
| Name | Type | Description |
|---|---|---|
byChannel | object | |
fetch | object |
- Type:
- void
(static) applyTrim(trim) → {void}
Applies one of guidePrograms.trims: drops the block, or cuts it back to what airs in [trim.from, trim.until].
| Name | Type | Description |
|---|---|---|
trim | object |
- Type:
- void
(static) channelFilterSet() → {void}
- Type:
- void
(static) channelsearchTermSet() → {void}
Voice Search set
- Type:
- void
(static) dropPrograms(blocks) → {void}
Drops the programs of blocks, one write per row.
| Name | Type | Description |
|---|---|---|
blocks | object |
- Type:
- void
(static) focusProgramDetails(setFocused) → {void}
Move the TV Guide Grid down or up depending whether details are selected
| Name | Type | Description |
|---|---|---|
setFocused | dynamic |
- Type:
- void
(static) guideFocusedRow(rowCount) → {integer}
The focused channel row, clamped to the grid. TimeGrid keeps reporting the old index for a moment after the content is replaced.
| Name | Type | Description |
|---|---|---|
rowCount | integer |
- Type:
- integer
(static) guideVisibleRows() → {integer}
- Type:
- integer
(static) init() → {void}
- Type:
- void
(static) isoFromSeconds(seconds) → {string}
| Name | Type | Description |
|---|---|---|
seconds | integer |
- Type:
- string
(static) loadProgramDetails(programId, channelIndex, programIndex) → {void}
Fetch full program details for a focused grid cell and swap the lightweight schedule item for the fully-loaded node. Render-thread promise: replaces the former LoadProgramDetailsTask, a pure-fetch Task consumed via createObject + observeField (Phase-3a collapse; canonical in docs/dev/promises.md). The transform here is a SINGLE item (transformBaseItem, not array processing), so it's render-thread-acceptable.
| Name | Type | Description |
|---|---|---|
programId | string | |
channelIndex | integer | |
programIndex | integer |
- Type:
- void
(static) onChannelFocused() → {void}
- Type:
- void
(static) onChannelPageFailed(startIndex) → {void}
A failed channel page is not the end of the list: keep the rows already here and fetch the same page again after a backoff delay (scheduleRetry).
| Name | Type | Description |
|---|---|---|
startIndex | integer |
- Type:
- void
(static) onChannelsLoaded(event) → {void}
Channels loaded callback: handles both first and subsequent pages. First page: creates grid content, shows channels immediately. Subsequent pages: appends channels to existing grid. Programs are not part of a page: reconcilePrograms loads them for the rows near the focus.
| Name | Type | Description |
|---|---|---|
event | object |
- Type:
- void
(static) onDestroy() → {void}
onDestroy: Full teardown releasing all resources before component removal. The guide is a child of BaseGridView, not a routed view, so BaseGridView calls this (hideTVGuide and its own onDestroy); the router never will.
- Type:
- void
(static) onGridScrolled() → {void}
The left edge sets the time window (guidePrograms.timeWindow): the blocks near the focus fetch what they miss of it, and what falls far outside it is trimmed. Blocks farther away catch up when the focus reaches them.
- Type:
- void
(static) onKeyEvent(key, press) → {boolean}
| Name | Type | Description |
|---|---|---|
key | string | |
press | boolean |
- Type:
- boolean
(static) onProgramFocused() → {void}
- Type:
- void
(static) onProgramSelected() → {void}
- Type:
- void
(static) onProgramsLoaded(event) → {void}
| Name | Type | Description |
|---|---|---|
event | object |
- Type:
- void
(static) onRecordChannelSelected() → {void}
Handle user selecting "Record Channel" from Program Details
- Type:
- void
(static) onRecordOperationDone(event) → {void}
| Name | Type | Description |
|---|---|---|
event | object |
- Type:
- void
(static) onRecordSeriesChannelSelected() → {void}
Handle user selecting "Record Series" from Program Details
- Type:
- void
(static) onRetryTimer() → {void}
- Type:
- void
(static) onScreenHidden() → {void}
Off screen (something plays on top of the library): retries wait until the guide is back.
- Type:
- void
(static) onScreenShown() → {void}
BaseGridView forwards onScreenShown / onScreenHidden: the guide is its child, not a routed view.
- Type:
- void
(static) onWatchChannelSelected() → {void}
Handle user selecting "Watch Channel" from Program Details
- Type:
- void
(static) reconcilePrograms() → {void}
Brings the rows near the focus to the programs they should hold: drops blocks beyond the cap, updates the text shown in rows without programs, starts the next fetch if none is in flight, and arms the retry timer for a failed block whose delay is not up yet.
- Type:
- void
(static) reloadChannels() → {void}
Rebuilds the guide for the current m.channelQuery: forgets every channel and program, and loads the list from its first page.
- Type:
- void
(static) resetPrograms() → {void}
Forgets every program and the channel rows' ids: the channel list is being rebuilt.
- Type:
- void
(static) runChannelsPage(startIndex) → {void}
Runs m.channelQuery from startIndex on a NEW LoadChannelsTask node, releasing the run in flight. Never a relaunch of the previous node: see replaceTask.
| Name | Type | Description |
|---|---|---|
startIndex | integer |
- Type:
- void
(static) scheduleRetry() → {void}
Arms the retry timer for the earliest failure whose delay is not up yet (a channel page with none in flight, or a wanted program block with no fetch in flight), or stops it when nothing waits or the guide is off screen.
- Type:
- void
(static) startLoading() → {void}
Called by BaseGridView after setting filter/searchTerm to avoid double-fire. Loads the channel list in pages of CHANNEL_PAGE_SIZE for fast initial display.
- Type:
- void
(static) startProgramFetch(fetch, rowCount) → {void}
Fetches the programs of one block on a new LoadScheduleTask node.
| Name | Type | Description |
|---|---|---|
fetch | object | |
rowCount | integer |
- Type:
- void
(static) startRecording(isSeries) → {void}
Records (or, if it already records, cancels) the program in the details pane, on a new RecordProgramTask node, so a second press while one is in flight starts a run of its own.
| Name | Type | Description |
|---|---|---|
isSeries | boolean |
- Type:
- void
(static) updateNoProgramsText(focusedRow, rowCount, window) → {void}
A row without programs reads "Loading…" while a block around the focus is still loading, "Schedule unavailable" while one is waiting to retry, and "No schedule information" once they have all loaded. TimeGrid has one text for every such row, so it follows the rows the user can see.
| Name | Type | Description |
|---|---|---|
focusedRow | integer | |
rowCount | integer | |
window | object |
- Type:
- void
(static) withoutHeld(programs, channel, index, stepBy, boundary) → {object}
programs without those channel already holds at the edge an extension overlaps: the held programs from index, stepping by stepBy (-1 from the end, 1 from the start), while they start at or after (-1) / at or before (1) boundary.
| Name | Type | Description |
|---|---|---|
programs | object | |
channel | object | |
index | integer | |
stepBy | integer | |
boundary | integer |
- Type:
- object