@fraku/video 0.1.63 → 0.1.65

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.
Files changed (39) hide show
  1. package/dist/components/AcceptParticipationDialog/AcceptParticipationDialog.test.d.ts +1 -0
  2. package/dist/components/AcceptParticipationDialog/helpers.d.ts +2 -12
  3. package/dist/components/AcceptParticipationDialog/index.d.ts +1 -1
  4. package/dist/components/AcceptParticipationDialog/types.d.ts +2 -2
  5. package/dist/config/permissions.d.ts +1 -0
  6. package/dist/i18n/locales/ca.json.d.ts +96 -44
  7. package/dist/i18n/locales/de.json.d.ts +99 -48
  8. package/dist/i18n/locales/en.json.d.ts +104 -53
  9. package/dist/i18n/locales/es.json.d.ts +97 -44
  10. package/dist/i18n/locales/fr.json.d.ts +98 -47
  11. package/dist/index.cjs +218 -218
  12. package/dist/index.js +22121 -21084
  13. package/dist/libs/helpers.d.ts +2 -0
  14. package/dist/pages/MainSessionPage/ButtonsDock/useButtonsDockController.d.ts +3 -0
  15. package/dist/pages/MainSessionPage/ParticipantsList/ActionCell.d.ts +5 -3
  16. package/dist/pages/MainSessionPage/ParticipantsList/UserListView.d.ts +1 -1
  17. package/dist/pages/MainSessionPage/ParticipantsList/useUserListController.d.ts +10 -0
  18. package/dist/pages/MainSessionPage/TurnQueue/TurnQueueUserListItem.d.ts +10 -2
  19. package/dist/pages/MainSessionPage/Video/RecordingIndicator.d.ts +2 -0
  20. package/dist/pages/MainSessionPage/Video/tests/RecordingIndicator.test.d.ts +1 -0
  21. package/dist/providers/AudioProvider/context.d.ts +1 -3
  22. package/dist/providers/DialogsProvider/context.d.ts +10 -1
  23. package/dist/providers/RecordingProvider/RecordingProvider.d.ts +4 -0
  24. package/dist/providers/RecordingProvider/context.d.ts +14 -0
  25. package/dist/providers/RecordingProvider/index.d.ts +2 -0
  26. package/dist/providers/RecordingProvider/tests/RecordingProvider.test.d.ts +1 -0
  27. package/dist/providers/RecordingProvider/types.d.ts +5 -0
  28. package/dist/providers/SharedProvider/commandChannelActionHandlers.d.ts +10 -6
  29. package/dist/providers/SharedProvider/context.d.ts +17 -0
  30. package/dist/providers/SharedProvider/hooks.d.ts +2 -2
  31. package/dist/providers/SharedProvider/tests/commandChannelActionHandlers.test.d.ts +1 -0
  32. package/dist/shared/index.d.ts +1 -1
  33. package/dist/shared/participation/index.d.ts +2 -0
  34. package/dist/shared/participation/reducer.d.ts +4 -0
  35. package/dist/shared/participation/reducer.test.d.ts +1 -0
  36. package/dist/shared/participation/types.d.ts +27 -0
  37. package/dist/shared/reducer.d.ts +2 -2
  38. package/dist/shared/types.d.ts +3 -1
  39. package/package.json +15 -15
@@ -21,6 +21,8 @@ export interface GenerateSignatureParams {
21
21
  telemetryTrackingId?: string;
22
22
  videoWebRtcMode?: 0 | 1;
23
23
  audioWebRtcMode?: 0 | 1;
24
+ cloud_recording_option?: 0 | 1;
25
+ cloud_recording_election?: 0 | 1;
24
26
  }
