@fraku/video 0.1.30 → 0.1.32

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,2 @@
1
+ declare const MicMutedBadge: () => import("react/jsx-runtime").JSX.Element;
2
+ export default MicMutedBadge;
@@ -0,0 +1,5 @@
1
+ declare const SharedInfoBanner: ({ name, isCurrentUserShare }: {
2
+ name: string;
3
+ isCurrentUserShare: boolean;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ export default SharedInfoBanner;
@@ -0,0 +1,8 @@
1
+ import { Participant } from '@zoom/videosdk';
2
+
3
+ type ParticipantVideoProps = {
4
+ user: Participant;
5
+ className?: string;
6
+ };
7
+ declare const UserVideo: ({ user, className }: ParticipantVideoProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default UserVideo;
@@ -0,0 +1,4 @@
1
+ declare const VideoOff: ({ userName }: {
2
+ userName: string;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export default VideoOff;
@@ -1,5 +1,6 @@
1
1
  import { Participant } from '@zoom/videosdk';
2
2
  import { SharedState } from '../../shared';
3
+ import { SessionStatus } from '../VideoPluginProvider/context';
3
4
 
4
5
  export declare const CHAT_STATE_DEFAULT: {
5
6
  active: boolean;
@@ -19,6 +20,7 @@ export type SharedContextType = {
19
20
  toggleTurnQueue: (active: boolean) => Promise<void>;
20
21
  toggleChat: (active: boolean) => Promise<void>;
21
22
  alertUser: (userId: number, message: string) => Promise<void>;
23
+ changeSessionStatus: (status: SessionStatus) => Promise<void>;
22
24
  };
23
25
  export declare const SharedContext: import('react').Context<SharedContextType>;
24
26
  export declare const useSharedContext: () => SharedContextType;
@@ -1,10 +1,11 @@
1
- import { Participant } from '@zoom/videosdk';
1
+ import { ActiveSpeaker, Participant } from '@zoom/videosdk';
2
2
 
3
3
  export type UsersContextType = {
4
- users: Participant[];
4
+ activeSpeakers: ActiveSpeaker[];
5
+ activeVideoParticipant: Participant | null;
5
6
  currentUser: Participant | null;
6
- activeSpeaker: Participant | null;
7
7
  screenSharingUser: Participant | null;
8
+ users: Participant[];
8
9
  };
9
10
  export declare const UsersContext: import('react').Context<UsersContextType>;
10
11
  export declare const useUsersContext: () => UsersContextType;
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { UserRole } from './context';
2
+ import { SessionStatus, UserRole } from './context';
3
3
  import { Credentials } from '../../types';
4
4
 
5
5
  export type VideoPluginProviderProps = {
@@ -9,6 +9,7 @@ export type VideoPluginProviderProps = {
9
9
  userId: number;
10
10
  role: UserRole;
11
11
  }) => Promise<void>;
12
+ videoSessionStatus?: SessionStatus;
12
13
  onInitVotingPreSession?: () => Promise<void>;
13
14
  onInitVotingSession?: () => Promise<void>;
14
15
  onCloseVotingSession?: () => Promise<void>;
@@ -2,6 +2,12 @@ import { Breakpoint } from '../../hooks/useDeviceSize';
2
2
  import { Credentials } from '../../types';
3
3
 
4
4
  export type UserRole = 'ATTENDEE' | 'PANELIST' | 'HOST';
5
+ export declare enum SessionStatus {
6
+ NOT_STARTED = "NOT_STARTED",
7
+ ONLY_PANELIST = "ONLY_PANELIST",
8
+ IN_PROGRESS = "IN_PROGRESS",
9
+ CLOSED = "CLOSED"
10
+ }
5
11
  export type VideoPluginContextType = {
6
12
  credentials: Credentials;
7
13
  changeUserRole?: (user: {
@@ -10,7 +16,7 @@ export type VideoPluginContextType = {
10
16
  }) => Promise<void>;
11
17
  breakpoint: Breakpoint;
12
18
  changePluginBreakpoint: (newBreakpoint: Breakpoint) => void;
13
- votingStarted: boolean;
19
+ sessionStatus: SessionStatus;
14
20
  initVotingPreSession: () => Promise<void>;
15
21
  initVotingSession: () => Promise<void>;
16
22
  closeVotingSession: () => Promise<void>;
@@ -4,7 +4,7 @@ import { MediaDevice, VideoPlayer } from '@zoom/videosdk';
4
4
  export type VideoContextType = {
5
5
  cameraList: MediaDevice[];
6
6
  activeCameraId: string;
7
- videoStarted: boolean;
7
+ selfVideoStarted: boolean;
8
8
  localVideoStarted: boolean;
9
9
  isBlurred: boolean;
10
10
  localVideoRef: MutableRefObject<HTMLVideoElement | null>;
@@ -24,6 +24,7 @@ export type VideoContextType = {
24
24
  selfShareCanvas: HTMLVideoElement | null;
25
25
  }) => Promise<void>;
26
26
  finishScreenSharing: () => Promise<void>;
27
+ checkIfUserIdRegisteredInCanvas: (userId: number) => boolean;
27
28
  };
28
29
  export declare const VideoContext: import('react').Context<VideoContextType>;
29
30
  export declare const useVideoContext: () => VideoContextType;
@@ -0,0 +1,2 @@
1
+ export { default } from './reducer';
2
+ export type { SessionState, SessionAction } from './types';
@@ -0,0 +1,4 @@
1
+ import { SessionAction, SessionState } from './types';
2
+
3
+ declare const sessionReducer: (state: SessionState, action: SessionAction) => SessionState;
4
+ export default sessionReducer;
@@ -0,0 +1,10 @@
1
+ import { SessionStatus } from '../../providers/VideoPluginProvider/context';
2
+
3
+ export type SessionState = {
4
+ status: SessionStatus;
5
+ };
6
+ export type ChangeSessionStatusAction = {
7
+ type: 'CHANGE-SESSION-STATUS';
8
+ status: SessionStatus;
9
+ };
10
+ export type SessionAction = ChangeSessionStatusAction;
@@ -1,9 +1,13 @@
1
+ import { SessionStatus } from '../providers/VideoPluginProvider/context';
1
2
  import { ChatAction, ChatState } from './chat';
2
3
  import { SpeakerTurnAction, SpeakerTurnState } from './speaker-turn';
3
4
 
4
5
  export type SharedState = {
5
6
  chatState: ChatState;
6
7
  speakerTurnState: SpeakerTurnState;
8
+ sessionState: {
9
+ status: SessionStatus;
10
+ };
7
11
  };
8
12
  export type AlertUserAction = {
9
13
  type: 'ALERT-USER';
@@ -18,4 +22,8 @@ export type SendStateAction = {
18
22
  type: 'SEND-SHARED-STATE';
19
23
  state: SharedState;
20
24
  };
21
- export type SharedAction = AlertUserAction | RequestStateAction | SendStateAction | SpeakerTurnAction | ChatAction;
25
+ export type SessionAction = {
26
+ type: 'CHANGE-SESSION-STATUS';
27
+ status: SessionStatus;
28
+ };
29
+ export type SharedAction = AlertUserAction | RequestStateAction | SendStateAction | SpeakerTurnAction | ChatAction | SessionAction;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fraku/video",
3
3
  "private": false,
4
- "version": "0.1.30",
4
+ "version": "0.1.32",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
@@ -1,8 +0,0 @@
1
- import { Participant } from '@zoom/videosdk';
2
-
3
- type ParticipantVideoProps = {
4
- user: Participant;
5
- className?: string;
6
- };
7
- declare const ParticipantVideo: ({ user, className }: ParticipantVideoProps) => import("react/jsx-runtime").JSX.Element;
8
- export default ParticipantVideo;