@xylink/xy-rtc-sdk 3.9.7 → 3.9.8

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.
@@ -67,15 +67,6 @@ export declare const SPEAKER_TEMPLATE: {
67
67
  };
68
68
  type: TemplateType;
69
69
  quality: VideoQuality;
70
- } | {
71
- position: number[];
72
- resolution: {
73
- normal: StreamResolutionLevel;
74
- low: StreamResolutionLevel;
75
- high?: undefined;
76
- };
77
- type: TemplateType;
78
- quality?: undefined;
79
70
  } | {
80
71
  position: number[];
81
72
  resolution: {
@@ -95,15 +86,6 @@ export declare const SPEAKER_TEMPLATE: {
95
86
  };
96
87
  type: TemplateType;
97
88
  quality: VideoQuality;
98
- } | {
99
- position: number[];
100
- resolution: {
101
- normal: StreamResolutionLevel;
102
- low: StreamResolutionLevel;
103
- high?: undefined;
104
- };
105
- type: TemplateType;
106
- quality?: undefined;
107
89
  } | {
108
90
  position: number[];
109
91
  resolution: {
@@ -123,15 +105,6 @@ export declare const SPEAKER_TEMPLATE: {
123
105
  };
124
106
  type: TemplateType;
125
107
  quality: VideoQuality;
126
- } | {
127
- position: number[];
128
- resolution: {
129
- normal: StreamResolutionLevel;
130
- low: StreamResolutionLevel;
131
- high?: undefined;
132
- };
133
- type: TemplateType;
134
- quality?: undefined;
135
108
  } | {
136
109
  position: number[];
137
110
  resolution: {
@@ -151,15 +124,6 @@ export declare const SPEAKER_TEMPLATE: {
151
124
  };
152
125
  type: TemplateType;
153
126
  quality: VideoQuality;
154
- } | {
155
- position: number[];
156
- resolution: {
157
- normal: StreamResolutionLevel;
158
- low: StreamResolutionLevel;
159
- high?: undefined;
160
- };
161
- type: TemplateType;
162
- quality?: undefined;
163
127
  } | {
164
128
  position: number[];
165
129
  resolution: {
@@ -179,15 +143,6 @@ export declare const SPEAKER_TEMPLATE: {
179
143
  };
180
144
  type: TemplateType;
181
145
  quality: VideoQuality;
182
- } | {
183
- position: number[];
184
- resolution: {
185
- normal: StreamResolutionLevel;
186
- low: StreamResolutionLevel;
187
- high?: undefined;
188
- };
189
- type: TemplateType;
190
- quality?: undefined;
191
146
  } | {
192
147
  position: number[];
193
148
  resolution: {
@@ -208,8 +163,9 @@ export declare const GALLERY_TEMPLATE: {
208
163
  high: StreamResolutionLevel;
209
164
  };
210
165
  type: TemplateType;
166
+ quality: VideoQuality;
211
167
  }[];
212
- '2-1': ({
168
+ '2-1': {
213
169
  position: number[];
214
170
  resolution: {
215
171
  normal: StreamResolutionLevel;
@@ -218,17 +174,8 @@ export declare const GALLERY_TEMPLATE: {
218
174
  };
219
175
  type: TemplateType;
220
176
  quality: VideoQuality;
221
- } | {
222
- position: number[];
223
- resolution: {
224
- normal: StreamResolutionLevel;
225
- low: StreamResolutionLevel;
226
- high: StreamResolutionLevel;
227
- };
228
- type: TemplateType;
229
- quality?: undefined;
230
- })[];
231
- '3-1': ({
177
+ }[];
178
+ '3-1': {
232
179
  position: number[];
233
180
  resolution: {
234
181
  normal: number;
@@ -236,16 +183,8 @@ export declare const GALLERY_TEMPLATE: {
236
183
  };
237
184
  type: TemplateType;
238
185
  quality: VideoQuality;
239
- } | {
240
- position: number[];
241
- resolution: {
242
- normal: number;
243
- low: StreamResolutionLevel;
244
- };
245
- type: TemplateType;
246
- quality?: undefined;
247
- })[];
248
- '4-1': ({
186
+ }[];
187
+ '4-1': {
249
188
  position: number[];
250
189
  resolution: {
251
190
  normal: number;
@@ -253,16 +192,8 @@ export declare const GALLERY_TEMPLATE: {
253
192
  };
254
193
  type: TemplateType;
255
194
  quality: VideoQuality;
256
- } | {
257
- position: number[];
258
- resolution: {
259
- normal: number;
260
- low: StreamResolutionLevel;
261
- };
262
- type: TemplateType;
263
- quality?: undefined;
264
- })[];
265
- '5-1': ({
195
+ }[];
196
+ '5-1': {
266
197
  position: number[];
267
198
  resolution: {
268
199
  normal: StreamResolutionLevel;
@@ -270,15 +201,7 @@ export declare const GALLERY_TEMPLATE: {
270
201
  };
271
202
  type: TemplateType;
272
203
  quality: VideoQuality;
273
- } | {
274
- position: number[];
275
- resolution: {
276
- normal: StreamResolutionLevel;
277
- low: StreamResolutionLevel;
278
- };
279
- type: TemplateType;
280
- quality?: undefined;
281
- })[];
204
+ }[];
282
205
  '6-1': {
283
206
  position: number[];
284
207
  resolution: {
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Polling layout template data
3
+ *
4
+ * @authors Luo-jinghui (luojinghui424@gmail.com)
5
+ * @date 2024-02-26 16:41:38
6
+ */
7
+ import { Template } from '../../type';
8
+ export declare const POLLING_TEMPLATE: Template;
@@ -78,3 +78,10 @@ export declare const TYPEOF: {
78
78
  isSpecialChar(val: any): boolean;
79
79
  isWhiteSpace(val: any): boolean;
80
80
  };
81
+ /**
82
+ * JSON字符串转对象
83
+ *
84
+ * @param { unknown } jsonString
85
+ * @returns { object}
86
+ */
87
+ export declare const jsonParse: (jsonString: unknown) => any;
@@ -3,7 +3,8 @@ import VideoManager from '../main/videoManager';
3
3
  import { IInternals, StreamResolution, StreamResolutionLevel, VideoQuality } from './stream';
4
4
  import { SupportLocalLanguages } from '../enum';
5
5
  import { ICloudRoomConfig } from './meeting';
6
- import { ContentTemplateMode, ExternalTemplateConfig, TemplateMode } from './layout';
6
+ import { ChairManReason, ContentTemplateMode, ExternalTemplateConfig, TemplateMode } from './layout';
7
+ import { AutoState } from './polling';
7
8
  /**
8
9
  * 向Client推送流类型
9
10
  *
@@ -144,23 +145,6 @@ export declare enum ContentMode {
144
145
  'VIDEO' = "VIDEO",
145
146
  'BOTH' = "BOTH"
146
147
  }
147
- /**
148
- * 埋点数据上报类型
149
- *
150
- * @param click 点击
151
- * @param msgCallback 消息回调
152
- * @param server server消息
153
- * @param trigger 触发事件类型
154
- */
155
- export type TStateAction = 'click' | 'msgCallback' | 'server' | 'trigger';
156
- /**
157
- * 埋点数据上报
158
- */
159
- export type TCategory = 'sta-confStatus' | 'oper-confOperation' | 'sta-msgCallback' | 'oper-setting';
160
- /**
161
- * 事件名称
162
- */
163
- export type TEventName = 'callIn' | 'layout' | 'content' | 'audioMute' | 'audioUnmute' | 'videoMute' | 'videoUnmute' | 'subtitle' | string;
164
148
  /**
165
149
  * 轮询多画面状态
166
150
  *
@@ -385,12 +369,12 @@ export type IOPERATE_MAP = {
385
369
  /**
386
370
  * 配置画面数据
387
371
  *
388
- * @property { string } calluri 设备url
389
- * @property { StreamResolutionLevel } resolution 分辨率
390
- * @property { VideoQuality } quality 质量
391
- * @property { number } mediagroupid 0:people画面,1:content共享画面
392
- * @property { boolean } isContent 是否是共享内容,NewLayout版本无此参数,使用mediagroupid配置参数;
393
- * @property { string } callUri NewLayout版本无此参数
372
+ * @property { string } calluri - 设备url
373
+ * @property { StreamResolutionLevel } resolution - 分辨率
374
+ * @property { VideoQuality } quality - 质量
375
+ * @property { number } mediagroupid - 0:people画面,1:content共享画面
376
+ * @property { boolean } isContent - 是否是共享内容,NewLayout版本无此参数,使用mediagroupid配置参数;
377
+ * @property { string } callUri - NewLayout版本无此参数
394
378
  */
395
379
  export type IReqInfo = {
396
380
  calluri: string;
@@ -646,6 +630,7 @@ export declare enum ConferenceMode {
646
630
  * @property { IMuteSpeaker } isMuteSpeaker 禁止收听
647
631
  * @property { boolean } recordIsDisabled 录制权限
648
632
  * @property { ConferenceMode } conferenceMode 会议模式
633
+ * @property { string } customizedLayout 轮询多画面控制Json字符串
649
634
  */
650
635
  export interface IMeetingControl {
651
636
  callIndex: number;
@@ -661,6 +646,7 @@ export interface IMeetingControl {
661
646
  recordIsDisabled: boolean;
662
647
  groupInfoList: IGroupInfo[];
663
648
  conferenceMode: ConferenceMode;
649
+ customizedLayout: string;
664
650
  }
665
651
  /**
666
652
  * Roster:参会者的基本信息,包含基本信息,设备信息,画面信息等
@@ -763,12 +749,13 @@ export declare enum MuteReason {
763
749
  /**
764
750
  * Conf Change消息
765
751
  *
766
- * @property { number } participantCount 当前会议参会者总人数,不包含共享内容设备数量,包含local
767
- * @property { number } totalEpCount 当前会议参会者总人数,包含共享内容、指挥调度客户端等设备数量, 包含local
768
- * @property { string } chairManUrl 当前会议主会场/主画面设备的callUrl,没有为'', 如果设置Local为主会场,则此值也为''
769
- * @property { string } contentUri 当前会议共享内容设别的callUrl,没有为''
770
- * @property { string } actSpkUri 当前会议语音激励者的callUrl,没有为''
771
- * @property { IMediaGroupInfo[] } mediaGroupnfo 多分组通人数信息,默认上报0和1分组,分别代表People通道和Content通道
752
+ * @property { number } participantCount - 当前会议参会者总人数,不包含共享内容设备数量,包含local
753
+ * @property { number } totalEpCount - 当前会议参会者总人数,包含共享内容、指挥调度客户端等设备数量, 包含local
754
+ * @property { string } chairManUrl - 当前主画面设备的callUrl,没有为''
755
+ * @property { string } contentUri - 当前会议共享内容设别的callUrl,没有为''
756
+ * @property { string } actSpkUri - 当前会议语音激励者的callUrl,没有为''
757
+ * @property { IMediaGroupInfo[] } mediaGroupnfo - 多分组通人数信息,默认上报0和1分组,分别代表People通道和Content通道
758
+ * @property { ChairManReason } ChairManReason - 主画面对应的模式,默认是主会场模式
772
759
  */
773
760
  export interface IConfInfo {
774
761
  participantCount: number;
@@ -777,13 +764,13 @@ export interface IConfInfo {
777
764
  contentUri: string;
778
765
  actSpkUri: string;
779
766
  mediaGroupInfo: IMediaGroupInfo[];
767
+ chairManReason: ChairManReason;
780
768
  }
781
769
  /**
782
770
  * 缓存Conf Change消息
783
771
  */
784
772
  export interface IPreConfInfo extends IConfInfo {
785
773
  isChairmanMode?: boolean;
786
- isFocusMode?: boolean;
787
774
  }
788
775
  export interface IMediaGroupInfo {
789
776
  endpointCount: number;
@@ -827,9 +814,12 @@ export interface ISpeakerInfo {
827
814
  * @property { number } index 忽略
828
815
  * @property { number } resolution 忽略, 2.0.2以前的版本 自定义布局roster请流使用
829
816
  * @property { number } quality 忽略, 2.0.2以前的版本 自定义布局roster请流使用
817
+ * @property { AutoState } pollingState 轮询多画面状态
818
+ * @property { string } pollingId - 多画面ID
819
+ * @property { string } pollingName - 多画面名称
830
820
  */
831
821
  export interface ILayout {
832
- roster: IRoster;
822
+ roster: IRoster | null;
833
823
  state?: ILayoutState;
834
824
  rotate?: any;
835
825
  positionStyle?: {
@@ -850,6 +840,9 @@ export interface ILayout {
850
840
  index?: number;
851
841
  resolution?: number;
852
842
  quality?: number;
843
+ pollingState?: AutoState;
844
+ pollingId?: string;
845
+ pollingName?: string;
853
846
  }
854
847
  /**
855
848
  * Local布局对象
@@ -1103,11 +1096,20 @@ export declare enum AutoMute {
1103
1096
  export interface IGetConferenceParams {
1104
1097
  autoMute: AutoMute;
1105
1098
  }
1099
+ /**
1100
+ * 录制相关信息
1101
+ *
1102
+ * @property { string } recordSessionId - sessionId
1103
+ */
1104
+ export interface IRecordInfo {
1105
+ recordSessionId: string;
1106
+ }
1106
1107
  /**
1107
1108
  * 本地录制结果上报
1108
1109
  *
1109
1110
  * @property { string } reason - 成功STATE:200
1110
1111
  * @property { RecordingState } state - 录制状态
1112
+ * @property { string } recordInfo - 录制相关信息
1111
1113
  * @property { boolean } isRecorded - ignore
1112
1114
  * @property { string } controlUri - ignore
1113
1115
  * @property { string } reasonText - ignore
@@ -1115,6 +1117,7 @@ export interface IGetConferenceParams {
1115
1117
  export interface IRecordingStateChanged {
1116
1118
  reason: string;
1117
1119
  state: RecordingState;
1120
+ recordInfo: IRecordInfo;
1118
1121
  isRecorded: boolean;
1119
1122
  controlUri: string;
1120
1123
  reasonText: string;
@@ -1136,6 +1139,7 @@ export interface IRecordStatusNotification {
1136
1139
  callerUri: string;
1137
1140
  status: string;
1138
1141
  isLocal: boolean;
1142
+ recordInfo: IRecordInfo;
1139
1143
  }
1140
1144
  /**
1141
1145
  * 录制权限
@@ -1387,37 +1391,49 @@ export interface IStreamCapability {
1387
1391
  resolution: StreamResolutionLevel;
1388
1392
  }
1389
1393
  /**
1390
- * 是否是联席主持人
1394
+ * 焦点画面动作
1391
1395
  *
1392
- * @param ON - 是
1393
- * @param OFF - 否
1396
+ * @param START - 指定焦点画面
1397
+ * @param STOP - 取消焦点画面
1394
1398
  */
1395
- export declare enum CoChair {
1396
- ON = "on",
1397
- OFF = "off"
1399
+ export declare enum FocusViewAction {
1400
+ START = "start",
1401
+ STOP = "stop"
1398
1402
  }
1399
1403
  /**
1400
- * 信令上报的消息
1401
- *
1402
- * @property { number } subType - 消息类型
1403
- * @property { number } content - 消息详细内容
1404
- * @property { CoChair } content.coChair - 是否是联席主持人
1404
+ * 上报终端状态-事件类型
1405
1405
  */
1406
- export interface Notification {
1407
- subType: number;
1408
- content: {
1409
- coChair: CoChair;
1410
- };
1411
- requestId: string;
1406
+ export declare enum StateCategory {
1407
+ STA_CONFSTATUS = "sta-confStatus",
1408
+ OPER_CONFOPERATION = "oper-confOperation",
1409
+ STA_MSGCALLBACK = "sta-msgCallback",
1410
+ OPER_SETTING = "oper-setting"
1412
1411
  }
1413
1412
  /**
1414
- * 焦点画面动作
1413
+ * 上报终端状态-事件名称
1414
+ */
1415
+ export declare enum StateEventName {
1416
+ CALL_IN = "callIn",
1417
+ LAYOUT = "layout",
1418
+ CONTENT = "content",
1419
+ AUDIO_MUTE = "audioMute",
1420
+ AUDIO_UNMUTE = "audioUnmute",
1421
+ VIDEO_MUTE = "videoMute",
1422
+ VIDEO_UNMUTE = "videoUnmute",
1423
+ SUBTITLE = "subtitle",
1424
+ COMPLEX_CAPABILITIES = "complexCapabilities",
1425
+ MMS_CAPABILITIES = "mmsCapabilities"
1426
+ }
1427
+ /**
1428
+ * 上报终端状态参数
1415
1429
  *
1416
- * @param START - 指定焦点画面
1417
- * @param STOP - 取消焦点画面
1430
+ * @property { StateCategory } category - 事件类型
1431
+ * @property { StateEventName } eventName - 事件名称
1432
+ * @property { Object } params - 事件详细数据
1418
1433
  */
1419
- export declare enum FocusViewAction {
1420
- START = "start",
1421
- STOP = "stop"
1434
+ export interface IStateParams {
1435
+ category: StateCategory;
1436
+ eventName: StateEventName;
1437
+ params?: Object;
1422
1438
  }
1423
1439
  export {};
@@ -16,3 +16,4 @@ export * from './quality';
16
16
  export * from './peer';
17
17
  export * from './logger';
18
18
  export * from './iauth';
19
+ export * from './polling';
@@ -186,17 +186,15 @@ export declare enum FocusViewKind {
186
186
  /**
187
187
  * 焦点画面参数
188
188
  *
189
- * @property { string } viewId - 指定的主画面的RosterId
189
+ * @property { boolean } isFocusMode - 是否显示焦点画面布局,Content/全屏模式 优先级更高
190
190
  * @property { TemplateType } type - 画面类型
191
191
  * @property { IRoster|null } roster - 焦点画面roster信息
192
- * @property { string } rosterId - 焦点画面rosterId
193
192
  * @property { FocusViewKind } kind - 来源
194
193
  */
195
194
  export interface FocusViewConfig {
196
- viewId: string;
195
+ isFocusMode: boolean;
197
196
  type: TemplateType;
198
197
  roster: IRoster | null;
199
- rosterId?: string;
200
198
  kind?: FocusViewKind;
201
199
  }
202
200
  /**
@@ -221,3 +219,48 @@ export interface LayoutConfig {
221
219
  isForceSharedLayout?: boolean;
222
220
  localSharedMaxViewCount?: number;
223
221
  }
222
+ /**
223
+ * 主画面来源
224
+ *
225
+ * @param MAIN_VENUE mainVenue - 主会场模式
226
+ * @param FOCUS_MODE focusMode - 焦点模式
227
+ */
228
+ export declare enum ChairManReason {
229
+ NONE = "",
230
+ MAIN_VENUE = "mainVenue",
231
+ FOCUS_MODE = "focusMode"
232
+ }
233
+ /**
234
+ * RosterId 分割信息
235
+ *
236
+ * @property { string } endpointId - 参会者callUri字段
237
+ * @property { string } mediagroupId - 多分组ID
238
+ */
239
+ export interface IRosterIdInfo {
240
+ endpointId: string;
241
+ mediagroupId: string;
242
+ }
243
+ export interface Template {
244
+ [key: string]: {
245
+ rate: number | undefined;
246
+ temp: any;
247
+ };
248
+ }
249
+ export interface TemplateItem {
250
+ position: number[];
251
+ resolution: {
252
+ normal: StreamResolutionLevel;
253
+ low?: StreamResolutionLevel;
254
+ high?: StreamResolutionLevel;
255
+ };
256
+ type: TemplateType;
257
+ quality: VideoQuality;
258
+ }
259
+ /**
260
+ * Layout状态,当前仅支持上报轮询多画面状态
261
+ *
262
+ * @property { boolean } isPolling - 是否增在轮询中,true代表正在轮询中,false代表结束/暂停轮询状态
263
+ */
264
+ export interface LayoutState {
265
+ isPolling: boolean;
266
+ }
@@ -2,7 +2,7 @@
2
2
  * Meeting Lib Type Defined
3
3
  *
4
4
  * Created at : 2022-10-27 18:13:24
5
- * Last modified : 2022-10-27 19:25:49
5
+ * Last modified : 2024-02-27 18:45:17
6
6
  */
7
7
  import { ILoginInfo } from './client';
8
8
  import { LayoutAvatarType } from './layout';
@@ -83,3 +83,63 @@ export interface IMediaConfigParam {
83
83
  export interface IEnterpriseConfig {
84
84
  userAvatarMode?: LayoutAvatarType;
85
85
  }
86
+ /**
87
+ * 是否是联席主持人
88
+ *
89
+ * @param NONE - 默认值
90
+ * @param ON - 是
91
+ * @param OFF - 否
92
+ */
93
+ export declare enum CoChair {
94
+ NONE = "none",
95
+ ON = "on",
96
+ OFF = "off"
97
+ }
98
+ /**
99
+ * 是否是主持人
100
+ *
101
+ * @param NONE - 默认值
102
+ * @param ON - 是
103
+ * @param OFF - 否
104
+ */
105
+ export declare enum Host {
106
+ NONE = "none",
107
+ ON = "on",
108
+ OFF = "off"
109
+ }
110
+ /**
111
+ * 是否有改名权限
112
+ *
113
+ * @param ON - 是
114
+ * @param OFF - 否
115
+ */
116
+ export declare enum EnableRename {
117
+ ON = "on",
118
+ OFF = "off"
119
+ }
120
+ /**
121
+ * 信令上报的消息
122
+ *
123
+ * @property { CoChair } coChair - 是否是联席主持人
124
+ * @property { Host } host - 是否是主持人
125
+ * @property { EnableRename } enableRename - 是否有改名权限
126
+ * @property { string } meetingId - 会议ID
127
+ */
128
+ export interface NotificationContent {
129
+ coChair?: CoChair;
130
+ host?: Host;
131
+ enableRename?: EnableRename;
132
+ meetingId?: string;
133
+ }
134
+ /**
135
+ * 联席主持人/主持人/改名权限 等消息
136
+ *
137
+ * @property { number } subType - 消息类型
138
+ * @property { NotificationContent } content - 消息详细内容
139
+ * @property { string } requestId - 消息ID
140
+ */
141
+ export interface Notification {
142
+ subType: number;
143
+ content: NotificationContent;
144
+ requestId: string;
145
+ }