@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.
Files changed (42) hide show
  1. package/dist/App.d.ts +3 -0
  2. package/dist/components/ZoomVideoPlugin/ZoomVideoPlugin.d.ts +4 -0
  3. package/dist/components/ZoomVideoPlugin/ZoomVideoPlugin.stories.d.ts +27 -0
  4. package/dist/components/ZoomVideoPlugin/components/ButtonsDock/ButtonsDock.d.ts +13 -0
  5. package/dist/components/ZoomVideoPlugin/components/ButtonsDock/DockButton.d.ts +30 -0
  6. package/dist/components/ZoomVideoPlugin/components/ButtonsDock/MenuItemTemplate.d.ts +9 -0
  7. package/dist/components/ZoomVideoPlugin/components/ButtonsDock/index.d.ts +1 -0
  8. package/dist/components/ZoomVideoPlugin/components/MobileIconButton/MobileIconButton.d.ts +9 -0
  9. package/dist/components/ZoomVideoPlugin/components/MobileIconButton/index.d.ts +1 -0
  10. package/dist/components/ZoomVideoPlugin/components/Overlay/Overlay.d.ts +13 -0
  11. package/dist/components/ZoomVideoPlugin/components/Overlay/index.d.ts +1 -0
  12. package/dist/components/ZoomVideoPlugin/components/ParticipantsList.d.ts +11 -0
  13. package/dist/components/ZoomVideoPlugin/components/SettingsOverlay/SettingsContent.d.ts +2 -0
  14. package/dist/components/ZoomVideoPlugin/components/SettingsOverlay/SettingsMenu.d.ts +2 -0
  15. package/dist/components/ZoomVideoPlugin/components/SettingsOverlay/SettingsOverlay.d.ts +11 -0
  16. package/dist/components/ZoomVideoPlugin/components/SettingsOverlay/Tabs/AudioSettings.d.ts +2 -0
  17. package/dist/components/ZoomVideoPlugin/components/SettingsOverlay/Tabs/BackgroundSettings.d.ts +2 -0
  18. package/dist/components/ZoomVideoPlugin/components/SettingsOverlay/Tabs/DropdownItemTemplate.d.ts +8 -0
  19. package/dist/components/ZoomVideoPlugin/components/SettingsOverlay/Tabs/DropdownValueTemplate.d.ts +8 -0
  20. package/dist/components/ZoomVideoPlugin/components/SettingsOverlay/Tabs/VideoSettings.d.ts +2 -0
  21. package/dist/components/ZoomVideoPlugin/components/SettingsOverlay/context.d.ts +13 -0
  22. package/dist/components/ZoomVideoPlugin/components/SettingsOverlay/index.d.ts +1 -0
  23. package/dist/components/ZoomVideoPlugin/components/Video.d.ts +5 -0
  24. package/dist/components/ZoomVideoPlugin/constants.d.ts +2 -0
  25. package/dist/components/ZoomVideoPlugin/context.d.ts +38 -0
  26. package/dist/components/ZoomVideoPlugin/hooks/useClientMessages.d.ts +21 -0
  27. package/dist/components/ZoomVideoPlugin/hooks/useDeviceSize.d.ts +10 -0
  28. package/dist/components/ZoomVideoPlugin/hooks/useStartVideoOptions.d.ts +10 -0
  29. package/dist/components/ZoomVideoPlugin/hooks/useZoomVideoPlayer.d.ts +7 -0
  30. package/dist/components/ZoomVideoPlugin/index.d.ts +2 -0
  31. package/dist/components/ZoomVideoPlugin/lib/platforms.d.ts +4 -0
  32. package/dist/components/ZoomVideoPlugin/pages/AfterSession.d.ts +4 -0
  33. package/dist/components/ZoomVideoPlugin/pages/MainSession.d.ts +2 -0
  34. package/dist/components/ZoomVideoPlugin/pages/PanelistsSession.d.ts +4 -0
  35. package/dist/components/ZoomVideoPlugin/pages/PreSessionConfiguration.d.ts +4 -0
  36. package/dist/components/ZoomVideoPlugin/types.d.ts +20 -0
  37. package/dist/index.cjs +1504 -0
  38. package/dist/index.css +1 -0
  39. package/dist/index.d.ts +3 -0
  40. package/dist/index.js +31236 -0
  41. package/dist/main.d.ts +1 -0
  42. package/package.json +5 -2
