call-live-sdk1 0.0.11 → 0.0.13

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.
Files changed (50) hide show
  1. package/dist/assets/style.CQrOViFp.css +1 -0
  2. package/dist/assets/style.css +1 -1
  3. package/dist/call-live-sdk.es.js +31900 -32069
  4. package/dist/call-live-sdk.umd.js +1 -1
  5. package/dist/components/CallGridLayout.d.ts +1 -1
  6. package/dist/components/CallSingleColumnLayout.d.ts +1 -1
  7. package/dist/components/CallUserVideo.d.ts +1 -1
  8. package/dist/components/DrawingTools/LayoutSwitcher.d.ts +1 -1
  9. package/dist/components/ErrorPage/ErrorPage.d.ts +1 -1
  10. package/dist/components/GlobalErrorBoundary.d.ts +1 -1
  11. package/dist/components/RightSidebar/components/CallComponent/features/meeting/components/MeetingUserList.d.ts +1 -1
  12. package/dist/components/RightSidebar/components/CallComponent/features/meeting/hooks/useCallConfig.d.ts +1 -1
  13. package/dist/components/RightSidebar/components/CallComponent/features/meeting/hooks/useOnlineUsers.d.ts +2 -2
  14. package/dist/components/RightSidebar/components/CallComponent/shared/ui/CallUser.d.ts +1 -1
  15. package/dist/components/RightSidebar/components/CallComponent/types/index.d.ts +1 -1
  16. package/dist/components/RtcJoomRoom/types.d.ts +1 -1
  17. package/dist/components/RtcJoomRoom/useRoomMessageHandler.d.ts +3 -3
  18. package/dist/pages/MobileLive/components/UserVideoContainer.d.ts +1 -1
  19. package/dist/pages/MobileLive/components/VideoSwipeContainer.d.ts +1 -1
  20. package/dist/stats-prod.html +1 -1
  21. package/dist/stores/activitytype.d.ts +2 -15
  22. package/dist/stores/call.d.ts +1 -5
  23. package/dist/stores/callStore.d.ts +1 -219
  24. package/dist/stores/commentChatUrl.d.ts +1 -4
  25. package/dist/stores/commentRtmpStats.d.ts +1 -4
  26. package/dist/stores/commentSocket.d.ts +1 -20
  27. package/dist/stores/counterStore.d.ts +1 -8
  28. package/dist/stores/currentUser.d.ts +1 -5
  29. package/dist/stores/drawingToolsStore.d.ts +1 -34
  30. package/dist/stores/guest.d.ts +1 -7
  31. package/dist/stores/liveInfo.d.ts +1 -9
  32. package/dist/stores/livepushcode.d.ts +2 -13
  33. package/dist/stores/sdkStore.d.ts +2 -47
  34. package/dist/types/stores/activitytype.d.ts +13 -0
  35. package/dist/types/stores/call.d.ts +4 -0
  36. package/dist/types/stores/callStore.d.ts +327 -0
  37. package/dist/types/stores/commentChatUrl.d.ts +4 -0
  38. package/dist/types/stores/commentRtmpStats.d.ts +4 -0
  39. package/dist/types/stores/commentSocket.d.ts +20 -0
  40. package/dist/types/stores/counterStore.d.ts +7 -0
  41. package/dist/types/stores/currentUser.d.ts +4 -0
  42. package/dist/types/stores/drawingToolsStore.d.ts +34 -0
  43. package/dist/types/stores/guest.d.ts +6 -0
  44. package/dist/types/stores/liveInfo.d.ts +8 -0
  45. package/dist/types/stores/livepushcode.d.ts +11 -0
  46. package/dist/types/stores/sdkStore.d.ts +34 -0
  47. package/dist/utils/utiles.d.ts +5 -0
  48. package/package.json +2 -1
  49. package/dist/assets/style.DcMyBSL2.css +0 -1
  50. package/dist/hooks/useVideoElementDetector.d.ts +0 -37
@@ -1,16 +1,4 @@
1
- interface ActivityTypeData {
2
- active_type: number;
3
- [key: string]: any;
4
- }
5
- interface ActivityTypeStore {
6
- activityType: ActivityTypeData;
7
- isLoading: boolean;
8
- error: string | null;
9
- fetchActivityType: (live_id: number) => Promise<ActivityTypeData | undefined>;
10
- setActivityType: (type: ActivityTypeData) => void;
11
- getActiveType: () => number;
12
- clearActivityType: () => void;
13
- }
1
+ import { ActivityTypeData, ActivityTypeStore } from '../types/stores/activitytype';
14
2
  /**
15
3
  * 直播活动类型状态存储
16
4
  * 用于管理直播活动类型的获取和状态
@@ -41,8 +29,7 @@ export declare const useActivityTypeError: () => string;
41
29
  * @returns 包含fetchActivityType等方法的对象
42
30
  */
