@fraku/video 0.1.87 → 0.1.88
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.
|
@@ -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;
|