@fraku/video 0.0.5 → 0.0.7

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 (53) hide show
  1. package/dist/ZoomVideo.d.ts +11 -0
  2. package/dist/ZoomVideo.stories.d.ts +8 -0
  3. package/dist/{components/ZoomVideoPlugin/ZoomVideoPlugin.d.ts → ZoomVideoPlugin.d.ts} +1 -1
  4. package/dist/ZoomVideoPlugin.stories.d.ts +8 -0
  5. package/dist/ZoomVideoPluginRouter.d.ts +4 -0
  6. package/dist/ZoomVideoProvider.d.ts +12 -0
  7. package/dist/components/Chat/Chat.d.ts +2 -0
  8. package/dist/components/Chat/index.d.ts +1 -0
  9. package/dist/components/Video.d.ts +2 -0
  10. package/dist/{components/ZoomVideoPlugin/context.d.ts → context.d.ts} +15 -4
  11. package/dist/hooks/useAsyncHandler.d.ts +5 -0
  12. package/dist/hooks/useClientMessages.d.ts +5 -0
  13. package/dist/hooks/useIsMobile.d.ts +2 -0
  14. package/dist/index.cjs +102 -263
  15. package/dist/index.css +1 -1
  16. package/dist/index.d.ts +2 -2
  17. package/dist/index.js +23088 -22790
  18. package/package.json +11 -5
  19. package/dist/App.d.ts +0 -3
  20. package/dist/components/ZoomVideoPlugin/ZoomVideoPlugin.stories.d.ts +0 -27
  21. package/dist/components/ZoomVideoPlugin/components/Video.d.ts +0 -5
  22. package/dist/components/ZoomVideoPlugin/hooks/useClientMessages.d.ts +0 -21
  23. package/dist/components/ZoomVideoPlugin/index.d.ts +0 -2
  24. package/dist/main.d.ts +0 -1
  25. /package/dist/components/{ZoomVideoPlugin/components/ButtonsDock → ButtonsDock}/ButtonsDock.d.ts +0 -0
  26. /package/dist/components/{ZoomVideoPlugin/components/ButtonsDock → ButtonsDock}/DockButton.d.ts +0 -0
  27. /package/dist/components/{ZoomVideoPlugin/components/ButtonsDock → ButtonsDock}/MenuItemTemplate.d.ts +0 -0
  28. /package/dist/components/{ZoomVideoPlugin/components/ButtonsDock → ButtonsDock}/index.d.ts +0 -0
  29. /package/dist/components/{ZoomVideoPlugin/components/MobileIconButton → MobileIconButton}/MobileIconButton.d.ts +0 -0
  30. /package/dist/components/{ZoomVideoPlugin/components/MobileIconButton → MobileIconButton}/index.d.ts +0 -0
  31. /package/dist/components/{ZoomVideoPlugin/components/Overlay → Overlay}/Overlay.d.ts +0 -0
  32. /package/dist/components/{ZoomVideoPlugin/components/Overlay → Overlay}/index.d.ts +0 -0
  33. /package/dist/components/{ZoomVideoPlugin/components/ParticipantsList.d.ts → ParticipantsList.d.ts} +0 -0
  34. /package/dist/components/{ZoomVideoPlugin/components/SettingsOverlay → SettingsOverlay}/SettingsContent.d.ts +0 -0
  35. /package/dist/components/{ZoomVideoPlugin/components/SettingsOverlay → SettingsOverlay}/SettingsMenu.d.ts +0 -0
  36. /package/dist/components/{ZoomVideoPlugin/components/SettingsOverlay → SettingsOverlay}/SettingsOverlay.d.ts +0 -0
  37. /package/dist/components/{ZoomVideoPlugin/components/SettingsOverlay → SettingsOverlay}/Tabs/AudioSettings.d.ts +0 -0
  38. /package/dist/components/{ZoomVideoPlugin/components/SettingsOverlay → SettingsOverlay}/Tabs/BackgroundSettings.d.ts +0 -0
  39. /package/dist/components/{ZoomVideoPlugin/components/SettingsOverlay → SettingsOverlay}/Tabs/DropdownItemTemplate.d.ts +0 -0
  40. /package/dist/components/{ZoomVideoPlugin/components/SettingsOverlay → SettingsOverlay}/Tabs/DropdownValueTemplate.d.ts +0 -0
  41. /package/dist/components/{ZoomVideoPlugin/components/SettingsOverlay → SettingsOverlay}/Tabs/VideoSettings.d.ts +0 -0
  42. /package/dist/components/{ZoomVideoPlugin/components/SettingsOverlay → SettingsOverlay}/context.d.ts +0 -0
  43. /package/dist/components/{ZoomVideoPlugin/components/SettingsOverlay → SettingsOverlay}/index.d.ts +0 -0
  44. /package/dist/{components/ZoomVideoPlugin/constants.d.ts → constants.d.ts} +0 -0
  45. /package/dist/{components/ZoomVideoPlugin/hooks → hooks}/useDeviceSize.d.ts +0 -0
  46. /package/dist/{components/ZoomVideoPlugin/hooks → hooks}/useStartVideoOptions.d.ts +0 -0
  47. /package/dist/{components/ZoomVideoPlugin/hooks → hooks}/useZoomVideoPlayer.d.ts +0 -0
  48. /package/dist/{components/ZoomVideoPlugin/lib → lib}/platforms.d.ts +0 -0
  49. /package/dist/{components/ZoomVideoPlugin/pages → pages}/AfterSession.d.ts +0 -0
  50. /package/dist/{components/ZoomVideoPlugin/pages → pages}/MainSession.d.ts +0 -0
  51. /package/dist/{components/ZoomVideoPlugin/pages → pages}/PanelistsSession.d.ts +0 -0
  52. /package/dist/{components/ZoomVideoPlugin/pages → pages}/PreSessionConfiguration.d.ts +0 -0
  53. /package/dist/{components/ZoomVideoPlugin/types.d.ts → types.d.ts} +0 -0