43
31
  export declare const useActivityTypeActions: () => {
44
- fetchActivityType: (live_id: number) => Promise<ActivityTypeData | undefined>;
32
+ fetchActivityType: (live_id: number) => Promise<ActivityTypeData>;
45
33
  setActivityType: (type: ActivityTypeData) => void;
46
34
  clearActivityType: () => void;
47
35
  };
48
- export {};
@@ -1,6 +1,2 @@
1
- interface CallStateType {
2
- status: 0 | 1;
3
- setStatus: (status: 0 | 1) => void;
4
- }
1
+ import { CallStateType } from '../types/stores/call';
5
2
  export declare const useCallStore: import("zustand").UseBoundStore<import("zustand").StoreApi<CallStateType>>;
6
- export {};
@@ -1,221 +1,4 @@
1
- import * as fabric from 'fabric';
2
- import { LoginResponseData, RTCMasterConfigResponse } from '@/api';
3
- /**
4
- * 视频类型枚举
5
- * 用于区分不同类型的视频流
6
- */
7
- export declare enum VideoType {
8
- /** 摄像头视频 */
9
- CAMERA = "video",
10
- /** 屏幕共享 */
11
- SCREEN = "screen",
12
- /** 主画面 */
13
- MAIN = "main",
14
- /** 屏幕共享主画面 */
15
- SCREEN_MAIN = "screenmain",
16
- /** 自视频 */
17
- SELF = "self"
18
- }
19
- /**
20
- * 用户状态枚举
21
- * 用于标识用户在等候模式下的状态
22
- */
23
- export declare enum WaitingModeState {
24
- /** 未开启等候模式 */
25
- NOT_ENABLED = 0,
26
- /** 等候中 */
27
- WAITING = 1,
28
- /** 已准入 */
29
- ADMITTED = 2
30
- }
31
- export interface CallUser extends LoginResponseData {
32
- device: string;
33
- isVideoDisabled?: boolean;
34
- isAudioDisabled?: boolean;
35
- isVideoEnabled?: boolean;
36
- isAudioEnabled?: boolean;
37
- isScreenEnabled?: boolean;
38
- joinTime?: number;
39
- waiting_mode_state: WaitingModeState;
40
- videoList: [id: string, screenId: string, mainId: string];
41
- isPublishStream?: boolean;
42
- isVideoCapture?: boolean;
43
- isSubscribeAudio?: boolean;
44
- }
45
- export declare enum LayoutMode {
46
- MAIN_PLUS_LIST = "main_plus_list",// 主画布+连麦列表
47
- GRID = "grid"
48
- }
49
- export interface StreamAreaConfig {
50
- width: number;
51
- height: number;
52
- aspectRatio: number;
53
- }
54
- export interface LayoutCalculation {
55
- mainArea: {
56
- x: number;
57
- y: number;
58
- width: number;
59
- height: number;
60
- } | null;
61
- callAreas: Array<{
62
- x: number;
63
- y: number;
64
- width: number;
65
- height: number;
66
- userId: string;
67
- domId?: string;
68
- nickname?: string;
69
- device: string;
70
- isVideoEnabled?: boolean;
71
- isAudioEnabled?: boolean;
72
- isScreenEnabled?: boolean;
73
- }>;
74
- }
75
- export type RuleType = '' | 'main' | 'sub';
76
- interface Scene {
77
- fabricObject: fabric.Object[];
78
- documentInfo: any;
79
- audioStates: Map<any, any>;
80
- documentIndex: number;
81
- documentScrollLeft: number;
82
- }
83
- interface Scenes {
84
- [key: string]: Scene;
85
- }
86
- export interface CallConfig extends RTCMasterConfigResponse, LoginResponseData {
87
- rule: RuleType;
88
- isCall: boolean;
89
- isAudioEnabled: boolean;
90
- isScreenEnabled: boolean;
91
- isVideoEnabled: boolean;
92
- micConnectPermission: 0 | 1;
93
- backgroundImg: string;
94
- media_devices: {
95
- cameraId: string;
96
- microphoneId: string;
97
- mirrorEnabled: boolean;
98
- } | null;
99
- }
100
- export interface CallStoreState {
101
- getter: () => Partial<CallStoreState>;
102
- getInitialScenes: () => Scenes;
103
- fabricObjects: fabric.Object[];
104
- setFabricObjects: (objects: fabric.Object[] | ((prev: fabric.Object[]) => fabric.Object[])) => void;
105
- documentInfo: any;
106
- setDocumentInfo: (info: any) => void;
107
- currentScene: string;
108
- setCurrentScene: (scene: string) => void;
109
- documentScrollLeft: number;
110
- setDocumentScrollLeft: (value: number) => void;
111
- documentIndex: number;
112
- setDocumentIndex: (value: number) => void;
113
- scenes: Scenes;
114
- setScenes: (scenes: Scenes | ((prev: Scenes) => Scenes)) => void;
115
- updateScene: (sceneKey: string, scene: Partial<Scene> | ((prev: Scene) => Partial<Scene>)) => void;
116
- callConfig: CallConfig;
117
- callCurrentUser: CallUser | undefined;
118
- mainCanvasId: string;
119
- currentMainVideoType: Exclude<VideoType, VideoType.CAMERA>;
120
- isVoiceChatOpen: boolean;
121
- isRightSidebarCollapsed: boolean;
122
- callUsers: CallUser[];
123
- layoutMode: LayoutMode;
124
- rtc: any;
125
- fabricInstance: any;
126
- compositeCanvasRef: HTMLCanvasElement | null;
127
- compositeContextRef: CanvasRenderingContext2D | null;
128
- callAudioStreamsRef: MediaStream[];
129
- videoList: (CallUser & {
130
- domId: string;
131
- })[];
132
- callUsersCurrentPageRef: number;
133
- offscreenCanvasRef: HTMLCanvasElement | null;
134
- offscreenContextRef: CanvasRenderingContext2D | null;
135
- backgroundImageRef: HTMLImageElement | null;
136
- lastBackgroundImgUrlRef: string;
137
- toggleRightSidebar: (collapsed?: boolean) => void;
138
- removeCallUser: (userId: string) => void;
139
- kickRoomUser: (userId: string, forbiddenInterval?: number) => Promise<void>;
140
- updateCallConfig: (updates: Partial<CallConfig>) => void;
141
- updateCallUser: (userId: string, updates: Partial<CallUser>) => CallUser | undefined;
142
- activeUsers: CallUser[];
143
- waitingUsers: CallUser[];
144
- joinCallUser: (remoteUser?: CallUser) => CallUser | false;
145
- addRemoteUser: (remoteUser: CallUser) => CallUser | false;
146
- addLocalUser: () => CallUser | false;
147
- isUserExists: (rtc_userid: string) => boolean;
148
- validateCallConfig: () => {
149
- isValid: boolean;
150
- errors: string[];
151
- };
152
- leave: (liveId?: number, agentId?: number) => void;
153
- leaveRemoteUser: (userId: string) => void;
154
- switchLayoutMode: (mode: LayoutMode) => void;
155
- calculateLayout: () => LayoutCalculation;
156
- calculateMainPlusListLayout: (width: number, height: number) => LayoutCalculation;
157
- calculateGridLayout: (width: number, height: number) => LayoutCalculation;
158
- calculateMainOnlyLayout: (width: number, height: number) => LayoutCalculation;
159
- initCompositeCanvas: () => HTMLCanvasElement | null;
160
- renderCompositeFrameSmooth: () => void;
161
- setMainCanvasId: (mainCanvasId: string) => void;
162
- setCallUsers: (callUsers: CallUser[]) => void;
163
- setCallConfig: (callConfig: CallConfig) => void;
164
- setIsVoiceChatOpen: (isVoiceChatOpen: boolean) => void;
165
- setCallCurrentUser: (callCurrentUser: CallUser | undefined) => void;
166
- setCurrentMainVideoType: (currentMainVideoType: Exclude<VideoType, VideoType.CAMERA>) => void;
167
- getCallConfig: () => CallConfig;
168
- setRtc: (rtc: any) => void;
169
- setFabricInstance: (fabricInstance: any) => void;
170
- setCompositeCanvasRef: (compositeCanvasRef: HTMLCanvasElement | null) => void;
171
- setCompositeContextRef: (compositeContextRef: CanvasRenderingContext2D | null) => void;
172
- setCallAudioStreamsRef: (callAudioStreamsRef: MediaStream[]) => void;
173
- setVideoList: (videoList: (CallUser & {
174
- domId: string;
175
- })[]) => void;
176
- setCallUsersCurrentPageRef: (callUsersCurrentPageRef: number) => void;
177
- setOffscreenCanvasRef: (offscreenCanvasRef: HTMLCanvasElement | null) => void;
178
- setOffscreenContextRef: (offscreenContextRef: CanvasRenderingContext2D | null) => void;
179
- setBackgroundImageRef: (backgroundImageRef: HTMLImageElement | null) => void;
180
- setLastBackgroundImgUrlRef: (lastBackgroundImgUrlRef: string) => void;
181
- filterCallUsers: (a: Partial<CallUser>) => CallUser[];
182
- drawUserVideoContent: (context: CanvasRenderingContext2D, videoElement: HTMLVideoElement, user: any, x: number, y: number, width: number, height: number) => void;
183
- drawUserInfo: (context: CanvasRenderingContext2D, user: any, x: number, y: number, width: number, height: number) => void;
184
- drawStatusIndicators: (context: CanvasRenderingContext2D, user: any, x: number, y: number, width: number) => void;
185
- drawStatusIndicator: (context: CanvasRenderingContext2D, x: number, y: number, width: number, statusY: number, offset: number, type: 'audio' | 'video') => void;
186
- renderEmptyUserArea: (context: CanvasRenderingContext2D, user: any, x: number, y: number, width: number, height: number) => void;
187
- canvasRequestRenderAll: () => void;
188
- findCallUserById: (id: string) => CallUser | undefined;
189
- changeAudioState: (id: string, isAudio: boolean) => void;
190
- changeVideoState: (id: string, isVideo: boolean) => void;
191
- toggleAudio: (isAudio?: boolean) => Promise<{
192
- success: boolean;
193
- message: string;
194
- isEnabled?: boolean;
195
- error?: any;
196
- }>;
197
- toggleVideo: (isVideo?: boolean) => Promise<{
198
- success: boolean;
199
- message: string;
200
- isEnabled?: boolean;
201
- error?: any;
202
- }>;
203
- toggleScreenShare: (isScreen?: boolean) => Promise<{
204
- success: boolean;
205
- message: string;
206
- isEnabled?: boolean;
207
- error?: any;
208
- }>;
209
- callAudioMixing: () => void;
210
- handleRemoteUserPublishScreen: (event: {
211
- userId: string;
212
- mediaType: any;
213
- }) => void;
214
- handleRemoteUserUnpublishScreen: (event: {
215
- userId: string;
216
- mediaType: any;
217
- }) => Promise<void>;
218
- }
1
+ import { CallStoreState } from '../types/stores/callStore';
219
2
  export declare const useCallStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<CallStoreState>, "subscribe"> & {
220
3
  subscribe: {
221
4
  (listener: (selectedState: CallStoreState, previousSelectedState: CallStoreState) => void): () => void;
@@ -225,4 +8,3 @@ export declare const useCallStore: import("zustand").UseBoundStore<Omit<import("
225
8
  }): () => void;
226
9
  };
