Members
(static, constant) MAX_CONSECUTIVE_PHOTO_FAILURES
How many photos in a row may fail before we stop skipping and make the user acknowledge it. Bounds the wholesale-failure case (e.g. no server URL): random mode has no end-of-list stop, so an unbounded skip would cycle silently forever.
- Default Value
- 3
Methods
(static) init() → {void}
- Type:
- void
(static) isValidToContinue(index) → {dynamic}
| Name | Type | Description |
|---|---|---|
index | integer |
- Type:
- dynamic
(static) nextSlide() → {void}
- Type:
- void
(static) onDestroy() → {void}
onDestroy: Full teardown releasing all resources before component removal Called automatically via JRScreen.beforeViewClose when sgRouter permanently closes this view.
- Type:
- void
(static) onIsRandomChanged() → {void}
isRandom component field has changed
- Type:
- void
(static) onIsSlideshowChanged() → {void}
isSlideshow component field has changed
- Type:
- void
(static) onItemContentChanged() → {void}
- Type:
- void
(static) onKeyEvent(key, press) → {boolean}
| Name | Type | Description |
|---|---|---|
key | string | |
press | boolean |
- Type:
- boolean
(static) onScreenHidden() → {void}
JRScreen hook. Used to ensure tasks are stopped
- Type:
- void
(static) onScreenShown() → {void}
The router creates this view; its launch data arrives as route.context (set by JRScene.onPhotoLaunchRequested). Apply it on first mount, setting itemIndex LAST so onItemContentChanged fires with itemsNode/itemsArray + slideshow flags already in place. itemIndex defaults to -1, so this runs once (subsequent shows are no-ops).
- Type:
- void
(static) showPhoto(uri) → {void}
Render the resolved photo, or handle an unresolvable one. Nothing else draws on this screen — no title, no overhang (see PhotoDetails.xml) — so a failed photo shows the user nothing new; the previous frame stays up, or black on the first one. During a slideshow we therefore toast and advance rather than stalling on a frame they never chose, and after MAX_CONSECUTIVE_PHOTO_FAILURES we stop advancing so a wholesale failure can't cycle silently.
A toast rather than a blocking dialog, and not only for interruption reasons: a dialog needs text metrics, and roFontRegistry is a MAIN|TASK-only component Roku refuses to create on the render thread. Toast goes through the scene's showToast, which is just field writes.
| Name | Type | Description |
|---|---|---|
uri | string |
- Type:
- void
(static) statusUpdate() → {void}
- Type:
- void