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.

Parameters:
NameTypeDescription
byChannelobject
fetchobject
Returns:
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].

Parameters:
NameTypeDescription
trimobject
Returns:
Type: 
void

(static) channelFilterSet() → {void}

Returns:
Type: 
void

(static) channelsearchTermSet() → {void}

Voice Search set

Returns:
Type: 
void

(static) dropPrograms(blocks) → {void}

Drops the programs of blocks, one write per row.

Parameters:
NameTypeDescription
blocksobject
Returns:
Type: 
void

(static) focusProgramDetails(setFocused) → {void}

Move the TV Guide Grid down or up depending whether details are selected

Parameters:
NameTypeDescription
setFocuseddynamic
Returns:
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.

Parameters:
NameTypeDescription
rowCountinteger
Returns:
Type: 
integer

(static) guideVisibleRows() → {integer}

Returns:
Type: 
integer

(static) init() → {void}

Returns:
Type: 
void

(static) isoFromSeconds(seconds) → {string}

Parameters:
NameTypeDescription
secondsinteger
Returns:
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.

Parameters:
NameTypeDescription
programIdstring
channelIndexinteger
programIndexinteger
Returns:
Type: 
void

(static) onChannelFocused() → {void}

Returns:
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).

Parameters:
NameTypeDescription
startIndexinteger
Returns:
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.

Parameters:
NameTypeDescription
eventobject
Returns:
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.

Returns:
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.

Returns:
Type: 
void

(static) onKeyEvent(key, press) → {boolean}

Parameters:
NameTypeDescription
keystring
pressboolean
Returns:
Type: 
boolean

(static) onProgramFocused() → {void}

Returns:
Type: 
void

(static) onProgramSelected() → {void}

Returns:
Type: 
void

(static) onProgramsLoaded(event) → {void}

Parameters:
NameTypeDescription
eventobject
Returns:
Type: 
void

(static) onRecordChannelSelected() → {void}

Handle user selecting "Record Channel" from Program Details

Returns:
Type: 
void

(static) onRecordOperationDone(event) → {void}

Parameters:
NameTypeDescription
eventobject
Returns:
Type: 
void

(static) onRecordSeriesChannelSelected() → {void}

Handle user selecting "Record Series" from Program Details

Returns:
Type: 
void

(static) onRetryTimer() → {void}

Returns:
Type: 
void

(static) onScreenHidden() → {void}

Off screen (something plays on top of the library): retries wait until the guide is back.

Returns:
Type: 
void

(static) onScreenShown() → {void}

BaseGridView forwards onScreenShown / onScreenHidden: the guide is its child, not a routed view.

Returns:
Type: 
void

(static) onWatchChannelSelected() → {void}

Handle user selecting "Watch Channel" from Program Details

Returns:
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.

Returns:
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.

Returns:
Type: 
void

(static) resetPrograms() → {void}

Forgets every program and the channel rows' ids: the channel list is being rebuilt.

Returns:
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.

Parameters:
NameTypeDescription
startIndexinteger
Returns:
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.

Returns:
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.

Returns:
Type: 
void

(static) startProgramFetch(fetch, rowCount) → {void}

Fetches the programs of one block on a new LoadScheduleTask node.

Parameters:
NameTypeDescription
fetchobject
rowCountinteger
Returns:
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.

Parameters:
NameTypeDescription
isSeriesboolean
Returns:
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.

Parameters:
NameTypeDescription
focusedRowinteger
rowCountinteger
windowobject
Returns:
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.

Parameters:
NameTypeDescription
programsobject
channelobject
indexinteger
stepByinteger
boundaryinteger
Returns:
Type: 
object