227
10
  }>;
228
- export {};
@@ -1,6 +1,3 @@
1
- interface CommentChatUrlState {
2
- webTransportUrl: string;
3
- fetChatUrl: (params: any) => Promise<void>;
4
- }
1
+ import { CommentChatUrlState } from '../types/stores/commentChatUrl';
5
2
  declare const useCommentChatUrlStore: import("zustand").UseBoundStore<import("zustand").StoreApi<CommentChatUrlState>>;
6
3
  export default useCommentChatUrlStore;
@@ -1,6 +1,3 @@
1
- interface CommentRtmpStatsState {
2
- rtmpStats: any;
3
- setRtmpStats: (stats: any) => void;
4
- }
1
+ import { CommentRtmpStatsState } from '../types/stores/commentRtmpStats';
5
2
  declare const useCommentRtmpStatsStore: import("zustand").UseBoundStore<import("zustand").StoreApi<CommentRtmpStatsState>>;
6
3
  export default useCommentRtmpStatsStore;
@@ -1,23 +1,4 @@
1
- interface MessageData {
2
- type: 'comment_delete' | 'chat_forward' | 'activity_config_change' | string;
3
- data: Record<string, any>;
4
- }
5
- interface WebSocketMessage {
6
- data: string;
7
- }
8
- interface CommentSocketState {
9
- chat_url: string;
10
- commentItem: Record<string, any>;
11
- commentDeleteItem: Record<string, any>;
12
- activityConfigChange: Record<string, any>;
13
- rtmUrl: string;
14
- webTransportUrl: string;
15
- readyState: number;
16
- latestMessage: WebSocketMessage | undefined;
17
- sendMessage: ((message: string) => void) | undefined;
18
- disconnect: (() => void) | undefined;
19
- fetChatUrl: (id: number) => Promise<void>;
20
- }
1
+ import { MessageData, WebSocketMessage, CommentSocketState } from '../types/stores/commentSocket';
21
2
  declare const useCommentSocketStore: import("zustand").UseBoundStore<import("zustand").StoreApi<CommentSocketState>>;
