@touchcastllc/napster-companion-api-dev 2.0.0-alpha.20 → 2.0.0-alpha.22
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.
- package/lib/components/InactiveOverlay/index.d.ts +3 -4
- package/lib/constants/inactivity.d.ts +11 -4
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.esm.js +1 -1
- package/lib/index.js +1 -1
- package/lib/index.standalone.js +1 -1
- package/lib/services/microphoneManager.d.ts +6 -0
- package/lib/types/index.d.ts +2 -0
- package/lib/utils/InactiveOverlayManager.d.ts +2 -6
- package/lib/utils/PiPManager.d.ts +5 -2
- package/package.json +1 -1
|
@@ -19,6 +19,12 @@ export interface MicrophoneManager {
|
|
|
19
19
|
switchDevice(deviceId: string): Promise<MediaStream>;
|
|
20
20
|
setMuted(muted: boolean): void;
|
|
21
21
|
isMuted(): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Hold the capture silent regardless of the user's mute (the inactivity
|
|
24
|
+
* warning). Not reflected in `isMuted()` or the `muted` event, so releasing
|
|
25
|
+
* it gives back exactly the user's own choice.
|
|
26
|
+
*/
|
|
27
|
+
setHeld(held: boolean): void;
|
|
22
28
|
getStream(): MediaStream | null;
|
|
23
29
|
getTrack(): MediaStreamTrack | null;
|
|
24
30
|
getAnalyser(): AnalyserNode | null;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -15,16 +15,12 @@ export interface InactiveOverlayTrigger {
|
|
|
15
15
|
type: InactiveOverlayTriggerType;
|
|
16
16
|
/** Duration in seconds for the countdown */
|
|
17
17
|
duration: number;
|
|
18
|
-
/** Optional custom message to display */
|
|
19
|
-
message?: string;
|
|
20
|
-
/** Whether user interaction is needed to continue */
|
|
21
|
-
isInteractionNeeded: boolean;
|
|
22
18
|
}
|
|
23
19
|
/**
|
|
24
20
|
* Callbacks for overlay lifecycle events
|
|
25
21
|
*/
|
|
26
22
|
export interface InactiveOverlayCallbacks {
|
|
27
|
-
/** Called when user clicks "
|
|
23
|
+
/** Called when user clicks "I'm here" */
|
|
28
24
|
onContinue?: () => void;
|
|
29
25
|
/** Called when countdown ends */
|
|
30
26
|
onEnd?: () => void;
|
|
@@ -74,7 +70,7 @@ export declare class InactiveOverlayManager {
|
|
|
74
70
|
*/
|
|
75
71
|
getCurrentTrigger(): InactiveOverlayTrigger | null;
|
|
76
72
|
/**
|
|
77
|
-
* Set the PiP window
|
|
73
|
+
* Set the PiP window's stage as the overlay target (or null when PiP closes).
|
|
78
74
|
* Relocates a visible overlay so it stays in front of the user.
|
|
79
75
|
*/
|
|
80
76
|
setPipTarget(target: HTMLElement | null): void;
|
|
@@ -19,8 +19,11 @@ export declare function createPiPManager(handlers: {
|
|
|
19
19
|
onScreenShareToggle: () => void;
|
|
20
20
|
isScreenShareSupported: () => boolean;
|
|
21
21
|
onInteraction?: () => void;
|
|
22
|
-
/**
|
|
23
|
-
|
|
22
|
+
/**
|
|
23
|
+
* PiP window opened — receives its #np_companion-sdk-root stage so callers
|
|
24
|
+
* can render into it with the SDK's root-anchored CSS applying.
|
|
25
|
+
*/
|
|
26
|
+
onOpen?: (pipStage: HTMLElement) => void;
|
|
24
27
|
/** PiP window closed (by user or programmatically). */
|
|
25
28
|
onClose?: () => void;
|
|
26
29
|
}): PiPController;
|