@fraku/video 0.1.87 → 0.1.89
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 +3 -0
- package/dist/i18n/locales/de.json.d.ts +3 -0
- package/dist/i18n/locales/en.json.d.ts +3 -0
- package/dist/i18n/locales/es.json.d.ts +3 -0
- package/dist/i18n/locales/fr.json.d.ts +3 -0
- package/dist/index.cjs +96 -96
- package/dist/index.css +1 -1
- package/dist/index.js +11121 -10828
- package/dist/providers/SharedProvider/chatControlFallback.d.ts +1 -1
- package/dist/providers/SharedProvider/context.d.ts +5 -13
- package/dist/providers/VideoAttachmentState/VideoAttachmentState.d.ts +4 -2
- package/dist/providers/VideoAttachmentState/context.d.ts +1 -0
- package/dist/providers/VideoAttachmentState/types.d.ts +2 -0
- package/dist/shared/defaultState.d.ts +16 -0
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/pin/index.d.ts +2 -0
- package/dist/shared/pin/reducer.d.ts +5 -0
- package/dist/shared/pin/reducer.test.d.ts +1 -0
- package/dist/shared/pin/types.d.ts +16 -0
- package/dist/shared/types.d.ts +8 -2
- package/package.json +1 -1
|
@@ -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' | 'PIN-FOR-EVERYONE' | 'UNPIN-FOR-EVERYONE';
|
|
4
4
|
export type SupportedChatFallbackAction = Extract<CommandChannelAction, {
|
|
5
5
|
type: SupportedChatFallbackActionType;
|
|
6
6
|
}>;
|
|
@@ -1,24 +1,16 @@
|
|
|
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
|
+
pinnedUserId: number | null;
|
|
12
|
+
pinForEveryone: (userId: number) => Promise<void>;
|
|
13
|
+
unpinForEveryone: () => Promise<void>;
|
|
22
14
|
speakerQueue: Participant[];
|
|
23
15
|
raisedHand: boolean;
|
|
24
16
|
toggleHand: () => Promise<void>;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { VideoAttachmentStateProviderProps } from './types';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* VideoAttachmentStateProvider determines which video container should have video attached
|
|
4
|
+
* VideoAttachmentStateProvider determines which video container should have video attached
|
|
5
|
+
* and which participant should be displayed in the active-video area.
|
|
5
6
|
*
|
|
6
7
|
* Responsibilities:
|
|
7
8
|
* - Centralizes logic for determining attachment mode
|
|
8
9
|
* - Enforces priority order: self-share > other-share > other-camera > self-camera > none
|
|
9
|
-
* -
|
|
10
|
+
* - Gates attendee camera attachment when the attendee lacks video permission
|
|
11
|
+
* - Exposes userId (SDK attachment target) and displayUserId (UI display target) separately
|
|
10
12
|
*
|
|
11
13
|
* This provider does NOT handle actual attach/detach operations.
|
|
12
14
|
* Those are handled by the useVideoAttachment hook in UserVideo component.
|
|
@@ -3,6 +3,7 @@ import { VideoAttachmentMode } from './types';
|
|
|
3
3
|
export type VideoAttachmentStateContextType = {
|
|
4
4
|
mode: VideoAttachmentMode;
|
|
5
5
|
userId: number | null;
|
|
6
|
+
displayUserId: number | null;
|
|
6
7
|
};
|
|
7
8
|
export declare const VideoAttachmentStateContext: import('react').Context<VideoAttachmentStateContextType | undefined>;
|
|
8
9
|
export declare const useVideoAttachmentState: () => VideoAttachmentStateContextType;
|
|
@@ -21,10 +21,12 @@ export declare enum VideoAttachmentMode {
|
|
|
21
21
|
*
|
|
22
22
|
* @property mode - Current attachment mode (which container should have video)
|
|
23
23
|
* @property userId - User ID whose video should be attached (null when mode is NONE)
|
|
24
|
+
* @property displayUserId - User ID whose tile should render in the active-video area (may differ from userId when camera is blocked)
|
|
24
25
|
*/
|
|
25
26
|
export type VideoAttachmentState = {
|
|
26
27
|
mode: VideoAttachmentMode;
|
|
27
28
|
userId: number | null;
|
|
29
|
+
displayUserId: number | null;
|
|
28
30
|
};
|
|
29
31
|
export type VideoAttachmentStateProviderProps = {
|
|
30
32
|
children: ReactNode;
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type PinForEveryoneAction = {
|
|
2
|
+
type: 'PIN-FOR-EVERYONE';
|
|
3
|
+
payload: {
|
|
4
|
+
userId: number;
|
|
5
|
+
};
|
|
6
|
+
timestamp: number;
|
|
7
|
+
};
|
|
8
|
+
export type UnpinForEveryoneAction = {
|
|
9
|
+
type: 'UNPIN-FOR-EVERYONE';
|
|
10
|
+
timestamp: number;
|
|
11
|
+
};
|
|
12
|
+
export type PinAction = PinForEveryoneAction | UnpinForEveryoneAction;
|
|
13
|
+
export type PinState = {
|
|
14
|
+
pinnedUserId: number | null;
|
|
15
|
+
lastActionTimestamp: number;
|
|
16
|
+
};
|
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;
|