22
3
  export declare function useCommentSocket(): {
23
4
  setCallback: (callback: (message: MessageData['data']) => void) => void;
@@ -1,9 +1,2 @@
1
- interface CounterState {
2
- count: number;
3
- increment: () => void;
4
- decrement: () => void;
5
- reset: () => void;
6
- incrementBy: (amount: number) => void;
7
- }
1
+ import { CounterState } from '../types/stores/counterStore';
8
2
  export declare const useCounterStore: import("zustand").UseBoundStore<import("zustand").StoreApi<CounterState>>;
9
- export {};
@@ -1,6 +1,2 @@
1
- interface CurrentUserState {
2
- currentUser: any | null;
3
- setCurrentUser: (user: any | null) => void;
4
- }
1
+ import { CurrentUserState } from '../types/stores/currentUser';
5
2
  export declare const useCurrentUserStore: import("zustand").UseBoundStore<import("zustand").StoreApi<CurrentUserState>>;
6
- export {};
@@ -1,36 +1,3 @@
1
- interface DrawingToolsState {
2
- selectedTool: number;
3
- setSelectedTool: (tool: number) => void;
4
- penSize: number;
5
- setPenSize: (size: number | ((prev: number) => number)) => void;
6
- penColor: string;
7
- setPenColor: (color: string | ((prev: string) => string)) => void;
8
- laserPenSize: number;
9
- setLaserPenSize: (size: number | ((prev: number) => number)) => void;
10
- laserPenColor: string;
11
- setLaserPenColor: (color: string | ((prev: string) => string)) => void;
12
- shapeSize: number;
13
- setShapeSize: (size: number | ((prev: number) => number)) => void;
14
- shapeType: string;
15
- setShapeType: (type: string | ((prev: string) => string)) => void;
16
- shapeColor: string;
17
- setShapeColor: (color: string | ((prev: string) => string)) => void;
18
- textSize: number;
19
- setTextSize: (size: number | ((prev: number) => number)) => void;
20
- textColor: string;
21
- setTextColor: (color: string | ((prev: string) => string)) => void;
22
- isPreviewModalVisible: boolean;
23
- setIsPreviewModalVisible: (visible: boolean) => void;
24
- downPoint: {
25
- current: any;
26
- };
27
- upPoint: {
28
- current: any;
29
- };
30
- currentShape: {
31
- current: any;
32
- };
33
- getter: () => any;
34
- }
1
+ import { DrawingToolsState } from '../types/stores/drawingToolsStore';
35
2
  declare const useDrawingToolsStore: import("zustand").UseBoundStore<import("zustand").StoreApi<DrawingToolsState>>;
36
3
  export default useDrawingToolsStore;
@@ -1,8 +1,2 @@
1
- interface GuestStateType {
2
- status: 0 | 1;
3
- deviceType: 'pc' | 'mobile';
4
- setDeviceType: (deviceType: 'pc' | 'mobile') => void;
5
- setStatus: (status: 0 | 1) => void;
6
- }
1
+ import { GuestStateType } from '../types/stores/guest';
7
2
  export declare const useGuestStore: import("zustand").UseBoundStore<import("zustand").StoreApi<GuestStateType>>;
8
- export {};
@@ -1,11 +1,4 @@
1
- interface LiveInfoState {
2
- data: any;
3
- loading: boolean;
4
- error: Error | undefined;
5
- run: (live_id: string | number) => void;
6
- cancel: () => void;
7
- refresh: () => void;
8
- }
1
+ import { LiveInfoState } from '../types/stores/liveInfo';
9
2
  export declare const useLiveInfoStore: import("zustand").UseBoundStore<import("zustand").StoreApi<LiveInfoState>>;
10
3
  export declare function useLiveInfo(): {
11
4
  requestResult: import("ahooks/lib/useRequest/src/types").Result<any, [live_id: any]>;
@@ -18,4 +11,3 @@ export declare function useLiveInfo(): {
18
11
  };
19
12
  export declare const getLiveInfoState: () => LiveInfoState;
20
13
  export declare const setLiveInfoState: (partial: LiveInfoState | Partial<LiveInfoState> | ((state: LiveInfoState) => LiveInfoState | Partial<LiveInfoState>), replace?: boolean) => void;
21
- export {};
@@ -1,14 +1,4 @@
1
- interface LivePushCode {
2
- [key: string]: any;
3
- }
4
- interface LivePushCodeStore {
5
- livePushCode: LivePushCode | null;
6
- isLoading: boolean;
7
- error: string | null;
8
- fetchLivePush: (live_id: number) => Promise<LivePushCode | undefined>;
9
- setLivePushCode: (code: LivePushCode) => void;
10
- clearLivePushCode: () => void;
11
- }
1
+ import { LivePushCode, LivePushCodeStore } from '../types/stores/livepushcode';
12
2
  /**
13
3
  * 直播推流码状态存储
14
4
  * 用于管理直播推流码的获取和状态
@@ -33,5 +23,4 @@ export declare const useLivePushCodeError: () => string;
33
23
  * 获取直播推流码获取方法的Hook
34
24
  * @returns 获取推流码的方法
35
25
  */
36
- export declare const useFetchLivePushCode: () => (live_id: number) => Promise<LivePushCode | undefined>;
37
- export {};
26
+ export declare const useFetchLivePushCode: () => (live_id: number) => Promise<LivePushCode>;
@@ -1,49 +1,5 @@
1
- import { CallSDKConfig, GuestSDKConfig } from '../types/sdk';
2
- export declare enum ErrorSeverity {
3
- /** 严重错误,需要显示错误页面 */
4
- SEVERE = "severe",
5
- /** 非严重错误,只需要弹出窗口提示 */
6
- WARNING = "warning"
7
- }
8
- export declare enum GlobalErrorType {
9
- /** 接口报错 */
10
- API_ERROR = "api_error",
11
- /** Token过期 */
12
- TOKEN_EXPIRED = "token_expired",
13
- /** SDK参数校验错误 */
14
- PARAM_VALIDATION_ERROR = "param_validation_error",
15
- /** 其他错误 */
16
- OTHER_ERROR = "other_error"
17
- }
18
- export interface GlobalError {
19
- type: GlobalErrorType;
20
- code: number;
21
- message: string;
22
- details?: any;
23
- /** 错误严重程度 */
24
- severity: ErrorSeverity;
25
- }
26
- interface SdkStore {
27
- styleConfig: {
28
- minHeight: number;
29
- minWidth: number;
30
- };
31
- callConfig: CallSDKConfig | null;
32
- setCallConfig: (config: CallSDKConfig) => void;
33
- getLiveId: () => number | undefined;
34
- getApiDomain: () => string;
35
- /**
36
- * 获取当前SDK配置
37
- * @returns 当前SDK配置对象或null
38
- */
39
- getAgentId: () => number | undefined;
40
- updateCallConfig: (partialConfig: Partial<CallSDKConfig>) => void;
41
- guestConfig: GuestSDKConfig | null;
42
- setGuestConfig: (config: GuestSDKConfig) => void;
43
- globalError: GlobalError | null;
44
- setGlobalError: (error: GlobalError | null) => void;
45
- clearGlobalError: () => void;
46
- }
1
+ import { CallSDKConfig } from '../types/sdk';
2
+ import { SdkStore } from '../types/stores/sdkStore';
47
3
  /**
48
4
  * SDK配置状态存储
49
5
  * 用于管理SDK的全局配置,包括直播ID等关键信息
@@ -59,4 +15,3 @@ export declare const useSdkConfig: () => CallSDKConfig;
59
15
  * @returns 直播ID字符串或undefined
60
16
  */
61
17
  export declare const useLiveId: () => number;
62
- export {};
@@ -0,0 +1,13 @@
1
+ export interface ActivityTypeData {
2
+ active_type: number;
3
+ [key: string]: any;
4
+ }
5
+ export interface ActivityTypeStore {
6
+ activityType: ActivityTypeData;
7
+ isLoading: boolean;
8
+ error: string | null;
9
+ fetchActivityType: (live_id: number) => Promise<ActivityTypeData | undefined>;
10
+ setActivityType: (type: ActivityTypeData) => void;
11
+ getActiveType: () => number;
12
+ clearActivityType: () => void;
13
+ }
@@ -0,0 +1,4 @@
1
+ export interface CallStateType {
2
+ status: 0 | 1;
3
+ setStatus: (status: 0 | 1) => void;
4
+ }