package/dist/App.d.ts ADDED
@@ -0,0 +1,3 @@
1
+
2
+ declare function App(): import("react/jsx-runtime").JSX.Element;
3
+ export default App;
@@ -0,0 +1,4 @@
1
+ import { ZoomVideoPluginProps } from './types';
2
+
3
+ declare const ZoomVideoPlugin: ({ credentials, closeParentContainer, setIsCloseButtonVisible }: ZoomVideoPluginProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default ZoomVideoPlugin;
@@ -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,2 @@
1
+ declare const SettingsContent: () => import("react/jsx-runtime").JSX.Element | null;
2
+ export default SettingsContent;
@@ -0,0 +1,2 @@
1
+ declare const SettingsMenu: () => import("react/jsx-runtime").JSX.Element;
2
+ export default SettingsMenu;
@@ -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,2 @@
1
+ declare const AudioSettings: () => import("react/jsx-runtime").JSX.Element;
2
+ export default AudioSettings;
@@ -0,0 +1,2 @@
1
+ declare const BackgroundSettings: () => import("react/jsx-runtime").JSX.Element;
2
+ export default BackgroundSettings;
@@ -0,0 +1,8 @@
1
+ declare const DropdownItemTemplate: ({ option, isActive }: {
2
+ option: {
3
+ label: string;
4
+ value: string;
5
+ };
6
+ isActive: boolean;
7
+ }) => import("react/jsx-runtime").JSX.Element;
8
+ export default DropdownItemTemplate;
@@ -0,0 +1,8 @@
1
+ declare const DropdownValueTemplate: ({ option, icon }: {
2
+ option: {
3
+ label: string;
4
+ value: string;
5
+ };
6
+ icon: string;
7
+ }) => import("react/jsx-runtime").JSX.Element;
8
+ export default DropdownValueTemplate;
@@ -0,0 +1,2 @@
1
+ declare const VideoSettings: () => import("react/jsx-runtime").JSX.Element;
2
+ export default VideoSettings;
@@ -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,5 @@
1
+ type VideoProps = {
2
+ fullRef: React.RefObject<HTMLVideoElement> | null;
3
+ };
4
+ declare const Video: ({ fullRef }: VideoProps) => import("react/jsx-runtime").JSX.Element;
5
+ export default Video;
@@ -0,0 +1,2 @@
1
+ export declare const VIDEO_PLACEHOLDER = "<div class=\"video-placeholder flex items-center justify-center bg-neutral-20 w-full h-full aspect-video text-white\"><i class=\"fa-regular fa-video-slash fa-lg\"/></div>";
2
+ export declare const SETTINGS_OVERLAY_WIDTH = 680;
@@ -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,10 @@
1
+ export declare enum Breakpoint {
2
+ Mobile = 0,
3
+ Tablet = 1,
4
+ Desktop = 2
5
+ }
6
+ export declare const useContainerSize: () => {
7
+ ref: import('react-use/lib/useMeasure').UseMeasureRef<HTMLDivElement>;
8
+ width: number;
9
+ breakpoint: Breakpoint;
10
+ };
@@ -0,0 +1,10 @@
1
+ import { Stream } from '@zoom/videosdk';
2
+
3
+ export declare const useStartVideoOptions: ({ mediaStream }: {
4
+ mediaStream: typeof Stream | null;
5
+ }) => {
6
+ hd: boolean;
7
+ fullHd: boolean;
8
+ ptz: boolean | undefined;
9
+ originalRatio: boolean;
10
+ };
@@ -0,0 +1,7 @@
1
+ import { RefObject } from 'react';
2
+
3
+ type UseZoomVideoPlayerProps = {
4
+ fullRef: RefObject<HTMLVideoElement | null>;
5
+ };
6
+ export declare const useZoomVideoPlayer: ({ fullRef }: UseZoomVideoPlayerProps) => void;
7
+ export {};
@@ -0,0 +1,2 @@
1
+ export { default } from './ZoomVideoPlugin';
2
+ export type { ZoomVideoPluginProps } from './types';
@@ -0,0 +1,4 @@
1
+ export declare const isIPad: () => boolean;
2
+ export declare const isIOSMobile: () => boolean;
3
+ export declare const isAndroidBrowser: () => boolean;
4
+ export declare const isAndroidOrIOSBrowser: () => boolean;
@@ -0,0 +1,4 @@
1
+ declare const AfterSession: ({ restartSession }: {
2
+ restartSession: () => void;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export default AfterSession;
@@ -0,0 +1,2 @@
1
+ declare const MainSession: () => import("react/jsx-runtime").JSX.Element;
2
+ export default MainSession;
@@ -0,0 +1,4 @@
1
+ declare const PanelistsSession: ({ initMainSession }: {
2
+ initMainSession: () => void;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export default PanelistsSession;
@@ -0,0 +1,4 @@
1
+ declare const PreSessionConfiguration: ({ joinSession }: {
2
+ joinSession: () => Promise<void>;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export default PreSessionConfiguration;
@@ -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
+ };