@touchcastllc/napster-companion-api-dev 2.0.0-alpha.0 → 2.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,6 +10,14 @@ export interface MicGateController {
10
10
  export interface MicGateOptions {
11
11
  /** Element the recovery card mounts into on denial. */
12
12
  root: HTMLElement;
13
+ /**
14
+ * True when the SDK's own click-to-start button is in play. Gates the
15
+ * 30s dismiss-timer below: with no button for an ignored prompt to fall
16
+ * back to, there's nothing useful for the attempt to collapse into, so
17
+ * this waits on the browser's own prompt indefinitely instead of forcing
18
+ * "entry" and firing onDismissed.
19
+ */
20
+ buttonMode: boolean;
13
21
  /**
14
22
  * The microphone is available. Fires once for an immediate grant, and
15
23
  * again after each successful "Check again" retry. May return a promise —
@@ -21,9 +29,11 @@ export interface MicGateOptions {
21
29
  onError?: (error: Error) => void;
22
30
  /**
23
31
  * Fires when a native permission prompt is ignored for 30s and the attempt
24
- * collapses back to the entry point — first attempt or retry. Distinct from
25
- * onError: a dismiss is not a failure, it is a clean, silent return to idle,
26
- * so nothing on this channel may reach the host's own onError.
32
+ * collapses back to the entry point — first attempt or retry. Only possible
33
+ * when buttonMode is true (see its own comment); without a button there is
34
+ * no 30s timer and this never fires. Distinct from onError: a dismiss is
35
+ * not a failure, it is a clean, silent return to idle, so nothing on this
36
+ * channel may reach the host's own onError.
27
37
  *
28
38
  * Exists because gateOnMicrophone()'s own promise resolves identically for
29
39
  * every outcome (it returns a bare { dismiss } handle), so a caller awaiting
@@ -227,6 +227,18 @@ export interface FeatureConfig {
227
227
  /** Mouth opening ratio threshold. Default 0.015. */
228
228
  talkingThreshold?: number;
229
229
  };
230
+ /** The "big card" placeholder (blurred companion photo + spinner) shown
231
+ * behind the entry/loading/permission-pending/permission-blocked states,
232
+ * and the zoom-in grow animation played when the session becomes ready.
233
+ * Disable when the embedding app renders its own start/loading screen
234
+ * and would otherwise have to fight this with CSS. Defaults to
235
+ * `enabled: true`. The MicPermission recovery card itself (the actual
236
+ * "Allow microphone access" / "Check again" UI) and the ready video/
237
+ * canvas are unaffected — this only controls the decorative chrome
238
+ * behind/around them. */
239
+ loadingIndicator?: {
240
+ enabled: boolean;
241
+ };
230
242
  }
231
243
  /**
232
244
  * Configuration for the face tracking service.
@@ -701,7 +713,14 @@ export interface NapsterCompanionApiSDK {
701
713
  };
702
714
  }): Promise<NapsterCompanionApiController>;
703
715
  /**
704
- * Initialize the SDK and connect immediately: resolves once the session is up.
716
+ * Initialize the SDK and connect immediately.
717
+ *
718
+ * The returned promise resolves as soon as the widget has mounted and
719
+ * rendered — before the microphone prompt, before `getToken()`, before any
720
+ * connection exists. Sending a command (`sendCommand`, `enableFeature`,
721
+ * etc.) right after `await init()` can silently drop it if the session
722
+ * isn't actually connected yet. Use {@link NapsterCompanionApiConfig.onAvatarReady}
723
+ * (or `onSessionStatusChange`) to know when the session itself is up.
705
724
  *
706
725
  * `getToken` is called by the SDK itself once the microphone permission has
707
726
  * settled, so the connection token is always fresh when signaling starts. A
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@touchcastllc/napster-companion-api-dev",
3
- "version": "2.0.0-alpha.0",
3
+ "version": "2.0.0-alpha.1",
4
4
  "keywords": [
5
5
  "napster",
6
6
  "companion-api",