Methods

(static) armLimit() → {void}

Arms the limit timer for the nearest time limit among the open waits.

Returns:
Type: 
void

(static) begin(kind, label) → {object}

Opens a wait the whole app is in (appWaits.begin) and returns its Promise, which ends it when it settles. Only through callFunc, so waits opened off the render thread are applied in order here. A playback start hides the screen it was pressed on until it ends, the way the plain spinner always has, and holds the remote focus meanwhile (holdFocus).

Parameters:
NameTypeDescription
kindstring

a LoadingKind with an app-wait time limit (appWaits.limitMs)

labelstring

the text above the spinner, "" for none

Returns:

the wait's Promise

Type: 
object

(static) cancelOnBack() → {boolean}

Back reached JRScene's arbiter with no navigation in flight: cancel every wait that hides the screen it was started from, so the viewer is back where they pressed Play: the same place Back from the player returns them to.

Returns:

whether there was a wait to cancel

Type: 
boolean

(static) endWait(key) → {void}

A wait's Promise settled: drop it, show the screen it hid, give the focus back, and redraw the spinner.

Parameters:
NameTypeDescription
keystring
Returns:
Type: 
void

(static) failLeftBehind(newView) → {void}

The viewer reached newView: end the playback starts they have left (appWaits.leftBehind).

Parameters:
NameTypeDescription
newViewdynamic
Returns:
Type: 
void

(static) holdFocus(screen) → {void}

A hidden screen must take no keys: a second OK would start a second launch, and arrows would move a focus nobody can see. So remember where its focus was, the way the router's suspend does (JRScreen.saveLastFocus), and hold the focus here until no wait hides a screen (releaseFocus). A screen outside the focus chain (a dialog has it) is left alone.

Parameters:
NameTypeDescription
screenobject
Returns:
Type: 
void

(static) init() → {void}

Returns:
Type: 
void

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

While a wait hides the screen it was started from, keys come here instead of to that screen. Back goes on to JRScene's Back arbiter, which cancels the wait (cancelOnBack) or leaves a navigation in flight alone; every other key is ignored until the wait ends.

Parameters:
NameTypeDescription
keystring
_pressboolean
Returns:
Type: 
boolean

(static) onLimit() → {void}

Ends every wait past its time limit. Nothing should reach here: each wait is ended by the code that owns it, so one that gets here is a start nobody finished, a bug to find in the log.

Returns:
Type: 
void

(static) publish() → {void}

Publishes the open waits for JRScene's spinner: only what it draws, not the nodes.

Returns:
Type: 
void

(static) releaseFocus() → {void}

No wait hides a screen any more. If the focus is still held here, the active screen takes it back and restores its own (the router's handleFocus, which restores lastFocus). A player that mounted, or a screen the viewer went to, has taken it already.

Returns:
Type: 
void

(static) setOverhangShown(shown) → {void}

Shows or hides the scene's overhang while a start hides a screen. By opacity, for the reason the screen is: JRScene's overhang controller owns the overhang's visible (a player hides it), so neither can undo the other. Looked up when first needed: the overhang is declared after this host in JRScene.xml.

Parameters:
NameTypeDescription
shownboolean
Returns:
Type: 
void