@xylink/xy-rtc-sdk 3.8.0-beta.2 → 3.8.0-beta.5
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/action/index.d.ts +9 -0
- package/lib/enum/device.d.ts +3 -0
- package/lib/enum/index.d.ts +1 -1
- package/lib/main/client.d.ts +61 -43
- package/lib/main/deviceManager.d.ts +3 -3
- package/lib/main/helper.d.ts +1 -1
- package/lib/main/iauth.d.ts +1 -5
- package/lib/main/layoutManager.d.ts +2 -2
- package/lib/main/meeting.d.ts +22 -4
- package/lib/main/stream.d.ts +5 -9
- package/lib/tools/{emmitter.d.ts → emitter.d.ts} +2 -2
- package/lib/tools/utils.d.ts +11 -14
- package/lib/type/base.d.ts +12 -0
- package/lib/type/client.d.ts +146 -15
- package/lib/type/meeting.d.ts +15 -0
- package/lib/type/stream.d.ts +2 -1
- package/lib/xyrtc.cjs.js +1 -1
- package/lib/xyrtc.umd.js +1 -1
- package/package.json +1 -1
package/lib/action/index.d.ts
CHANGED
|
@@ -249,6 +249,15 @@ declare class Action {
|
|
|
249
249
|
* 获取个人云会议室信息,包含入会密码和个人云会议室号
|
|
250
250
|
*/
|
|
251
251
|
getCloudMeetingRooms(userId: number): Promise<any>;
|
|
252
|
+
/**
|
|
253
|
+
* 获取参会者头像
|
|
254
|
+
*
|
|
255
|
+
* @param { string } callUrl
|
|
256
|
+
*/
|
|
257
|
+
getInComingCallUrlInfo(callUrl: string): Promise<{
|
|
258
|
+
avatar: string;
|
|
259
|
+
}>;
|
|
260
|
+
sendVideoControlResult(type: 'muteVideo' | 'unMuteVideo', value: string): Promise<any>;
|
|
252
261
|
}
|
|
253
262
|
declare const _default: Action;
|
|
254
263
|
export default _default;
|
package/lib/enum/index.d.ts
CHANGED
package/lib/main/client.d.ts
CHANGED
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
5
5
|
* @date 2019-10-23 12:04:44
|
|
6
6
|
*/
|
|
7
|
-
import { IClientConfig, ICall, IMackCall, IInvite, IRoster, ILayoutRoster, ISpeakerInfo, IScreenInfo, ILoginExtAccount, IPublishParams, ICustomLayout, ICustomStreamTrack, IInternels, IVideoAudioType, IShareContentStatus, IPushType, IMode, IReqInfo, TCommand, ILayout, IConference, IConferenceInfo, IContentMode, IToken, AutoMute, Key, IRecordPermission, TLocalLanguage, IFeatureConfig, IConfMgmtUrl } from '../type';
|
|
8
|
-
import
|
|
7
|
+
import { IClientConfig, ICall, IMackCall, IInvite, IRoster, ILayoutRoster, ISpeakerInfo, IScreenInfo, ILoginExtAccount, IPublishParams, ICustomLayout, ICustomStreamTrack, IInternels, IVideoAudioType, IShareContentStatus, IPushType, IMode, IReqInfo, TCommand, ILayout, IConference, IConferenceInfo, IContentMode, IToken, AutoMute, Key, IRecordPermission, TLocalLanguage, IFeatureConfig, IConfMgmtUrl, IVideoControlResult } from '../type';
|
|
8
|
+
import Emitter from '../tools/emitter';
|
|
9
9
|
import Socket from '../tools/socket';
|
|
10
10
|
import Stream from './stream';
|
|
11
11
|
import Logger from '../tools/logger';
|
|
12
12
|
import IAuth from './iauth';
|
|
13
13
|
import DeviceManager from './deviceManager';
|
|
14
14
|
import LayoutManager from './layoutManager';
|
|
15
|
-
export default class Client extends
|
|
15
|
+
export default class Client extends Emitter {
|
|
16
16
|
logger: Logger;
|
|
17
17
|
iauth: IAuth;
|
|
18
18
|
socketTask: Socket | undefined;
|
|
@@ -51,7 +51,7 @@ export default class Client extends Emmitter {
|
|
|
51
51
|
private peerConnectionStatus;
|
|
52
52
|
private customLayoutSeq;
|
|
53
53
|
private contentSenderPid;
|
|
54
|
-
private
|
|
54
|
+
private shareContentTimer;
|
|
55
55
|
private streamChange;
|
|
56
56
|
private streamChangeList;
|
|
57
57
|
private seq;
|
|
@@ -71,6 +71,7 @@ export default class Client extends Emmitter {
|
|
|
71
71
|
private qualityManager;
|
|
72
72
|
private isShareContent;
|
|
73
73
|
private isSubscribeTranslation;
|
|
74
|
+
private handStatus;
|
|
74
75
|
private featureConfig;
|
|
75
76
|
private meeting;
|
|
76
77
|
private onDocumentChange;
|
|
@@ -128,6 +129,12 @@ export default class Client extends Emmitter {
|
|
|
128
129
|
* @returns { boolean }
|
|
129
130
|
*/
|
|
130
131
|
getLocalShareContent(): boolean;
|
|
132
|
+
/**
|
|
133
|
+
* 设置本地是否在等候室
|
|
134
|
+
*
|
|
135
|
+
* @param { boolean } onhold
|
|
136
|
+
*/
|
|
137
|
+
setOnHold(onhold: boolean): void;
|
|
131
138
|
/**
|
|
132
139
|
* 小鱼账号初始登录,获取token方法
|
|
133
140
|
*
|
|
@@ -156,19 +163,25 @@ export default class Client extends Emmitter {
|
|
|
156
163
|
*
|
|
157
164
|
* @public
|
|
158
165
|
* @param { IFeatureConfig } config 功能配置项
|
|
159
|
-
* @
|
|
160
|
-
* @
|
|
161
|
-
* @property { boolean } config.
|
|
162
|
-
* @property { boolean } config.
|
|
163
|
-
* @property { boolean } config.
|
|
164
|
-
* @property { boolean } config.
|
|
165
|
-
* @
|
|
166
|
+
* @property { boolean } config.enableMeetingShout 是否启用会控喊话场景,会控喊话场景需要指定mediaGroupId分组通道信息才可以正常接收远端声音;
|
|
167
|
+
* @property { boolean } config.enableV2States 是否启用小鱼数据上报功能,默认启用,设置为true;
|
|
168
|
+
* @property { boolean } config.enableCheckRecordPermission 是否启用录制权限查询功能,默认不启用,设置为false;
|
|
169
|
+
* @property { boolean } config.enableBandwidthSetting 是否启用管理平台带宽控制(双向),默认不启用,设置为false;
|
|
170
|
+
* @property { boolean } config.enableMeetingInvite 是否启用查询小鱼会议邀请链接信息,默认不启用,设置为false;
|
|
171
|
+
* @property { boolean } config.enableMeetingOwner 是否启用查询会议Owner信息,默认不启用,设置为false;
|
|
172
|
+
* @property { boolean } config.enableAutoResizeLayout 是否启用自动布局下,当屏幕大小变化后计算最新的Layout数据,默认启用,设置为true;
|
|
173
|
+
* @property { boolean } config.enableLowResolution 是否启用低性能模式,降低发送和接收端的分辨率和质量,默认不启用,设置为false;
|
|
174
|
+
* @property { boolean } config.enableSpeakerInfo 是否启用推送实时讲话人信息,每秒2条消息推送,默认不启用,设置为false;
|
|
175
|
+
* @property { boolean } config.enableLayoutAvatar 是否启用获取参会者头像,默认不启用,设置为false;
|
|
176
|
+
* @returns { IResult }
|
|
177
|
+
*/
|
|
178
|
+
setFeatureConfig(config: IFeatureConfig): import("../type").IReturnResult | undefined;
|
|
179
|
+
/**
|
|
180
|
+
* 限制Content和People发送能力
|
|
181
|
+
*
|
|
182
|
+
* @param { boolean } limitPeople - 是否限制People的发送能力
|
|
166
183
|
*/
|
|
167
|
-
|
|
168
|
-
code: string;
|
|
169
|
-
msg: string;
|
|
170
|
-
detail: any;
|
|
171
|
-
} | undefined;
|
|
184
|
+
private setLimitResolution;
|
|
172
185
|
/**
|
|
173
186
|
* 获取会控地址
|
|
174
187
|
*/
|
|
@@ -280,6 +293,21 @@ export default class Client extends Emmitter {
|
|
|
280
293
|
* @param { any } resolve
|
|
281
294
|
*/
|
|
282
295
|
handleSocketMessage(data: any, resolve: any): void;
|
|
296
|
+
/**
|
|
297
|
+
* 处理会控上报开启/关闭摄像头事件
|
|
298
|
+
*
|
|
299
|
+
* @private
|
|
300
|
+
* @param { Object } data 远端数据
|
|
301
|
+
*/
|
|
302
|
+
private onEPMessage;
|
|
303
|
+
/**
|
|
304
|
+
* 通知会控打开/关闭摄像头结果
|
|
305
|
+
*
|
|
306
|
+
* @param { 'muteVideo' | 'unMuteVideo' } type - 结果类型
|
|
307
|
+
* @param { IVideoControlResult } data - 数据详情
|
|
308
|
+
* @returns { Promise<IReturnResult | null> }
|
|
309
|
+
*/
|
|
310
|
+
sendVideoControlResult(type: 'muteVideo' | 'unMuteVideo', data: IVideoControlResult): Promise<import("../type").IReturnResult>;
|
|
283
311
|
/**
|
|
284
312
|
* 处理录制状态上报
|
|
285
313
|
*
|
|
@@ -652,11 +680,12 @@ export default class Client extends Emmitter {
|
|
|
652
680
|
*/
|
|
653
681
|
sendAudioStatus(status: boolean | string): void;
|
|
654
682
|
/**
|
|
655
|
-
* 发布layout
|
|
683
|
+
* 发布 自动布局/自定义布局 layout布局信息(参会人最新的布局列表数据)
|
|
656
684
|
*
|
|
657
685
|
* @public
|
|
686
|
+
* @params { boolean } isDealAvatar 是否处理layout头像, 启用相关配置后,默认处理
|
|
658
687
|
*/
|
|
659
|
-
sendLayoutMessage(): void;
|
|
688
|
+
sendLayoutMessage(isDealAvatar?: boolean): void;
|
|
660
689
|
/**
|
|
661
690
|
* 发布最新的已经排序过的的roster信息
|
|
662
691
|
*
|
|
@@ -669,12 +698,6 @@ export default class Client extends Emmitter {
|
|
|
669
698
|
* @private
|
|
670
699
|
*/
|
|
671
700
|
private sendsOriginOrderRosterMessage;
|
|
672
|
-
/**
|
|
673
|
-
* 【仅支持2.0.2以前的版本】发布 自定义布局 layout布局信息(参会人最新的布局列表数据)
|
|
674
|
-
*
|
|
675
|
-
* @public
|
|
676
|
-
*/
|
|
677
|
-
sendCustomLayoutMessage(): void;
|
|
678
701
|
/**
|
|
679
702
|
* 发布Layout Container的容器信息
|
|
680
703
|
*
|
|
@@ -755,13 +778,13 @@ export default class Client extends Emmitter {
|
|
|
755
778
|
*
|
|
756
779
|
* @private
|
|
757
780
|
*/
|
|
758
|
-
private
|
|
781
|
+
private initWindowResizeEvent;
|
|
759
782
|
/**
|
|
760
783
|
* 移除resize事件
|
|
761
784
|
*
|
|
762
785
|
* @private
|
|
763
786
|
*/
|
|
764
|
-
private
|
|
787
|
+
private removeWindowResizeEvent;
|
|
765
788
|
/**
|
|
766
789
|
* 发送wss peopleCapability,通知本地采集能力,用于vom进行分配
|
|
767
790
|
*
|
|
@@ -879,6 +902,13 @@ export default class Client extends Emmitter {
|
|
|
879
902
|
* @public
|
|
880
903
|
*/
|
|
881
904
|
reSendContentOffer(): void;
|
|
905
|
+
/**
|
|
906
|
+
* 重新计算Layout布局数据
|
|
907
|
+
*
|
|
908
|
+
* 触发机制:当页面窗口变化/Container Dom大小变化时,可主动调用同时SDK更新Layout信息
|
|
909
|
+
* 建议:如果业务上自行监听窗口变化和Dom大小变化,建议通过featureConfig配置autoResizeLayout为false关闭内部的事件,避免重复计算;
|
|
910
|
+
*/
|
|
911
|
+
updateLayoutSize(): void;
|
|
882
912
|
/**
|
|
883
913
|
* 会控喊话功能,用于关联audio track与mediaGroupId通道,从而向特定通道发送音频数据
|
|
884
914
|
*
|
|
@@ -892,11 +922,7 @@ export default class Client extends Emmitter {
|
|
|
892
922
|
* @param { number } mediagroupId 分组id,也称sessionId或者mediaGroupId,代表只向此分组通道发送音频数据
|
|
893
923
|
* @returns { boolean }
|
|
894
924
|
*/
|
|
895
|
-
bindTrackGroup(trackType: 'audio' | 'video', mediagroupId: number): true |
|
|
896
|
-
code: string;
|
|
897
|
-
msg: string;
|
|
898
|
-
detail: any;
|
|
899
|
-
};
|
|
925
|
+
bindTrackGroup(trackType: 'audio' | 'video', mediagroupId: number): true | import("../type").IReturnResult;
|
|
900
926
|
/**
|
|
901
927
|
* 启用多分组通道,接收多分组通道数据
|
|
902
928
|
*
|
|
@@ -904,11 +930,7 @@ export default class Client extends Emmitter {
|
|
|
904
930
|
* @param { Key[] } mediagrpIds 多分组sessionId,可以配置多个或一个值
|
|
905
931
|
* @returns { boolean }
|
|
906
932
|
*/
|
|
907
|
-
startMonitorGroup(mediagrpIds: Key[]): true |
|
|
908
|
-
code: string;
|
|
909
|
-
msg: string;
|
|
910
|
-
detail: any;
|
|
911
|
-
};
|
|
933
|
+
startMonitorGroup(mediagrpIds: Key[]): true | import("../type").IReturnResult;
|
|
912
934
|
/**
|
|
913
935
|
* 停止多分组通道,销毁资源
|
|
914
936
|
*
|
|
@@ -916,11 +938,7 @@ export default class Client extends Emmitter {
|
|
|
916
938
|
* @param { Key[] } mediagrpIds 多分组sessionId,可以配置多个或一个值
|
|
917
939
|
* @returns { boolean }
|
|
918
940
|
*/
|
|
919
|
-
stopMonitorGroup(mediagrpIds: Key[]): true |
|
|
920
|
-
code: string;
|
|
921
|
-
msg: string;
|
|
922
|
-
detail: any;
|
|
923
|
-
};
|
|
941
|
+
stopMonitorGroup(mediagrpIds: Key[]): true | import("../type").IReturnResult;
|
|
924
942
|
/**
|
|
925
943
|
* 设置多分组通道,通用方法
|
|
926
944
|
*
|
|
@@ -946,8 +964,8 @@ export default class Client extends Emmitter {
|
|
|
946
964
|
* init websocket connection
|
|
947
965
|
*
|
|
948
966
|
* @private
|
|
949
|
-
* @param {
|
|
950
|
-
* @param {
|
|
967
|
+
* @param { Promise.resolve } resolve 响应回调
|
|
968
|
+
* @param { Promise.reject } reject 拒绝回调
|
|
951
969
|
*/
|
|
952
970
|
private initWss;
|
|
953
971
|
}
|
|
@@ -9,15 +9,15 @@
|
|
|
9
9
|
* Last modified : 2022-06-09 17:33:47
|
|
10
10
|
*/
|
|
11
11
|
import Logger from '../tools/logger';
|
|
12
|
-
import
|
|
12
|
+
import Emitter from '../tools/emitter';
|
|
13
13
|
import { IDeviceList, ISelectedDevice, ICurrentPermission } from '../type';
|
|
14
14
|
/**
|
|
15
15
|
* DeviceManager模块,用于管理枚举设备列表、监听设备变动、处理设备权限等功能
|
|
16
16
|
*
|
|
17
17
|
* @class DeviceManager
|
|
18
|
-
* @extends
|
|
18
|
+
* @extends Emitter 事件发送器
|
|
19
19
|
*/
|
|
20
|
-
declare class DeviceManager extends
|
|
20
|
+
declare class DeviceManager extends Emitter {
|
|
21
21
|
private navigator;
|
|
22
22
|
private currentDeviceList;
|
|
23
23
|
private nextDeviceList;
|
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 : 2022-
|
|
8
|
+
* Last modified : 2022-11-03 19:20:11
|
|
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" | "AUDIO_ONLY" | "MUTE" | "AUDIO_TEL" | "AUDIO_CONTENT";
|
package/lib/main/iauth.d.ts
CHANGED
|
@@ -24,10 +24,6 @@ declare class IAuth {
|
|
|
24
24
|
* @param { ISdkUserInfo } sdkUserInfo
|
|
25
25
|
* @param { ILoginExtAccount } params
|
|
26
26
|
*/
|
|
27
|
-
login(sdkUserInfo: ISdkUserInfo, params?: ILoginExtAccount): Promise<
|
|
28
|
-
code: string;
|
|
29
|
-
msg: string;
|
|
30
|
-
detail: any;
|
|
31
|
-
}>;
|
|
27
|
+
login(sdkUserInfo: ISdkUserInfo, params?: ILoginExtAccount): Promise<import("../type").IReturnResult>;
|
|
32
28
|
}
|
|
33
29
|
export default IAuth;
|
|
@@ -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 : 2022-
|
|
9
|
+
* Last modified : 2022-11-03 15:48:52
|
|
10
10
|
*/
|
|
11
11
|
import Logger from '../tools/logger';
|
|
12
12
|
import { ILayout, IVideoRenders, IRoster, ITemplateObj, IScreenInfo, IMode, IOutputCustomLayout, ILayoutRoster, IResolutionType, IConfInfo, IPageInfo, IReqInfo, IQualityType } from '../type/index';
|
|
@@ -171,7 +171,7 @@ export default class LayoutManager {
|
|
|
171
171
|
calculateNewLayoutList(): {
|
|
172
172
|
roster: IRoster;
|
|
173
173
|
position: number[];
|
|
174
|
-
resolution:
|
|
174
|
+
resolution: IResolutionType;
|
|
175
175
|
zIndex: number;
|
|
176
176
|
}[];
|
|
177
177
|
calculateScreenInfo(): {
|
package/lib/main/meeting.d.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Meeting Info Control
|
|
3
3
|
*
|
|
4
4
|
* Created at : 2022-10-27 13:58:22
|
|
5
|
-
* Last modified : 2022-
|
|
5
|
+
* Last modified : 2022-11-04 14:45:39
|
|
6
6
|
*/
|
|
7
|
-
import { IConferenceInfo, IRecordPermission, IConfMgmtUrl } from '../type';
|
|
7
|
+
import { IConferenceInfo, IRecordPermission, IConfMgmtUrl, ILayout } from '../type';
|
|
8
8
|
import Client from './client';
|
|
9
9
|
import Logger from '../tools/logger';
|
|
10
10
|
declare class Meeting {
|
|
@@ -12,10 +12,12 @@ declare class Meeting {
|
|
|
12
12
|
logger: Logger;
|
|
13
13
|
conferenceInfo: IConferenceInfo;
|
|
14
14
|
private recordPermission;
|
|
15
|
-
private
|
|
15
|
+
private cloudRoomInfo;
|
|
16
16
|
private confMgmtUrl;
|
|
17
|
+
private layoutAvatarMap;
|
|
17
18
|
constructor(client: Client, logger: Logger);
|
|
18
19
|
getRecordPermission(): IRecordPermission;
|
|
20
|
+
getLayoutAvatarMap(): Map<string, string>;
|
|
19
21
|
/**
|
|
20
22
|
* 登录用户信息和个人云会议室信息
|
|
21
23
|
*/
|
|
@@ -42,13 +44,16 @@ declare class Meeting {
|
|
|
42
44
|
*/
|
|
43
45
|
private getMeetingControlUrl;
|
|
44
46
|
/**
|
|
45
|
-
* 获取
|
|
47
|
+
* 获取vcNumber真实的会议室信息
|
|
46
48
|
*
|
|
47
49
|
* @param { string } vcNumber 终端对应的会议室号码
|
|
48
50
|
*/
|
|
49
51
|
private getVCConfInfo;
|
|
50
52
|
/**
|
|
51
53
|
* 获取Content水印内容
|
|
54
|
+
*
|
|
55
|
+
* @private
|
|
56
|
+
* @param { string } confAuxProperties 水印内容
|
|
52
57
|
*/
|
|
53
58
|
private getWatermarkContent;
|
|
54
59
|
/**
|
|
@@ -76,5 +81,18 @@ declare class Meeting {
|
|
|
76
81
|
* 获取个人云会议室信息,包含入会密码和个人云会议室号
|
|
77
82
|
*/
|
|
78
83
|
getCloudMeetingRooms(): Promise<void>;
|
|
84
|
+
/**
|
|
85
|
+
* 处理信令下发的等候室
|
|
86
|
+
*
|
|
87
|
+
* @private
|
|
88
|
+
* @param { IWaitingRoomProps } waitingRoomProps 等候室信息
|
|
89
|
+
*/
|
|
90
|
+
private handleWaitingRoomInfo;
|
|
91
|
+
/**
|
|
92
|
+
* 处理layout图像
|
|
93
|
+
*
|
|
94
|
+
* @param { ILayout[] } unAvatarList 需要获取头像的终端
|
|
95
|
+
*/
|
|
96
|
+
handleLayoutAvatar(unAvatarList: ILayout[]): Promise<void>;
|
|
79
97
|
}
|
|
80
98
|
export default Meeting;
|
package/lib/main/stream.d.ts
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* @date 2019-10-27 23:12:45
|
|
6
6
|
*/
|
|
7
7
|
import Logger from '../tools/logger';
|
|
8
|
-
import
|
|
8
|
+
import Emitter from '../tools/emitter';
|
|
9
9
|
import { IStreamChangeType, IStreamObj, IGetMediaStreams, ISource, IStreamInitConfig, IStreamCurrent, IMediaSupportedConstraints, IStreamChange } from '../type';
|
|
10
10
|
import Peer from './peer';
|
|
11
11
|
import Client from './client';
|
|
12
|
-
export default class Stream extends
|
|
12
|
+
export default class Stream extends Emitter {
|
|
13
13
|
streams: IStreamObj[];
|
|
14
14
|
config: IStreamInitConfig;
|
|
15
15
|
current: IStreamCurrent;
|
|
@@ -77,7 +77,7 @@ export default class Stream extends Emmitter {
|
|
|
77
77
|
* @returns
|
|
78
78
|
*/
|
|
79
79
|
private replaceVideoTrack;
|
|
80
|
-
setAudioOrVideoStatus(type: string): Promise<undefined>;
|
|
80
|
+
setAudioOrVideoStatus(type: string): Promise<import("../type").IReturnResult | undefined>;
|
|
81
81
|
private setStreamStatus;
|
|
82
82
|
private getNextAudioContraints;
|
|
83
83
|
private getNextAudioMedia;
|
|
@@ -116,17 +116,13 @@ export default class Stream extends Emmitter {
|
|
|
116
116
|
*
|
|
117
117
|
* @public
|
|
118
118
|
* @param { IStreamInitConfig } config 输入输出设备相关配置,默认是{}
|
|
119
|
-
* @param { muteVideo: boolean; muteAudio: boolean } params 可选参数,是否开启麦克风或者摄像头设备,默认情况下可以通过
|
|
119
|
+
* @param { muteVideo: boolean; muteAudio: boolean } params 可选参数,是否开启麦克风或者摄像头设备,默认情况下可以通过createClient配置即可
|
|
120
120
|
* @returns { IResult } 返回结果
|
|
121
121
|
*/
|
|
122
122
|
init(config?: IStreamInitConfig, params?: {
|
|
123
123
|
muteVideo?: boolean;
|
|
124
124
|
muteAudio?: boolean;
|
|
125
|
-
}): Promise<
|
|
126
|
-
code: string;
|
|
127
|
-
msg: string;
|
|
128
|
-
detail: any;
|
|
129
|
-
}>;
|
|
125
|
+
}): Promise<import("../type").IReturnResult>;
|
|
130
126
|
/**
|
|
131
127
|
* 获取content采集配置信息
|
|
132
128
|
*
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Event
|
|
2
|
+
* Event Emitter
|
|
3
3
|
*
|
|
4
4
|
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
5
5
|
* @date 2019-10-17 19:14:39
|
|
6
6
|
*/
|
|
7
|
-
export default class
|
|
7
|
+
export default class Emitter {
|
|
8
8
|
private events;
|
|
9
9
|
constructor();
|
|
10
10
|
on(key: string, listener: Function, total?: number): void;
|
package/lib/tools/utils.d.ts
CHANGED
|
@@ -3,21 +3,22 @@
|
|
|
3
3
|
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
4
4
|
* @date 2019-11-08 15:54:21
|
|
5
5
|
*/
|
|
6
|
+
import { IReturnResult } from '../type';
|
|
6
7
|
/**
|
|
7
|
-
*
|
|
8
|
+
* 防抖函数
|
|
8
9
|
*
|
|
9
|
-
* @param fn
|
|
10
|
-
* @param delay
|
|
11
|
-
* @param atleast 最短间隔触发时间
|
|
10
|
+
* @param fn 原始函数
|
|
11
|
+
* @param delay 延迟触发时间
|
|
12
12
|
*/
|
|
13
|
-
export declare const debounce: (fn: any, delay: number
|
|
13
|
+
export declare const debounce: (fn: any, delay: number) => () => void;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* 节流函数
|
|
16
16
|
*
|
|
17
|
-
* @param fn
|
|
18
|
-
* @param
|
|
17
|
+
* @param fn 原始函数
|
|
18
|
+
* @param delay 最后一次延迟触发时间
|
|
19
|
+
* @param atleast 触发最短间隔时间
|
|
19
20
|
*/
|
|
20
|
-
export declare const throttle: (fn: any,
|
|
21
|
+
export declare const throttle: (fn: any, delay: number, atleast: number) => () => void;
|
|
21
22
|
/**
|
|
22
23
|
* 获取当前时间
|
|
23
24
|
*
|
|
@@ -46,11 +47,7 @@ export declare const diffTime: (time1: number, time2: number, format?: string) =
|
|
|
46
47
|
export declare function mapToObj<T>(data: Map<string, T>): {
|
|
47
48
|
[key: string]: T;
|
|
48
49
|
};
|
|
49
|
-
export declare const getStatus: (code: string, detail?: any, msg?: string) =>
|
|
50
|
-
code: string;
|
|
51
|
-
msg: string;
|
|
52
|
-
detail: any;
|
|
53
|
-
};
|
|
50
|
+
export declare const getStatus: (code: string, detail?: any, msg?: string) => IReturnResult;
|
|
54
51
|
export declare const getMeetingStatus: (success: boolean, code?: string, msg?: string) => {
|
|
55
52
|
success: boolean;
|
|
56
53
|
data: {
|
package/lib/type/base.d.ts
CHANGED
|
@@ -68,4 +68,16 @@ export interface ISignParams {
|
|
|
68
68
|
token: string;
|
|
69
69
|
signSecret: string;
|
|
70
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* 返回结果内容
|
|
73
|
+
*
|
|
74
|
+
* @property { string } code - 结果码
|
|
75
|
+
* @property { string } msg - 结果说明
|
|
76
|
+
* @property { any } detail - 数据内容
|
|
77
|
+
*/
|
|
78
|
+
export interface IReturnResult {
|
|
79
|
+
code: string;
|
|
80
|
+
msg: string;
|
|
81
|
+
detail: any;
|
|
82
|
+
}
|
|
71
83
|
export declare type Key = string | number;
|