aliyun-rtc-sdk 7.2.1 → 7.2.3
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/aliyun-rtc-sdk.es.js +4222 -3923
- package/dist/aliyun-rtc-sdk.umd.js +18 -18
- package/dist/plugins/audioProcessPlugin.d.ts +5 -0
- package/dist/plugins/beautyPlugin.d.ts +5 -0
- package/dist/types/index.d.ts +229 -78
- package/package.json +2 -2
|
@@ -1027,6 +1027,11 @@ declare class AliRtcLocalStreamInfo extends EventEmitter$1<AliRtcLocalStreamList
|
|
|
1027
1027
|
* @param publishStream
|
|
1028
1028
|
*/
|
|
1029
1029
|
cloneVideoProfile(publishStream: LocalStream): Promise<void>;
|
|
1030
|
+
/**
|
|
1031
|
+
* 复制音频 profile 到指定 LocalStream
|
|
1032
|
+
* @param publishStream
|
|
1033
|
+
*/
|
|
1034
|
+
cloneAudioProfile(publishStream: LocalStream): Promise<void>;
|
|
1030
1035
|
addPlugin(plugin: AliRtcPlugin): void;
|
|
1031
1036
|
removePlugin(plugin: AliRtcPlugin): boolean;
|
|
1032
1037
|
}
|
|
@@ -1028,6 +1028,11 @@ declare class AliRtcLocalStreamInfo extends EventEmitter$1<AliRtcLocalStreamList
|
|
|
1028
1028
|
* @param publishStream
|
|
1029
1029
|
*/
|
|
1030
1030
|
cloneVideoProfile(publishStream: LocalStream): Promise<void>;
|
|
1031
|
+
/**
|
|
1032
|
+
* 复制音频 profile 到指定 LocalStream
|
|
1033
|
+
* @param publishStream
|
|
1034
|
+
*/
|
|
1035
|
+
cloneAudioProfile(publishStream: LocalStream): Promise<void>;
|
|
1031
1036
|
addPlugin(plugin: AliRtcPlugin): void;
|
|
1032
1037
|
removePlugin(plugin: AliRtcPlugin): boolean;
|
|
1033
1038
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -267,6 +267,7 @@ declare class AliRtcEngine_2 extends default_2<AliRtcEngineEventListener> {
|
|
|
267
267
|
private _localCheckAuthInfoTimestamp;
|
|
268
268
|
private _proxyAiTid;
|
|
269
269
|
private _agentParam;
|
|
270
|
+
sessionId?: string;
|
|
270
271
|
constructor(config?: AliRtcEngineConfig | undefined);
|
|
271
272
|
/**
|
|
272
273
|
* 获取当前频道号,已经入会成功返回频道号,否则返回undefined
|
|
@@ -1021,10 +1022,17 @@ declare class AliRtcEngine_2 extends default_2<AliRtcEngineEventListener> {
|
|
|
1021
1022
|
* @param dataChannelMsg 伴奏控制消息
|
|
1022
1023
|
*/
|
|
1023
1024
|
sendDataChannelMessage(dataChannelMsg: AliRtcDataChannelMsg): void;
|
|
1025
|
+
/**
|
|
1026
|
+
* @brief 不依赖入会,直接订阅远程流
|
|
1027
|
+
* @param config 订阅配置对象
|
|
1028
|
+
* @returns RemoteStreamHandler 远端流处理器实例
|
|
1029
|
+
*/
|
|
1030
|
+
subscribeRemoteStream(config: SubscribeRemoteStreamConfig): RemoteStreamHandler;
|
|
1024
1031
|
}
|
|
1025
1032
|
|
|
1026
1033
|
declare interface AliRtcEngineConfig {
|
|
1027
1034
|
env?: AliRtcEnv;
|
|
1035
|
+
globalEnv?: 'DEFAULT' | 'SEA';
|
|
1028
1036
|
webTrack?: boolean | AliRtcWebTrackConfig;
|
|
1029
1037
|
maxSignalingReconnectDuration?: number;
|
|
1030
1038
|
parameter?: Parameter;
|
|
@@ -1324,6 +1332,21 @@ declare interface AliRtcEngineEventListener {
|
|
|
1324
1332
|
* @param result 结果
|
|
1325
1333
|
*/
|
|
1326
1334
|
AIAgentResult: (code: number, action: string, result: string) => void;
|
|
1335
|
+
/**
|
|
1336
|
+
* @brief 网络质量回调
|
|
1337
|
+
* @param event 网络质量信息
|
|
1338
|
+
* @param event.subscribe 下行网络质量
|
|
1339
|
+
* @param event.subscribe.rtt 下行网络往返延时(ms)
|
|
1340
|
+
* @param event.subscribe.loss 下行网络丢包率
|
|
1341
|
+
* @param event.subscribe.quality 下行网络质量类型
|
|
1342
|
+
*/
|
|
1343
|
+
networkQuality: (event: {
|
|
1344
|
+
subscribe: {
|
|
1345
|
+
rtt: number;
|
|
1346
|
+
loss: number;
|
|
1347
|
+
quality: AliRtcNetworkQuality;
|
|
1348
|
+
};
|
|
1349
|
+
}) => void;
|
|
1327
1350
|
}
|
|
1328
1351
|
|
|
1329
1352
|
export declare enum AliRtcEngineLocalDeviceExceptionType {
|
|
@@ -1902,6 +1925,11 @@ export declare class AliRtcLocalStreamInfo extends default_2<AliRtcLocalStreamLi
|
|
|
1902
1925
|
* @param publishStream
|
|
1903
1926
|
*/
|
|
1904
1927
|
cloneVideoProfile(publishStream: LocalStream): Promise<void>;
|
|
1928
|
+
/**
|
|
1929
|
+
* 复制音频 profile 到指定 LocalStream
|
|
1930
|
+
* @param publishStream
|
|
1931
|
+
*/
|
|
1932
|
+
cloneAudioProfile(publishStream: LocalStream): Promise<void>;
|
|
1905
1933
|
addPlugin(plugin: AliRtcPlugin): void;
|
|
1906
1934
|
removePlugin(plugin: AliRtcPlugin): boolean;
|
|
1907
1935
|
}
|
|
@@ -1928,6 +1956,26 @@ export declare enum AliRtcLogLevel {
|
|
|
1928
1956
|
NONE = 5
|
|
1929
1957
|
}
|
|
1930
1958
|
|
|
1959
|
+
/**
|
|
1960
|
+
* @brief 网络质量类型
|
|
1961
|
+
*/
|
|
1962
|
+
export declare enum AliRtcNetworkQuality {
|
|
1963
|
+
/** 网络极好 */
|
|
1964
|
+
AliRtcNetworkExcellent = 0,
|
|
1965
|
+
/** 网络好 */
|
|
1966
|
+
AliRtcNetworkGood = 1,
|
|
1967
|
+
/** 网络不好 */
|
|
1968
|
+
AliRtcNetworkPoor = 2,
|
|
1969
|
+
/** 网络差 */
|
|
1970
|
+
AliRtcNetworkBad = 3,
|
|
1971
|
+
/** 网络极差 */
|
|
1972
|
+
AliRtcNetworkVeryBad = 4,
|
|
1973
|
+
/** 网络断开 */
|
|
1974
|
+
AliRtcNetworkDisconnected = 5,
|
|
1975
|
+
/** 网络未知 */
|
|
1976
|
+
AliRtcNetworkUnknown = 6
|
|
1977
|
+
}
|
|
1978
|
+
|
|
1931
1979
|
/**
|
|
1932
1980
|
* @brief OnBye类型枚举
|
|
1933
1981
|
*/
|
|
@@ -2310,6 +2358,7 @@ declare class BizControl extends default_2<BizControlListener> {
|
|
|
2310
2358
|
private parameter;
|
|
2311
2359
|
private audio3AConfig;
|
|
2312
2360
|
private dcReadyHelper?;
|
|
2361
|
+
private networkQualityTimer?;
|
|
2313
2362
|
constructor(config: BizControlConfig);
|
|
2314
2363
|
private addSignalingManagerListener;
|
|
2315
2364
|
private addRTSListener;
|
|
@@ -2480,6 +2529,13 @@ declare interface BizControlListener {
|
|
|
2480
2529
|
occurError: (error: AliRtcError, uid?: string) => void;
|
|
2481
2530
|
remoteDataChannelMessage: (uid: string, message: AliRtcDataChannelMsg) => void;
|
|
2482
2531
|
remoteUserSubscribedDataChannel: (uid: string) => void;
|
|
2532
|
+
networkQuality: (event: {
|
|
2533
|
+
subscribe: {
|
|
2534
|
+
rtt: number;
|
|
2535
|
+
loss: number;
|
|
2536
|
+
quality: AliRtcNetworkQuality;
|
|
2537
|
+
};
|
|
2538
|
+
}) => void;
|
|
2483
2539
|
}
|
|
2484
2540
|
|
|
2485
2541
|
declare enum ClientEventType {
|
|
@@ -3005,9 +3061,7 @@ declare interface LocalUserConfig {
|
|
|
3005
3061
|
signalingManager: SignalingManager;
|
|
3006
3062
|
pluginManager: PluginManager;
|
|
3007
3063
|
audioVolumeIndicationInterval: number;
|
|
3008
|
-
parameter:
|
|
3009
|
-
[key: string]: any;
|
|
3010
|
-
};
|
|
3064
|
+
parameter: Parameter;
|
|
3011
3065
|
}
|
|
3012
3066
|
|
|
3013
3067
|
/**
|
|
@@ -3019,14 +3073,18 @@ declare class LogClient {
|
|
|
3019
3073
|
protected param?: any;
|
|
3020
3074
|
protected msgCacheArr: any[];
|
|
3021
3075
|
protected index: number;
|
|
3022
|
-
protected stsOpt?: any;
|
|
3023
|
-
protected slsToken?: SLSSTSToken;
|
|
3024
|
-
protected ossToken?: OSSSTSToken;
|
|
3025
3076
|
protected ntpClock: NTPClient;
|
|
3026
|
-
|
|
3077
|
+
private clientId;
|
|
3078
|
+
private stsData?;
|
|
3079
|
+
private stsExpiration;
|
|
3080
|
+
private updateTaskTimer?;
|
|
3081
|
+
private globalEnv;
|
|
3082
|
+
constructor(globalEnv?: 'DEFAULT' | 'SEA');
|
|
3027
3083
|
private createTracker;
|
|
3084
|
+
private startSTSUpdateTask;
|
|
3085
|
+
private refreshSTSToken;
|
|
3086
|
+
private requestSTSToken;
|
|
3028
3087
|
start(info: AliRtcAuthInfo): void;
|
|
3029
|
-
updateToken(slsToken: SLSSTSToken, ossToken?: OSSSTSToken): void;
|
|
3030
3088
|
/**
|
|
3031
3089
|
* 断开连接
|
|
3032
3090
|
*/
|
|
@@ -3099,24 +3157,6 @@ declare class NTPClient {
|
|
|
3099
3157
|
now(): number;
|
|
3100
3158
|
}
|
|
3101
3159
|
|
|
3102
|
-
declare interface OSSSTSToken {
|
|
3103
|
-
access_key_id: string;
|
|
3104
|
-
access_key_secret: string;
|
|
3105
|
-
security_token: string;
|
|
3106
|
-
region_endpoint: string;
|
|
3107
|
-
bucket_name: string;
|
|
3108
|
-
expiration: number;
|
|
3109
|
-
}
|
|
3110
|
-
|
|
3111
|
-
declare interface OSSToken {
|
|
3112
|
-
access_key_id: string;
|
|
3113
|
-
access_key_secret: string;
|
|
3114
|
-
security_token: string;
|
|
3115
|
-
region_endpoint: string;
|
|
3116
|
-
bucket_name: string;
|
|
3117
|
-
expiration: number;
|
|
3118
|
-
}
|
|
3119
|
-
|
|
3120
3160
|
declare interface PackageAdaptInfo {
|
|
3121
3161
|
os_name: string;
|
|
3122
3162
|
device_name: string;
|
|
@@ -3175,9 +3215,86 @@ declare class PackageCreator {
|
|
|
3175
3215
|
protected createBaseSendPackage(messageType: MessageType): ISendPackage;
|
|
3176
3216
|
}
|
|
3177
3217
|
|
|
3178
|
-
|
|
3218
|
+
/**
|
|
3219
|
+
* SDK 参数配置
|
|
3220
|
+
*/
|
|
3221
|
+
declare interface Parameter {
|
|
3222
|
+
/** 是否在推流信息中报告 L1 IP */
|
|
3223
|
+
reportL1IP?: boolean;
|
|
3224
|
+
/** 数据通道配置 */
|
|
3225
|
+
data?: ParameterData;
|
|
3226
|
+
/** 是否使用 AudioContext 进行音量控制 */
|
|
3227
|
+
enableAudioContextPlayoutVolume?: boolean;
|
|
3228
|
+
/** 网络相关配置 */
|
|
3229
|
+
net?: ParameterNet;
|
|
3230
|
+
/** 加入房间模式,如 'Conference'、'AIUser' 等 */
|
|
3231
|
+
joinMode?: string;
|
|
3232
|
+
/** 是否启用空白音频(用于保持音频轨道活跃) */
|
|
3233
|
+
enableBlankAudio?: boolean;
|
|
3234
|
+
/** 音频 3A 处理配置 */
|
|
3235
|
+
audio?: ParameterAudio;
|
|
3236
|
+
/** 支持其他自定义参数 */
|
|
3179
3237
|
[key: string]: any;
|
|
3180
|
-
}
|
|
3238
|
+
}
|
|
3239
|
+
|
|
3240
|
+
/**
|
|
3241
|
+
* 音频 3A 处理配置参数
|
|
3242
|
+
*/
|
|
3243
|
+
declare interface ParameterAudio {
|
|
3244
|
+
/** 是否使用服务端配置的 3A 设置 */
|
|
3245
|
+
useAudio3AConfigFromServer?: boolean;
|
|
3246
|
+
/** 是否启用系统回声消除 */
|
|
3247
|
+
useSysEchoCancellation?: boolean;
|
|
3248
|
+
/** 是否启用系统噪声抑制 */
|
|
3249
|
+
useSysNoiseSuppression?: boolean;
|
|
3250
|
+
/** 是否启用系统自动增益控制 */
|
|
3251
|
+
useSysAutoGainControl?: boolean;
|
|
3252
|
+
/** 是否启用智能 AEC */
|
|
3253
|
+
useAIAEC?: boolean;
|
|
3254
|
+
/** 是否启用软件 3A 处理 */
|
|
3255
|
+
enableSoft3A?: boolean;
|
|
3256
|
+
/** 是否启用旁路软 3A 检查 */
|
|
3257
|
+
enableSoft3ACheck?: boolean;
|
|
3258
|
+
/** 是否仅使用硬件 3A */
|
|
3259
|
+
useHardOnly?: boolean;
|
|
3260
|
+
/** 是否导出音频数据 */
|
|
3261
|
+
dumpAudioData?: boolean;
|
|
3262
|
+
}
|
|
3263
|
+
|
|
3264
|
+
/**
|
|
3265
|
+
* 数据通道配置参数
|
|
3266
|
+
*/
|
|
3267
|
+
declare interface ParameterData {
|
|
3268
|
+
/** 是否启用发布端数据通道 */
|
|
3269
|
+
enablePubDataChannel?: boolean;
|
|
3270
|
+
/** 是否启用订阅端数据通道 */
|
|
3271
|
+
enableSubDataChannel?: boolean;
|
|
3272
|
+
}
|
|
3273
|
+
|
|
3274
|
+
/**
|
|
3275
|
+
* 网络相关配置参数
|
|
3276
|
+
*/
|
|
3277
|
+
declare interface ParameterNet {
|
|
3278
|
+
/** 是否使用 TCP 传输 */
|
|
3279
|
+
useTCP?: boolean;
|
|
3280
|
+
/** 是否启用累积延迟 */
|
|
3281
|
+
cumuDelay?: boolean;
|
|
3282
|
+
/** 是否禁用心跳检测 */
|
|
3283
|
+
disableHeartbeat?: boolean;
|
|
3284
|
+
/** 心跳探活参数 */
|
|
3285
|
+
heartbeat?: {
|
|
3286
|
+
/** 心跳间隔,毫秒数,最小 200,默认 2500 */
|
|
3287
|
+
interval?: number;
|
|
3288
|
+
/** 超时时间,毫秒数 */
|
|
3289
|
+
timeout?: number;
|
|
3290
|
+
/** 是否启用心跳日志(监听 hebtSent/hebtReceived 事件) */
|
|
3291
|
+
enableLog?: boolean;
|
|
3292
|
+
};
|
|
3293
|
+
/** 数据通道配置 */
|
|
3294
|
+
datachannelInitOptions?: RTCDataChannelInit;
|
|
3295
|
+
/** 媒体超时时间(毫秒),有效范围 1000-100000 */
|
|
3296
|
+
mediaTimeout?: number;
|
|
3297
|
+
}
|
|
3181
3298
|
|
|
3182
3299
|
declare class PluginManager extends default_2<PluginManagerListener> {
|
|
3183
3300
|
private plugins;
|
|
@@ -3301,6 +3418,46 @@ declare interface RemoteMediaTrackInfo extends MediaTrackInfo {
|
|
|
3301
3418
|
subscribeState?: RemoteTrackSubscribeState;
|
|
3302
3419
|
}
|
|
3303
3420
|
|
|
3421
|
+
/**
|
|
3422
|
+
* 远端流订阅失败原因
|
|
3423
|
+
*/
|
|
3424
|
+
declare enum RemoteStreamErrorReason {
|
|
3425
|
+
/** 无法获取播放地址 */
|
|
3426
|
+
FETCH_STREAM_URL_FAILED = "FETCH_STREAM_URL_FAILED",
|
|
3427
|
+
/** 目标用户没有可用的流 */
|
|
3428
|
+
NO_STREAM_AVAILABLE = "NO_STREAM_AVAILABLE",
|
|
3429
|
+
/** 无效的播放元素 */
|
|
3430
|
+
INVALID_VIEW_ELEMENT = "INVALID_VIEW_ELEMENT",
|
|
3431
|
+
/** 订阅失败 */
|
|
3432
|
+
SUBSCRIBE_FAILED = "SUBSCRIBE_FAILED"
|
|
3433
|
+
}
|
|
3434
|
+
|
|
3435
|
+
declare class RemoteStreamHandler extends default_2<RemoteStreamHandlerEvents> {
|
|
3436
|
+
private config;
|
|
3437
|
+
private static logName;
|
|
3438
|
+
private readonly roomServerUrl;
|
|
3439
|
+
private readonly label;
|
|
3440
|
+
private rtsInstance?;
|
|
3441
|
+
private currentStatus;
|
|
3442
|
+
private latestStreamInfo?;
|
|
3443
|
+
constructor(config: SubscribeRemoteStreamConfig);
|
|
3444
|
+
/**
|
|
3445
|
+
* 更新连接状态,只有当状态发生变化时才触发事件
|
|
3446
|
+
*/
|
|
3447
|
+
private updateConnectionStatus;
|
|
3448
|
+
/**
|
|
3449
|
+
* 处理错误,使实例进入不可恢复状态,业务侧应销毁实例
|
|
3450
|
+
*/
|
|
3451
|
+
private handleError;
|
|
3452
|
+
private fetchStreamUrlAndPlay;
|
|
3453
|
+
dispose(): void;
|
|
3454
|
+
}
|
|
3455
|
+
|
|
3456
|
+
declare interface RemoteStreamHandlerEvents {
|
|
3457
|
+
connectionStatusChange: (status: AliRtcConnectionStatus) => void;
|
|
3458
|
+
error: (reason: RemoteStreamErrorReason, detail: string) => void;
|
|
3459
|
+
}
|
|
3460
|
+
|
|
3304
3461
|
declare class RemoteStreamInfo extends default_2<StreamListener> {
|
|
3305
3462
|
/**
|
|
3306
3463
|
* @ignore
|
|
@@ -3428,6 +3585,7 @@ declare class RemoteUser extends User {
|
|
|
3428
3585
|
* @ignore
|
|
3429
3586
|
*/
|
|
3430
3587
|
static logName: string;
|
|
3588
|
+
get logName(): string;
|
|
3431
3589
|
remoteCallId: string;
|
|
3432
3590
|
remoteUserInfo: AliRtcRemoteUserInfo;
|
|
3433
3591
|
protected localUser?: LocalUser;
|
|
@@ -3480,7 +3638,9 @@ declare class RemoteUser extends User {
|
|
|
3480
3638
|
setPlayoutVolume(value: number): void;
|
|
3481
3639
|
getAudioMuted(): boolean;
|
|
3482
3640
|
get hasAudioTrack(): boolean;
|
|
3641
|
+
get audioSSRC(): string;
|
|
3483
3642
|
get hasVideoTrack(): boolean;
|
|
3643
|
+
get videoSSRC(): string;
|
|
3484
3644
|
get hasVideoLargeTrack(): boolean;
|
|
3485
3645
|
get hasVideoSmallTrack(): boolean;
|
|
3486
3646
|
get hasScreenTrack(): boolean;
|
|
@@ -3639,9 +3799,7 @@ declare interface RemoteUserConfig {
|
|
|
3639
3799
|
localUser?: LocalUser;
|
|
3640
3800
|
audioVolumeIndicationInterval: number;
|
|
3641
3801
|
playoutVolume: number;
|
|
3642
|
-
parameter:
|
|
3643
|
-
[key: string]: any;
|
|
3644
|
-
};
|
|
3802
|
+
parameter: Parameter;
|
|
3645
3803
|
}
|
|
3646
3804
|
|
|
3647
3805
|
declare interface RemoteUserMap {
|
|
@@ -3958,12 +4116,16 @@ declare class RtsManager extends default_2<RtsManagerEventListener> {
|
|
|
3958
4116
|
private dcResolve?;
|
|
3959
4117
|
private dcReject?;
|
|
3960
4118
|
private dcConnectingPromise?;
|
|
4119
|
+
private _prevDownlinkStat?;
|
|
3961
4120
|
private _publishingTracks;
|
|
3962
4121
|
private parameter;
|
|
3963
4122
|
preferredPubL1Ip?: string;
|
|
3964
4123
|
preferredSubL1Ip?: string;
|
|
4124
|
+
private httpPublishUrlMap;
|
|
4125
|
+
private httpSubscribeUrlMap;
|
|
3965
4126
|
private traceIdMap;
|
|
3966
4127
|
constructor(localStreamManager: LocalStreamManager, slsReporter: SLSReporter, parameter: Parameter);
|
|
4128
|
+
private createRtsInstance;
|
|
3967
4129
|
private addRTSListener;
|
|
3968
4130
|
/**
|
|
3969
4131
|
* 更新鉴权信息,传入一个新的带鉴权的 URL,RTS 会去除鉴权信息做更新
|
|
@@ -3983,6 +4145,8 @@ declare class RtsManager extends default_2<RtsManagerEventListener> {
|
|
|
3983
4145
|
private setConnected;
|
|
3984
4146
|
get isConnecting(): boolean;
|
|
3985
4147
|
get isConnected(): boolean;
|
|
4148
|
+
private suffixHttpUrl;
|
|
4149
|
+
private getSuffixedUrl;
|
|
3986
4150
|
get publishingTracks(): TrackInfo[];
|
|
3987
4151
|
private getPubMsid;
|
|
3988
4152
|
private updatePublishingTracks;
|
|
@@ -3997,6 +4161,11 @@ declare class RtsManager extends default_2<RtsManagerEventListener> {
|
|
|
3997
4161
|
publishAddDataChannel(streamUrl: string): Promise<any>;
|
|
3998
4162
|
publishStopDataChannel(streamUrl: string, datachannel: any): Promise<void>;
|
|
3999
4163
|
unpublish(): Promise<void>;
|
|
4164
|
+
getSubscribeNetworkQuality(): Promise<{
|
|
4165
|
+
rtt: number;
|
|
4166
|
+
loss: number;
|
|
4167
|
+
quality: AliRtcNetworkQuality;
|
|
4168
|
+
}>;
|
|
4000
4169
|
/**
|
|
4001
4170
|
* 获取 sub/subAdd config
|
|
4002
4171
|
* @param {ISubscribeConfig | ISubConfigItem} options
|
|
@@ -4005,6 +4174,16 @@ declare class RtsManager extends default_2<RtsManagerEventListener> {
|
|
|
4005
4174
|
private getSubConfig;
|
|
4006
4175
|
private handleHTTPConfig;
|
|
4007
4176
|
private httpSubscribe;
|
|
4177
|
+
/**
|
|
4178
|
+
* 订阅时支持 preferredSubL1Ip 超时降级
|
|
4179
|
+
* 如果存在 preferredSubL1Ip,则设置 3 秒超时,超时后清除 preferredSubL1Ip,降级到 DNS 解析的 L1 节点
|
|
4180
|
+
*/
|
|
4181
|
+
private subscribeWithPreferredL1Fallback;
|
|
4182
|
+
/**
|
|
4183
|
+
* 推流时支持 preferredPubL1Ip 超时降级
|
|
4184
|
+
* 如果存在 preferredPubL1Ip,则设置 3 秒超时,超时后清除 preferredPubL1Ip,降级到 DNS 解析的 L1 节点
|
|
4185
|
+
*/
|
|
4186
|
+
private publishWithPreferredL1Fallback;
|
|
4008
4187
|
private subscribeAdd;
|
|
4009
4188
|
subscribeDelete(subscribeOptions: RemoteSubscribeOptions): Promise<ISubDeleteResult | undefined>;
|
|
4010
4189
|
subscribeAddDataChannel(streamUrl: string): Promise<any>;
|
|
@@ -4023,6 +4202,10 @@ declare class RtsManager extends default_2<RtsManagerEventListener> {
|
|
|
4023
4202
|
msid?: string;
|
|
4024
4203
|
}): any;
|
|
4025
4204
|
getPCStats(): Promise<any>;
|
|
4205
|
+
/**
|
|
4206
|
+
* 获取当前使用的 candidate 协议类型(udp/tcp)
|
|
4207
|
+
*/
|
|
4208
|
+
private logCandidateProtocol;
|
|
4026
4209
|
sendSEI(streamUrl: string, data: ArrayBuffer, repeatCount: number, payloadType: number): Promise<void>;
|
|
4027
4210
|
}
|
|
4028
4211
|
|
|
@@ -4063,7 +4246,6 @@ declare class SignalingManager extends default_2<RoomServerListener> {
|
|
|
4063
4246
|
protected clientRole: AliRtcSdkClientRole;
|
|
4064
4247
|
protected env: AliRtcEnv;
|
|
4065
4248
|
protected maxSignalingReconnectDuration?: number;
|
|
4066
|
-
stsManager: StsManager;
|
|
4067
4249
|
private slsReporter;
|
|
4068
4250
|
constructor(channelProfile: AliRtcSdkChannelProfile, clientRole: AliRtcSdkClientRole, slsReporter: SLSReporter, env?: AliRtcEnv);
|
|
4069
4251
|
reset(): void;
|
|
@@ -4190,10 +4372,7 @@ declare class SLSReporter {
|
|
|
4190
4372
|
protected logClient: LogClient;
|
|
4191
4373
|
protected authInfo?: AliRtcAuthInfo;
|
|
4192
4374
|
private ntpClock;
|
|
4193
|
-
|
|
4194
|
-
private static getLogClient;
|
|
4195
|
-
static reportOSSUpload(sessionId: string, date: string, responseCode?: number): void;
|
|
4196
|
-
constructor(engine: WrappedAliRtcEngine);
|
|
4375
|
+
constructor(engine: WrappedAliRtcEngine, globalEnv?: 'DEFAULT' | 'SEA');
|
|
4197
4376
|
private customFields;
|
|
4198
4377
|
/**
|
|
4199
4378
|
* 设置通用字段
|
|
@@ -4213,7 +4392,6 @@ declare class SLSReporter {
|
|
|
4213
4392
|
* @param authInfo
|
|
4214
4393
|
*/
|
|
4215
4394
|
start(info: AliRtcAuthInfo): void;
|
|
4216
|
-
updateToken(token: SLSSTSToken, ossToken?: OSSSTSToken): void;
|
|
4217
4395
|
/**
|
|
4218
4396
|
* 断开连接
|
|
4219
4397
|
*/
|
|
@@ -4223,6 +4401,8 @@ declare class SLSReporter {
|
|
|
4223
4401
|
reportSubscribeMonitor(callId: string, remoteId: string, traceId: string, msid: string, stats: any[]): void;
|
|
4224
4402
|
reportNetworkMonitor(candidates: any[]): void;
|
|
4225
4403
|
reportLoopAudioDelay(ssrc: string, result: any): void;
|
|
4404
|
+
reportCumuAudioDelay(audioSSRC: string, result: any): void;
|
|
4405
|
+
reportCumuVideoDelay(videoSSRC: string, result: any): void;
|
|
4226
4406
|
/**
|
|
4227
4407
|
* 加入房间成功埋点
|
|
4228
4408
|
* @param {number} joinTime
|
|
@@ -4365,28 +4545,6 @@ declare class SLSReporter {
|
|
|
4365
4545
|
protected data2String(data: any): string;
|
|
4366
4546
|
}
|
|
4367
4547
|
|
|
4368
|
-
declare interface SLSSTSToken {
|
|
4369
|
-
access_key_id: string;
|
|
4370
|
-
access_key_secret: string;
|
|
4371
|
-
expiration: number;
|
|
4372
|
-
log_store_debug: string;
|
|
4373
|
-
log_store_stats: string;
|
|
4374
|
-
project: string;
|
|
4375
|
-
region_endpoint: string;
|
|
4376
|
-
security_token: string;
|
|
4377
|
-
}
|
|
4378
|
-
|
|
4379
|
-
declare interface SLSToken {
|
|
4380
|
-
access_key_id: string;
|
|
4381
|
-
access_key_secret: string;
|
|
4382
|
-
security_token: string;
|
|
4383
|
-
region_endpoint: string;
|
|
4384
|
-
project: string;
|
|
4385
|
-
log_store_stats: string;
|
|
4386
|
-
log_store_debug: string;
|
|
4387
|
-
expiration: number;
|
|
4388
|
-
}
|
|
4389
|
-
|
|
4390
4548
|
/**
|
|
4391
4549
|
* Websocket类
|
|
4392
4550
|
*/
|
|
@@ -4495,25 +4653,6 @@ declare interface StreamOptions {
|
|
|
4495
4653
|
data?: boolean;
|
|
4496
4654
|
}
|
|
4497
4655
|
|
|
4498
|
-
declare class StsManager extends default_2<StsManagerListener> {
|
|
4499
|
-
static logName: string;
|
|
4500
|
-
private env;
|
|
4501
|
-
private authInfo?;
|
|
4502
|
-
private timer?;
|
|
4503
|
-
private slsReporter;
|
|
4504
|
-
private expiration;
|
|
4505
|
-
private skipTime;
|
|
4506
|
-
constructor(slsReporter: SLSReporter, env: AliRtcEnv);
|
|
4507
|
-
refreshAuthInfo(authInfo: AliRtcAuthInfo): void;
|
|
4508
|
-
private requestToken;
|
|
4509
|
-
startSTSUpdate(authInfo: AliRtcAuthInfo): void;
|
|
4510
|
-
clear(): void;
|
|
4511
|
-
}
|
|
4512
|
-
|
|
4513
|
-
declare interface StsManagerListener {
|
|
4514
|
-
onTokenUpdate: (ossToken: OSSToken, slsToken: SLSToken) => void;
|
|
4515
|
-
}
|
|
4516
|
-
|
|
4517
4656
|
declare interface SubConfig {
|
|
4518
4657
|
isAudioSubscribing: boolean;
|
|
4519
4658
|
isVideoSubscribing: boolean;
|
|
@@ -4538,6 +4677,18 @@ declare enum SubscribeReason {
|
|
|
4538
4677
|
Reconnect = "reconnect"
|
|
4539
4678
|
}
|
|
4540
4679
|
|
|
4680
|
+
declare interface SubscribeRemoteStreamConfig {
|
|
4681
|
+
env?: AliRtcEnv;
|
|
4682
|
+
appId: string;
|
|
4683
|
+
currentUserId: string;
|
|
4684
|
+
targetChannelId: string;
|
|
4685
|
+
targetUserId: string;
|
|
4686
|
+
token: string;
|
|
4687
|
+
nonce?: string;
|
|
4688
|
+
timestamp: number;
|
|
4689
|
+
view?: string | HTMLVideoElement;
|
|
4690
|
+
}
|
|
4691
|
+
|
|
4541
4692
|
declare interface TimeRecorder {
|
|
4542
4693
|
start: number;
|
|
4543
4694
|
[key: string]: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aliyun-rtc-sdk",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "rtc web sdk of aliyun",
|
|
6
6
|
"main": "dist/aliyun-rtc-sdk.umd.js",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"@aliyun-sls/web-sts-plugin": "^0.3.5",
|
|
11
11
|
"@aliyun-sls/web-track-browser": "^0.3.5",
|
|
12
12
|
"aliyun-queen-engine": "^6.3.14",
|
|
13
|
-
"aliyun-rts-sdk": "2.
|
|
13
|
+
"aliyun-rts-sdk": "2.14.4",
|
|
14
14
|
"crypto-js": "^4.1.1",
|
|
15
15
|
"dateformat": "^5.0.3",
|
|
16
16
|
"eventemitter3": "^5.0.1",
|