@fraku/video 0.1.60 → 0.1.62
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/dist/components/NetworkQualityIcon/NetworkQualityIcon.d.ts +6 -0
- package/dist/components/NetworkQualityIcon/NetworkQualityIcon.test.d.ts +1 -0
- package/dist/components/NetworkQualityIcon/index.d.ts +1 -0
- package/dist/config/permissions.d.ts +1 -0
- package/dist/i18n/locales/ca.json.d.ts +19 -0
- package/dist/i18n/locales/de.json.d.ts +19 -0
- package/dist/i18n/locales/en.json.d.ts +19 -0
- package/dist/i18n/locales/es.json.d.ts +19 -0
- package/dist/i18n/locales/fr.json.d.ts +19 -0
- package/dist/index.cjs +204 -203
- package/dist/index.js +19145 -18691
- package/dist/libs/browserPermissions.d.ts +5 -2
- package/dist/pages/MainSessionPage/ButtonsDock/useButtonsDockController.d.ts +3 -0
- package/dist/pages/MainSessionPage/MainSessionPage.d.ts +3 -1
- package/dist/pages/MainSessionPage/ParticipantsList/ActionCell.d.ts +24 -0
- package/dist/pages/MainSessionPage/Video/PiPControls.d.ts +2 -0
- package/dist/pages/MainSessionPage/Video/tests/PiPControls.test.d.ts +1 -0
- package/dist/pages/MainSessionPage/Video/tests/usePictureInPicture.test.d.ts +1 -0
- package/dist/pages/MainSessionPage/Video/usePictureInPicture.d.ts +10 -0
- package/dist/pages/MainSessionPage/context.d.ts +5 -0
- package/dist/providers/AudioProvider/context.d.ts +3 -1
- package/dist/providers/DialogsProvider/context.d.ts +1 -1
- package/dist/providers/SessionProvider/context.d.ts +1 -0
- package/dist/providers/UsersProvider/context.d.ts +5 -0
- package/dist/providers/UsersProvider/index.d.ts +1 -0
- package/dist/providers/UsersProvider/tests/UsersProvider.test.d.ts +1 -0
- package/dist/providers/VideoProvider/context.d.ts +4 -1
- package/dist/providers/VideoProvider/useVideoEventHandlers.d.ts +2 -1
- package/package.json +6 -6
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
* The acquired tracks are stopped right away — we only need the permission
|
|
7
7
|
* grant, not an active stream.
|
|
8
8
|
*
|
|
9
|
-
* @returns 'granted' if the user allowed access, 'denied'
|
|
9
|
+
* @returns 'granted' if the user allowed access, 'denied' if the user explicitly
|
|
10
|
+
* denied the permission (NotAllowedError), or 'error' for any other failure
|
|
11
|
+
* (e.g. device not found, hardware error).
|
|
10
12
|
*/
|
|
11
|
-
export
|
|
13
|
+
export type BrowserPermissionResult = 'granted' | 'denied' | 'error';
|
|
14
|
+
export declare function requestBrowserPermission(kind: 'audio' | 'video'): Promise<BrowserPermissionResult>;
|
|
@@ -8,4 +8,7 @@ export declare const useButtonsDockController: () => {
|
|
|
8
8
|
micMenuOptionsRef: import('react').RefObject<Menu>;
|
|
9
9
|
showChatBadge: boolean;
|
|
10
10
|
showHandRaiseBadge: boolean | undefined;
|
|
11
|
+
handleToggleMic: () => Promise<void>;
|
|
12
|
+
handleToggleVideo: () => Promise<void>;
|
|
13
|
+
handleToggleScreenShare: () => Promise<void>;
|
|
11
14
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Participant } from '@zoom/videosdk';
|
|
2
|
+
import { Menu } from 'primereact/menu';
|
|
3
|
+
import { RefObject } from 'react';
|
|
4
|
+
|
|
5
|
+
type ActionCellProps = {
|
|
6
|
+
p: Participant;
|
|
7
|
+
currentUserId: number;
|
|
8
|
+
canToggleUserAudio: boolean;
|
|
9
|
+
loading: boolean;
|
|
10
|
+
showUserMenuButton: boolean;
|
|
11
|
+
handleToggleParticipantMic: (p: Participant) => Promise<void>;
|
|
12
|
+
setSelectedUser: (p: Participant) => void;
|
|
13
|
+
userMenuRef: RefObject<Menu>;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* ActionCell reads selfCameraPermission / selfMicPermission directly from
|
|
17
|
+
* useVideoContext() rather than accepting them as props. This is intentional:
|
|
18
|
+
* PrimeReact DataTable memoizes row rendering based on row data, so changes to
|
|
19
|
+
* the parent's closure (props) don't trigger cell re-renders. As a React
|
|
20
|
+
* component subscribed to context, ActionCell re-renders independently when
|
|
21
|
+
* permission state changes.
|
|
22
|
+
*/
|
|
23
|
+
declare const ActionCell: ({ p, currentUserId, canToggleUserAudio, loading, showUserMenuButton, handleToggleParticipantMic, setSelectedUser, userMenuRef }: ActionCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export default ActionCell;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
|
|
3
|
+
export declare const usePictureInPicture: (videoContainerRef: RefObject<HTMLElement | null>) => {
|
|
4
|
+
isPiP: boolean;
|
|
5
|
+
isPiPSupported: boolean;
|
|
6
|
+
enterPiP: () => Promise<void>;
|
|
7
|
+
leavePiP: () => void;
|
|
8
|
+
togglePiP: () => void;
|
|
9
|
+
pipControlsContainer: HTMLDivElement | null;
|
|
10
|
+
};
|
|
@@ -5,6 +5,11 @@ type PageContextType = {
|
|
|
5
5
|
openTabs: number[];
|
|
6
6
|
handleOpenCloseTab: (tabIdx: number) => void;
|
|
7
7
|
selfShareViewRef: MutableRefObject<HTMLVideoElement | null>;
|
|
8
|
+
videoContainerRef: MutableRefObject<HTMLDivElement | null>;
|
|
9
|
+
isPiP: boolean;
|
|
10
|
+
isPiPSupported: boolean;
|
|
11
|
+
togglePiP: () => void;
|
|
12
|
+
pipControlsContainer: HTMLDivElement | null;
|
|
8
13
|
};
|
|
9
14
|
export declare const PageContext: import('react').Context<PageContextType>;
|
|
10
15
|
export declare const useMainPageContext: () => PageContextType;
|
|
@@ -12,7 +12,9 @@ export type AudioContextType = {
|
|
|
12
12
|
speakerList: MediaDevice[];
|
|
13
13
|
activeSpeakerId: string;
|
|
14
14
|
switchSpeaker: (deviceId: string) => Promise<void>;
|
|
15
|
-
startAudio: () => Promise<void>;
|
|
15
|
+
startAudio: (muteOverride?: boolean) => Promise<void>;
|
|
16
|
+
noiseSuppression: boolean;
|
|
17
|
+
toggleNoiseSuppression: () => Promise<void>;
|
|
16
18
|
setMicList: (mics: MediaDevice[]) => void;
|
|
17
19
|
setSpeakerList: (speakers: MediaDevice[]) => void;
|
|
18
20
|
setActiveMicId: (id: string) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SettingsTab } from '../../components/ConfigDialog/context';
|
|
2
2
|
import { AcceptParticipationDialogConfig } from '../../components/AcceptParticipationDialog/types';
|
|
3
3
|
|
|
4
|
-
export type NotifySeverity = 'info' | 'success' | 'error';
|
|
4
|
+
export type NotifySeverity = 'info' | 'success' | 'warn' | 'error';
|
|
5
5
|
export type AlertDialogProps = {
|
|
6
6
|
header?: string;
|
|
7
7
|
message: string;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { ActiveSpeaker, Participant } from '@zoom/videosdk';
|
|
2
2
|
|
|
3
|
+
export type NetworkQuality = {
|
|
4
|
+
uplink: number;
|
|
5
|
+
downlink: number;
|
|
6
|
+
};
|
|
3
7
|
export type UsersContextType = {
|
|
4
8
|
activeSpeakers: ActiveSpeaker[];
|
|
5
9
|
activeVideoParticipant: Participant | null;
|
|
6
10
|
currentUser: Participant | null;
|
|
11
|
+
networkQualityMap: Map<number, NetworkQuality>;
|
|
7
12
|
screenSharingUser: Participant | null;
|
|
8
13
|
users: Participant[];
|
|
9
14
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -11,8 +11,11 @@ export type VirtualBackgroundState = {
|
|
|
11
11
|
customImages: CustomBackgroundImage[];
|
|
12
12
|
activeCustomImageId: string | null;
|
|
13
13
|
};
|
|
14
|
+
export type BrowserPermissionState = 'granted' | 'denied' | 'prompt' | 'unknown';
|
|
14
15
|
export type VideoContextType = {
|
|
15
16
|
activeCameraId: string;
|
|
17
|
+
selfCameraPermission: BrowserPermissionState;
|
|
18
|
+
selfMicPermission: BrowserPermissionState;
|
|
16
19
|
attachSharedVideo: ({ userId, videoPlayer }: {
|
|
17
20
|
userId: number;
|
|
18
21
|
videoPlayer: VideoPlayer;
|
|
@@ -38,5 +41,5 @@ export type VideoContextType = {
|
|
|
38
41
|
uploadBackgroundImage: (file: File) => Promise<void>;
|
|
39
42
|
virtualBackground: VirtualBackgroundState;
|
|
40
43
|
};
|
|
41
|
-
export declare const VideoContext: import('react').Context<VideoContextType>;
|
|
44
|
+
export declare const VideoContext: import('react').Context<VideoContextType | null>;
|
|
42
45
|
export declare const useVideoContext: () => VideoContextType;
|
|
@@ -7,9 +7,10 @@ type UseVideoEventHandlersParams = {
|
|
|
7
7
|
onVideoStopped: () => void;
|
|
8
8
|
onDeviceChange: () => void;
|
|
9
9
|
onScreenShareStopped: () => void;
|
|
10
|
+
onPermissionRestored: (name: 'camera' | 'microphone') => void;
|
|
10
11
|
};
|
|
11
12
|
/**
|
|
12
13
|
* Custom hook to manage Zoom video event subscriptions
|
|
13
14
|
*/
|
|
14
|
-
export declare const useVideoEventHandlers: ({ zmClient, sessionStarted, onVideoStarted, onVideoStopped, onDeviceChange, onScreenShareStopped }: UseVideoEventHandlersParams) => void;
|
|
15
|
+
export declare const useVideoEventHandlers: ({ zmClient, sessionStarted, onVideoStarted, onVideoStopped, onDeviceChange, onScreenShareStopped, onPermissionRestored }: UseVideoEventHandlersParams) => void;
|
|
15
16
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fraku/video",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.62",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -60,12 +60,12 @@
|
|
|
60
60
|
"react-i18next": "^16.5.4",
|
|
61
61
|
"react-use": "^17.6.0",
|
|
62
62
|
"styled-components": "^5.3.11",
|
|
63
|
-
"tailwind-merge": "^3.
|
|
63
|
+
"tailwind-merge": "^3.5.0",
|
|
64
64
|
"uuid": "^13.0.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@playwright/test": "^1.58.2",
|
|
68
|
-
"@storybook/react-vite": "^10.2.
|
|
68
|
+
"@storybook/react-vite": "^10.2.14",
|
|
69
69
|
"@storybook/test-runner": "^0.24.2",
|
|
70
70
|
"@tailwindcss/container-queries": "^0.1.1",
|
|
71
71
|
"@testing-library/jest-dom": "^6.9.1",
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
"@vitejs/plugin-react": "^4.3.4",
|
|
81
81
|
"@vitest/coverage-v8": "^4.0.18",
|
|
82
82
|
"@vitest/ui": "^4.0.18",
|
|
83
|
-
"autoprefixer": "^10.4.
|
|
84
|
-
"baseline-browser-mapping": "^2.
|
|
83
|
+
"autoprefixer": "^10.4.27",
|
|
84
|
+
"baseline-browser-mapping": "^2.10.0",
|
|
85
85
|
"eslint": "^8.55.0",
|
|
86
86
|
"eslint-plugin-react": "^7.37.5",
|
|
87
87
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"postcss": "^8.5.6",
|
|
93
93
|
"react": "^18.2.0",
|
|
94
94
|
"react-dom": "^18.2.0",
|
|
95
|
-
"storybook": "^10.2.
|
|
95
|
+
"storybook": "^10.2.14",
|
|
96
96
|
"tailwindcss": "^3.4.17",
|
|
97
97
|
"typescript": "^5.2.2",
|
|
98
98
|
"vite": "^6.0.7",
|