25
27
  /**
26
28
  * Generate a Zoom Video SDK signature (JWT)
@@ -1,9 +1,12 @@
1
1
  import { Menu } from 'primereact/menu';
2
+ import { MenuItem } from 'primereact/menuitem';
2
3
  import { DockItem } from './types';
3
4
 
4
5
  export declare const useButtonsDockController: () => {
5
6
  dockItems: DockItem[];
6
7
  audioMenuOptionsRef: import('react').RefObject<Menu>;
8
+ recordingMenuRef: import('react').RefObject<Menu>;
9
+ recordingMenuItems: MenuItem[];
7
10
  videoMenuOptionsRef: import('react').RefObject<Menu>;
8
11
  micMenuOptionsRef: import('react').RefObject<Menu>;
9
12
  showChatBadge: boolean;
@@ -1,10 +1,10 @@
1
+ import { RefObject } from 'react';
1
2
  import { Participant } from '@zoom/videosdk';
2
3
  import { Menu } from 'primereact/menu';
3
- import { RefObject } from 'react';
4
4
 
5
5
  type ActionCellProps = {
6
6
  p: Participant;
7
- currentUserId: number;
7
+ isCurrentUserRow: boolean;
8
8
  canToggleUserAudio: boolean;
9
9
  loading: boolean;
10
10
  showUserMenuButton: boolean;
@@ -19,6 +19,8 @@ type ActionCellProps = {
19
19
  * the parent's closure (props) don't trigger cell re-renders. As a React
20
20
  * component subscribed to context, ActionCell re-renders independently when
21
21
  * permission state changes.
22
+ *
23
+ * participationPermissions is also read directly from useSharedContext() for the same reason.
22
24
  */
23
- declare const ActionCell: ({ p, currentUserId, canToggleUserAudio, loading, showUserMenuButton, handleToggleParticipantMic, setSelectedUser, userMenuRef }: ActionCellProps) => import("react/jsx-runtime").JSX.Element;
25
+ declare const ActionCell: ({ p, isCurrentUserRow, canToggleUserAudio, loading, showUserMenuButton, handleToggleParticipantMic, setSelectedUser, userMenuRef }: ActionCellProps) => import("react/jsx-runtime").JSX.Element;
24
26
  export default ActionCell;
@@ -3,5 +3,5 @@ import { UserListControllerReturn } from './useUserListController';
3
3
  type UserListViewProps = UserListControllerReturn & {
4
4
  columnHeader: string;
5
5
  };
6
- declare const UserListView: ({ can, columnHeader, currentUserId, filteredUsers, filter, handleMakeHost, handleMakeManager, handleRevokeManager, handleRequestMakeHost, handleToggleParticipantMic, showUserMenuButton, loading, setFilter, setSelectedUser, userMenuRef }: UserListViewProps) => import("react/jsx-runtime").JSX.Element;
6
+ declare const UserListView: ({ can, columnHeader, currentUserId, filteredUsers, filter, handleMakeHost, handleMakeManager, handleRevokeManager, handleRequestMakeHost, handleToggleParticipantMic, handleGrantMicParticipation, handleGrantMicCameraParticipation, handleUpgradeMicToCamera, handleRevokeParticipation, showUserMenuButton, loading, setFilter, setSelectedUser, userMenuRef }: UserListViewProps) => import("react/jsx-runtime").JSX.Element;
7
7
  export default UserListView;
@@ -9,6 +9,12 @@ export type UserListControllerReturn = {
9
9
  revokeManagerRole: boolean;
10
10
  makeManagerRole: boolean;
11
11
  transferHostRole: boolean;
12
+ grantMicParticipation: boolean;
13
+ grantMicCameraParticipation: boolean;
14
+ upgradeMicToCamera: boolean;
15
+ revokeParticipation: boolean;
16
+ inviteToParticipateMic: boolean;
17
+ inviteToParticipateMicCamera: boolean;
12
18
  };
13
19
  currentUserId: number;
14
20
  filteredUsers: Participant[];
