@fraku/video 0.1.88 → 0.1.90
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/i18n/locales/ca.json.d.ts +8 -0
- package/dist/i18n/locales/de.json.d.ts +8 -0
- package/dist/i18n/locales/en.json.d.ts +8 -0
- package/dist/i18n/locales/es.json.d.ts +8 -0
- package/dist/i18n/locales/fr.json.d.ts +8 -0
- package/dist/index.cjs +79 -79
- package/dist/index.css +1 -1
- package/dist/index.js +11039 -10560
- package/dist/pages/MainSessionPage/Video/PinnedView/PinnedCompactView.d.ts +7 -0
- package/dist/pages/MainSessionPage/Video/PinnedView/PinnedGridView.d.ts +7 -0
- package/dist/pages/MainSessionPage/Video/PinnedView/PinnedTile.d.ts +11 -0
- package/dist/pages/MainSessionPage/Video/PinnedView/PinnedView.d.ts +9 -0
- package/dist/pages/MainSessionPage/Video/PinnedView/tests/PinnedCompactView.test.d.ts +1 -0
- package/dist/pages/MainSessionPage/Video/PinnedView/tests/PinnedTile.test.d.ts +1 -0
- package/dist/pages/MainSessionPage/Video/PinnedView/tests/PinnedView.test.d.ts +1 -0
- package/dist/pages/MainSessionPage/Video/PinnedView/tests/usePinnedTileAttachment.test.d.ts +1 -0
- package/dist/pages/MainSessionPage/Video/PinnedView/usePinnedTileAttachment.d.ts +4 -0
- package/dist/providers/SharedProvider/chatControlFallback.d.ts +1 -1
- package/dist/providers/SharedProvider/context.d.ts +6 -13
- package/dist/providers/VideoAttachmentState/types.d.ts +5 -3
- package/dist/providers/VideoProvider/context.d.ts +4 -2
- package/dist/shared/defaultState.d.ts +16 -0
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/pin/index.d.ts +3 -0
- package/dist/shared/pin/reducer.d.ts +6 -0
- package/dist/shared/pin/reducer.test.d.ts +1 -0
- package/dist/shared/pin/types.d.ts +24 -0
- package/dist/shared/types.d.ts +8 -2
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PinnedResolvedUser } from './PinnedView';
|
|
2
|
+
|
|
3
|
+
type PinnedCompactViewProps = {
|
|
4
|
+
pinnedUsers: PinnedResolvedUser[];
|
|
5
|
+
};
|
|
6
|
+
declare const PinnedCompactView: ({ pinnedUsers }: PinnedCompactViewProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
export default PinnedCompactView;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PinnedResolvedUser } from './PinnedView';
|
|
2
|
+
|
|
3
|
+
type PinnedGridViewProps = {
|
|
4
|
+
pinnedUsers: PinnedResolvedUser[];
|
|
5
|
+
};
|
|
6
|
+
declare const PinnedGridView: ({ pinnedUsers }: PinnedGridViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default PinnedGridView;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Participant } from '@zoom/videosdk';
|
|
2
|
+
|
|
3
|
+
export type PinnedTileVariant = 'grid' | 'primary' | 'thumbnail';
|
|
4
|
+
type PinnedTileProps = {
|
|
5
|
+
userId: number;
|
|
6
|
+
user: Participant | null;
|
|
7
|
+
isSpeaking: boolean;
|
|
8
|
+
variant?: PinnedTileVariant;
|
|
9
|
+
};
|
|
10
|
+
declare const PinnedTile: ({ userId, user, isSpeaking, variant }: PinnedTileProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default PinnedTile;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { VideoPlayer } from '@zoom/videosdk';
|
|
2
|
+
import { PinnedVideoAttachmentOwner } from '../../../../providers/VideoProvider/context';
|
|
3
|
+
|
|
4
|
+
export declare const usePinnedTileAttachment: (userId: number | null, videoElementRef: React.RefObject<VideoPlayer | null>, owner: PinnedVideoAttachmentOwner) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CommandChannelAction } from '../../shared';
|
|
2
2
|
|
|
3
|
-
type SupportedChatFallbackActionType = 'TOGGLE-HAND' | 'LOWER-USER-HAND' | 'TOGGLE-TURN-QUEUE' | 'TOGGLE-CHAT' | 'CHANGE-SESSION-STATUS' | 'REQUEST-HOST-ROLE' | 'GRANT-PARTICIPATION' | 'REVOKE-PARTICIPATION' | 'REVOKE-VIDEO-PARTICIPATION' | 'INVITE-TO-PARTICIPATE';
|
|
3
|
+
type SupportedChatFallbackActionType = 'TOGGLE-HAND' | 'LOWER-USER-HAND' | 'TOGGLE-TURN-QUEUE' | 'TOGGLE-CHAT' | 'CHANGE-SESSION-STATUS' | 'REQUEST-HOST-ROLE' | 'GRANT-PARTICIPATION' | 'REVOKE-PARTICIPATION' | 'REVOKE-VIDEO-PARTICIPATION' | 'INVITE-TO-PARTICIPATE' | 'SET-PINNED-USERS-FOR-EVERYONE' | 'PIN-FOR-EVERYONE' | 'UNPIN-FOR-EVERYONE';
|
|
4
4
|
export type SupportedChatFallbackAction = Extract<CommandChannelAction, {
|
|
5
5
|
type: SupportedChatFallbackActionType;
|
|
6
6
|
}>;
|
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
import { Participant } from '@zoom/videosdk';
|
|
2
|
-
import { SharedState } from '../../shared';
|
|
2
|
+
import { CHAT_STATE_DEFAULT, REQUEST_HOST_ROLE_STATE_DEFAULT, TURN_QUEUE_STATE_DEFAULT, SharedState } from '../../shared';
|
|
3
3
|
import { ParticipationPermissions } from '../../shared/participation/types';
|
|
4
4
|
import { SessionStatus } from '../VideoPluginProvider/context';
|
|
5
5
|
import { CommandChannelStatus } from './useCommandChannelController';
|
|
6
6
|
|
|
7
|
-
export
|
|
8
|
-
active: boolean;
|
|
9
|
-
timestamp: number;
|
|
10
|
-
};
|
|
11
|
-
export declare const TURN_QUEUE_STATE_DEFAULT: {
|
|
12
|
-
active: boolean;
|
|
13
|
-
timestamp: number;
|
|
14
|
-
};
|
|
15
|
-
export declare const REQUEST_HOST_ROLE_STATE_DEFAULT: {
|
|
16
|
-
userId: null;
|
|
17
|
-
timestamp: number;
|
|
18
|
-
};
|
|
7
|
+
export { CHAT_STATE_DEFAULT, REQUEST_HOST_ROLE_STATE_DEFAULT, TURN_QUEUE_STATE_DEFAULT };
|
|
19
8
|
export type SharedContextType = {
|
|
20
9
|
sharedState: SharedState;
|
|
21
10
|
requestSharedState: () => Promise<void>;
|
|
11
|
+
pinnedUserIds: number[];
|
|
12
|
+
pinForEveryone: (userId: number) => Promise<void>;
|
|
13
|
+
unpinUserForEveryone: (userId: number) => Promise<void>;
|
|
14
|
+
unpinForEveryone: () => Promise<void>;
|
|
22
15
|
speakerQueue: Participant[];
|
|
23
16
|
raisedHand: boolean;
|
|
24
17
|
toggleHand: () => Promise<void>;
|
|
@@ -5,13 +5,15 @@ import { ReactNode } from 'react';
|
|
|
5
5
|
* Priority order (highest to lowest):
|
|
6
6
|
* 1. SELF_SHARE - Current user sharing screen
|
|
7
7
|
* 2. OTHER_SHARE - Another user sharing screen
|
|
8
|
-
* 3.
|
|
9
|
-
* 4.
|
|
10
|
-
* 5.
|
|
8
|
+
* 3. PINNED_VIEW - Multi-panelist pinned grid (2-4 users)
|
|
9
|
+
* 4. OTHER_CAMERA - Other user's camera (single pin or active speaker)
|
|
10
|
+
* 5. SELF_CAMERA - Current user's camera
|
|
11
|
+
* 6. NONE - No video attached
|
|
11
12
|
*/
|
|
12
13
|
export declare enum VideoAttachmentMode {
|
|
13
14
|
SELF_SHARE = "self-share",// Self screen sharing - uses selfShareViewRef
|
|
14
15
|
OTHER_SHARE = "other-share",// Other user sharing - uses otherSharedVideoPlayerRef
|
|
16
|
+
PINNED_VIEW = "pinned-view",// Multi-panelist pinned grid - handled by PinnedView component
|
|
15
17
|
OTHER_CAMERA = "other-camera",// Other user camera - uses videoPlayerRef
|
|
16
18
|
SELF_CAMERA = "self-camera",// Self camera view - uses selfViewVideoPlayerRef
|
|
17
19
|
NONE = "none"
|
|
@@ -12,6 +12,8 @@ export type VirtualBackgroundState = {
|
|
|
12
12
|
activeCustomImageId: string | null;
|
|
13
13
|
};
|
|
14
14
|
export type BrowserPermissionState = 'granted' | 'denied' | 'prompt' | 'unknown';
|
|
15
|
+
export type PinnedVideoAttachmentOwner = `pinned-view:grid:${number}` | `pinned-view:primary:${number}` | `pinned-view:thumbnail:${number}`;
|
|
16
|
+
export type VideoAttachmentOwner = 'active-video' | PinnedVideoAttachmentOwner;
|
|
15
17
|
export type VideoContextType = {
|
|
16
18
|
activeCameraId: string;
|
|
17
19
|
selfCameraPermission: BrowserPermissionState;
|
|
@@ -20,11 +22,11 @@ export type VideoContextType = {
|
|
|
20
22
|
userId: number;
|
|
21
23
|
videoPlayer: VideoPlayer;
|
|
22
24
|
}) => Promise<void>;
|
|
23
|
-
attachUserVideo: (userId: number, videoElement: VideoPlayer) => Promise<void>;
|
|
25
|
+
attachUserVideo: (userId: number, videoElement: VideoPlayer, owner?: VideoAttachmentOwner) => Promise<void>;
|
|
24
26
|
cameraList: MediaDevice[];
|
|
25
27
|
checkIfUserIdRegisteredInCanvas: (userId: number) => boolean;
|
|
26
28
|
detachSharedVideo: (userId: number) => Promise<void>;
|
|
27
|
-
detachUserVideo: (userId: number) => Promise<void>;
|
|
29
|
+
detachUserVideo: (userId: number, owner?: VideoAttachmentOwner) => Promise<void>;
|
|
28
30
|
finishScreenSharing: () => Promise<void>;
|
|
29
31
|
localVideoRef: MutableRefObject<HTMLVideoElement | null>;
|
|
30
32
|
localVideoStarted: boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SharedState } from './types';
|
|
2
|
+
|
|
3
|
+
export declare const CHAT_STATE_DEFAULT: {
|
|
4
|
+
active: boolean;
|
|
5
|
+
timestamp: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const TURN_QUEUE_STATE_DEFAULT: {
|
|
8
|
+
active: boolean;
|
|
9
|
+
timestamp: number;
|
|
10
|
+
};
|
|
11
|
+
export declare const REQUEST_HOST_ROLE_STATE_DEFAULT: {
|
|
12
|
+
userId: null;
|
|
13
|
+
timestamp: number;
|
|
14
|
+
};
|
|
15
|
+
export declare const SHARED_STATE_DEFAULT: SharedState;
|
|
16
|
+
export declare const normalizeSharedState: (state: SharedState) => SharedState;
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { default } from './reducer';
|
|
2
|
+
export { CHAT_STATE_DEFAULT, REQUEST_HOST_ROLE_STATE_DEFAULT, SHARED_STATE_DEFAULT, TURN_QUEUE_STATE_DEFAULT, normalizeSharedState } from './defaultState';
|
|
2
3
|
export type { SharedState, CommandChannelAction, SharedReducerAction } from './types';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PinAction, PinState } from './types';
|
|
2
|
+
|
|
3
|
+
export declare const initialPinState: PinState;
|
|
4
|
+
export declare const normalizePinnedUserIds: (userIds: number[]) => number[];
|
|
5
|
+
declare const pinReducer: (state: PinState, action: PinAction) => PinState;
|
|
6
|
+
export default pinReducer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const MAX_PINNED_USERS = 4;
|
|
2
|
+
export type SetPinnedUsersForEveryoneAction = {
|
|
3
|
+
type: 'SET-PINNED-USERS-FOR-EVERYONE';
|
|
4
|
+
payload: {
|
|
5
|
+
userIds: number[];
|
|
6
|
+
};
|
|
7
|
+
timestamp: number;
|
|
8
|
+
};
|
|
9
|
+
export type PinForEveryoneAction = {
|
|
10
|
+
type: 'PIN-FOR-EVERYONE';
|
|
11
|
+
payload: {
|
|
12
|
+
userId: number;
|
|
13
|
+
};
|
|
14
|
+
timestamp: number;
|
|
15
|
+
};
|
|
16
|
+
export type UnpinForEveryoneAction = {
|
|
17
|
+
type: 'UNPIN-FOR-EVERYONE';
|
|
18
|
+
timestamp: number;
|
|
19
|
+
};
|
|
20
|
+
export type PinAction = SetPinnedUsersForEveryoneAction | PinForEveryoneAction | UnpinForEveryoneAction;
|
|
21
|
+
export type PinState = {
|
|
22
|
+
pinnedUserIds: number[];
|
|
23
|
+
lastActionTimestamp: number;
|
|
24
|
+
};
|
package/dist/shared/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SessionStatus } from '../providers/VideoPluginProvider/context';
|
|
2
2
|
import { ChatAction, ChatState } from './chat';
|
|
3
3
|
import { GrantParticipationAction, InviteToParticipateAction, ParticipationPermissions, RevokeParticipationAction, RevokeVideoParticipationAction } from './participation/types';
|
|
4
|
+
import { PinAction, PinState } from './pin';
|
|
4
5
|
import { RequestHostRoleAction } from './request-host-role';
|
|
5
6
|
import { SessionAction } from './session-info';
|
|
6
7
|
import { SpeakerTurnAction, SpeakerTurnState } from './speaker-turn';
|
|
@@ -18,6 +19,7 @@ export type SharedState = {
|
|
|
18
19
|
timestamp: number;
|
|
19
20
|
};
|
|
20
21
|
participationPermissions: ParticipationPermissions;
|
|
22
|
+
pinState: PinState;
|
|
21
23
|
};
|
|
22
24
|
export type AlertUserAction = {
|
|
23
25
|
type: 'ALERT-USER';
|
|
@@ -36,6 +38,10 @@ export type ResetSharedStateAction = {
|
|
|
36
38
|
type: 'RESET-SHARED-STATE';
|
|
37
39
|
state: SharedState;
|
|
38
40
|
};
|
|
41
|
+
export type ClearPinnedUserAction = {
|
|
42
|
+
type: 'CLEAR-PINNED-USER';
|
|
43
|
+
userId: number;
|
|
44
|
+
};
|
|
39
45
|
export type RequestStateRecoveryAction = {
|
|
40
46
|
type: 'REQUEST-STATE-RECOVERY';
|
|
41
47
|
requesterUserId: number;
|
|
@@ -48,5 +54,5 @@ export type SendStateRecoveryAction = {
|
|
|
48
54
|
responderUserId: number;
|
|
49
55
|
responderRole: 'host' | 'manager' | 'attendee';
|
|
50
56
|
};
|
|
51
|
-
export type CommandChannelAction = AlertUserAction | RequestStateAction | SendStateAction | RequestStateRecoveryAction | SendStateRecoveryAction | SpeakerTurnAction | ChatAction | SessionAction | RequestHostRoleAction | GrantParticipationAction | RevokeParticipationAction | RevokeVideoParticipationAction | InviteToParticipateAction;
|
|
52
|
-
export type SharedReducerAction = CommandChannelAction | ResetSharedStateAction;
|
|
57
|
+
export type CommandChannelAction = AlertUserAction | RequestStateAction | SendStateAction | RequestStateRecoveryAction | SendStateRecoveryAction | SpeakerTurnAction | ChatAction | SessionAction | RequestHostRoleAction | GrantParticipationAction | RevokeParticipationAction | RevokeVideoParticipationAction | InviteToParticipateAction | PinAction;
|
|
58
|
+
export type SharedReducerAction = CommandChannelAction | ResetSharedStateAction | ClearPinnedUserAction;
|