@xylink/xy-rtc-sdk 3.9.3 → 3.9.4
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.
- package/lib/main/client.d.ts +9 -3
- package/lib/main/helper.d.ts +9 -1
- package/lib/main/layout/index.d.ts +32 -8
- package/lib/type/client.d.ts +10 -1
- package/lib/type/layout.d.ts +22 -4
- package/lib/xyrtc.cjs.js +1 -1
- package/lib/xyrtc.umd.js +1 -1
- package/package.json +1 -1
package/lib/main/client.d.ts
CHANGED
|
@@ -348,10 +348,10 @@ export default class Client extends Emitter {
|
|
|
348
348
|
/**
|
|
349
349
|
* 切换主画面
|
|
350
350
|
*
|
|
351
|
-
* @param { string }
|
|
352
|
-
* @returns { Promise<string> }
|
|
351
|
+
* @param { string } rosterId 指定切换到主画面的rosterId
|
|
352
|
+
* @returns { Promise<string> } rosterId
|
|
353
353
|
*/
|
|
354
|
-
setFocusView(
|
|
354
|
+
setFocusView(rosterId: string): Promise<string>;
|
|
355
355
|
/**
|
|
356
356
|
* AUTO布局 分页
|
|
357
357
|
*
|
|
@@ -834,6 +834,12 @@ export default class Client extends Emitter {
|
|
|
834
834
|
* @param { OperateType } type - 操作类型
|
|
835
835
|
*/
|
|
836
836
|
emitVideoStatus(type: OperateType): void;
|
|
837
|
+
/**
|
|
838
|
+
* 入会成功后,再上报焦点画面
|
|
839
|
+
*
|
|
840
|
+
* @param { IRoster | null } focusRoster - 焦点画面
|
|
841
|
+
*/
|
|
842
|
+
emitFocusView(focusRoster: IRoster | null): void;
|
|
837
843
|
/**
|
|
838
844
|
* 发布 自动布局/自定义布局 layout布局信息(参会人最新的布局列表数据)
|
|
839
845
|
*
|
package/lib/main/helper.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @email luojinghui424@gmail.com
|
|
6
6
|
*
|
|
7
7
|
* Created at : 2021-01-09 14:45:46
|
|
8
|
-
* Last modified : 2023-
|
|
8
|
+
* Last modified : 2023-12-07 14:26:03
|
|
9
9
|
*/
|
|
10
10
|
import { ILayout, IVideoManagerState, IRotationInfoTotalItem } from '../type';
|
|
11
11
|
export declare const getLayoutItemState: (item: ILayout | ILayout, stream: MediaStream | null, vmState: IVideoManagerState) => "REQUEST" | "NORMAL" | "MUTE" | "AUDIO_TEL" | "AUDIO_ONLY" | "AUDIO_CONTENT";
|
|
@@ -49,3 +49,11 @@ export declare const detectLocator: ({ extId, clientId, clientSecret, httpServer
|
|
|
49
49
|
clientSecret: string;
|
|
50
50
|
httpServer?: string | undefined;
|
|
51
51
|
}) => Promise<string>;
|
|
52
|
+
/**
|
|
53
|
+
* 生成用户唯一ID值
|
|
54
|
+
*
|
|
55
|
+
* @param { string } callUri - callUri或者endpointId值
|
|
56
|
+
* @param { number | string } mediagroupid - mid,多分组通道,常见:0代表people,1代表content,会控喊话有>10值
|
|
57
|
+
* @return { string } 唯一ID
|
|
58
|
+
*/
|
|
59
|
+
export declare const getRosterId: (callUri?: string, mediagroupid?: number | string) => string;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @email luojinghui424@gmail.com
|
|
7
7
|
*
|
|
8
8
|
* Created at : 2021-01-05 17:24:07
|
|
9
|
-
* Last modified : 2023-
|
|
9
|
+
* Last modified : 2023-12-08 15:34:41
|
|
10
10
|
*/
|
|
11
11
|
import Logger from '../../tools/logger';
|
|
12
12
|
import { ILayout, IVideoRenders, IRoster, IScreenInfo, IOutputCustomLayout, ILayoutRoster, IConfInfo, IPageInfo, IReqInfo, VideoQuality, StreamResolutionLevel, TLayoutMap, TemplateMode, ContentTemplateMode, IMode, LayoutOrientationType } from '../../type/index';
|
|
@@ -44,6 +44,10 @@ export default class LayoutManager {
|
|
|
44
44
|
quality: VideoQuality;
|
|
45
45
|
mediagroupid: number;
|
|
46
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* 是否开启/接收content
|
|
49
|
+
*/
|
|
50
|
+
get isContentMode(): boolean;
|
|
47
51
|
/**
|
|
48
52
|
* 当前是否是对话模式,且没有发送或接收content。
|
|
49
53
|
* content优先级大于对话模式
|
|
@@ -59,10 +63,17 @@ export default class LayoutManager {
|
|
|
59
63
|
get isEnableHideLocalView(): boolean;
|
|
60
64
|
/**
|
|
61
65
|
* 是否是主会场模式(远端设置为主会场)
|
|
66
|
+
* 会控下发的chairmanUri标识当前会议设置了主会场,
|
|
67
|
+
* 会控的chairmanUri有值时,媒体下发的chairManUrl才标识最终入会的主会场的CallUri
|
|
62
68
|
*
|
|
63
69
|
* @returns
|
|
64
70
|
*/
|
|
65
71
|
get isChairmanMode(): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* 是否是焦点模式
|
|
74
|
+
* forceLayout/content优先级大于对话模式
|
|
75
|
+
*/
|
|
76
|
+
get isFocusMode(): boolean;
|
|
66
77
|
getNewLayout(): ILayout[];
|
|
67
78
|
getOrderRosterList(): IRoster[];
|
|
68
79
|
getOriginOrderRosters(): IRoster[];
|
|
@@ -81,6 +92,7 @@ export default class LayoutManager {
|
|
|
81
92
|
getConfInfo(): IConfInfo;
|
|
82
93
|
getInternalsLayout(): IOutputCustomLayout;
|
|
83
94
|
getLocalShareState(): boolean;
|
|
95
|
+
getFocusRoster(): IRoster | null;
|
|
84
96
|
setOrderRosterList(orderRosterList: IRoster[]): void;
|
|
85
97
|
setOriginOrderRosters(originOrderRosters: IRoster[]): void;
|
|
86
98
|
/**
|
|
@@ -165,12 +177,12 @@ export default class LayoutManager {
|
|
|
165
177
|
*/
|
|
166
178
|
switchLayout(templateMode?: IMode): "SPEAKER" | "GALLERY" | "MULTI_PIC_CONTENT_HIGH_PRIORITY" | "MULTI_PIC_ACTIVE_HIGH_PRIORITY" | "TWO_PIC_PIP" | "CONTENT_ONLY" | "TWO_PIC_SYMMETRIC";
|
|
167
179
|
/**
|
|
168
|
-
* 切换主画面, GALLERY
|
|
180
|
+
* 切换主画面, GALLERY布局/会控设置焦点画面 不支持
|
|
169
181
|
*
|
|
170
|
-
* @param { string }
|
|
171
|
-
* @returns { string }
|
|
182
|
+
* @param { string } rosterId - 指定切换到主画面的rosterId
|
|
183
|
+
* @returns { string } rosterId
|
|
172
184
|
*/
|
|
173
|
-
setFocusView(
|
|
185
|
+
setFocusView(rosterId: string): string;
|
|
174
186
|
/**
|
|
175
187
|
* 更新Local video track
|
|
176
188
|
*/
|
|
@@ -230,11 +242,23 @@ export default class LayoutManager {
|
|
|
230
242
|
*/
|
|
231
243
|
calculateOrderRosterList(): IRoster[];
|
|
232
244
|
/**
|
|
233
|
-
*
|
|
245
|
+
* 设置焦点画面Roster
|
|
246
|
+
*/
|
|
247
|
+
private setFocusRoster;
|
|
248
|
+
/**
|
|
249
|
+
* 缓存主画面信息, 并请流
|
|
250
|
+
*
|
|
251
|
+
* @param { string } id - 指定切换到主画面的RosterId
|
|
252
|
+
* @param { FocusViewKind } kind - 来源
|
|
253
|
+
* @param { IRoster | null } roster - 焦点画面roster
|
|
254
|
+
*/
|
|
255
|
+
private handleFocusView;
|
|
256
|
+
/**
|
|
257
|
+
* 更新焦点画面参数
|
|
234
258
|
*
|
|
235
|
-
* @param {
|
|
259
|
+
* @param { FocusViewConfig } config - 焦点画面参数
|
|
236
260
|
*/
|
|
237
|
-
private
|
|
261
|
+
private updateFocusViewConfig;
|
|
238
262
|
/**
|
|
239
263
|
* 计算 custom layout 数据
|
|
240
264
|
*/
|
package/lib/type/client.d.ts
CHANGED
|
@@ -674,6 +674,7 @@ export interface IMeetingControl {
|
|
|
674
674
|
* @property { boolean } audioTxMute 参会者麦克风状态,true:开启,false:关闭
|
|
675
675
|
* @property { boolean } videoTxMute 参会者摄像头状态,true:开启,false:关闭
|
|
676
676
|
* @property { boolean } isForceFullScreen 参会者是否是主画面
|
|
677
|
+
* @property { boolean } isFocusScreen 参会者是否是焦点画面
|
|
677
678
|
* @property { number } videoMuteReason 视频关闭原因
|
|
678
679
|
* @property { boolean } isContent 参会者画面类型,同mediagroupid,true:是共享内容画面,false:people画面
|
|
679
680
|
* @property { boolean } isActiveSpeaker 参会者是否是语音激励,即当前会中说话声音最大的一个人
|
|
@@ -697,6 +698,7 @@ export interface IRoster extends Partial<ILayoutRoster> {
|
|
|
697
698
|
videoRxMute: boolean;
|
|
698
699
|
videoMuteReason: number;
|
|
699
700
|
isForceFullScreen: boolean;
|
|
701
|
+
isFocusScreen: boolean;
|
|
700
702
|
isLastAdd: boolean;
|
|
701
703
|
onHold: boolean;
|
|
702
704
|
isPolling: boolean;
|
|
@@ -763,7 +765,7 @@ export declare enum MuteReason {
|
|
|
763
765
|
*
|
|
764
766
|
* @property { number } participantCount 当前会议参会者总人数,不包含共享内容设备数量,包含local
|
|
765
767
|
* @property { number } totalEpCount 当前会议参会者总人数,包含共享内容、指挥调度客户端等设备数量, 包含local
|
|
766
|
-
* @property { string } chairManUrl 当前会议主会场/主画面设备的callUrl,没有为''
|
|
768
|
+
* @property { string } chairManUrl 当前会议主会场/主画面设备的callUrl,没有为'', 如果设置Local为主会场,则此值也为''
|
|
767
769
|
* @property { string } contentUri 当前会议共享内容设别的callUrl,没有为''
|
|
768
770
|
* @property { string } actSpkUri 当前会议语音激励者的callUrl,没有为''
|
|
769
771
|
* @property { IMediaGroupInfo[] } mediaGroupnfo 多分组通人数信息,默认上报0和1分组,分别代表People通道和Content通道
|
|
@@ -776,6 +778,13 @@ export interface IConfInfo {
|
|
|
776
778
|
actSpkUri: string;
|
|
777
779
|
mediaGroupInfo: IMediaGroupInfo[];
|
|
778
780
|
}
|
|
781
|
+
/**
|
|
782
|
+
* 缓存Conf Change消息
|
|
783
|
+
*/
|
|
784
|
+
export interface IPreConfInfo extends IConfInfo {
|
|
785
|
+
isChairmanMode?: boolean;
|
|
786
|
+
isFocusMode?: boolean;
|
|
787
|
+
}
|
|
779
788
|
export interface IMediaGroupInfo {
|
|
780
789
|
endpointCount: number;
|
|
781
790
|
mediagroupid: number;
|
package/lib/type/layout.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ILayout } from './client';
|
|
1
|
+
import { ILayout, IRoster } from './client';
|
|
2
2
|
import { StreamResolutionLevel, VideoQuality } from './stream';
|
|
3
3
|
/**
|
|
4
4
|
* Layout头像类型
|
|
@@ -172,14 +172,32 @@ export declare enum LayoutOrientationType {
|
|
|
172
172
|
MOBILE_VERTICAL = 1
|
|
173
173
|
}
|
|
174
174
|
/**
|
|
175
|
-
*
|
|
175
|
+
* 焦点画面来源
|
|
176
176
|
*
|
|
177
|
-
* @
|
|
177
|
+
* @param NONE 0 - 无
|
|
178
|
+
* @param USER 1 - 用户
|
|
179
|
+
* @param MEETING 2 - 会控
|
|
180
|
+
*/
|
|
181
|
+
export declare enum FocusViewKind {
|
|
182
|
+
NONE = 0,
|
|
183
|
+
USER = 1,
|
|
184
|
+
MEETING = 2
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* 焦点画面参数
|
|
188
|
+
*
|
|
189
|
+
* @property { string } viewId - 指定的主画面的RosterId
|
|
178
190
|
* @property { TemplateType } type - 画面类型
|
|
191
|
+
* @property { IRoster|null } roster - 焦点画面roster信息
|
|
192
|
+
* @property { string } rosterId - 焦点画面rosterId
|
|
193
|
+
* @property { FocusViewKind } kind - 来源
|
|
179
194
|
*/
|
|
180
195
|
export interface FocusViewConfig {
|
|
181
|
-
|
|
196
|
+
viewId: string;
|
|
182
197
|
type: TemplateType;
|
|
198
|
+
roster: IRoster | null;
|
|
199
|
+
rosterId?: string;
|
|
200
|
+
kind?: FocusViewKind;
|
|
183
201
|
}
|
|
184
202
|
/**
|
|
185
203
|
* 需要管理员广播才能收看内容共享
|