@@ -0,0 +1,11 @@
1
+ type ZoomVideoHandle = {
2
+ sessionStarted: boolean;
3
+ initSession: () => Promise<void>;
4
+ joinSession: () => Promise<void>;
5
+ startVideo: () => Promise<void>;
6
+ stopVideo: () => Promise<void>;
7
+ stopSession: () => Promise<void>;
8
+ };
9
+ export declare const ZoomVideo: import('react').ForwardRefExoticComponent<import('react').RefAttributes<ZoomVideoHandle>>;
10
+ export type ZoomVideo = ZoomVideoHandle;
11
+ export default ZoomVideo;
@@ -0,0 +1,8 @@
1
+ declare const _default: {
2
+ title: string;
3
+ };
4
+ export default _default;
5
+ export declare const Default: {
6
+ (): import("react/jsx-runtime").JSX.Element;
7
+ storyName: string;
8
+ };
@@ -1,4 +1,4 @@
1
1
  import { ZoomVideoPluginProps } from './types';
2
2
 
3
- declare const ZoomVideoPlugin: ({ credentials, closeParentContainer, setIsCloseButtonVisible }: ZoomVideoPluginProps) => import("react/jsx-runtime").JSX.Element;
3
+ declare const ZoomVideoPlugin: ({ credentials, closeParentContainer, setIsCloseButtonVisible }: ZoomVideoPluginProps) => import("react/jsx-runtime").JSX.Element | null;
4
4
  export default ZoomVideoPlugin;
