@fraku/video 0.0.7 → 0.1.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/dist/{ZoomVideo.d.ts → VideoPlugin.d.ts} +5 -3
- package/dist/{ZoomVideo.stories.d.ts → VideoPlugin.stories.d.ts} +3 -0
- package/dist/VideoPluginContent.d.ts +5 -0
- package/dist/VideoPluginProvider.d.ts +11 -0
- package/dist/context.d.ts +14 -41
- package/dist/index.cjs +845 -525
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +43020 -22248
- package/dist/pages/MainSessionPage/ButtonsDock.d.ts +2 -0
- package/dist/pages/MainSessionPage/MainSessionPage.d.ts +2 -0
- package/dist/pages/MainSessionPage/ParticipantVideo.d.ts +8 -0
- package/dist/pages/MainSessionPage/Video.d.ts +2 -0
- package/dist/pages/MainSessionPage/index.d.ts +1 -0
- package/dist/pages/SetupPage/SetupPage.d.ts +2 -0
- package/dist/pages/SetupPage/index.d.ts +1 -0
- package/dist/types.d.ts +4 -11
- package/dist/utils.d.ts +48 -0
- package/package.json +6 -3
- package/dist/ZoomVideoPlugin.d.ts +0 -4
- package/dist/ZoomVideoPlugin.stories.d.ts +0 -8
- package/dist/ZoomVideoPluginRouter.d.ts +0 -4
- package/dist/ZoomVideoProvider.d.ts +0 -12
- package/dist/components/ButtonsDock/ButtonsDock.d.ts +0 -13
- package/dist/components/ButtonsDock/DockButton.d.ts +0 -30
- package/dist/components/ButtonsDock/MenuItemTemplate.d.ts +0 -9
- package/dist/components/ButtonsDock/index.d.ts +0 -1
- package/dist/components/MobileIconButton/MobileIconButton.d.ts +0 -9
- package/dist/components/MobileIconButton/index.d.ts +0 -1
- package/dist/components/Overlay/Overlay.d.ts +0 -13
- package/dist/components/Overlay/index.d.ts +0 -1
- package/dist/components/ParticipantsList.d.ts +0 -11
- package/dist/components/SettingsOverlay/SettingsContent.d.ts +0 -2
- package/dist/components/SettingsOverlay/SettingsMenu.d.ts +0 -2
- package/dist/components/SettingsOverlay/SettingsOverlay.d.ts +0 -11
- package/dist/components/SettingsOverlay/Tabs/AudioSettings.d.ts +0 -2
- package/dist/components/SettingsOverlay/Tabs/BackgroundSettings.d.ts +0 -2
- package/dist/components/SettingsOverlay/Tabs/DropdownItemTemplate.d.ts +0 -8
- package/dist/components/SettingsOverlay/Tabs/DropdownValueTemplate.d.ts +0 -8
- package/dist/components/SettingsOverlay/Tabs/VideoSettings.d.ts +0 -2
- package/dist/components/SettingsOverlay/context.d.ts +0 -13
- package/dist/components/SettingsOverlay/index.d.ts +0 -1
- package/dist/components/Video.d.ts +0 -2
- package/dist/constants.d.ts +0 -2
- package/dist/hooks/useClientMessages.d.ts +0 -5
- package/dist/hooks/useStartVideoOptions.d.ts +0 -10
- package/dist/hooks/useZoomVideoPlayer.d.ts +0 -7
- package/dist/lib/platforms.d.ts +0 -4
- package/dist/pages/AfterSession.d.ts +0 -4
- package/dist/pages/MainSession.d.ts +0 -2
- package/dist/pages/PanelistsSession.d.ts +0 -4
- package/dist/pages/PreSessionConfiguration.d.ts +0 -4
- /package/dist/{components → pages/MainSessionPage}/Chat/Chat.d.ts +0 -0
- /package/dist/{components → pages/MainSessionPage}/Chat/index.d.ts +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Participant } from '@zoom/videosdk';
|
|
2
|
+
|
|
3
|
+
type ParticipantVideoProps = {
|
|
4
|
+
participant: Participant;
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const ParticipantVideo: ({ participant, className }: ParticipantVideoProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default ParticipantVideo;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './MainSessionPage';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SetupPage';
|
package/dist/types.d.ts
CHANGED
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
|
-
export declare enum SessionStep {
|
|
4
|
-
LocalSettingsConfiguration = 0,
|
|
5
|
-
OnlyPanelistsSession = 1,
|
|
6
|
-
MainSession = 2,
|
|
7
|
-
AfterSession = 3
|
|
8
|
-
}
|
|
9
3
|
export type Credentials = {
|
|
10
4
|
sessionName: string;
|
|
11
5
|
signature: string;
|
|
12
6
|
userName: string;
|
|
13
7
|
sessionPasscode: string;
|
|
14
8
|
};
|
|
15
|
-
export type
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
closeParentContainer: () => void;
|
|
19
|
-
setIsCloseButtonVisible: ReactSetter<boolean>;
|
|
9
|
+
export type VideoPluginProps = {
|
|
10
|
+
credentials: Credentials;
|
|
11
|
+
className?: string;
|
|
20
12
|
};
|
|
13
|
+
export type ReactSetter<T> = React.Dispatch<React.SetStateAction<T>>;
|
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ClassValue } from 'clsx';
|
|
2
|
+
|
|
3
|
+
export declare const fetchDevices: () => Promise<{
|
|
4
|
+
micList: MediaDeviceInfo[];
|
|
5
|
+
speakerList: MediaDeviceInfo[];
|
|
6
|
+
cameraList: MediaDeviceInfo[];
|
|
7
|
+
}>;
|
|
8
|
+
export declare const getRequiredEnv: (key: string) => string;
|
|
9
|
+
export declare const getOptionalEnv: (key: string) => string;
|
|
10
|
+
export interface GenerateSignatureParams {
|
|
11
|
+
sdkKey: string;
|
|
12
|
+
sdkSecret: string;
|
|
13
|
+
sessionName: string;
|
|
14
|
+
role: 0 | 1;
|
|
15
|
+
expirationSeconds?: number;
|
|
16
|
+
userIdentity?: string;
|
|
17
|
+
sessionKey?: string;
|
|
18
|
+
geoRegions?: string[];
|
|
19
|
+
cloudRecordingOption?: 0 | 1;
|
|
20
|
+
cloudRecordingElection?: 0 | 1;
|
|
21
|
+
telemetryTrackingId?: string;
|
|
22
|
+
videoWebRtcMode?: 0 | 1;
|
|
23
|
+
audioWebRtcMode?: 0 | 1;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Generate a Zoom Video SDK signature (JWT)
|
|
27
|
+
*
|
|
28
|
+
* @param params - Parameters for generating the signature
|
|
29
|
+
* @returns JWT signature string
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const signature = generateSignature({
|
|
34
|
+
* sdkKey: 'your-sdk-key',
|
|
35
|
+
* sdkSecret: 'your-sdk-secret',
|
|
36
|
+
* sessionName: 'test-session',
|
|
37
|
+
* role: 1,
|
|
38
|
+
* userIdentity: 'user123'
|
|
39
|
+
* })
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare const generateSignature: (params: GenerateSignatureParams) => string;
|
|
43
|
+
/**
|
|
44
|
+
* Utility function that combines clsx and tailwind-merge
|
|
45
|
+
* - clsx handles conditional classes and complex logic
|
|
46
|
+
* - twMerge resolves Tailwind CSS class conflicts
|
|
47
|
+
*/
|
|
48
|
+
export declare function cn(...inputs: ClassValue[]): string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fraku/video",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0
|
|
4
|
+
"version": "0.1.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -41,14 +41,17 @@
|
|
|
41
41
|
"@zoom/videosdk": "^2.2.12",
|
|
42
42
|
"classnames": "^2.5.1",
|
|
43
43
|
"clsx": "^2.1.1",
|
|
44
|
+
"jsrsasign": "^11.1.0",
|
|
44
45
|
"primeicons": "^7.0.0",
|
|
45
46
|
"primereact": "^10.9.6",
|
|
46
47
|
"react-use": "^17.6.0",
|
|
47
|
-
"styled-components": "^5.3.11"
|
|
48
|
+
"styled-components": "^5.3.11",
|
|
49
|
+
"tailwind-merge": "^3.4.0"
|
|
48
50
|
},
|
|
49
51
|
"devDependencies": {
|
|
50
52
|
"@storybook/react-vite": "^9.1.13",
|
|
51
53
|
"@tailwindcss/container-queries": "^0.1.1",
|
|
54
|
+
"@types/jsrsasign": "^10.5.15",
|
|
52
55
|
"@types/node": "^24.8.1",
|
|
53
56
|
"@types/react": "^18.2.43",
|
|
54
57
|
"@types/react-dom": "^18.2.17",
|
|
@@ -79,4 +82,4 @@
|
|
|
79
82
|
"author": "",
|
|
80
83
|
"license": "MIT",
|
|
81
84
|
"description": "A React TypeScript component library"
|
|
82
|
-
}
|
|
85
|
+
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { ChatMessage } from '@zoom/videosdk';
|
|
3
|
-
import { Credentials } from './types';
|
|
4
|
-
|
|
5
|
-
type ZoomVideoProviderProps = {
|
|
6
|
-
credentials: Credentials;
|
|
7
|
-
children: ReactNode;
|
|
8
|
-
messages?: ChatMessage[];
|
|
9
|
-
closeParentContainer: () => void;
|
|
10
|
-
};
|
|
11
|
-
export declare const ZoomVideoProvider: ({ credentials, children, messages: mockMessages, closeParentContainer }: ZoomVideoProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { SessionStep } from '../../types';
|
|
2
|
-
|
|
3
|
-
type ButtonsDockProps = {
|
|
4
|
-
exit: () => void;
|
|
5
|
-
setIsCamOn: () => void;
|
|
6
|
-
setIsMicOn: () => void;
|
|
7
|
-
sessionStep: SessionStep;
|
|
8
|
-
setActiveMicrophone: (deviceId: string) => void;
|
|
9
|
-
setActiveCamera: (deviceId: string) => void;
|
|
10
|
-
setActiveAudioOutput: (deviceId: string) => void;
|
|
11
|
-
};
|
|
12
|
-
declare const ButtonsDock: ({ sessionStep, exit, setIsMicOn, setIsCamOn, setActiveMicrophone, setActiveCamera, setActiveAudioOutput }: ButtonsDockProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export default ButtonsDock;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
type DockButtonProps = {
|
|
4
|
-
className?: string;
|
|
5
|
-
mainIcon: string;
|
|
6
|
-
mainLabel?: string;
|
|
7
|
-
mainTitle?: string;
|
|
8
|
-
onMainClick: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
9
|
-
showSecondary?: boolean;
|
|
10
|
-
secondaryIcon?: string;
|
|
11
|
-
secondaryTitle?: string;
|
|
12
|
-
onSecondaryClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Renders a customizable dock button component with optional main and secondary actions.
|
|
16
|
-
*
|
|
17
|
-
* @param className - Additional CSS class names to apply to the container.
|
|
18
|
-
* @param mainIcon - The CSS class for the main icon to display.
|
|
19
|
-
* @param mainLabel - Optional label text for the main button.
|
|
20
|
-
* @param mainTitle - The title attribute for the main button (for accessibility/tooltips).
|
|
21
|
-
* @param onMainClick - Click handler for the main button action.
|
|
22
|
-
* @param showSecondary - Flag to indicate if the secondary button should be displayed.
|
|
23
|
-
* @param secondaryIcon - Optional CSS class for the secondary icon to display.
|
|
24
|
-
* @param secondaryTitle - The title attribute for the secondary button (for accessibility/tooltips).
|
|
25
|
-
* @param onSecondaryClick - Optional click handler for the secondary button action.
|
|
26
|
-
*
|
|
27
|
-
* @returns A dock button component with main and optional secondary actions.
|
|
28
|
-
*/
|
|
29
|
-
declare const DockButton: ({ className, mainIcon, mainLabel, mainTitle, onMainClick, secondaryIcon, secondaryTitle, onSecondaryClick, showSecondary }: DockButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
-
export default DockButton;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { MenuItem, MenuItemOptions } from 'primereact/menuitem';
|
|
2
|
-
|
|
3
|
-
type Props = {
|
|
4
|
-
item: MenuItem;
|
|
5
|
-
options: MenuItemOptions;
|
|
6
|
-
activeItem: string | undefined;
|
|
7
|
-
};
|
|
8
|
-
declare const MenuItemTemplate: ({ item, options, activeItem }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export default MenuItemTemplate;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './ButtonsDock';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
type MobileIconButtonProps = {
|
|
2
|
-
className?: string;
|
|
3
|
-
icon: string;
|
|
4
|
-
onClick: () => void;
|
|
5
|
-
title?: string;
|
|
6
|
-
id?: string;
|
|
7
|
-
};
|
|
8
|
-
declare const MobileIconButton: ({ className, icon, onClick, title, id }: MobileIconButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export default MobileIconButton;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './MobileIconButton';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Breakpoint } from '../../hooks/useDeviceSize';
|
|
2
|
-
|
|
3
|
-
type OverlayProps = {
|
|
4
|
-
breakpoint: Breakpoint;
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
className?: string;
|
|
7
|
-
header?: string | React.ReactNode;
|
|
8
|
-
onHide: () => void;
|
|
9
|
-
width?: string | number;
|
|
10
|
-
visible: boolean;
|
|
11
|
-
};
|
|
12
|
-
declare const Overlay: ({ breakpoint, children, onHide, className, visible, width, header }: OverlayProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export default Overlay;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './Overlay';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Participant, VideoClient } from '@zoom/videosdk';
|
|
2
|
-
import { ReactSetter } from '../types';
|
|
3
|
-
|
|
4
|
-
type Props = {
|
|
5
|
-
participants: Participant[];
|
|
6
|
-
setIsCamOn: ReactSetter<boolean>;
|
|
7
|
-
setIsMicOn: ReactSetter<boolean>;
|
|
8
|
-
zmClient: typeof VideoClient;
|
|
9
|
-
};
|
|
10
|
-
declare const ParticipantsList: ({ zmClient, setIsCamOn, setIsMicOn, participants }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export default ParticipantsList;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Breakpoint } from '../../hooks/useDeviceSize';
|
|
2
|
-
import { SettingsTab } from './context';
|
|
3
|
-
|
|
4
|
-
type Props = {
|
|
5
|
-
breakpoint: Breakpoint;
|
|
6
|
-
visible: boolean;
|
|
7
|
-
onHide: () => void;
|
|
8
|
-
defaultTab?: SettingsTab;
|
|
9
|
-
};
|
|
10
|
-
declare const SettingsOverlay: ({ visible, onHide, breakpoint, defaultTab }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export default SettingsOverlay;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ReactSetter } from '../../types';
|
|
2
|
-
|
|
3
|
-
export declare enum SettingsTab {
|
|
4
|
-
Audio = "Audio",
|
|
5
|
-
Video = "Video",
|
|
6
|
-
Background = "Background"
|
|
7
|
-
}
|
|
8
|
-
export type SettingsOverlayContextProps = {
|
|
9
|
-
selectedSettingsTab: SettingsTab;
|
|
10
|
-
setSelectedSettingsTab: ReactSetter<SettingsTab>;
|
|
11
|
-
};
|
|
12
|
-
export declare const settingsOverlayContext: import('react').Context<SettingsOverlayContextProps>;
|
|
13
|
-
export declare const useSettingsOverlayContext: () => SettingsOverlayContextProps;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './SettingsOverlay';
|
package/dist/constants.d.ts
DELETED
package/dist/lib/platforms.d.ts
DELETED
|
File without changes
|
|
File without changes
|