@xylink/xy-rtc-sdk 3.9.7 → 3.9.9

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,242 @@
1
+ /**
2
+ * Polling Lib Type Defined
3
+ *
4
+ * Created at : 2022-10-27 18:13:24
5
+ * Last modified : 2024-03-08 18:57:07
6
+ */
7
+ import { ILayoutState, IRoster } from './client';
8
+ import { ExternalTemplateConfig } from './layout';
9
+ /**
10
+ * 轮询多画面布局模型
11
+ *
12
+ * @property 1x1 - 对称1画面
13
+ * @property 2x1 - 对称2画面
14
+ * @property 3x1 - 对称3画面
15
+ * @property 4x1 - 对称4画面
16
+ * @property 4x2 - 非对称4画面
17
+ * @property 5x1 - 非对称5画面
18
+ * @property 6x1 - 对称6画面
19
+ * @property 6x2 - 非对称6画面
20
+ * @property 8x1 - 非对称8画面
21
+ * @property 9x1 - 对称9画面
22
+ */
23
+ export declare enum CustomizedMode {
24
+ '1x1' = "1x1",
25
+ '2x1' = "2x1",
26
+ '3x1' = "3x1",
27
+ '4x1' = "4x1",
28
+ '4x2' = "4x2",
29
+ '5x1' = "5x1",
30
+ '6x1' = "6x1",
31
+ '6x2' = "6x2",
32
+ '8x1' = "8x1",
33
+ '9x1' = "9x1"
34
+ }
35
+ /**
36
+ * 多画面布局成员位置属性
37
+ *
38
+ * @property SPEAKER - 语音激励
39
+ * @property SPECIFIED - 指定成员
40
+ * @property AUTO - 自动轮询
41
+ */
42
+ export declare enum CustomizedType {
43
+ 'SPEAKER' = "speaker",
44
+ 'SPECIFIED' = "specified",
45
+ 'AUTO' = "auto"
46
+ }
47
+ /**
48
+ * 轮询状态
49
+ *
50
+ * @property INIT - 初始化状态
51
+ * @property READY - 轮询准备状态
52
+ * @property PAUSE_MEETING - 会控轮询暂停状态
53
+ * @property PAUSE_SDK - SDK基于优先级暂停轮询状态
54
+ * @property POLLING - 正在轮询中
55
+ */
56
+ export declare enum PollingState {
57
+ 'INIT' = "INIT",
58
+ 'READY' = "READY",
59
+ 'PAUSE_MEETING' = "PAUSE_MEETING",
60
+ 'PAUSE_SDK' = "PAUSE_SDK",
61
+ 'POLLING' = "POLLING"
62
+ }
63
+ /**
64
+ * 自动轮询多画面状态
65
+ *
66
+ * @property NORMAL - 画面正常
67
+ * @property NO_JOINED - 未入会
68
+ * @property VIDEO_MUTE - 视频暂停
69
+ * @property NOT_FOUND - 未符合条件的终端
70
+ * @property NULL - 画面为空
71
+ */
72
+ export declare enum AutoState {
73
+ 'NORMAL' = "NORMAL",
74
+ 'NO_JOINED' = "NO_JOINED",
75
+ 'VIDEO_MUTE' = "VIDEO_MUTE",
76
+ 'NOT_FOUND' = "NOT_FOUND",
77
+ 'NULL' = "NULL"
78
+ }
79
+ export declare enum AutoPollingDataEntry {
80
+ 'FULL_ROSTER' = 0,
81
+ 'SPECIFIED' = 1
82
+ }
83
+ /**
84
+ * 会控指定成员基础数据
85
+ *
86
+ * @property { string } di - endpointId,参会者唯一ID
87
+ * @property { string } dn - deviceNumber,暂时未使用
88
+ */
89
+ export type BaseSpecifiedInfo = {
90
+ di: string;
91
+ dn: string;
92
+ };
93
+ /**
94
+ * 轮询布局模型
95
+ */
96
+ export type PollingModeItem = CustomizedMode | null;
97
+ /**
98
+ * 轮询模型状态
99
+ *
100
+ * @property { PollingModeItem } pre - 上一次轮询模型状态
101
+ * @property { PollingModeItem } next - 最新的轮询模型状态
102
+ */
103
+ export interface PollingMode {
104
+ pre: PollingModeItem;
105
+ next: PollingModeItem;
106
+ }
107
+ /**
108
+ * 封装轮询数据结构
109
+ *
110
+ * @property { string } endpointId - 参会者唯一ID
111
+ * @property { number } mediaGroupId - 参会者通道分组,0代表People,1代表Content
112
+ * @property { AutoState } state - 参会者当前画面状态
113
+ * @property { string } deviceName - 参会者名称
114
+ */
115
+ export interface BasePollingItem {
116
+ endpointId: string;
117
+ mediaGroupId: number;
118
+ state: AutoState;
119
+ deviceName?: string;
120
+ }
121
+ /**
122
+ * 指定轮询列表
123
+ *
124
+ * @property { number } index - 当前轮询的页码数(pollingList的索引位置),翻页使用
125
+ * @property { BasePollingItem[] } pollingList - 当前指定轮询成员列表数据
126
+ */
127
+ export interface SpecifiedMap {
128
+ index: number;
129
+ pollingList: BasePollingItem[];
130
+ }
131
+ /**
132
+ * 自动轮询列表
133
+ *
134
+ * @property { number } pageSize - 当前页成员数
135
+ * @property { number } totalPage - 总页数
136
+ * @property { number } currentPage - 当前页码
137
+ * @property { BasePollingItem[] } pollingList - 当前自动轮询成员列表数据
138
+ */
139
+ export interface AutoPollingMap {
140
+ pageSize: number;
141
+ totalPage: number;
142
+ currentPage: number;
143
+ pollingList: BasePollingItem[];
144
+ }
145
+ /**
146
+ * 会控自动轮询消息-基础数据结构
147
+ *
148
+ * @property { number[] } layout - 坐标系数,[x,y,w,h],分辨代表X、Y、Width、Height系数,由于是硬件16:9容器的系数,因此SDK无法使用
149
+ * @property { number } sequence - 当前位置的索引位
150
+ * @property { number } pollingInterval - 当前轮询间隔时间
151
+ * @property { BaseSpecifiedInfo[] } items - 轮询的成员列表数据
152
+ * @property { CustomizedType } type - 多画面布局成员位置属性
153
+ * @property { boolean } autoFill - 是否自动裁剪
154
+ * @property { boolean } pollingPause - 轮询多画面是否暂停,true代表暂停,false代表轮询中
155
+ */
156
+ export type CustomizedItem = {
157
+ layout: number[];
158
+ sequence: number;
159
+ pollingInterval: number;
160
+ items: BaseSpecifiedInfo[];
161
+ type: CustomizedType;
162
+ autoFill: boolean;
163
+ pollingPause: boolean;
164
+ };
165
+ /**
166
+ * 混合轮询多画面消息
167
+ *
168
+ * @property { boolean } mix - 是否是混合轮询
169
+ * @property { boolean } auto - 是否是自动轮询,true代表启用自动轮询
170
+ * @property { CustomizedItem[] } detail - 轮询多画面列表数据,包含每一项的详细配置数据
171
+ * @property { boolean } useAvc - 是否是AVC合并画面模式
172
+ * @property { string } modeType - 多画面类型,分svc/是否是AVC合并画面模式
173
+ * @property { object } exFlags - 针对avc的额外配置项
174
+ * @property { CustomizedMode } mode - 多画面布局模型
175
+ * @property { BaseSpecifiedInfo[] } autoSpecified - 自动轮询/手动轮询的指定轮询列表
176
+ * @property { boolean } polling - 是否是轮询模式,true代表正在轮询
177
+ * @property { boolean } templatePolling - 忽略
178
+ * @property { array } templateDetails - 忽略
179
+ * @property { boolean } skipUnjoined - 自动/指定论序时,是否忽略未入会终端
180
+ * @property { boolean } skipMuteVideo - 自动/指定轮询时,是否忽略视频关闭终端
181
+ */
182
+ export interface ICustomizedLayout {
183
+ mix: boolean;
184
+ auto: boolean;
185
+ detail: CustomizedItem[];
186
+ useAvc: boolean;
187
+ modeType: string;
188
+ exFlags: object;
189
+ mode: CustomizedMode;
190
+ autoSpecified: BaseSpecifiedInfo[];
191
+ polling: boolean;
192
+ templatePolling: boolean;
193
+ templateDetails: [];
194
+ skipUnjoined: boolean;
195
+ skipMuteVideo: boolean;
196
+ }
197
+ /**
198
+ * 多画面Layout数据
199
+ *
200
+ * @property { IRoster } roster - 参会者基本信息、状态信息,例如:用户名、麦克风/摄像头状态、是否是主会场等信息
201
+ * @property { ILayoutState } state - 当前参会者的画面状态信息,暂时未使用
202
+ * @property { any } rotate - 当前参会者的旋转信息,用于设置video标签样式
203
+ * @property { { left: string; top: string; width: string; height: string } } positionStyle - 当前参会者的位置样式
204
+ * @property { string } avatar - 人物头像
205
+ * @property { string } textAvatar - 名称头像
206
+ * @property { ExternalTemplateConfig } templateConfig - 忽略
207
+ * @property { { width: number; height: number } } positionInfo - 忽略
208
+ * @property { number[] } position - 忽略
209
+ * @property { boolean } deal - 忽略
210
+ * @property { number } index - 忽略
211
+ * @property { number } resolution - 忽略, 2.0.2以前的版本 自定义布局roster请流使用
212
+ * @property { number } quality - 忽略, 2.0.2以前的版本 自定义布局roster请流使用
213
+ * @property { AutoState } pollingState - 轮询多画面状态
214
+ * @property { string } pollingId - 多画面ID
215
+ * @property { string } pollingName - 多画面名称
216
+ */
217
+ export interface PollingLayout {
218
+ roster: IRoster | null;
219
+ state?: ILayoutState;
220
+ rotate?: any;
221
+ positionStyle?: {
222
+ left: string;
223
+ top: string;
224
+ width: string;
225
+ height: string;
226
+ };
227
+ avatar?: string;
228
+ textAvatar?: string;
229
+ templateConfig?: ExternalTemplateConfig;
230
+ position?: number[];
231
+ positionInfo?: {
232
+ width: number;
233
+ height: number;
234
+ };
235
+ deal?: boolean;
236
+ index?: number;
237
+ resolution?: number;
238
+ quality?: number;
239
+ pollingState?: AutoState;
240
+ pollingId?: string;
241
+ pollingName?: string;
242
+ }