@@ -0,0 +1,8 @@
1
+ declare const _default: {
2
+ title: string;
3
+ };
4
+ export default _default;
5
+ export declare const Default: {
6
+ (): import("react/jsx-runtime").JSX.Element;
7
+ storyName: string;
8
+ };
@@ -0,0 +1,4 @@
1
+ import { ZoomVideoPluginProps } from './types';
2
+
3
+ declare const ZoomVideoPluginRouter: ({ credentials, setIsCloseButtonVisible }: ZoomVideoPluginProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default ZoomVideoPluginRouter;
@@ -0,0 +1,12 @@
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 {};
@@ -0,0 +1,2 @@
1
+ declare const Chat: () => import("react/jsx-runtime").JSX.Element;
2
+ export default Chat;
@@ -0,0 +1 @@
1
+ export { default } from './Chat';
@@ -0,0 +1,2 @@
1
+ declare const Video: import('react').ForwardRefExoticComponent<import('react').RefAttributes<HTMLVideoElement>>;
2
+ export default Video;
@@ -1,8 +1,9 @@
1
- import { ActiveSpeaker, ConnectionState, LocalAudioTrack, LocalVideoTrack, MediaDevice, Participant, Stream, VideoClient } from '@zoom/videosdk';
1
+ import { ActiveSpeaker, ChatMessage, ConnectionState, LocalAudioTrack, LocalVideoTrack, MediaDevice, Participant, Stream, VideoClient } from '@zoom/videosdk';
2
2
  import { Breakpoint } from './hooks/useDeviceSize';
3
3
 
4
4
  export declare const zmClient: typeof VideoClient;
5
5
  export type ZoomVideoContextType = {
6
+ messages: ChatMessage[];
6
7
  activeAudioOutput: string | undefined;
7
8
  activeCamera: string | undefined;
8
9
  activeMicrophone: string | undefined;
@@ -11,7 +12,6 @@ export type ZoomVideoContextType = {
11
12
  audioOutputList: MediaDevice[];
12
13
  breakpoint: Breakpoint;
13
14
  cameraList: MediaDevice[];
14
- closeParentContainer: () => void;
15
15
  connectionState: ConnectionState | null;
16
16
  isBlurred: boolean;
17
17
  isCamOn: boolean;
@@ -21,7 +21,17 @@ export type ZoomVideoContextType = {
21
21
  mediaStream: typeof Stream | null;
22
22
  micList: MediaDevice[];
23
23
  participants: Participant[];
24
+ zmClient: typeof VideoClient;
25
+ closeParentContainer: () => void;
26
+ setActiveMicrophone: ReactSetter<string | undefined>;
27
+ setActiveAudioOutput: ReactSetter<string | undefined>;
24
28
  setActiveCamera: ReactSetter<string | undefined>;
29
+ setMicList: ReactSetter<MediaDevice[]>;
30
+ setActiveSpeakers: ReactSetter<ActiveSpeaker[]>;
31
+ setActiveVideoId: ReactSetter<number | null>;
32
+ setAudioOutputList: ReactSetter<MediaDevice[]>;
33
+ setCameraList: ReactSetter<MediaDevice[]>;
34
+ setConnectionState: ReactSetter<ConnectionState | null>;
25
35
  setIsBlurred: ReactSetter<boolean>;
26
36
  setIsCamOn: ReactSetter<boolean>;
27
37
  setIsMicOn: ReactSetter<boolean>;
@@ -29,10 +39,11 @@ export type ZoomVideoContextType = {
29
39
  setLocalVideo: ReactSetter<LocalVideoTrack>;
30
40
  setMediaStream: ReactSetter<typeof Stream | null>;
31
41
  setParticipants: ReactSetter<Participant[]>;
32
- stopSession: () => Promise<void>;
33
42
  switchActiveAudioOutput: (deviceId: string) => Promise<void>;
34
43
  switchActiveMicrophone: (deviceId: string) => Promise<void>;
35
- zmClient: typeof VideoClient;
44
+ initSession: () => Promise<void>;
45
+ joinSession: () => Promise<void>;
46
+ stopSession: () => Promise<void>;
36
47
  };
37
48
  export declare const ZoomVideoContext: import('react').Context<ZoomVideoContextType>;
38
49
  export declare const useZoomVideoContext: () => ZoomVideoContextType;
@@ -0,0 +1,5 @@
1
+ export declare const useAsyncHandler: <T extends (...args: any[]) => Promise<any>>(callback: T, deps: React.DependencyList) => [(...args: Parameters<T>) => Promise<void>, {
2
+ loading: boolean;
3
+ value: Awaited<ReturnType<T>> | undefined;
4
+ error: Error | undefined;
5
+ }];
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Hook that subscribes to Zoom Video SDK events and updates the context state accordingly.
3
+ * This hook should be called from within a ZoomVideoProvider.
4
+ */
5
+ export declare const useClientMessages: () => void;
@@ -0,0 +1,2 @@
1
+ export declare function useIsMobile(): boolean;
2
+ export default useIsMobile;