@@ -18,6 +24,10 @@ export type UserListControllerReturn = {
18
24
  handleRevokeManager: () => Promise<void>;
19
25
  handleRequestMakeHost: () => Promise<void>;
20
26
  handleToggleParticipantMic: (p: Participant) => Promise<void>;
27
+ handleGrantMicParticipation: () => Promise<void>;
28
+ handleGrantMicCameraParticipation: () => Promise<void>;
29
+ handleUpgradeMicToCamera: () => Promise<void>;
30
+ handleRevokeParticipation: () => Promise<void>;
21
31
  showUserMenuButton: boolean;
22
32
  loading: boolean;
23
33
  setFilter: ReactSetter<string>;
@@ -1,10 +1,18 @@
1
1
  import { Participant } from '@zoom/videosdk';
2
+ import { ParticipationPermission } from '../../../shared/participation/types';
2
3
 
3
4
  type TurnQueueUserListItemProps = {
4
5
  participant: Participant;
6
+ isAttendee: boolean;
7
+ participationPermission: ParticipationPermission | undefined;
5
8
  onMicToggle: (p: Participant) => Promise<void>;
6
- onLowerHand: (userId: number) => Promise<void>;
9
+ onGrantMic: (p: Participant) => Promise<void>;
10
+ onGrantMicCamera: (p: Participant) => Promise<void>;
11
+ onUpgradeMicToCamera: (p: Participant) => Promise<void>;
12
+ onRevokeParticipation: (p: Participant) => Promise<void>;
13
+ onLowerHand: (p: Participant) => Promise<void>;
7
14
  isMicToggleEnabled: boolean;
15
+ loading: boolean;
8
16
  };
9
- declare const TurnQueueUserListItem: ({ participant, onMicToggle, onLowerHand, isMicToggleEnabled }: TurnQueueUserListItemProps) => import("react/jsx-runtime").JSX.Element;
17
+ declare const TurnQueueUserListItem: (props: TurnQueueUserListItemProps) => import("react/jsx-runtime").JSX.Element;
10
18
  export default TurnQueueUserListItem;
@@ -0,0 +1,2 @@
1
+ declare const RecordingIndicator: () => import("react/jsx-runtime").JSX.Element | null;
2
+ export default RecordingIndicator;
@@ -6,8 +6,8 @@ export type AudioContextType = {
6
6
  micMuted: boolean;
7
7
  muteMic: () => Promise<void>;
8
8
  muteUserMic: (userId: number) => Promise<void>;
9
- unmuteMic: () => Promise<void>;
10
9
  unmuteUserMic: (userId: number) => Promise<void>;
10
+ unmuteMic: () => Promise<void>;
11
11
  switchMic: (deviceId: string) => Promise<void>;
12
12
  speakerList: MediaDevice[];
13
13
  activeSpeakerId: string;
@@ -20,8 +20,6 @@ export type AudioContextType = {
20
20
  setActiveMicId: (id: string) => void;
21
21
  setActiveSpeakerId: (id: string) => void;
22
22
  setMicMuted: (muted: boolean) => void;
23
- hostAskUnmute: boolean;
24
- resetHostAskUnmute: () => void;
25
23
  };
26
24
  export declare const AudioContext: import('react').Context<AudioContextType>;
27
25
  export declare const useAudioContext: () => AudioContextType;
@@ -11,6 +11,14 @@ export type ConfirmDialogProps = {
11
11
  message: string;
12
12
  onAccept: () => void;
13
13
  };
14
+ export type ConfirmWithAlternativeDialogProps = {
15
+ header?: string;
16
+ message: string;
17
+ confirmLabel: string;
18
+ alternativeLabel: string;
19
+ onConfirm: () => void | Promise<void>;
20
+ onAlternative: () => void | Promise<void>;
21
+ };
14
22
  export type NotifyProps = {
15
23
  header?: string;
16
24
  message: string;
@@ -31,6 +39,7 @@ export type DialogsContextType = {
31
39
  notify: (props: NotifyProps) => void;
32
40
  alert: (props: AlertDialogProps) => void;
33
41
  confirm: (props: ConfirmDialogProps) => void;
42
+ confirmWithAlternative: (props: ConfirmWithAlternativeDialogProps) => void;
34
43
  };
35
- export declare const DialogsContext: import('react').Context<DialogsContextType>;
44
+ export declare const DialogsContext: import('react').Context<DialogsContextType | null>;
36
45
  export declare const useDialogsContext: () => DialogsContextType;
@@ -0,0 +1,4 @@
1
+ import { RecordingProviderProps } from './types';
2
+
3
+ declare const RecordingProvider: ({ children }: RecordingProviderProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default RecordingProvider;
@@ -0,0 +1,14 @@
1
+ import { RecordingStatus } from '@zoom/videosdk';
2
+
3
+ export type RecordingContextType = {
4
+ recordingStatus: RecordingStatus;
5
+ isRecording: boolean;
6
+ isPaused: boolean;
7
+ canRecord: boolean;
8
+ startRecording: () => Promise<void>;
9
+ stopRecording: () => Promise<void>;
10
+ pauseRecording: () => Promise<void>;
11
+ resumeRecording: () => Promise<void>;
12
+ };
13
+ export declare const RecordingContext: import('react').Context<RecordingContextType>;
14
+ export declare const useRecordingContext: () => RecordingContextType;
@@ -0,0 +1,2 @@
1
+ export { default as RecordingProvider } from './RecordingProvider';
2
+ export { useRecordingContext } from './context';
@@ -0,0 +1,5 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ export type RecordingProviderProps = {
4
+ children: ReactNode;
5
+ };
@@ -1,19 +1,23 @@
1
1
  import { VideoClient } from '@zoom/videosdk';
2
- import { SharedAction, SharedState } from '../../shared';
2
+ import { CommandChannelAction, SharedState } from '../../shared';
3
+ import { ParticipationPermission } from '../../shared/participation';
3
4
  import { AlertDialogProps } from '../DialogsProvider/context';
4
5
  import { SendActionOptions } from './hooks';
5
6
 
6
- type CommandChannelContext = {
7
+ export type CommandChannelContext = {
7
8
  zmClient: typeof VideoClient;
8
- sendAction: (action: SharedAction, options?: SendActionOptions) => Promise<void>;
9
+ sendAction: (action: CommandChannelAction, options?: SendActionOptions) => Promise<void>;
9
10
  sharedState: SharedState;
10
11
  alert: (props: AlertDialogProps) => void;
11
- dispatch: (action: SharedAction) => void;
12
+ dispatch: (action: CommandChannelAction) => void;
12
13
  setRequestedHostRoleDialogVisible: (visible: boolean) => void;
14
+ setParticipationGranted: (value: ParticipationPermission | null) => void;
15
+ setParticipationRevoked: (value: boolean) => void;
16
+ setPendingParticipationInvite: (value: ParticipationPermission | null) => void;
13
17
  };
14
- type CommandChannelActionHandler = (action: SharedAction, context: CommandChannelContext) => void;
18
+ type CommandChannelActionHandler = (action: CommandChannelAction, context: CommandChannelContext) => void;
15
19
  type CommandChannelActionHandlers = {
16
- [K in SharedAction['type']]?: CommandChannelActionHandler;
20
+ [K in CommandChannelAction['type']]?: CommandChannelActionHandler;
17
21
  };
18
22
  export declare const commandChannelActionHandlers: CommandChannelActionHandlers;
19
23
  export {};
@@ -1,5 +1,6 @@
1
1
  import { Participant } from '@zoom/videosdk';
2
2
  import { SharedState } from '../../shared';
3
+ import { ParticipationPermissions } from '../../shared/participation/types';
3
4
  import { SessionStatus } from '../VideoPluginProvider/context';
4
5
 
5
6
  export declare const CHAT_STATE_DEFAULT: {
@@ -33,6 +34,22 @@ export type SharedContextType = {
33
34
  userId: number;
34
35
  censusUserId: string;
35
36
  }) => Promise<void>;
37
+ participationPermissions: ParticipationPermissions;
38
+ participationGranted: {
39
+ audio: boolean;
40
+ video: boolean;
41
+ } | null;
42
+ participationRevoked: boolean;
43
+ pendingParticipationInvite: {
44
+ audio: boolean;
45
+ video: boolean;
46
+ } | null;
47
+ resetParticipationGranted: () => void;
48
+ resetParticipationRevoked: () => void;
49
+ resetPendingParticipationInvite: () => void;
50
+ grantParticipation: (userId: number, audio: boolean, video: boolean) => Promise<void>;
51
+ revokeParticipation: (userId: number) => Promise<void>;
52
+ requestParticipation: (userId: number, audio: boolean, video: boolean) => Promise<void>;
36
53
  };
37
54
  export declare const SharedContext: import('react').Context<SharedContextType>;
38
55
  export declare const useSharedContext: () => SharedContextType;
@@ -1,4 +1,4 @@
1
- import { SharedAction } from '../../shared';
1
+ import { CommandChannelAction } from '../../shared';
2
2
 
3
3
  export type SendActionOptions = {
4
4
  maxAttempts?: number;
@@ -6,4 +6,4 @@ export type SendActionOptions = {
6
6
  connectionTimeout?: number;
7
7
  userId?: number;
8
8
  };
9
- export declare const useActionSender: () => (action: SharedAction, options?: SendActionOptions) => Promise<void>;
9
+ export declare const useActionSender: () => (action: CommandChannelAction, options?: SendActionOptions) => Promise<void>;
@@ -1,2 +1,2 @@
1
1
  export { default } from './reducer';
2
- export type { SharedState, SharedAction } from './types';
2
+ export type { SharedState, CommandChannelAction } from './types';
@@ -0,0 +1,2 @@
1
+ export type { ParticipationPermission, ParticipationPermissions, GrantParticipationAction, RevokeParticipationAction, InviteToParticipateAction } from './types';
2
+ export { default as participationReducer } from './reducer';
@@ -0,0 +1,4 @@
1
+ import { GrantParticipationAction, ParticipationPermissions, RevokeParticipationAction } from './types';
2
+
3
+ declare const participationReducer: (state: ParticipationPermissions, action: GrantParticipationAction | RevokeParticipationAction) => ParticipationPermissions;
4
+ export default participationReducer;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,27 @@
1
+ export type ParticipationPermission = {
2
+ audio: boolean;
3
+ video: boolean;
4
+ };
5
+ export type ParticipationPermissions = Record<number, ParticipationPermission>;
6
+ export type GrantParticipationAction = {
7
+ type: 'GRANT-PARTICIPATION';
8
+ payload: {
9
+ targetUserId: number;
10
+ audio: boolean;
11
+ video: boolean;
12
+ };
13
+ };
14
+ export type RevokeParticipationAction = {
15
+ type: 'REVOKE-PARTICIPATION';
16
+ payload: {
17
+ targetUserId: number;
18
+ };
19
+ };
20
+ export type InviteToParticipateAction = {
21
+ type: 'INVITE-TO-PARTICIPATE';
22
+ payload: {
23
+ targetUserId: number;
24
+ audio: boolean;
25
+ video: boolean;
26
+ };
27
+ };
@@ -1,4 +1,4 @@
1
- import { SharedState, SharedAction } from './types';
1
+ import { SharedState, CommandChannelAction } from './types';
2
2
 
3
- declare const reducer: (state: SharedState, action: SharedAction) => SharedState;
3
+ declare const reducer: (state: SharedState, action: CommandChannelAction) => SharedState;
4
4
  export default reducer;
@@ -1,5 +1,6 @@
1
1
  import { SessionStatus } from '../providers/VideoPluginProvider/context';
2
2
  import { ChatAction, ChatState } from './chat';
3
+ import { GrantParticipationAction, InviteToParticipateAction, ParticipationPermissions, RevokeParticipationAction } from './participation/types';
3
4
  import { RequestHostRoleAction } from './request-host-role';
4
5
  import { SessionAction } from './session-info';
5
6
  import { SpeakerTurnAction, SpeakerTurnState } from './speaker-turn';
@@ -14,6 +15,7 @@ export type SharedState = {
14
15
  userId: number | null;
15
16
  timestamp: number;
16
17
  };
18
+ participationPermissions: ParticipationPermissions;
17
19
  };
18
20
  export type AlertUserAction = {
19
21
  type: 'ALERT-USER';
@@ -28,4 +30,4 @@ export type SendStateAction = {
28
30
  type: 'SEND-SHARED-STATE';
29
31
  state: SharedState;
30
32
  };
31
- export type SharedAction = AlertUserAction | RequestStateAction | SendStateAction | SpeakerTurnAction | ChatAction | SessionAction | RequestHostRoleAction;
33
+ export type CommandChannelAction = AlertUserAction | RequestStateAction | SendStateAction | SpeakerTurnAction | ChatAction | SessionAction | RequestHostRoleAction | GrantParticipationAction | RevokeParticipationAction | InviteToParticipateAction;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fraku/video",
3
3
  "private": false,
4
- "version": "0.1.63",
4
+ "version": "0.1.65",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
@@ -48,16 +48,16 @@
48
48
  "react-dom": "^18.2.0"
49
49
  },
50
50
  "dependencies": {
51
- "@zoom/videosdk": "^2.3.14",
51
+ "@zoom/videosdk": "^2.3.15",
52
52
  "classnames": "^2.5.1",
53
53
  "clsx": "^2.1.1",
54
54
  "i18n": "^0.15.3",
55
- "i18next": "^25.8.5",
56
- "i18next-browser-languagedetector": "^8.2.0",
57
- "jsrsasign": "^11.1.0",
55
+ "i18next": "^25.8.18",
56
+ "i18next-browser-languagedetector": "^8.2.1",
57
+ "jsrsasign": "^11.1.1",
58
58
  "primeicons": "^7.0.0",
59
59
  "primereact": "^10.9.6",
60
- "react-i18next": "^16.5.4",
60
+ "react-i18next": "^16.5.8",
61
61
  "react-use": "^17.6.0",
62
62
  "styled-components": "^5.3.11",
63
63
  "tailwind-merge": "^3.5.0",
@@ -65,7 +65,7 @@
65
65
  },
66
66
  "devDependencies": {
67
67
  "@playwright/test": "^1.58.2",
68
- "@storybook/react-vite": "^10.2.14",
68
+ "@storybook/react-vite": "^10.2.19",
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",
@@ -78,27 +78,27 @@
78
78
  "@typescript-eslint/eslint-plugin": "^6.14.0",
79
79
  "@typescript-eslint/parser": "^6.14.0",
80
80
  "@vitejs/plugin-react": "^4.3.4",
81
- "@vitest/coverage-v8": "^4.0.18",
82
- "@vitest/ui": "^4.0.18",
81
+ "@vitest/coverage-v8": "^4.1.0",
82
+ "@vitest/ui": "^4.1.0",
83
83
  "autoprefixer": "^10.4.27",
84
- "baseline-browser-mapping": "^2.10.0",
84
+ "baseline-browser-mapping": "^2.10.8",
85
85
  "eslint": "^8.55.0",
86
86
  "eslint-plugin-react": "^7.37.5",
87
87
  "eslint-plugin-react-hooks": "^4.6.0",
88
88
  "eslint-plugin-react-refresh": "^0.4.5",
89
- "eslint-plugin-storybook": "^10.2.6",
89
+ "eslint-plugin-storybook": "^10.2.19",
90
90
  "husky": "^9.1.7",
91
91
  "jsdom": "^27.4.0",
92
- "postcss": "^8.5.6",
92
+ "postcss": "^8.5.8",
93
93
  "react": "^18.2.0",
94
94
  "react-dom": "^18.2.0",
95
- "storybook": "^10.2.14",
95
+ "storybook": "^10.2.19",
96
96
  "tailwindcss": "^3.4.17",
97
97
  "typescript": "^5.2.2",
98
98
  "vite": "^6.0.7",
99
99
  "vite-plugin-dts": "^3.6.4",
100
- "vite-plugin-static-copy": "^3.2.0",
101
- "vitest": "^4.0.18"
100
+ "vite-plugin-static-copy": "^3.3.0",
101
+ "vitest": "^4.1.0"
102
102
  },
103
103
  "keywords": [
104
104
  "react",