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}

Returns:
Type: 
void

(static) isValidToContinue(index) → {dynamic}

Parameters:
NameTypeDescription
indexinteger
Returns:
Type: 
dynamic

(static) nextSlide() → {void}

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

Returns:
Type: 
void

(static) onIsRandomChanged() → {void}

isRandom component field has changed

Returns:
Type: 
void

(static) onIsSlideshowChanged() → {void}

isSlideshow component field has changed

Returns:
Type: 
void

(static) onItemContentChanged() → {void}

Returns:
Type: 
void

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

Parameters:
NameTypeDescription
keystring
pressboolean
Returns:
Type: 
boolean

(static) onScreenHidden() → {void}

JRScreen hook. Used to ensure tasks are stopped

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

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

Parameters:
NameTypeDescription
uristring
Returns:
Type: 
void

(static) statusUpdate() → {void}

Returns:
Type: 
void