@fraku/video 0.1.5 → 0.1.8

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.
@@ -0,0 +1,6 @@
1
+ import { Participant } from '@zoom/videosdk';
2
+ import { default as permissions } from '../config/permissions';
3
+ import { User } from '../types/permissions';
4
+
5
+ export declare const usePermissions: () => (permission: keyof typeof permissions) => boolean | undefined;
6
+ export declare const createUser: (p: Participant, signature: string) => User;
@@ -0,0 +1,8 @@
1
+ import { Participant } from '@zoom/videosdk';
2
+
3
+ type ParticipantsPanelProps = {
4
+ items: Participant[];
5
+ columnHeader: string;
6
+ };
7
+ declare const ParticipantList: ({ items, columnHeader }: ParticipantsPanelProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default ParticipantList;
@@ -0,0 +1,4 @@
1
+ import { DialogsProviderProps } from './types';
2
+
3
+ declare const DialogsProvider: ({ children }: DialogsProviderProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default DialogsProvider;
@@ -0,0 +1,3 @@
1
+ import { DialogsContextType } from './types';
2
+
3
+ export declare const DialogsContext: import('react').Context<DialogsContextType>;
@@ -0,0 +1,2 @@
1
+ export { default } from './DialogsProvider';
2
+ export { DialogsContext } from './context';
@@ -1,9 +1,9 @@
1
1
  import { ReactNode } from 'react';
2
2
 
3
- export type ConfigDialogContextType = {
3
+ export type DialogsContextType = {
4
4
  configDialogVisible: boolean;
5
5
  toggleConfigDialog: () => void;
6
6
  };
7
- export type ConfigDialogProviderProps = {
7
+ export type DialogsProviderProps = {
8
8
  children?: ReactNode;
9
9
  };
@@ -1,6 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ChatMessage, MediaDevice, Participant, VideoPlayer } from '@zoom/videosdk';
3
3
  import { Credentials } from '../../types';
4
+ import { User } from '../../types/permissions';
4
5
 
5
6
  export type MediaContextType = {
6
7
  sessionStarted: boolean;
@@ -21,11 +22,17 @@ export type MediaContextType = {
21
22
  switchMicrophone: (deviceId: string) => Promise<void>;
22
23
  switchSpeaker: (deviceId: string) => Promise<void>;
23
24
  participants: Participant[];
24
- currentUser: Participant | null;
25
+ currentUser: User | null;
26
+ activeSpeaker: Participant | null;
25
27
  messages: ChatMessage[];
28
+ votingStarted: boolean;
29
+ initVotingSession?: () => Promise<void>;
26
30
  };
27
31
  export type MediaProviderProps = {
28
32
  credentials: Credentials;
29
33
  messages?: ChatMessage[];
30
34
  children: ReactNode;
35
+ onInitVotingPreSession?: () => Promise<void>;
36
+ onInitVotingSession?: () => Promise<void>;
37
+ onCloseVotingSession?: () => Promise<void>;
31
38
  };
@@ -7,6 +7,9 @@ export type Credentials = {
7
7
  sessionPasscode: string;
8
8
  };
9
9
  export type VideoPluginProps = {
10
+ onInitPreSession?: () => Promise<void>;
11
+ onInitSession?: () => Promise<void>;
12
+ onCloseSession?: () => Promise<void>;
10
13
  credentials: Credentials;
11
14
  className?: string;
12
15
  };
@@ -0,0 +1,6 @@
1
+ import { Participant } from '@zoom/videosdk';
2
+
3
+ export type Role = 'admin' | 'panelist' | 'voter';
4
+ export type User = Participant & {
5
+ role: Role;
6
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fraku/video",
3
3
  "private": false,
4
- "version": "0.1.5",
4
+ "version": "0.1.8",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
@@ -1,4 +0,0 @@
1
- import { ConfigDialogProviderProps } from './types';
2
-
3
- declare const ConfigDialogProvider: ({ children }: ConfigDialogProviderProps) => import("react/jsx-runtime").JSX.Element;
4
- export default ConfigDialogProvider;
@@ -1,3 +0,0 @@
1
- import { ConfigDialogContextType } from './types';
2
-
3
- export declare const ConfigDialogContext: import('react').Context<ConfigDialogContextType>;
@@ -1,2 +0,0 @@
1
- export { default } from './ConfigDialogProvider';
2
- export { ConfigDialogContext } from './context';
File without changes