@xipkg/calls-compactview 0.0.0
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/README.md +0 -0
- package/dist/index.d.ts +101 -0
- package/dist/index.mjs +1245 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +65 -0
package/README.md
ADDED
|
File without changes
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as _livekit_components_core from '@livekit/components-core';
|
|
3
|
+
|
|
4
|
+
type CompactViewPropsT = {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
declare const CompactView: ({ children }: CompactViewPropsT) => react_jsx_runtime.JSX.Element;
|
|
8
|
+
|
|
9
|
+
declare const CompactCall: ({ saveUserChoices, withOutShadows }: {
|
|
10
|
+
saveUserChoices?: boolean | undefined;
|
|
11
|
+
withOutShadows?: boolean | undefined;
|
|
12
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
interface CompactNavigationControlsProps {
|
|
15
|
+
canPrev: boolean;
|
|
16
|
+
canNext: boolean;
|
|
17
|
+
onPrev: () => void;
|
|
18
|
+
onNext: () => void;
|
|
19
|
+
currentIndex: number;
|
|
20
|
+
totalParticipants: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Элементы управления навигацией для компактного вида
|
|
24
|
+
* Показывает кнопки навигации и индикаторы участников только при наведении
|
|
25
|
+
*/
|
|
26
|
+
declare function CompactNavigationControls({ canPrev, canNext, onPrev, onNext, currentIndex, totalParticipants, }: CompactNavigationControlsProps): react_jsx_runtime.JSX.Element | null;
|
|
27
|
+
|
|
28
|
+
type PiPCompactCallPropsT = {
|
|
29
|
+
pipWindow: Window;
|
|
30
|
+
};
|
|
31
|
+
declare function PiPCompactCall({ pipWindow }: PiPCompactCallPropsT): react_jsx_runtime.JSX.Element;
|
|
32
|
+
|
|
33
|
+
type PiPContextValue = {
|
|
34
|
+
openPiP: () => Promise<void>;
|
|
35
|
+
isPiPActive: boolean;
|
|
36
|
+
isSupported: boolean;
|
|
37
|
+
};
|
|
38
|
+
declare function usePiP(): PiPContextValue | null;
|
|
39
|
+
type PiPProviderProps = {
|
|
40
|
+
children: React.ReactNode;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Предоставляет API PiP (openPiP, isSupported) дочерним компонентам и управляет
|
|
44
|
+
* Document Picture-in-Picture (логика из PiPManager).
|
|
45
|
+
*/
|
|
46
|
+
declare function PiPProvider({ children }: PiPProviderProps): react_jsx_runtime.JSX.Element;
|
|
47
|
+
|
|
48
|
+
declare function useCompactAvailableHeight(isOnBoardPage: boolean): number;
|
|
49
|
+
|
|
50
|
+
declare const useCompactNavigation: () => {
|
|
51
|
+
currentParticipant: _livekit_components_core.TrackReferenceOrPlaceholder;
|
|
52
|
+
participants: _livekit_components_core.TrackReferenceOrPlaceholder[];
|
|
53
|
+
currentIndex: number;
|
|
54
|
+
totalParticipants: number;
|
|
55
|
+
canGoNext: boolean;
|
|
56
|
+
canGoPrev: boolean;
|
|
57
|
+
goToNext: () => void;
|
|
58
|
+
goToPrev: () => void;
|
|
59
|
+
goToParticipant: (index: number) => void;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
declare global {
|
|
63
|
+
interface DocumentPictureInPicture {
|
|
64
|
+
requestWindow(options?: {
|
|
65
|
+
width?: number;
|
|
66
|
+
height?: number;
|
|
67
|
+
disallowReturnToOpener?: boolean;
|
|
68
|
+
preferInitialWindowPlacement?: boolean;
|
|
69
|
+
}): Promise<Window>;
|
|
70
|
+
window: Window | null;
|
|
71
|
+
}
|
|
72
|
+
interface DocumentPictureInPictureEvent extends Event {
|
|
73
|
+
}
|
|
74
|
+
interface Window {
|
|
75
|
+
documentPictureInPicture?: DocumentPictureInPicture;
|
|
76
|
+
}
|
|
77
|
+
interface MediaSession {
|
|
78
|
+
setMicrophoneActive(active: boolean): void;
|
|
79
|
+
setCameraActive(active: boolean): void;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
type UseDocumentPiPOptions = {
|
|
83
|
+
width?: number;
|
|
84
|
+
height?: number;
|
|
85
|
+
enabled?: boolean;
|
|
86
|
+
microphoneActive?: boolean;
|
|
87
|
+
cameraActive?: boolean;
|
|
88
|
+
};
|
|
89
|
+
declare function useDocumentPiP({ width, height, enabled, microphoneActive, cameraActive, }?: UseDocumentPiPOptions): {
|
|
90
|
+
isSupported: boolean;
|
|
91
|
+
pipWindow: Window | null;
|
|
92
|
+
isPiPActive: boolean;
|
|
93
|
+
openPiP: (overrides?: {
|
|
94
|
+
width?: number;
|
|
95
|
+
height?: number;
|
|
96
|
+
}) => Promise<Window | null>;
|
|
97
|
+
closePiP: () => void;
|
|
98
|
+
resizePiP: (w: number, h: number) => void;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export { CompactCall, CompactNavigationControls, CompactView, PiPCompactCall, PiPProvider, useCompactAvailableHeight, useCompactNavigation, useDocumentPiP, usePiP };
|