@rongcloud/plugin-call-plus 2.1.10-enterprise-lz.50 → 2.1.10
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/index.d.ts +295 -247
- package/index.esm.js +1 -1
- package/index.js +1 -1
- package/package.json +3 -3
- package/wrapper/index.esm.js +1 -1
- package/wrapper/index.js +1 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RCConnectionStatus, EventEmitter, BasicLogger, PluginContext, EnableLogL, IReceivedMessage, IPluginGenerator } from '@rongcloud/engine';
|
|
2
|
-
import { RCRemoteTrack, RCTrack, ISubscribeAttr, RCRTCCode, RCLocalAudioTrack, RCRemoteAudioTrack, RCRTCClient, RCFrameRate, RCResolution } from '@rongcloud/plugin-rtc';
|
|
1
|
+
import { RCConnectionStatus, EventEmitter, BasicLogger, PluginContext, IRuntime, EnableLogL, IReceivedMessage, IPluginGenerator } from '@rongcloud/engine';
|
|
2
|
+
import { RCRemoteTrack, RCTrack, ISubscribeAttr, RCRTCCode, RCLocalAudioTrack, RCRemoteAudioTrack, RCRTCClient, RCRTCRoom, RCLocalTrack, IPublishAttrs, IPubSuccessRes, RCFrameRate, RCResolution } from '@rongcloud/plugin-rtc';
|
|
3
3
|
export { RCFrameRate as RCCallPlusFrameRate, RCResolution as RCCallPlusResolution } from '@rongcloud/plugin-rtc';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -413,11 +413,7 @@ declare enum RCCallPlusReason {
|
|
|
413
413
|
/**
|
|
414
414
|
* 远端用户的其他端已经在房间中,不允许 joinRoom 进行音视频通话
|
|
415
415
|
*/
|
|
416
|
-
REMOTE_OTHER_CLIENT_IN_RTC = 1214
|
|
417
|
-
/**
|
|
418
|
-
* 加密通话失败,如获取秘钥失败等
|
|
419
|
-
*/
|
|
420
|
-
ENCRYPT_FAILED = 1216
|
|
416
|
+
REMOTE_OTHER_CLIENT_IN_RTC = 1214
|
|
421
417
|
}
|
|
422
418
|
|
|
423
419
|
/**
|
|
@@ -475,10 +471,6 @@ interface IBaseSingalCon {
|
|
|
475
471
|
* 开始呼叫信令内容
|
|
476
472
|
*/
|
|
477
473
|
interface IStartCallCon {
|
|
478
|
-
/**
|
|
479
|
-
* 客户端生成,传给服务
|
|
480
|
-
*/
|
|
481
|
-
callId?: string;
|
|
482
474
|
/**
|
|
483
475
|
* 用户生成 callId
|
|
484
476
|
*/
|
|
@@ -499,10 +491,6 @@ interface IStartCallCon {
|
|
|
499
491
|
* 是否密聊
|
|
500
492
|
*/
|
|
501
493
|
secretChat: SecretCallType;
|
|
502
|
-
/**
|
|
503
|
-
* 密钥
|
|
504
|
-
*/
|
|
505
|
-
secretChatKey: string;
|
|
506
494
|
/**
|
|
507
495
|
* 当前用户的来源组 ID 类型
|
|
508
496
|
*/
|
|
@@ -527,16 +515,11 @@ interface IStartCallCon {
|
|
|
527
515
|
* 附加信息,服务器透传
|
|
528
516
|
*/
|
|
529
517
|
extra?: string;
|
|
530
|
-
innerExtra?: string;
|
|
531
518
|
}
|
|
532
519
|
/**
|
|
533
520
|
* 单呼信令内容
|
|
534
521
|
*/
|
|
535
522
|
interface IStartSingleCon {
|
|
536
|
-
/**
|
|
537
|
-
* 客户端生成,传递给服务
|
|
538
|
-
*/
|
|
539
|
-
callId?: string;
|
|
540
523
|
/**
|
|
541
524
|
* 用户生成 callId
|
|
542
525
|
*/
|
|
@@ -582,16 +565,11 @@ interface IStartSingleCon {
|
|
|
582
565
|
* 服务端接收的推送扩展
|
|
583
566
|
*/
|
|
584
567
|
pushExt?: string;
|
|
585
|
-
innerExtra?: string;
|
|
586
568
|
}
|
|
587
569
|
/**
|
|
588
570
|
* 群呼信令内容
|
|
589
571
|
*/
|
|
590
572
|
interface IStartGroupCon {
|
|
591
|
-
/**
|
|
592
|
-
* 客户端生成,传递给服务
|
|
593
|
-
*/
|
|
594
|
-
callId?: string;
|
|
595
573
|
/**
|
|
596
574
|
* 用户生成 callId
|
|
597
575
|
*/
|
|
@@ -628,16 +606,6 @@ interface IStartGroupCon {
|
|
|
628
606
|
* 服务端接收的推送扩展
|
|
629
607
|
*/
|
|
630
608
|
pushExt?: string;
|
|
631
|
-
innerExtra?: string;
|
|
632
|
-
/**
|
|
633
|
-
* 是否密聊(0: 否;1: 是)
|
|
634
|
-
* PC 目前无密聊,写死 0
|
|
635
|
-
*/
|
|
636
|
-
secretChat: SecretCallType;
|
|
637
|
-
/**
|
|
638
|
-
* 单聊加密 key
|
|
639
|
-
*/
|
|
640
|
-
secretChatKey?: string;
|
|
641
609
|
}
|
|
642
610
|
/**
|
|
643
611
|
* 开始呼叫 Server 返回
|
|
@@ -674,7 +642,6 @@ interface IInviteCallCon extends IBaseSingalCon {
|
|
|
674
642
|
* 服务端接收的推送扩展
|
|
675
643
|
*/
|
|
676
644
|
pushExt?: string;
|
|
677
|
-
innerExtra?: string;
|
|
678
645
|
}
|
|
679
646
|
/**
|
|
680
647
|
* 邀请好友加入信令结果
|
|
@@ -753,7 +720,7 @@ interface IPubInviteCon extends IBaseSingalCon {
|
|
|
753
720
|
/**
|
|
754
721
|
* 媒体类型
|
|
755
722
|
*/
|
|
756
|
-
mediaType: RCCallPlusMediaType
|
|
723
|
+
mediaType: RCCallPlusMediaType;
|
|
757
724
|
/**
|
|
758
725
|
* 是否密聊
|
|
759
726
|
*/
|
|
@@ -774,14 +741,6 @@ interface IPubInviteCon extends IBaseSingalCon {
|
|
|
774
741
|
* 附加信息
|
|
775
742
|
*/
|
|
776
743
|
extra?: string;
|
|
777
|
-
/**
|
|
778
|
-
* 可存储的扩展信息,由发起人发起时定义
|
|
779
|
-
*/
|
|
780
|
-
innerExtra?: string;
|
|
781
|
-
/**
|
|
782
|
-
* 通话加密密钥
|
|
783
|
-
*/
|
|
784
|
-
secretChatKey?: string;
|
|
785
744
|
}
|
|
786
745
|
/**
|
|
787
746
|
* 通话响铃信令内容
|
|
@@ -1010,7 +969,6 @@ interface ISyncCallLogRes extends IBaseSingalCon {
|
|
|
1010
969
|
* 同步数据
|
|
1011
970
|
*/
|
|
1012
971
|
syncTime: number;
|
|
1013
|
-
innerExtra?: string;
|
|
1014
972
|
}
|
|
1015
973
|
interface ISyncCallLogResList {
|
|
1016
974
|
hasMore: 0 | 1;
|
|
@@ -1052,7 +1010,7 @@ interface ISignalTransporterListener {
|
|
|
1052
1010
|
/**
|
|
1053
1011
|
* 收到通话状态变更
|
|
1054
1012
|
*/
|
|
1055
|
-
onStatusDown(data: IStatusDownCont,
|
|
1013
|
+
onStatusDown(data: IStatusDownCont, traceId: string, sessionId?: string): void;
|
|
1056
1014
|
/**
|
|
1057
1015
|
* 其他端通话状态变更
|
|
1058
1016
|
*/
|
|
@@ -1084,7 +1042,7 @@ interface IGetUserCallStateListRes {
|
|
|
1084
1042
|
callStateList: {
|
|
1085
1043
|
callId: string;
|
|
1086
1044
|
callType: RCCallPlusType;
|
|
1087
|
-
mediaType: RCCallPlusMediaType
|
|
1045
|
+
mediaType: RCCallPlusMediaType;
|
|
1088
1046
|
/**
|
|
1089
1047
|
* 呼叫发起者 ID
|
|
1090
1048
|
*/
|
|
@@ -1118,8 +1076,6 @@ interface IGetUserCallStateListRes {
|
|
|
1118
1076
|
*/
|
|
1119
1077
|
targetId: string;
|
|
1120
1078
|
startTime: number;
|
|
1121
|
-
innerExtra?: string;
|
|
1122
|
-
secretChat: SecretCallType;
|
|
1123
1079
|
}[];
|
|
1124
1080
|
}
|
|
1125
1081
|
interface IClearCallLogRes {
|
|
@@ -1140,7 +1096,7 @@ interface IGetCallSessionServerRes extends IBaseSingalCon {
|
|
|
1140
1096
|
/**
|
|
1141
1097
|
* 媒体类型
|
|
1142
1098
|
*/
|
|
1143
|
-
mediaType: RCCallPlusMediaType
|
|
1099
|
+
mediaType: RCCallPlusMediaType;
|
|
1144
1100
|
/**
|
|
1145
1101
|
* 通话状态
|
|
1146
1102
|
*/
|
|
@@ -1169,9 +1125,6 @@ interface IGetCallSessionServerRes extends IBaseSingalCon {
|
|
|
1169
1125
|
* 同步时间戳
|
|
1170
1126
|
*/
|
|
1171
1127
|
syncTime: number;
|
|
1172
|
-
innerExtra?: string;
|
|
1173
|
-
secretChat: SecretCallType;
|
|
1174
|
-
secretChatKey?: string;
|
|
1175
1128
|
}
|
|
1176
1129
|
interface IGetCallTimeInfoRes extends IBaseSingalCon {
|
|
1177
1130
|
/**
|
|
@@ -1242,14 +1195,6 @@ interface ISessionUser {
|
|
|
1242
1195
|
* 成员系统状态
|
|
1243
1196
|
*/
|
|
1244
1197
|
systemState: RCCallPlusReason;
|
|
1245
|
-
/**
|
|
1246
|
-
* 摄像头是否可用
|
|
1247
|
-
*/
|
|
1248
|
-
cameraEnable: boolean;
|
|
1249
|
-
/**
|
|
1250
|
-
* 麦克风是否可用
|
|
1251
|
-
*/
|
|
1252
|
-
microphoneEnable: boolean;
|
|
1253
1198
|
/**
|
|
1254
1199
|
* 来源组 ID 类型
|
|
1255
1200
|
*/
|
|
@@ -1324,14 +1269,6 @@ interface IRCCallPlusCallRecord {
|
|
|
1324
1269
|
* 创建时间
|
|
1325
1270
|
*/
|
|
1326
1271
|
createTimestamp: number;
|
|
1327
|
-
/**
|
|
1328
|
-
* 同步数据
|
|
1329
|
-
*/
|
|
1330
|
-
syncData?: string;
|
|
1331
|
-
/**
|
|
1332
|
-
* 是否为加密通话
|
|
1333
|
-
*/
|
|
1334
|
-
isSecret: boolean;
|
|
1335
1272
|
}
|
|
1336
1273
|
interface IUserInfo {
|
|
1337
1274
|
/**
|
|
@@ -1355,15 +1292,7 @@ interface IUserInfo {
|
|
|
1355
1292
|
*/
|
|
1356
1293
|
orgId?: string;
|
|
1357
1294
|
}
|
|
1358
|
-
interface IStartCallOpts {
|
|
1359
|
-
/**
|
|
1360
|
-
* 通话唯一 ID
|
|
1361
|
-
*/
|
|
1362
|
-
callId?: string;
|
|
1363
|
-
/**
|
|
1364
|
-
* 客户端 callId
|
|
1365
|
-
*/
|
|
1366
|
-
clientCallId: string;
|
|
1295
|
+
interface IStartCallOpts extends ICallId {
|
|
1367
1296
|
/**
|
|
1368
1297
|
* 被邀请人信息
|
|
1369
1298
|
*/
|
|
@@ -1375,7 +1304,7 @@ interface IStartCallOpts {
|
|
|
1375
1304
|
/**
|
|
1376
1305
|
* 通话媒体类型
|
|
1377
1306
|
*/
|
|
1378
|
-
mediaType: RCCallPlusMediaType
|
|
1307
|
+
mediaType: RCCallPlusMediaType;
|
|
1379
1308
|
/**
|
|
1380
1309
|
* 当前用户来源组 ID 类型
|
|
1381
1310
|
*/
|
|
@@ -1397,12 +1326,6 @@ interface IStartCallOpts {
|
|
|
1397
1326
|
* 附加信息,服务器透传
|
|
1398
1327
|
*/
|
|
1399
1328
|
extra?: string;
|
|
1400
|
-
/**
|
|
1401
|
-
* 内部透传信息,服务器会记录该数据
|
|
1402
|
-
*/
|
|
1403
|
-
innerExtra?: string;
|
|
1404
|
-
secretChat: SecretCallType;
|
|
1405
|
-
secretChatKey?: string;
|
|
1406
1329
|
}
|
|
1407
1330
|
interface IStartCallResult {
|
|
1408
1331
|
/**
|
|
@@ -1542,7 +1465,7 @@ interface IGetCallSessionRes extends ICallId {
|
|
|
1542
1465
|
/**
|
|
1543
1466
|
* 媒体类型
|
|
1544
1467
|
*/
|
|
1545
|
-
mediaType: RCCallPlusMediaType
|
|
1468
|
+
mediaType: RCCallPlusMediaType;
|
|
1546
1469
|
/**
|
|
1547
1470
|
* 通话状态
|
|
1548
1471
|
*/
|
|
@@ -1563,12 +1486,6 @@ interface IGetCallSessionRes extends ICallId {
|
|
|
1563
1486
|
* 同步时间戳
|
|
1564
1487
|
*/
|
|
1565
1488
|
syncTime: number;
|
|
1566
|
-
innerExtra?: string;
|
|
1567
|
-
secretChat: SecretCallType;
|
|
1568
|
-
/**
|
|
1569
|
-
* 通话加密密钥
|
|
1570
|
-
*/
|
|
1571
|
-
secretChatKey?: string;
|
|
1572
1489
|
}
|
|
1573
1490
|
|
|
1574
1491
|
declare enum CallTimerEventType {
|
|
@@ -1613,17 +1530,8 @@ declare class RCCallInnerSession extends EventEmitter {
|
|
|
1613
1530
|
*/
|
|
1614
1531
|
private _callUsers;
|
|
1615
1532
|
private readonly _logger;
|
|
1616
|
-
private readonly _isSecret;
|
|
1617
|
-
/**
|
|
1618
|
-
* 同步数据
|
|
1619
|
-
*/
|
|
1620
|
-
private _syncData;
|
|
1621
1533
|
/**
|
|
1622
|
-
*
|
|
1623
|
-
*/
|
|
1624
|
-
private _secretKey;
|
|
1625
|
-
/**
|
|
1626
|
-
* 暂存请求更新的 mediaType,无请求时为 null
|
|
1534
|
+
* 请求更新的 mediaType
|
|
1627
1535
|
*/
|
|
1628
1536
|
private _reqMediaType;
|
|
1629
1537
|
/**
|
|
@@ -1664,7 +1572,7 @@ declare class RCCallInnerSession extends EventEmitter {
|
|
|
1664
1572
|
/**
|
|
1665
1573
|
* 通话媒体类型
|
|
1666
1574
|
*/
|
|
1667
|
-
_mediaType: RCCallPlusMediaType
|
|
1575
|
+
_mediaType: RCCallPlusMediaType,
|
|
1668
1576
|
/**
|
|
1669
1577
|
* session 呼叫发起者
|
|
1670
1578
|
*/
|
|
@@ -1676,15 +1584,7 @@ declare class RCCallInnerSession extends EventEmitter {
|
|
|
1676
1584
|
/**
|
|
1677
1585
|
* 当前 session 人员信息列表
|
|
1678
1586
|
*/
|
|
1679
|
-
_callUsers: ISessionUser[], _logger: BasicLogger
|
|
1680
|
-
/**
|
|
1681
|
-
* 同步数据
|
|
1682
|
-
*/
|
|
1683
|
-
_syncData?: string,
|
|
1684
|
-
/**
|
|
1685
|
-
* 通话加密密钥
|
|
1686
|
-
*/
|
|
1687
|
-
_secretKey?: string);
|
|
1587
|
+
_callUsers: ISessionUser[], _logger: BasicLogger);
|
|
1688
1588
|
/**
|
|
1689
1589
|
* 获取 CallID
|
|
1690
1590
|
*/
|
|
@@ -1700,7 +1600,7 @@ declare class RCCallInnerSession extends EventEmitter {
|
|
|
1700
1600
|
/**
|
|
1701
1601
|
* 获取媒体类型
|
|
1702
1602
|
*/
|
|
1703
|
-
getMediaType(): RCCallPlusMediaType
|
|
1603
|
+
getMediaType(): RCCallPlusMediaType;
|
|
1704
1604
|
/**
|
|
1705
1605
|
* 获取 session 发起者
|
|
1706
1606
|
*/
|
|
@@ -1716,7 +1616,7 @@ declare class RCCallInnerSession extends EventEmitter {
|
|
|
1716
1616
|
/**
|
|
1717
1617
|
* 请求更新的 mediaType
|
|
1718
1618
|
*/
|
|
1719
|
-
getReqMediaType(): RCCallPlusMediaType
|
|
1619
|
+
getReqMediaType(): RCCallPlusMediaType | null;
|
|
1720
1620
|
/**
|
|
1721
1621
|
* inviterTimerId
|
|
1722
1622
|
*/
|
|
@@ -1726,7 +1626,6 @@ declare class RCCallInnerSession extends EventEmitter {
|
|
|
1726
1626
|
*/
|
|
1727
1627
|
getInviteeTimerId(): number;
|
|
1728
1628
|
getAllTimerIds(): number[];
|
|
1729
|
-
setUserDeviceEnable(userId: string, mediaType: RCCallPlusMediaType, enable: boolean, traceId: string): void;
|
|
1730
1629
|
/**
|
|
1731
1630
|
* 更新人员列表, 并返回更新的人员列表
|
|
1732
1631
|
* 根据人员状态去添加、删除、更新
|
|
@@ -1746,11 +1645,11 @@ declare class RCCallInnerSession extends EventEmitter {
|
|
|
1746
1645
|
/**
|
|
1747
1646
|
* 更新媒体类型(升降级)
|
|
1748
1647
|
*/
|
|
1749
|
-
updateMediaType(mediaType: RCCallPlusMediaType
|
|
1648
|
+
updateMediaType(mediaType: RCCallPlusMediaType): void;
|
|
1750
1649
|
/**
|
|
1751
1650
|
* 更新请求的媒体类型(升降级)
|
|
1752
1651
|
*/
|
|
1753
|
-
updateReqMediaType(mediaType: RCCallPlusMediaType
|
|
1652
|
+
updateReqMediaType(mediaType: RCCallPlusMediaType | null): void;
|
|
1754
1653
|
/**
|
|
1755
1654
|
* 更新 invter timer id
|
|
1756
1655
|
*/
|
|
@@ -1764,9 +1663,6 @@ declare class RCCallInnerSession extends EventEmitter {
|
|
|
1764
1663
|
*/
|
|
1765
1664
|
setIsLocalClientHangup(isLocalClientHangup: boolean): void;
|
|
1766
1665
|
getIsLocalClientHangup(): boolean;
|
|
1767
|
-
getSyncData(): string | undefined;
|
|
1768
|
-
isSecret(): boolean;
|
|
1769
|
-
getSecretKey(): string;
|
|
1770
1666
|
}
|
|
1771
1667
|
|
|
1772
1668
|
declare enum CallServerAction {
|
|
@@ -2060,6 +1956,8 @@ declare class RCCallPlusReportModule {
|
|
|
2060
1956
|
|
|
2061
1957
|
declare class SignalTransporter extends EventEmitter {
|
|
2062
1958
|
private readonly _context;
|
|
1959
|
+
private readonly _runtime;
|
|
1960
|
+
private readonly _initOpts;
|
|
2063
1961
|
private readonly _timeCorrectioner;
|
|
2064
1962
|
private readonly _logger;
|
|
2065
1963
|
private readonly _reportAppEventModule;
|
|
@@ -2075,7 +1973,7 @@ declare class SignalTransporter extends EventEmitter {
|
|
|
2075
1973
|
/**
|
|
2076
1974
|
* constructor
|
|
2077
1975
|
*/
|
|
2078
|
-
constructor(_context: PluginContext, _timeCorrectioner: TimeCorrectioner, _logger: BasicLogger, _reportAppEventModule: RCCallPlusReportModule);
|
|
1976
|
+
constructor(_context: PluginContext, _runtime: IRuntime, _initOpts: ICallPlusInitOpts, _timeCorrectioner: TimeCorrectioner, _logger: BasicLogger, _reportAppEventModule: RCCallPlusReportModule);
|
|
2079
1977
|
private _onMessage;
|
|
2080
1978
|
getSessionId(): string;
|
|
2081
1979
|
getDeviceId(): string;
|
|
@@ -2207,7 +2105,7 @@ declare class SignalTransporter extends EventEmitter {
|
|
|
2207
2105
|
/**
|
|
2208
2106
|
* 补偿数据处理
|
|
2209
2107
|
*/
|
|
2210
|
-
private
|
|
2108
|
+
private _onConpensationData;
|
|
2211
2109
|
}
|
|
2212
2110
|
|
|
2213
2111
|
/**
|
|
@@ -2217,8 +2115,9 @@ declare class SignalTransporter extends EventEmitter {
|
|
|
2217
2115
|
*/
|
|
2218
2116
|
declare class AbnormalCall {
|
|
2219
2117
|
private readonly _logger;
|
|
2118
|
+
private _localStore;
|
|
2220
2119
|
private static _STORAGE_KEY;
|
|
2221
|
-
constructor(_logger: BasicLogger);
|
|
2120
|
+
constructor(runtime: IRuntime, _logger: BasicLogger);
|
|
2222
2121
|
/**
|
|
2223
2122
|
* 添加异常 callId
|
|
2224
2123
|
*/
|
|
@@ -2233,8 +2132,250 @@ declare class AbnormalCall {
|
|
|
2233
2132
|
getAbnormalCallIds(userId: string): Promise<string[] | null>;
|
|
2234
2133
|
}
|
|
2235
2134
|
|
|
2135
|
+
declare class RTCModule extends EventEmitter {
|
|
2136
|
+
private readonly _context;
|
|
2137
|
+
private readonly _runtime;
|
|
2138
|
+
private readonly _initOpts;
|
|
2139
|
+
private readonly _logger;
|
|
2140
|
+
private readonly _callEngine;
|
|
2141
|
+
private readonly _reportAppEventModule;
|
|
2142
|
+
static __INNER_RTC_PROCESS_FAILED__: string;
|
|
2143
|
+
static __INNER_RTC_PEERCONNECTION_ABNORMAL_CLOSE__: string;
|
|
2144
|
+
static __INNER_ON_SELF_JOINED__: string;
|
|
2145
|
+
static __INNER_ON_OTHER_JOINED__: string;
|
|
2146
|
+
static __INNER_RECEIVE_FIRST_FRAME__: string;
|
|
2147
|
+
static __INNER_ON_KICKOFF__: string;
|
|
2148
|
+
/**
|
|
2149
|
+
* RCRTC 实例
|
|
2150
|
+
*/
|
|
2151
|
+
_rtcClient: RCRTCClient;
|
|
2152
|
+
/**
|
|
2153
|
+
* 己方的音视频 tracks
|
|
2154
|
+
*/
|
|
2155
|
+
private _localTracks;
|
|
2156
|
+
/**
|
|
2157
|
+
* RCRTCRoom 实例
|
|
2158
|
+
*/
|
|
2159
|
+
_room: RCRTCRoom | null;
|
|
2160
|
+
private _callId;
|
|
2161
|
+
private _callMediaType;
|
|
2162
|
+
private _videoConfig;
|
|
2163
|
+
private _audioConfig;
|
|
2164
|
+
private _isPubTiny;
|
|
2165
|
+
private _audioOutputDeviceId;
|
|
2166
|
+
/**
|
|
2167
|
+
* 视频配置是否变更
|
|
2168
|
+
*/
|
|
2169
|
+
private _videoConfigIsChange;
|
|
2170
|
+
/**
|
|
2171
|
+
* 音频配置是否变更
|
|
2172
|
+
*/
|
|
2173
|
+
private _audioConfigIsChange;
|
|
2174
|
+
/**
|
|
2175
|
+
* 存储设置的人员和视图
|
|
2176
|
+
*/
|
|
2177
|
+
private _userViewMap;
|
|
2178
|
+
private _callPlusStatusReportListener;
|
|
2179
|
+
private _remoteAudioEnable;
|
|
2180
|
+
constructor(_context: PluginContext, _runtime: IRuntime, _initOpts: ICallPlusInitOpts, _logger: BasicLogger, _callEngine: RCCallEngine, _reportAppEventModule: RCCallPlusReportModule);
|
|
2181
|
+
setCallPlusStatusReportListener(listener: IStatusReportListener): void;
|
|
2182
|
+
/**
|
|
2183
|
+
* 取摄像头资源
|
|
2184
|
+
* 内存中有时,返回内存中的视轨
|
|
2185
|
+
*/
|
|
2186
|
+
getCameraVideoTrack(traceId: string): Promise<{
|
|
2187
|
+
code: number;
|
|
2188
|
+
track?: RCLocalTrack;
|
|
2189
|
+
}>;
|
|
2190
|
+
/**
|
|
2191
|
+
* 取麦克风资源
|
|
2192
|
+
* 内存中有时,返回内存中的音轨
|
|
2193
|
+
*/
|
|
2194
|
+
getMicrophoneAudioTrack(traceId: string): Promise<{
|
|
2195
|
+
code: number;
|
|
2196
|
+
track?: RCLocalTrack;
|
|
2197
|
+
}>;
|
|
2198
|
+
/**
|
|
2199
|
+
* 根据通话类型创建音、视频资源
|
|
2200
|
+
* @param mediaType 音频或音视频
|
|
2201
|
+
*/
|
|
2202
|
+
createCallMediaTracks(mediaType: RCCallPlusMediaType, traceId: string): Promise<{
|
|
2203
|
+
code: number;
|
|
2204
|
+
}>;
|
|
2205
|
+
setVideoConfig(videoConfig: IVideoConfig): void;
|
|
2206
|
+
setAudioConfig(audioConfig: IAudioConfig): void;
|
|
2207
|
+
setAudioOutputDeviceId(deviceId: string): Promise<{
|
|
2208
|
+
code: number;
|
|
2209
|
+
}>;
|
|
2210
|
+
destroyAllTracks(traceId: string): void;
|
|
2211
|
+
setAllRemoteAudioEnable(enable: boolean, traceId: string): {
|
|
2212
|
+
code: 80001;
|
|
2213
|
+
} | {
|
|
2214
|
+
code: 0;
|
|
2215
|
+
};
|
|
2216
|
+
destroyTrack(track: RCLocalTrack): Promise<void>;
|
|
2217
|
+
/**
|
|
2218
|
+
* session 连接
|
|
2219
|
+
*/
|
|
2220
|
+
sessionConnected(callId: string, traceId: string): Promise<void>;
|
|
2221
|
+
sessionClose(callId: string, traceId: string): Promise<void>;
|
|
2222
|
+
/**
|
|
2223
|
+
* 禁用视频 track
|
|
2224
|
+
*/
|
|
2225
|
+
disableVideoTrack(): Promise<{
|
|
2226
|
+
code: number | RCRTCCode;
|
|
2227
|
+
track?: RCLocalTrack;
|
|
2228
|
+
}>;
|
|
2229
|
+
/**
|
|
2230
|
+
* 启用视频track
|
|
2231
|
+
* 1. 启用前应用层需先创建视频 track
|
|
2232
|
+
*/
|
|
2233
|
+
enableVideoTrack(traceId: string): Promise<{
|
|
2234
|
+
code: number | RCRTCCode;
|
|
2235
|
+
}>;
|
|
2236
|
+
/**
|
|
2237
|
+
* 通话中切换视频设备
|
|
2238
|
+
*/
|
|
2239
|
+
changeVideoDevice(traceId: string): Promise<{
|
|
2240
|
+
code: number;
|
|
2241
|
+
track?: RCLocalTrack;
|
|
2242
|
+
}>;
|
|
2243
|
+
/**
|
|
2244
|
+
* 通话中更换音频设备
|
|
2245
|
+
*/
|
|
2246
|
+
changeAudioDevice(traceId: string): Promise<{
|
|
2247
|
+
code: number;
|
|
2248
|
+
}>;
|
|
2249
|
+
/**
|
|
2250
|
+
* 禁用音频 track
|
|
2251
|
+
*/
|
|
2252
|
+
disableAudioTrack(): Promise<{
|
|
2253
|
+
code: number | RCRTCCode;
|
|
2254
|
+
track?: RCLocalTrack;
|
|
2255
|
+
}>;
|
|
2256
|
+
/**
|
|
2257
|
+
* 媒体类型升、降
|
|
2258
|
+
*/
|
|
2259
|
+
changeMediaType(mediaType: RCCallPlusMediaType, traceId: string): Promise<void>;
|
|
2260
|
+
/**
|
|
2261
|
+
* 升级 音频 -> 音视频
|
|
2262
|
+
* 1. 业务层需要先通过 createLocalTracks 创建本地视频 track
|
|
2263
|
+
* 2. SDK 只处理发布视频 track
|
|
2264
|
+
*/
|
|
2265
|
+
private _upgradeMediaType;
|
|
2266
|
+
/**
|
|
2267
|
+
* 降级处理
|
|
2268
|
+
*/
|
|
2269
|
+
private _downgradeMediaType;
|
|
2270
|
+
/**
|
|
2271
|
+
* 加入 RTC 房间
|
|
2272
|
+
*/
|
|
2273
|
+
joinRTCRoom(callId: string, traceId: string): Promise<{
|
|
2274
|
+
code: number;
|
|
2275
|
+
room?: RCRTCRoom;
|
|
2276
|
+
tracks?: RCRemoteTrack[];
|
|
2277
|
+
}>;
|
|
2278
|
+
/**
|
|
2279
|
+
* RTC 订阅
|
|
2280
|
+
*/
|
|
2281
|
+
subscribeTracks(tracks: (ISubscribeAttr)[], traceId: string): Promise<{
|
|
2282
|
+
code: number;
|
|
2283
|
+
}>;
|
|
2284
|
+
/**
|
|
2285
|
+
* RTC 取消订阅
|
|
2286
|
+
*/
|
|
2287
|
+
unsubscribeTracks(tracks: RCRemoteTrack[], traceId: string): Promise<{
|
|
2288
|
+
code: number;
|
|
2289
|
+
}>;
|
|
2290
|
+
private _releaseStoredData;
|
|
2291
|
+
getRemoteTracks(): {
|
|
2292
|
+
[userId: string]: RCRemoteTrack[];
|
|
2293
|
+
};
|
|
2294
|
+
getRemoteTrack(userId: string, mediaType: RCCallPlusMediaType): RCRemoteTrack | undefined;
|
|
2295
|
+
getRTCSessionId(): string | null;
|
|
2296
|
+
/** ======私有方法============================================================================================= */
|
|
2297
|
+
/**
|
|
2298
|
+
* RTC 事件监听注册
|
|
2299
|
+
*/
|
|
2300
|
+
private _regRTCListeners;
|
|
2301
|
+
private _onLocalTrackReady;
|
|
2302
|
+
private _onRemoteTrackReady;
|
|
2303
|
+
private _onKickOff;
|
|
2304
|
+
/**
|
|
2305
|
+
* RTC Peer 异常关闭
|
|
2306
|
+
* 移动端未处理此回调,定义 sysStatus 为 CONNECTION_ERR
|
|
2307
|
+
*/
|
|
2308
|
+
private _onRTCPeerConnectionCloseByException;
|
|
2309
|
+
private _onSelfJoined;
|
|
2310
|
+
private _onRemoteTrackPublish;
|
|
2311
|
+
private _onTrackUnpublish;
|
|
2312
|
+
private _onAudioMuteChange;
|
|
2313
|
+
private _onVideoMuteChagne;
|
|
2314
|
+
private _onRTCStateReport;
|
|
2315
|
+
/**
|
|
2316
|
+
* RTC 接收最终失败后需要调用 hangup 挂断的情况
|
|
2317
|
+
*/
|
|
2318
|
+
private _onRTCMethodFail;
|
|
2319
|
+
private _onOtherMemJoined;
|
|
2320
|
+
/**
|
|
2321
|
+
* 创建本地音频 track, 创建成功后保存本地并回调通知
|
|
2322
|
+
*/
|
|
2323
|
+
private _createAudioTrack;
|
|
2324
|
+
/**
|
|
2325
|
+
* 创建本地视频 track, 创建成功后保存本地并回调通知
|
|
2326
|
+
*/
|
|
2327
|
+
private _createVideoTrack;
|
|
2328
|
+
/**
|
|
2329
|
+
* 获得本地缓存视频 track
|
|
2330
|
+
*/
|
|
2331
|
+
getLocalVideoTrack(): RCLocalTrack | undefined;
|
|
2332
|
+
/**
|
|
2333
|
+
* 获得本地缓存音频 track
|
|
2334
|
+
*/
|
|
2335
|
+
getLocalAudioTrack(): RCLocalTrack | undefined;
|
|
2336
|
+
/**
|
|
2337
|
+
* 发布本地资源的逻辑
|
|
2338
|
+
*/
|
|
2339
|
+
publish(tracks: (RCLocalTrack | IPublishAttrs)[], traceId: string): Promise<{
|
|
2340
|
+
code: number;
|
|
2341
|
+
}>;
|
|
2342
|
+
publishVideoTrack(): Promise<IPubSuccessRes>;
|
|
2343
|
+
setVideoView(list: {
|
|
2344
|
+
userId: string;
|
|
2345
|
+
videoElement: HTMLVideoElement;
|
|
2346
|
+
isTiny?: boolean;
|
|
2347
|
+
}[], traceId: string): void;
|
|
2348
|
+
/**
|
|
2349
|
+
* 删除视图时,取消订阅资源
|
|
2350
|
+
*/
|
|
2351
|
+
removeVideoView(userIds: string[], traceId: string): void;
|
|
2352
|
+
/**
|
|
2353
|
+
* 获取存储的人员和 video 元素数据
|
|
2354
|
+
*/
|
|
2355
|
+
getUserViewMap(): {
|
|
2356
|
+
[userId: string]: {
|
|
2357
|
+
videoView: HTMLVideoElement;
|
|
2358
|
+
isTiny: boolean;
|
|
2359
|
+
};
|
|
2360
|
+
};
|
|
2361
|
+
/**
|
|
2362
|
+
* 播放媒体资源
|
|
2363
|
+
*/
|
|
2364
|
+
playMedia(userId: string, mediaType: RCCallPlusMediaType, videoView: HTMLVideoElement, traceId: string): Promise<{
|
|
2365
|
+
code: 80104;
|
|
2366
|
+
} | {
|
|
2367
|
+
code: 80102;
|
|
2368
|
+
} | {
|
|
2369
|
+
code: RCRTCCode.PB_ERROR | RCRTCCode.SIGNAL_DISCONNECTED | RCRTCCode.PARAMS_ERROR | RCRTCCode.REPERT_JOIN_ROOM | RCRTCCode.NOT_IN_ROOM | RCRTCCode.SERVICE_INVALID | RCRTCCode.RTC_TOKEN_INVALID | RCRTCCode.SIGNAL_ERROR | RCRTCCode.CREATE_OFFER_FAILED | RCRTCCode.REQUEST_FAILED | RCRTCCode.MCU_SERVER_NOT_FOUND | RCRTCCode.BROADCAST_SUB_LIST_NOT_EMPTY | RCRTCCode.ROOM_HAS_BEEN_DESTROYED | RCRTCCode.NOT_OPEN_VIDEO_AUDIO_SERVER | RCRTCCode.GET_USER_MEDIA_FAILED | RCRTCCode.GET_DISPLAY_MEDIA_FAILED | RCRTCCode.BROWSER_PERMISSION_DENIED | RCRTCCode.CREATE_CUSTOM_TRACK_FAILED | RCRTCCode.INVALID_TAGS | RCRTCCode.INVALID_USER_ID | RCRTCCode.CREATE_FILE_TRACK_FAILED | RCRTCCode.INVALID_FILE_INSTANCE | RCRTCCode.SET_REMOTE_DESCRIPTION_FAILED | RCRTCCode.BROWSER_NOT_SUPPORT | RCRTCCode.TRACK_NOT_READY | RCRTCCode.VIDEO_TRACK_MISS_MEDIA_ELEMENT | RCRTCCode.TRACK_PLAY_ERROR | RCRTCCode.SIGNAL_AUDIENCE_JOIN_ROOM_FAILED | RCRTCCode.SIGNAL_ROOM_CHANGE_IDENTITY_FAILED | RCRTCCode.PACKAGE_ENVIRONMENT_ERROR | RCRTCCode.PUBLISH_TRACK_LIMIT_EXCEEDED | RCRTCCode.CDN_RESOURCE_IS_EMPTY | RCRTCCode.SIGNAL_JOIN_RTC_ROOM_REFUSED | RCRTCCode.NO_PERMISSION_TO_USE_REQUESTED_DEVICE | RCRTCCode.THE_FUNCTION_IS_DISABLED_IN_PKROOM | RCRTCCode.SOME_TRACKS_PUBLISH_FAILED | RCRTCCode.MAC_IN_ELECTRON_NOT_SUPPORT_SCREEN_SHARE_WITH_AUDIO | RCRTCCode.JWT_TIME_OUT | RCRTCCode.SYSTEM_PERMISSION_DENIED | RCRTCCode.PUBLISH_TRACKS_IS_INVALID | RCRTCCode.TRACK_READYSTATE_IS_ENDED | RCRTCCode.APPLY_3A_NOISE_WORKLET_BEFORE_PUBLISH | RCRTCCode.LOAD_3A_MODULE_FAILED;
|
|
2370
|
+
} | {
|
|
2371
|
+
code: 0;
|
|
2372
|
+
}>;
|
|
2373
|
+
}
|
|
2374
|
+
|
|
2236
2375
|
declare class RCCallEngine extends EventEmitter {
|
|
2237
2376
|
private readonly _context;
|
|
2377
|
+
private readonly _runtime;
|
|
2378
|
+
private readonly _initOpts;
|
|
2238
2379
|
private readonly _logger;
|
|
2239
2380
|
private readonly _reportAppEventModule;
|
|
2240
2381
|
static __INNER_SESSION_CLOSE__: string;
|
|
@@ -2276,10 +2417,14 @@ declare class RCCallEngine extends EventEmitter {
|
|
|
2276
2417
|
* client callId
|
|
2277
2418
|
*/
|
|
2278
2419
|
private _clientCallId;
|
|
2420
|
+
/**
|
|
2421
|
+
* session 需使用 rtc 模块取设备状态
|
|
2422
|
+
*/
|
|
2423
|
+
private _rtcModule;
|
|
2279
2424
|
/**
|
|
2280
2425
|
* 构造器
|
|
2281
2426
|
*/
|
|
2282
|
-
constructor(_context: PluginContext, _logger: BasicLogger, _reportAppEventModule: RCCallPlusReportModule);
|
|
2427
|
+
constructor(_context: PluginContext, _runtime: IRuntime, _initOpts: ICallPlusInitOpts, _logger: BasicLogger, _reportAppEventModule: RCCallPlusReportModule);
|
|
2283
2428
|
/**
|
|
2284
2429
|
* 发起呼叫
|
|
2285
2430
|
*/
|
|
@@ -2401,8 +2546,7 @@ declare class RCCallEngine extends EventEmitter {
|
|
|
2401
2546
|
* 通知人员状态
|
|
2402
2547
|
* CallClient 也需要更新人员状态,定义为公共函数
|
|
2403
2548
|
*/
|
|
2404
|
-
updateUsersState(callId: string, users: ISessionUser[], traceId: string):
|
|
2405
|
-
setUserDeviceEnable(userId: string, mediaType: RCCallPlusMediaType, enable: boolean, traceId: string): void;
|
|
2549
|
+
updateUsersState(callId: string, users: ISessionUser[], traceId: string): ISessionUser[];
|
|
2406
2550
|
/**
|
|
2407
2551
|
* 获取通话开始时间
|
|
2408
2552
|
*/
|
|
@@ -2443,6 +2587,7 @@ declare class RCCallEngine extends EventEmitter {
|
|
|
2443
2587
|
endCurrentUserAbnormalCalls(allDevice: boolean): Promise<{
|
|
2444
2588
|
code: number;
|
|
2445
2589
|
}>;
|
|
2590
|
+
setRTCModule(rtcModule: RTCModule): void;
|
|
2446
2591
|
/** ======私有方法============================================================================================= */
|
|
2447
2592
|
/**
|
|
2448
2593
|
* IM 状态变更处理
|
|
@@ -2528,7 +2673,7 @@ declare class RCCallEngine extends EventEmitter {
|
|
|
2528
2673
|
* A2 多端在接听和直接加入 call 时,上报 onPhoneEnd 状态,消除 B 端展示的 onPhone 状态
|
|
2529
2674
|
*/
|
|
2530
2675
|
private _clearMobileOnPhone;
|
|
2531
|
-
|
|
2676
|
+
reportRemoteUserStateChange(callId: string, users: ISessionUser[], traceId: string): void;
|
|
2532
2677
|
private _onOtherMemberInvite;
|
|
2533
2678
|
private _onRequestChangeMediaType;
|
|
2534
2679
|
private _receiveMediaTypeChangeResult;
|
|
@@ -2542,10 +2687,12 @@ declare class RCCallPlusSession {
|
|
|
2542
2687
|
private readonly _session;
|
|
2543
2688
|
private readonly _callEngine;
|
|
2544
2689
|
private readonly _logger;
|
|
2690
|
+
private readonly _rtcModule;
|
|
2691
|
+
private readonly _context;
|
|
2545
2692
|
private _startTime;
|
|
2546
2693
|
private _duration;
|
|
2547
2694
|
private _callId;
|
|
2548
|
-
constructor(_session: RCCallInnerSession, _callEngine: RCCallEngine, _logger: BasicLogger);
|
|
2695
|
+
constructor(_session: RCCallInnerSession, _callEngine: RCCallEngine, _logger: BasicLogger, _rtcModule: RTCModule, _context: PluginContext);
|
|
2549
2696
|
/**
|
|
2550
2697
|
* 获取 CallId
|
|
2551
2698
|
*/
|
|
@@ -2561,7 +2708,7 @@ declare class RCCallPlusSession {
|
|
|
2561
2708
|
/**
|
|
2562
2709
|
* 获取通话媒体类型
|
|
2563
2710
|
*/
|
|
2564
|
-
getMediaType(): RCCallPlusMediaType
|
|
2711
|
+
getMediaType(): RCCallPlusMediaType;
|
|
2565
2712
|
/**
|
|
2566
2713
|
* 获取通话人员列表
|
|
2567
2714
|
*/
|
|
@@ -2593,20 +2740,6 @@ declare class RCCallPlusSession {
|
|
|
2593
2740
|
code: number;
|
|
2594
2741
|
duration?: number;
|
|
2595
2742
|
}>;
|
|
2596
|
-
/**
|
|
2597
|
-
* 获取通话中的缓存数据,数据由通话发起人在发起通话时定义
|
|
2598
|
-
* @returns
|
|
2599
|
-
*/
|
|
2600
|
-
getSyncData(): string | undefined;
|
|
2601
|
-
/**
|
|
2602
|
-
* 通话是否已加密
|
|
2603
|
-
* @returns
|
|
2604
|
-
*/
|
|
2605
|
-
isSecret(): boolean;
|
|
2606
|
-
/**
|
|
2607
|
-
* 获取通话加密密钥
|
|
2608
|
-
*/
|
|
2609
|
-
getSecretKey(): string;
|
|
2610
2743
|
}
|
|
2611
2744
|
|
|
2612
2745
|
/**
|
|
@@ -2707,6 +2840,10 @@ interface ICallPlusInitOpts {
|
|
|
2707
2840
|
* 是否发布小流
|
|
2708
2841
|
*/
|
|
2709
2842
|
isPubTiny?: boolean;
|
|
2843
|
+
/**
|
|
2844
|
+
* ring 状态下是否允许立即开始新通话,默认为 true
|
|
2845
|
+
*/
|
|
2846
|
+
isAllowNewCallWhenRinging?: boolean;
|
|
2710
2847
|
}
|
|
2711
2848
|
/**
|
|
2712
2849
|
* 通话记录的消息 content 字段
|
|
@@ -2744,75 +2881,12 @@ interface IRCCallPlusSummaryMessageContent {
|
|
|
2744
2881
|
* 通话挂断原因
|
|
2745
2882
|
*/
|
|
2746
2883
|
hangupReason: RCCallPlusReason;
|
|
2747
|
-
/**
|
|
2748
|
-
* 是否为加密通话
|
|
2749
|
-
*/
|
|
2750
|
-
isSecret: boolean;
|
|
2751
|
-
/**
|
|
2752
|
-
* 通话发起人定义的同步信息
|
|
2753
|
-
*/
|
|
2754
|
-
syncData?: string;
|
|
2755
|
-
/**
|
|
2756
|
-
* 是否是本人挂断
|
|
2757
|
-
*/
|
|
2758
|
-
isSelfHangup: boolean;
|
|
2759
2884
|
}
|
|
2760
2885
|
/**
|
|
2761
2886
|
* 通话记录的消息结构定义
|
|
2762
2887
|
*/
|
|
2763
2888
|
interface IRCCallPlusReceivedSummaryMessage extends IReceivedMessage {
|
|
2764
2889
|
}
|
|
2765
|
-
/**
|
|
2766
|
-
* 发起呼叫参数
|
|
2767
|
-
*/
|
|
2768
|
-
interface IRCCallPlusStartParams {
|
|
2769
|
-
/**
|
|
2770
|
-
* callId,量子生成相同密钥时使用
|
|
2771
|
-
*/
|
|
2772
|
-
callId?: string;
|
|
2773
|
-
/**
|
|
2774
|
-
* 被叫方通话用户列表
|
|
2775
|
-
*/
|
|
2776
|
-
userIds: string[];
|
|
2777
|
-
/**
|
|
2778
|
-
* 通话类型,默认为 `RCCallPlusType.SINGLE`
|
|
2779
|
-
* * `RCCallPlusType.SINGLE` - 发起单人呼叫
|
|
2780
|
-
* * `RCCallPlusType.MULTI` - 发起多人呼叫
|
|
2781
|
-
*/
|
|
2782
|
-
type?: RCCallPlusType;
|
|
2783
|
-
/**
|
|
2784
|
-
* 通话媒体类型,默认为 `RCCallPlusMediaType.AUDIO_VIDEO` 音视频通话
|
|
2785
|
-
* * `RCCallPlusMediaType.AUDIO` - 音频通话
|
|
2786
|
-
* * `RCCallPlusMediaType.AUDIO_VIDEO` - 音视频通话
|
|
2787
|
-
*/
|
|
2788
|
-
mediaType: RCCallPlusMediaType.AUDIO | RCCallPlusMediaType.AUDIO_VIDEO;
|
|
2789
|
-
/**
|
|
2790
|
-
* 推送配置,用于定义移动端接收呼叫时的推送行为
|
|
2791
|
-
*/
|
|
2792
|
-
pushConfig?: IRCCallPlusPushConfig;
|
|
2793
|
-
/**
|
|
2794
|
-
* 透传信息,该信息将通过 `onReceivedCall` 回调时透传给被叫方
|
|
2795
|
-
*/
|
|
2796
|
-
extra?: string;
|
|
2797
|
-
/**
|
|
2798
|
-
* 定义通话同步数据,该数据与 `extra` 不同点,在于数据会被服务器存储,同时可通过 `session.getSyncData()` 获取;
|
|
2799
|
-
* 数据不可超出 1024 Bytes
|
|
2800
|
-
*/
|
|
2801
|
-
syncData?: string;
|
|
2802
|
-
/**
|
|
2803
|
-
* 加密配置
|
|
2804
|
-
*/
|
|
2805
|
-
encryption?: {
|
|
2806
|
-
/**
|
|
2807
|
-
* 是否加密,默认不加密
|
|
2808
|
-
*/
|
|
2809
|
-
isSecret: boolean;
|
|
2810
|
-
/**
|
|
2811
|
-
* 密钥
|
|
2812
|
-
*/
|
|
2813
|
-
secretKey: string;
|
|
2814
|
-
};
|
|
2815
|
-
}
|
|
2816
2890
|
/**
|
|
2817
2891
|
* callPlus 对外事件定义
|
|
2818
2892
|
*/
|
|
@@ -3067,15 +3141,6 @@ interface IStatusReportListener {
|
|
|
3067
3141
|
onReceivePacketLoss(data: {
|
|
3068
3142
|
[userId: string]: RCCallPlusPacketLossStats;
|
|
3069
3143
|
}): void;
|
|
3070
|
-
/**
|
|
3071
|
-
* 上报远端视频信息,每秒回调一次
|
|
3072
|
-
* @param info.width 视频宽度
|
|
3073
|
-
* @param info.height 视频高度
|
|
3074
|
-
*/
|
|
3075
|
-
onReceiveRemoteVideoInfo?(info: {
|
|
3076
|
-
width: number;
|
|
3077
|
-
height: number;
|
|
3078
|
-
}): void;
|
|
3079
3144
|
}
|
|
3080
3145
|
/**
|
|
3081
3146
|
* 人员及人员状态
|
|
@@ -3327,8 +3392,11 @@ declare class RCCallPlusAndroidPushConfigBuilder {
|
|
|
3327
3392
|
setimageUrlHonor(imageUrlHonor: string): this;
|
|
3328
3393
|
/**
|
|
3329
3394
|
* 构建 IAndroidPushConfig
|
|
3395
|
+
<<<<<<< HEAD
|
|
3396
|
+
=======
|
|
3330
3397
|
* @returns IAndroidPushConfig 安卓推送配置数据
|
|
3331
3398
|
* 返回值需传入 startCall、invite、hangup 方法的 pushConfig.androidConfig 中
|
|
3399
|
+
>>>>>>> develop
|
|
3332
3400
|
*/
|
|
3333
3401
|
build(): IAndroidPushConfig;
|
|
3334
3402
|
}
|
|
@@ -3336,6 +3404,7 @@ declare class RCCallPlusAndroidPushConfigBuilder {
|
|
|
3336
3404
|
declare class RCCallPlusClient {
|
|
3337
3405
|
private readonly _context;
|
|
3338
3406
|
private readonly _logger;
|
|
3407
|
+
private readonly _runtime;
|
|
3339
3408
|
private readonly _initOpts;
|
|
3340
3409
|
/**
|
|
3341
3410
|
* 摄像头采集配置
|
|
@@ -3367,7 +3436,7 @@ declare class RCCallPlusClient {
|
|
|
3367
3436
|
* 上报应用层事件模块
|
|
3368
3437
|
*/
|
|
3369
3438
|
_reportAppEventModule: RCCallPlusReportModule;
|
|
3370
|
-
constructor(_context: PluginContext, _logger: BasicLogger, _initOpts: ICallPlusInitOpts);
|
|
3439
|
+
constructor(_context: PluginContext, _logger: BasicLogger, _runtime: IRuntime, _initOpts: ICallPlusInitOpts);
|
|
3371
3440
|
/**
|
|
3372
3441
|
* 加房间、发布、订阅失败时需结束通话,并上报原因
|
|
3373
3442
|
*/
|
|
@@ -3392,10 +3461,6 @@ declare class RCCallPlusClient {
|
|
|
3392
3461
|
* 被踢出房间时,需结束通话
|
|
3393
3462
|
*/
|
|
3394
3463
|
private _kickoffHandle;
|
|
3395
|
-
/**
|
|
3396
|
-
* 远端资源音视频状态变化,需更新 session 中人员的设备状态
|
|
3397
|
-
*/
|
|
3398
|
-
private _receiveDeviceEnableChangeHandle;
|
|
3399
3464
|
/**
|
|
3400
3465
|
* 通话挂断时,需清空内存,离开房间
|
|
3401
3466
|
*/
|
|
@@ -3444,12 +3509,9 @@ declare class RCCallPlusClient {
|
|
|
3444
3509
|
* 播放某个人的视频前,请确保已经调用 `setVideoView` 方法为其设置视频视图
|
|
3445
3510
|
* @param userId 指定要查看某个人的媒体资源
|
|
3446
3511
|
* @param mediaType 指定播放音频还是视频
|
|
3447
|
-
* @param volume 有效值为 0-100
|
|
3448
3512
|
* @returns 返回是否播放成功
|
|
3449
3513
|
*/
|
|
3450
|
-
playMedia(userId: string, mediaType: RCCallPlusMediaType
|
|
3451
|
-
volume?: number;
|
|
3452
|
-
}): Promise<{
|
|
3514
|
+
playMedia(userId: string, mediaType: RCCallPlusMediaType): Promise<{
|
|
3453
3515
|
code: number;
|
|
3454
3516
|
}>;
|
|
3455
3517
|
/**
|
|
@@ -3494,23 +3556,14 @@ declare class RCCallPlusClient {
|
|
|
3494
3556
|
}>;
|
|
3495
3557
|
/**
|
|
3496
3558
|
* 发起呼叫
|
|
3497
|
-
* @deprecated 接口已废弃,请使用 `startCallWithParams` 接口替代
|
|
3498
3559
|
* @param userIds 被叫人员 userId 列表,单人呼叫仅需在数组中放置对方一人的 userId
|
|
3499
|
-
* @param
|
|
3560
|
+
* @param type 单人呼叫 or 多人呼叫
|
|
3500
3561
|
* @param mediaType 通话媒体类型: 音频 or 音视频
|
|
3501
3562
|
* @param pushConfig 移动端推送信息
|
|
3502
3563
|
* @param extra 附加信息,会透传给被呼叫方
|
|
3503
3564
|
* @returns callId 呼叫成功后,产生的会话 id
|
|
3504
3565
|
*/
|
|
3505
|
-
startCall(userIds: string[], callType?: RCCallPlusType, mediaType?: RCCallPlusMediaType
|
|
3506
|
-
code: number;
|
|
3507
|
-
callId?: string;
|
|
3508
|
-
}>;
|
|
3509
|
-
/**
|
|
3510
|
-
* 发起呼叫
|
|
3511
|
-
* @param params - {@inheritDoc IRCCallPlusStartParams}
|
|
3512
|
-
*/
|
|
3513
|
-
startCallWithParams(params: IRCCallPlusStartParams): Promise<{
|
|
3566
|
+
startCall(userIds: string[], callType?: RCCallPlusType, mediaType?: RCCallPlusMediaType, pushConfig?: IRCCallPlusPushConfig, extra?: string): Promise<{
|
|
3514
3567
|
code: number;
|
|
3515
3568
|
callId?: string;
|
|
3516
3569
|
}>;
|
|
@@ -3541,16 +3594,17 @@ declare class RCCallPlusClient {
|
|
|
3541
3594
|
accept(callId: string, pushConfig?: IRCCallPlusPushConfig): Promise<{
|
|
3542
3595
|
code: number;
|
|
3543
3596
|
}>;
|
|
3544
|
-
private
|
|
3597
|
+
private __innerHangup;
|
|
3545
3598
|
/**
|
|
3546
3599
|
* 挂断通话
|
|
3547
|
-
* @param callId
|
|
3600
|
+
* @param callId 为可选参数,不传时,挂断正在进行的主 session,传入时可指定挂断主通话或暂未建立连接的通话
|
|
3601
|
+
* @param pushConfig 移动端推送信息
|
|
3602
|
+
* 暂未建立连接的通话:指已在通话中时,收到呼叫但暂未接听的通话
|
|
3548
3603
|
* @param pushConfig 移动端推送信息
|
|
3549
3604
|
*/
|
|
3550
|
-
hangup(callId?: string, pushConfig?: IRCCallPlusPushConfig
|
|
3605
|
+
hangup(callId?: string, pushConfig?: IRCCallPlusPushConfig): Promise<{
|
|
3551
3606
|
code: number;
|
|
3552
3607
|
}>;
|
|
3553
|
-
private _hangup;
|
|
3554
3608
|
/**
|
|
3555
3609
|
* 通话中发起媒体类型变更请求
|
|
3556
3610
|
* @param mediaType 媒体类型
|
|
@@ -3691,14 +3745,8 @@ declare class RCCallPlusClient {
|
|
|
3691
3745
|
switchMicrophone(microphoneId: string): Promise<{
|
|
3692
3746
|
code: number;
|
|
3693
3747
|
}>;
|
|
3694
|
-
/**
|
|
3695
|
-
* 客户端生成 callId,量子特定,用于生成同样的密钥
|
|
3696
|
-
* 呼叫时传给服务,通话 callId 为此 callId
|
|
3697
|
-
* @param userId 用户 id
|
|
3698
|
-
*/
|
|
3699
|
-
generateCallId(userId: string): string;
|
|
3700
3748
|
}
|
|
3701
3749
|
|
|
3702
3750
|
declare const installer: IPluginGenerator<RCCallPlusClient, ICallPlusInitOpts>;
|
|
3703
3751
|
|
|
3704
|
-
export { IAndroidPushConfig, IAudioConfig, IAudioConfigBuilder, ICallOpts, ICallPlusEventListener, ICallPlusInitOpts, IRCCallPlusCallRecord, IRCCallPlusGetCallRecordRes, IRCCallPlusPushConfig, IRCCallPlusReceivedSummaryMessage,
|
|
3752
|
+
export { IAndroidPushConfig, IAudioConfig, IAudioConfigBuilder, ICallOpts, ICallPlusEventListener, ICallPlusInitOpts, IRCCallPlusCallRecord, IRCCallPlusGetCallRecordRes, IRCCallPlusPushConfig, IRCCallPlusReceivedSummaryMessage, IRCCallPlusSummaryMessageContent, IServerPushExt, IStatusReportListener, IVideoConfig, IVideoConfigBuilder, IiOSPushConfig, RCAudioConfigBuilder, RCCallPlusAndroidPushConfigBuilder, RCCallPlusCallState, RCCallPlusCallUser, RCCallPlusClient, RCCallPlusCode, RCCallPlusMediaType, RCCallPlusMediaTypeChangeResult, RCCallPlusPacketLossStats, RCCallPlusReason, RCCallPlusSession, RCCallPlusSessionUserState, RCCallPlusType, RCVideoConfigBuilder, installer };
|