@rongcloud/plugin-call-plus 2.0.1-alpha.1 → 2.1.0
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/dist/index.d.ts +49 -31
- package/dist/index.esm.js +2375 -4146
- package/dist/index.umd.js +2 -5778
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -752,10 +752,6 @@ interface IRingingCallCon extends IBaseSingalCon {
|
|
|
752
752
|
* 通话接听信令内容
|
|
753
753
|
*/
|
|
754
754
|
interface IAcceptCallCon extends IBaseSingalCon {
|
|
755
|
-
/**
|
|
756
|
-
* 服务端接收的推送扩展
|
|
757
|
-
*/
|
|
758
|
-
pushExt?: string;
|
|
759
755
|
}
|
|
760
756
|
/**
|
|
761
757
|
* 直接加入通话信令内容
|
|
@@ -918,6 +914,10 @@ interface ISyncCallLogCon {
|
|
|
918
914
|
* 每页记录数 默认 30
|
|
919
915
|
*/
|
|
920
916
|
count?: number;
|
|
917
|
+
/**
|
|
918
|
+
* 正序或倒序
|
|
919
|
+
*/
|
|
920
|
+
order?: 0 | 1;
|
|
921
921
|
}
|
|
922
922
|
interface ISyncCallLogRes extends IBaseSingalCon {
|
|
923
923
|
callType: RCCallPlusType;
|
|
@@ -974,6 +974,10 @@ interface ISyncCallLogResList {
|
|
|
974
974
|
* 列表中最大时间戳
|
|
975
975
|
*/
|
|
976
976
|
maxTime: number;
|
|
977
|
+
/**
|
|
978
|
+
* 通话记录列表中最小的时间戳
|
|
979
|
+
*/
|
|
980
|
+
minTime: number;
|
|
977
981
|
/**
|
|
978
982
|
* 删除的列表
|
|
979
983
|
*/
|
|
@@ -1148,6 +1152,16 @@ interface ISysStatusUpOpts extends IBaseSingalCon {
|
|
|
1148
1152
|
*/
|
|
1149
1153
|
forward: ForwardType;
|
|
1150
1154
|
}
|
|
1155
|
+
interface IEndAbnormalCallOpts {
|
|
1156
|
+
/**
|
|
1157
|
+
* 0 当前端;1 所有端
|
|
1158
|
+
*/
|
|
1159
|
+
allDevice: 0 | 1;
|
|
1160
|
+
/**
|
|
1161
|
+
* 异常的 callId 列表
|
|
1162
|
+
*/
|
|
1163
|
+
callIds: string[];
|
|
1164
|
+
}
|
|
1151
1165
|
interface IGetDelayTimeInfoRes {
|
|
1152
1166
|
/**
|
|
1153
1167
|
* 获取 CallServer 与用户本地时间的差值,用于矫正与 CallServer 的时间
|
|
@@ -1365,10 +1379,6 @@ interface IInviteRes extends ICallId {
|
|
|
1365
1379
|
busylineUsers?: IBusylineUser[];
|
|
1366
1380
|
}
|
|
1367
1381
|
interface IAcceptOpts extends ICallId {
|
|
1368
|
-
/**
|
|
1369
|
-
* 推送扩展
|
|
1370
|
-
*/
|
|
1371
|
-
pushConfig?: IRCCallPlusPushConfig;
|
|
1372
1382
|
}
|
|
1373
1383
|
interface IHangupForBusyOpts extends ICallId {
|
|
1374
1384
|
/**
|
|
@@ -1393,6 +1403,10 @@ interface IGetCallLogListOpts {
|
|
|
1393
1403
|
* 获取数量
|
|
1394
1404
|
*/
|
|
1395
1405
|
count?: number;
|
|
1406
|
+
/**
|
|
1407
|
+
* 正序或倒序
|
|
1408
|
+
*/
|
|
1409
|
+
order?: 0 | 1;
|
|
1396
1410
|
}
|
|
1397
1411
|
interface IRCCallPlusGetCallRecordRes {
|
|
1398
1412
|
/**
|
|
@@ -1404,9 +1418,9 @@ interface IRCCallPlusGetCallRecordRes {
|
|
|
1404
1418
|
*/
|
|
1405
1419
|
list: IRCCallPlusCallRecord[];
|
|
1406
1420
|
/**
|
|
1407
|
-
*
|
|
1421
|
+
* hasMore 为 true 时,继续获取通话记录需传入的时间戳
|
|
1408
1422
|
*/
|
|
1409
|
-
|
|
1423
|
+
syncTime: number;
|
|
1410
1424
|
}
|
|
1411
1425
|
interface IReqChangeMediaTypeOpts {
|
|
1412
1426
|
/**
|
|
@@ -1987,6 +2001,12 @@ declare class SignalTransporter extends EventEmitter {
|
|
|
1987
2001
|
upCallLogReaded(opts: IBaseSingalCon): Promise<{
|
|
1988
2002
|
code: number;
|
|
1989
2003
|
}>;
|
|
2004
|
+
/**
|
|
2005
|
+
* 清除用户正在呼叫中的通话会话(*非暴露接口,供调试酌情调用)
|
|
2006
|
+
*/
|
|
2007
|
+
endUserAbnormalCalls(opts: IEndAbnormalCallOpts): Promise<{
|
|
2008
|
+
code: number;
|
|
2009
|
+
}>;
|
|
1990
2010
|
/** ======私有方法============================================================================================= */
|
|
1991
2011
|
private _onIMConnectionStateChange;
|
|
1992
2012
|
/**
|
|
@@ -2345,6 +2365,14 @@ declare class RCCallEngine extends EventEmitter {
|
|
|
2345
2365
|
* holdSession 升级为 mainSession
|
|
2346
2366
|
*/
|
|
2347
2367
|
upgradeMainSession(holdCallId: string): void;
|
|
2368
|
+
/**
|
|
2369
|
+
* 清除异常结束的 call
|
|
2370
|
+
*/
|
|
2371
|
+
endCurrentUserAbnormalCalls(opts: {
|
|
2372
|
+
allDevice: boolean;
|
|
2373
|
+
}): Promise<{
|
|
2374
|
+
code: number;
|
|
2375
|
+
}>;
|
|
2348
2376
|
/** ======私有方法============================================================================================= */
|
|
2349
2377
|
/**
|
|
2350
2378
|
* IM 状态变更处理
|
|
@@ -2639,7 +2667,6 @@ interface ICallPlusEventListener {
|
|
|
2639
2667
|
* @param userId 状态变更人员 id
|
|
2640
2668
|
* @param state 人员变更后状态
|
|
2641
2669
|
* @param reason 变更原因
|
|
2642
|
-
* @param extra 透传远端人员接听、挂断时携带的附加信息
|
|
2643
2670
|
*/
|
|
2644
2671
|
onRemoteUserStateChanged?(callId: string, userId: string, state: RCCallPlusSessionUserState, reason?: RCCallPlusReason): void;
|
|
2645
2672
|
/**
|
|
@@ -3086,11 +3113,8 @@ declare class RCCallPlusAndroidPushConfigBuilder {
|
|
|
3086
3113
|
setimageUrlHonor(imageUrlHonor: string): this;
|
|
3087
3114
|
/**
|
|
3088
3115
|
* 构建 IAndroidPushConfig
|
|
3089
|
-
<<<<<<< HEAD
|
|
3090
|
-
=======
|
|
3091
3116
|
* @returns IAndroidPushConfig 安卓推送配置数据
|
|
3092
3117
|
* 返回值需传入 startCall、invite、hangup 方法的 pushConfig.androidConfig 中
|
|
3093
|
-
>>>>>>> develop
|
|
3094
3118
|
*/
|
|
3095
3119
|
build(): IAndroidPushConfig;
|
|
3096
3120
|
}
|
|
@@ -3280,16 +3304,14 @@ declare class RCCallPlusClient {
|
|
|
3280
3304
|
/**
|
|
3281
3305
|
* 接听通话
|
|
3282
3306
|
* @param callId 通话 id
|
|
3283
|
-
* @param pushConfig 移动端推送信息
|
|
3284
3307
|
*/
|
|
3285
|
-
accept(callId: string
|
|
3308
|
+
accept(callId: string): Promise<{
|
|
3286
3309
|
code: number;
|
|
3287
3310
|
}>;
|
|
3288
3311
|
private __innerHangup;
|
|
3289
3312
|
/**
|
|
3290
3313
|
* 挂断通话
|
|
3291
3314
|
* @param callId 为可选参数,不传时,挂断正在进行的主 session,传入时可指定挂断主通话或暂未建立连接的通话
|
|
3292
|
-
* @param pushConfig 移动端推送信息
|
|
3293
3315
|
* 暂未建立连接的通话:指已在通话中时,收到呼叫但暂未接听的通话
|
|
3294
3316
|
* @param pushConfig 移动端推送信息
|
|
3295
3317
|
*/
|
|
@@ -3334,13 +3356,19 @@ declare class RCCallPlusClient {
|
|
|
3334
3356
|
}>;
|
|
3335
3357
|
/**
|
|
3336
3358
|
* 分页查找当前用户的全部通话记录
|
|
3337
|
-
* @param startTimestamp
|
|
3359
|
+
* @param startTimestamp 起始时间戳,
|
|
3360
|
+
* 首次获取可传 -1,倒序时,返回最新的通话记录,正序时,返回最早的通话记录
|
|
3361
|
+
* order 为正序时,返回大于此时间戳的通话记录
|
|
3362
|
+
* order 为倒序时,返回小于此时间戳的通话记录
|
|
3338
3363
|
* @param count 每次获取的数量
|
|
3364
|
+
* @param order 正序或倒序获取,默认为正序
|
|
3365
|
+
* 0 为正序,向开始时间戳之后查询
|
|
3366
|
+
* 1 为倒序,向开始时间戳之前查询
|
|
3339
3367
|
* @returns result.hasMore 是否有更多通话记录
|
|
3340
3368
|
* @returns result.list 通话记录列表,类型为 IRCCallPlusCallRecord[],可通过 apiDoc 查看具体包含字段
|
|
3341
|
-
* @returns result.
|
|
3369
|
+
* @returns result.syncTime hasMore 为 true 时,继续获取通话记录需传入的时间戳
|
|
3342
3370
|
*/
|
|
3343
|
-
getCallRecords(startTimestamp: number, count: number): Promise<{
|
|
3371
|
+
getCallRecords(startTimestamp: number, count: number, order?: 0 | 1): Promise<{
|
|
3344
3372
|
code: number;
|
|
3345
3373
|
result?: IRCCallPlusGetCallRecordRes;
|
|
3346
3374
|
}>;
|
|
@@ -3374,7 +3402,7 @@ declare class RCCallPlusClient {
|
|
|
3374
3402
|
/**
|
|
3375
3403
|
* 切换摄像头
|
|
3376
3404
|
* 切换成功后 `ICallPlusEventListener` 监听器的 `onUserMediaAvailable` 中会收到新切换的摄像头资源可播放,此时调用 `callPlusClient.playMedia()` 可显示新摄像头的画面
|
|
3377
|
-
* @param cameraId 浏览器中取得的摄像头设备 id,可调 getCameras 方法取得
|
|
3405
|
+
* @param cameraId 浏览器中取得的摄像头设备 id,可调 plugin-rtc 的 getCameras 方法取得
|
|
3378
3406
|
* @description 通话前和通话中都可调用
|
|
3379
3407
|
*/
|
|
3380
3408
|
switchCamera(cameraId: string): Promise<{
|
|
@@ -3418,16 +3446,6 @@ declare class RCCallPlusClient {
|
|
|
3418
3446
|
* 获取麦克风列表
|
|
3419
3447
|
*/
|
|
3420
3448
|
getMicrophones(): Promise<MediaDeviceInfo[]>;
|
|
3421
|
-
getRTCSessionId(): string | null;
|
|
3422
|
-
/**
|
|
3423
|
-
* 切换麦克风
|
|
3424
|
-
* 切换成功后 `ICallPlusEventListener` 监听器的 `onUserMediaAvailable` 中会收到新切换的麦克风资源可播放,此时调用 `callPlusClient.playMedia()` 可播放新麦克风的声音
|
|
3425
|
-
* @param microphoneId 浏览器中取得的麦克风设备 id,可调 getMicrophones 方法取得
|
|
3426
|
-
* @description 通话前和通话中都可调用
|
|
3427
|
-
*/
|
|
3428
|
-
switchMicrophone(microphoneId: string): Promise<{
|
|
3429
|
-
code: number;
|
|
3430
|
-
}>;
|
|
3431
3449
|
}
|
|
3432
3450
|
|
|
3433
3451
|
declare const installer: IPluginGenerator<RCCallPlusClient, ICallPlusInitOpts>;
|