Members
(static, constant) TRICKPLAYBAR_POSITION_LABEL_INDEX
Child index for position label in Roku's built-in trickPlayBar component. The trickPlayBar is part of the Video node and doesn't expose child IDs, so we must access by index. Fallback search logic exists if Roku changes the structure. Defined at module level (BrighterScript const requirement) to provide immutability and enable reuse across multiple helper functions if needed.
- Default Value
- 8
Methods
(static) ReportPlayback(stateopt) → {void}
Report playback to server
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
state | string | <optional> | "update" |
- Type:
- void
(static) availSubtitleTrackIdx(tracknameToFind) → {integer}
availSubtitleTrackIdx: Returns Roku's index for requested subtitle track
| Name | Type | Description |
|---|---|---|
tracknameToFind | string | TrackName for subtitle we're looking to match |
indicating Roku's index for requested subtitle track. Returns SubtitleSelection.none if not found
- Type:
- integer
(static) bufferCheck() → {void}
Check the the buffering has not hung
- Type:
- void
(static) checkTimeToDisplayNextEpisode() → {void}
Checks if we need to display the Next Episode button
- Type:
- void
(static) destroy() → {void}
destroy: Full teardown releasing all resources before component removal Called by SceneManager when popping this scene
- Type:
- void
(static) findTrickPlayBarPositionLabel() → {dynamic}
findTrickPlayBarPositionLabel: Defensively finds the position text label in trickPlayBar
Tries multiple strategies to find the Label that displays seek position:
- Expected child index (8) - fast path for current Roku OS
- Search for FIRST Label child - position text comes before remaining time
- Return invalid if not found - feature gracefully degrades
- Label node or invalid if not found
- Type:
- dynamic
(static) getCurrentChapterIndex() → {integer}
getCurrentChapterIndex: Finds current chapter index
indicating index of current chapter within chapter data or 0 if chapter lookup fails
- Type:
- integer
(static) handleChapterListAction() → {void}
handleChapterListAction: Handles action to show chapter list
- Type:
- void
(static) handleChapterSkipAction(action) → {void}
handleChapterSkipAction: Handles user command to skip chapters in playing video
| Name | Type | Description |
|---|---|---|
action | string |
- Type:
- void
(static) handleHideAction(resume) → {void}
handleHideAction: Handles action to hide OSD menu
| Name | Type | Description |
|---|---|---|
resume | boolean | controls whether or not to resume video playback when sub is called |
- Type:
- void
(static) handleItemSkipAction(action) → {void}
handleItemSkipAction: Handles user command to skip items
| Name | Type | Description |
|---|---|---|
action | string | skip action to take |
- Type:
- void
(static) handleShowAudioMenuAction() → {void}
handleShowAudioMenuAction: Handles action to show audio selection menu
- Type:
- void
(static) handleShowSubtitleMenuAction() → {void}
handleShowSubtitleMenuAction: Handles action to show subtitle selection menu
- Type:
- void
(static) handleShowVideoInfoPopupAction() → {void}
handleShowVideoInfoPopupAction: Handles action to show video info popup
- Type:
- void
(static) handleVideoPlayPauseAction() → {void}
handleVideoPlayPauseAction: Handles action to either play or pause the video content
- Type:
- void
(static) hideNextEpisodeButton() → {void}
Runs hide Next Episode button animation and sets focus back to video
- Type:
- void
(static) init() → {void}
- Type:
- void
(static) loadCaption() → {void}
Set caption url to server subtitle track
- Type:
- void
(static) onAllowCaptionsChange() → {void}
Only setup caption items if captions are allowed
- Type:
- void
(static) onAudioIndexChange() → {void}
Event handler for when audioIndex changes
- Type:
- void
(static) onContentChange() → {void}
Event handler for when video content field changes
- Type:
- void
(static) onKeyEvent(key, press) → {boolean}
| Name | Type | Description |
|---|---|---|
key | string | |
press | boolean |
- Type:
- boolean
(static) onNextEpisodeDataLoaded() → {void}
- Type:
- void
(static) onOSDAction() → {void}
onOSDAction: Process action events from OSD to their respective handlers
- Type:
- void
(static) onPlaybackErrorButtonSelected(msg) → {void}
| Name | Type | Description |
|---|---|---|
msg | dynamic |
- Type:
- void
(static) onPlaybackErrorDialogClosed(msg) → {void}
| Name | Type | Description |
|---|---|---|
msg | dynamic |
- Type:
- void
(static) onPositionChanged() → {void}
When Video Player state changes
- Type:
- void
(static) onState() → {void}
When Video Player state changes
- Type:
- void
(static) onSubtitleChange() → {void}
Event handler for when selectedSubtitle changes
- Type:
- void
(static) onTrickPlayBarTextChange() → {void}
Called when Roku's trickPlayBar position text changes Parses the time string to get seek position and syncs our carousel This ensures carousel stays in sync with Roku's authoritative seek position
- Type:
- void
(static) onVideoContentLoaded() → {void}
- Type:
- void
(static) populateChapterMenu() → {void}
populateChapterMenu: ' Parse chapter data from API and appeand to chapter list menu
- Type:
- void
(static) shouldUseCustomSubtitlesForCurrentSelection() → {boolean}
Determines if custom subtitles should be used for the current selection Custom subtitles should only be used for external subtitles when the user has enabled the setting
- Type:
- boolean
(static) showNextEpisodeButton() → {void}
Runs Next Episode button animation and sets focus to button
- Type:
- void
(static) showPlaybackErrorDialog(errorMessageopt) → {void}
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
errorMessage | string | <optional> | "" |
- Type:
- void
(static) stateAllowsOSD() → {boolean}
stateAllowsOSD: Check if current video state allows showing the OSD
indicating if video state allows the OSD to show
- Type:
- boolean
(static) toggleCaption() → {void}
Toggles visibility of custom subtitles and sets captionTask's player state
- Type:
- void
(static) updateCaption() → {void}
Removes old subtitle lines and adds new subtitle lines
- Type:
- void
(static) updateCount() → {void}
Update count down text
- Type:
- void
(static) updateTrickplayCarousel(position) → {void}
Updates trickplay carousel with index calculated from video position Snaps to thumbnail boundaries for cleaner UX
| Name | Type | Description |
|---|---|---|
position | Float | Video position in seconds |
- Type:
- void