Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions deps/cloudxr/webxr_client/helpers/react/CloudXRComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ const IDLE_FRAME_LOG_MESSAGE = 'Received idle frame';
// (or the stream stalled), so the warm-up watchdogs resume.
const IDLE_FRAMES_QUIET_MS = 1000;

// Defaults for the warmupBeginTimeoutMs/warmupEndTimeoutMs props below. Both shorter than
// STREAM_ATTACH_BASE_TIMEOUT_MS and, unlike it, neither grows per reconnect attempt (see
// armWarmupBeginTimer/armWarmupEndTimer): once the stream has attached at all, decoder warm-up
// is a fast, bounded startup step (server encoder priming), not something that legitimately
// takes longer on a slow network the way the initial attach can. Split into two deadlines
// because "no warm-up signal at all since attaching" and "warm-up started but never finishes"
// are different failure modes worth distinguishing in the synthetic error message.
const WARMUP_BEGIN_BASE_TIMEOUT_MS = 10000; // 10 seconds - first warm-up log since onStreamStarted
const WARMUP_END_BASE_TIMEOUT_MS = 30000; // 30 seconds - completion since warm-up began
// Defaults for the warmupBeginTimeoutMs/warmupEndTimeoutMs props below. 0 disables warm-up
// detection: a CloudXR runtime with no OpenXR app streams idle frames that count as warm-up
// frames, so a fixed deadline can tear down a healthy session that is only waiting for an app.
// Callers that want detection (e.g. tests) set the props. Neither deadline grows per reconnect
// attempt (see armWarmupBeginTimer/armWarmupEndTimer). Split into two because "no warm-up signal
// at all since attaching" and "warm-up started but never finishes" are different failure modes
// worth distinguishing in the synthetic error message.
const WARMUP_BEGIN_BASE_TIMEOUT_MS = 0; // disabled; first warm-up log since onStreamStarted
const WARMUP_END_BASE_TIMEOUT_MS = 0; // disabled; completion since warm-up began

// setTimeout's delay is stored as a 32-bit signed int internally; a value above this overflows
// and fires (almost) immediately instead of waiting - the opposite of what a long configured
Expand Down Expand Up @@ -189,7 +189,7 @@ interface CloudXRComponentProps {
* message. Like warmupEndTimeoutMs, does NOT grow per reconnect attempt - warm-up is a fast,
* bounded server-side priming step once the stream has attached at all, not something that
* legitimately takes longer under retry the way the initial attach can. Defaults to
* WARMUP_BEGIN_BASE_TIMEOUT_MS (10 seconds). A value <= 0 disables this detection, as does
* WARMUP_BEGIN_BASE_TIMEOUT_MS (0, disabled). A value <= 0 disables this detection, as does
* warmupEndTimeoutMs <= 0.
*/
warmupBeginTimeoutMs?: number;
Expand All @@ -200,7 +200,7 @@ interface CloudXRComponentProps {
* the first warm-up log arrives and cleared by WARMUP_COMPLETE_LOG_PATTERN). See
* warmupBeginTimeoutMs's doc comment for why this is a separate deadline. Does NOT grow per
* reconnect attempt, for the same reason warmupBeginTimeoutMs doesn't. Defaults to
* WARMUP_END_BASE_TIMEOUT_MS (30 seconds). A value <= 0 disables this detection and
* WARMUP_END_BASE_TIMEOUT_MS (0, disabled). A value <= 0 disables this detection and
* warmupBeginTimeoutMs too (all warm-up detection); stream-attach detection is unaffected.
*/
warmupEndTimeoutMs?: number;
Expand Down
4 changes: 2 additions & 2 deletions deps/cloudxr/webxr_client/src/CloudXR2DUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -599,8 +599,8 @@ export class CloudXR2DUI {
reconnectMaxAttempts: 3,
reconnectDelayMs: 3000,
streamAttachTimeoutMs: 120000,
warmupBeginTimeoutMs: 10000,
warmupEndTimeoutMs: 30000,
warmupBeginTimeoutMs: 0,
warmupEndTimeoutMs: 0,
teleopPath: DEFAULT_TELEOP_PATH,
};
}
Expand Down
8 changes: 4 additions & 4 deletions deps/cloudxr/webxr_client/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1570,7 +1570,7 @@ <h4 class="advanced-divider">Advanced settings</h4>

<div class="config-section">
<label for="cloudxrWarmupBeginTimeoutMs" class="input-label"
>Warm-up Begin Timeout (ms, default: 10000 / 10 seconds)</label
>Warm-up Begin Timeout (ms, default: 0 / disabled)</label
>
<input
id="cloudxrWarmupBeginTimeoutMs"
Expand All @@ -1580,7 +1580,7 @@ <h4 class="advanced-divider">Advanced settings</h4>
step="1000"
placeholder="Warm-up begin timeout in ms"
spellcheck="false"
value="10000"
value="0"
/>
<div class="config-text">
How long to wait, after the stream attaches, for the first sign that decoder
Expand All @@ -1592,7 +1592,7 @@ <h4 class="advanced-divider">Advanced settings</h4>

<div class="config-section">
<label for="cloudxrWarmupEndTimeoutMs" class="input-label"
>Warm-up End Timeout (ms, default: 30000 / 30 seconds)</label
>Warm-up End Timeout (ms, default: 0 / disabled)</label
>
<input
id="cloudxrWarmupEndTimeoutMs"
Expand All @@ -1602,7 +1602,7 @@ <h4 class="advanced-divider">Advanced settings</h4>
step="1000"
placeholder="Warm-up end timeout in ms"
spellcheck="false"
value="30000"
value="0"
/>
<div class="config-text">
How long to wait for decoder warm-up to finish once it has begun before treating
Expand Down
Loading