@fraku/video 0.0.2 → 0.0.6
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/App.d.ts +3 -0
- package/dist/components/ZoomVideoPlugin/ZoomVideoPlugin.d.ts +4 -0
- package/dist/components/ZoomVideoPlugin/ZoomVideoPlugin.stories.d.ts +27 -0
- package/dist/components/ZoomVideoPlugin/components/ButtonsDock/ButtonsDock.d.ts +13 -0
- package/dist/components/ZoomVideoPlugin/components/ButtonsDock/DockButton.d.ts +30 -0
- package/dist/components/ZoomVideoPlugin/components/ButtonsDock/MenuItemTemplate.d.ts +9 -0
- package/dist/components/ZoomVideoPlugin/components/ButtonsDock/index.d.ts +1 -0
- package/dist/components/ZoomVideoPlugin/components/MobileIconButton/MobileIconButton.d.ts +9 -0
- package/dist/components/ZoomVideoPlugin/components/MobileIconButton/index.d.ts +1 -0
- package/dist/components/ZoomVideoPlugin/components/Overlay/Overlay.d.ts +13 -0
- package/dist/components/ZoomVideoPlugin/components/Overlay/index.d.ts +1 -0
- package/dist/components/ZoomVideoPlugin/components/ParticipantsList.d.ts +11 -0
- package/dist/components/ZoomVideoPlugin/components/SettingsOverlay/SettingsContent.d.ts +2 -0
- package/dist/components/ZoomVideoPlugin/components/SettingsOverlay/SettingsMenu.d.ts +2 -0
- package/dist/components/ZoomVideoPlugin/components/SettingsOverlay/SettingsOverlay.d.ts +11 -0
- package/dist/components/ZoomVideoPlugin/components/SettingsOverlay/Tabs/AudioSettings.d.ts +2 -0
- package/dist/components/ZoomVideoPlugin/components/SettingsOverlay/Tabs/BackgroundSettings.d.ts +2 -0
- package/dist/components/ZoomVideoPlugin/components/SettingsOverlay/Tabs/DropdownItemTemplate.d.ts +8 -0
- package/dist/components/ZoomVideoPlugin/components/SettingsOverlay/Tabs/DropdownValueTemplate.d.ts +8 -0
- package/dist/components/ZoomVideoPlugin/components/SettingsOverlay/Tabs/VideoSettings.d.ts +2 -0
- package/dist/components/ZoomVideoPlugin/components/SettingsOverlay/context.d.ts +13 -0
- package/dist/components/ZoomVideoPlugin/components/SettingsOverlay/index.d.ts +1 -0
- package/dist/components/ZoomVideoPlugin/components/Video.d.ts +5 -0
- package/dist/components/ZoomVideoPlugin/constants.d.ts +2 -0
- package/dist/components/ZoomVideoPlugin/context.d.ts +38 -0
- package/dist/components/ZoomVideoPlugin/hooks/useClientMessages.d.ts +21 -0
- package/dist/components/ZoomVideoPlugin/hooks/useDeviceSize.d.ts +10 -0
- package/dist/components/ZoomVideoPlugin/hooks/useStartVideoOptions.d.ts +10 -0
- package/dist/components/ZoomVideoPlugin/hooks/useZoomVideoPlayer.d.ts +7 -0
- package/dist/components/ZoomVideoPlugin/index.d.ts +2 -0
- package/dist/components/ZoomVideoPlugin/lib/platforms.d.ts +4 -0
- package/dist/components/ZoomVideoPlugin/pages/AfterSession.d.ts +4 -0
- package/dist/components/ZoomVideoPlugin/pages/MainSession.d.ts +2 -0
- package/dist/components/ZoomVideoPlugin/pages/PanelistsSession.d.ts +4 -0
- package/dist/components/ZoomVideoPlugin/pages/PreSessionConfiguration.d.ts +4 -0
- package/dist/components/ZoomVideoPlugin/types.d.ts +20 -0
- package/dist/index.cjs +1504 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +31236 -0
- package/dist/main.d.ts +1 -0
- package/package.json +5 -2
package/dist/App.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ credentials, closeParentContainer, setIsCloseButtonVisible }: import('./types').ZoomVideoPluginProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
argTypes: {
|
|
11
|
+
credentials: {
|
|
12
|
+
description: string;
|
|
13
|
+
control: "object";
|
|
14
|
+
};
|
|
15
|
+
closeParentContainer: {
|
|
16
|
+
description: string;
|
|
17
|
+
action: string;
|
|
18
|
+
};
|
|
19
|
+
setIsCloseButtonVisible: {
|
|
20
|
+
description: string;
|
|
21
|
+
action: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export default meta;
|
|
26
|
+
type Story = StoryObj<typeof meta>;
|
|
27
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
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;
|
|
@@ -0,0 +1,30 @@
|
|
|
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;
|
|
@@ -0,0 +1,9 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ButtonsDock';
|
|
@@ -0,0 +1,9 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './MobileIconButton';
|
|
@@ -0,0 +1,13 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Overlay';
|
|
@@ -0,0 +1,11 @@
|
|
|
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;
|
|
@@ -0,0 +1,11 @@
|
|
|
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;
|
|
@@ -0,0 +1,13 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SettingsOverlay';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ActiveSpeaker, ConnectionState, LocalAudioTrack, LocalVideoTrack, MediaDevice, Participant, Stream, VideoClient } from '@zoom/videosdk';
|
|
2
|
+
import { Breakpoint } from './hooks/useDeviceSize';
|
|
3
|
+
|
|
4
|
+
export declare const zmClient: typeof VideoClient;
|
|
5
|
+
export type ZoomVideoContextType = {
|
|
6
|
+
activeAudioOutput: string | undefined;
|
|
7
|
+
activeCamera: string | undefined;
|
|
8
|
+
activeMicrophone: string | undefined;
|
|
9
|
+
activeSpeakers: ActiveSpeaker[];
|
|
10
|
+
activeVideoId: number | null;
|
|
11
|
+
audioOutputList: MediaDevice[];
|
|
12
|
+
breakpoint: Breakpoint;
|
|
13
|
+
cameraList: MediaDevice[];
|
|
14
|
+
closeParentContainer: () => void;
|
|
15
|
+
connectionState: ConnectionState | null;
|
|
16
|
+
isBlurred: boolean;
|
|
17
|
+
isCamOn: boolean;
|
|
18
|
+
isMicOn: boolean;
|
|
19
|
+
localAudio: LocalAudioTrack | undefined;
|
|
20
|
+
localVideo: LocalVideoTrack | undefined;
|
|
21
|
+
mediaStream: typeof Stream | null;
|
|
22
|
+
micList: MediaDevice[];
|
|
23
|
+
participants: Participant[];
|
|
24
|
+
setActiveCamera: ReactSetter<string | undefined>;
|
|
25
|
+
setIsBlurred: ReactSetter<boolean>;
|
|
26
|
+
setIsCamOn: ReactSetter<boolean>;
|
|
27
|
+
setIsMicOn: ReactSetter<boolean>;
|
|
28
|
+
setLocalAudio: ReactSetter<LocalAudioTrack>;
|
|
29
|
+
setLocalVideo: ReactSetter<LocalVideoTrack>;
|
|
30
|
+
setMediaStream: ReactSetter<typeof Stream | null>;
|
|
31
|
+
setParticipants: ReactSetter<Participant[]>;
|
|
32
|
+
stopSession: () => Promise<void>;
|
|
33
|
+
switchActiveAudioOutput: (deviceId: string) => Promise<void>;
|
|
34
|
+
switchActiveMicrophone: (deviceId: string) => Promise<void>;
|
|
35
|
+
zmClient: typeof VideoClient;
|
|
36
|
+
};
|
|
37
|
+
export declare const ZoomVideoContext: import('react').Context<ZoomVideoContextType>;
|
|
38
|
+
export declare const useZoomVideoContext: () => ZoomVideoContextType;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ActiveSpeaker, ConnectionState, MediaDevice, Participant, Stream, VideoClient } from '@zoom/videosdk';
|
|
2
|
+
|
|
3
|
+
type Props = {
|
|
4
|
+
zmClient: typeof VideoClient | null;
|
|
5
|
+
mediaStream: typeof Stream | null;
|
|
6
|
+
setActiveMicrophone: ReactSetter<string | undefined>;
|
|
7
|
+
setActiveAudioOutput: ReactSetter<string | undefined>;
|
|
8
|
+
setActiveCamera: ReactSetter<string | undefined>;
|
|
9
|
+
setMicList: ReactSetter<MediaDevice[]>;
|
|
10
|
+
setAudioOutputList: ReactSetter<MediaDevice[]>;
|
|
11
|
+
setCameraList: ReactSetter<MediaDevice[]>;
|
|
12
|
+
setConnectionState: ReactSetter<ConnectionState | null>;
|
|
13
|
+
setIsCamOn: ReactSetter<boolean>;
|
|
14
|
+
setIsMicOn: ReactSetter<boolean>;
|
|
15
|
+
setActiveSpeakers: ReactSetter<ActiveSpeaker[]>;
|
|
16
|
+
setParticipants: ReactSetter<Participant[]>;
|
|
17
|
+
setActiveVideoId: ReactSetter<number | null>;
|
|
18
|
+
setHandRaises: ReactSetter<Record<string, boolean>>;
|
|
19
|
+
};
|
|
20
|
+
export declare const useClientMessages: ({ zmClient, mediaStream, setActiveMicrophone, setActiveAudioOutput, setActiveCamera, setMicList, setAudioOutputList, setCameraList, setConnectionState, setIsCamOn, setIsMicOn, setActiveSpeakers, setActiveVideoId, setParticipants, setHandRaises }: Props) => void;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export declare enum SessionStep {
|
|
4
|
+
LocalSettingsConfiguration = 0,
|
|
5
|
+
OnlyPanelistsSession = 1,
|
|
6
|
+
MainSession = 2,
|
|
7
|
+
AfterSession = 3
|
|
8
|
+
}
|
|
9
|
+
export type Credentials = {
|
|
10
|
+
sessionName: string;
|
|
11
|
+
signature: string;
|
|
12
|
+
userName: string;
|
|
13
|
+
sessionPasscode: string;
|
|
14
|
+
};
|
|
15
|
+
export type ReactSetter<T> = React.Dispatch<React.SetStateAction<T>>;
|
|
16
|
+
export type ZoomVideoPluginProps = {
|
|
17
|
+
credentials: Credentials | null;
|
|
18
|
+
closeParentContainer: () => void;
|
|
19
|
+
setIsCloseButtonVisible: ReactSetter<boolean>;
|
|
20
|
+
};
|