@fraku/video 0.1.89 → 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 +5 -0
- package/dist/i18n/locales/de.json.d.ts +5 -0
- package/dist/i18n/locales/en.json.d.ts +5 -0
- package/dist/i18n/locales/es.json.d.ts +5 -0
- package/dist/i18n/locales/fr.json.d.ts +5 -0
- package/dist/index.cjs +66 -66
- package/dist/index.css +1 -1
- package/dist/index.js +10309 -10089
- 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 +2 -1
- package/dist/providers/VideoAttachmentState/types.d.ts +5 -3
- package/dist/providers/VideoProvider/context.d.ts +4 -2
- package/dist/shared/pin/index.d.ts +3 -2
- package/dist/shared/pin/reducer.d.ts +1 -0
- package/dist/shared/pin/types.d.ts +10 -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' | 'PIN-FOR-EVERYONE' | 'UNPIN-FOR-EVERYONE';
|
|
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
|
}>;
|
|
@@ -8,8 +8,9 @@ export { CHAT_STATE_DEFAULT, REQUEST_HOST_ROLE_STATE_DEFAULT, TURN_QUEUE_STATE_D
|
|
|
8
8
|
export type SharedContextType = {
|
|
9
9
|
sharedState: SharedState;
|
|
10
10
|
requestSharedState: () => Promise<void>;
|
|
11
|
-
|
|
11
|
+
pinnedUserIds: number[];
|
|
12
12
|
pinForEveryone: (userId: number) => Promise<void>;
|
|
13
|
+
unpinUserForEveryone: (userId: number) => Promise<void>;
|
|
13
14
|
unpinForEveryone: () => Promise<void>;
|
|
14
15
|
speakerQueue: Participant[];
|
|
15
16
|
raisedHand: boolean;
|
|
@@ -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;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export { default, initialPinState } from './reducer';
|
|
2
|
-
export type { PinAction, PinForEveryoneAction, PinState, UnpinForEveryoneAction } from './types';
|
|
1
|
+
export { default, initialPinState, normalizePinnedUserIds } from './reducer';
|
|
2
|
+
export type { PinAction, PinForEveryoneAction, PinState, SetPinnedUsersForEveryoneAction, UnpinForEveryoneAction } from './types';
|
|
3
|
+
export { MAX_PINNED_USERS } from './types';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PinAction, PinState } from './types';
|
|
2
2
|
|
|
3
3
|
export declare const initialPinState: PinState;
|
|
4
|
+
export declare const normalizePinnedUserIds: (userIds: number[]) => number[];
|
|
4
5
|
declare const pinReducer: (state: PinState, action: PinAction) => PinState;
|
|
5
6
|
export default pinReducer;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
};
|
|
1
9
|
export type PinForEveryoneAction = {
|
|
2
10
|
type: 'PIN-FOR-EVERYONE';
|
|
3
11
|
payload: {
|
|
@@ -9,8 +17,8 @@ export type UnpinForEveryoneAction = {
|
|
|
9
17
|
type: 'UNPIN-FOR-EVERYONE';
|
|
10
18
|
timestamp: number;
|
|
11
19
|
};
|
|
12
|
-
export type PinAction = PinForEveryoneAction | UnpinForEveryoneAction;
|
|
20
|
+
export type PinAction = SetPinnedUsersForEveryoneAction | PinForEveryoneAction | UnpinForEveryoneAction;
|
|
13
21
|
export type PinState = {
|
|
14
|
-
|
|
22
|
+
pinnedUserIds: number[];
|
|
15
23
|
lastActionTimestamp: number;
|
|
16
24
|
};
|