Methods
(static) armLimit() → {void}
Arms the limit timer for the nearest time limit among the open waits.
- 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).
| Name | Type | Description |
|---|---|---|
kind | string | a LoadingKind with an app-wait time limit (appWaits.limitMs) |
label | string | the text above the spinner, "" for none |
- Source
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.
- Source
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.
| Name | Type | Description |
|---|---|---|
key | string |
- Source
- Type:
- void
(static) failLeftBehind(newView) → {void}
The viewer reached newView: end the playback starts they have left (appWaits.leftBehind).
| Name | Type | Description |
|---|---|---|
newView | dynamic |
- Source
- 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.
| Name | Type | Description |
|---|---|---|
screen | object |
- Source
- Type:
- void
(static) init() → {void}
- Source
- 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.
| Name | Type | Description |
|---|---|---|
key | string | |
_press | boolean |
- Source
- 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.
- Type:
- void
(static) publish() → {void}
Publishes the open waits for JRScene's spinner: only what it draws, not the nodes.
- 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.
- Source
- 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.
| Name | Type | Description |
|---|---|---|
shown | boolean |
- Source
- Type:
- void