call-live-sdk1 0.0.20 → 0.0.22

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.
@@ -0,0 +1,36 @@
1
+ import React from 'react';
2
+ import { CallUser } from '@/components/RtcJoomRoom';
3
+ /**
4
+ * 视频流绑定配置参数
5
+ */
6
+ export interface UseVideoSlotBindingParams {
7
+ item: any;
8
+ livePlayerRef: React.RefObject<any>;
9
+ fenge: string;
10
+ }
11
+ /**
12
+ * 视频流绑定 Hook 返回值
13
+ */
14
+ export interface UseVideoSlotBindingReturn {
15
+ /** 当前选中的视频流值 */
16
+ selectedValue: string;
17
+ /** 设置选中的视频流值 */
18
+ setSelectedValue: (value: string) => void;
19
+ /** 目标用户信息 */
20
+ targetUser: CallUser | undefined;
21
+ /** 处理视频流选择变化 */
22
+ handleStreamChange: (value: string, option: any) => void;
23
+ }
24
+ /**
25
+ * 视频流绑定 Hook
26
+ *
27
+ * 负责管理视频槽的绑定逻辑,包括:
28
+ * - 管理选中的视频流值
29
+ * - 处理视频流选择变化(绑定/解绑)
30
+ * - 计算当前绑定的目标用户
31
+ * - 监听用户状态变化,自动绑定/解绑视频流
32
+ *
33
+ * @param params - 视频流绑定配置参数
34
+ * @returns 视频流绑定状态和处理函数
35
+ */
36
+ export declare const useVideoSlotBinding: ({ item, livePlayerRef, fenge, }: UseVideoSlotBindingParams) => UseVideoSlotBindingReturn;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * 视频流选项类型
3
+ */
4
+ export interface VideoStreamOption {
5
+ label: string;
6
+ value: string;
7
+ disabled?: boolean;
8
+ isVideoEnabled?: boolean;
9
+ rtc_userid?: string;
10
+ nickname?: string;
11
+ isScreenEnabled?: boolean;
12
+ }
13
+ /**
14
+ * 视频流列表 Hook 返回值
15
+ */
16
+ export interface UseVideoSlotStreamsReturn {
17
+ /** 可用的视频流列表 */
18
+ availableStreams: VideoStreamOption[];
19
+ /** 分隔符 */
20
+ fenge: string;
21
+ }
22
+ /**
23
+ * 视频流列表 Hook
24
+ *
25
+ * 负责计算当前可绑定的远程视频流列表,包括:
26
+ * - 过滤等待中的用户
27
+ * - 过滤画板用户
28
+ * - 为每个用户生成摄像头和屏幕共享选项
29
+ *
30
+ * @returns 可用的视频流列表和分隔符
31
+ */
32
+ export declare const useVideoSlotStreams: () => UseVideoSlotStreamsReturn;