aliyun-rtc-sdk 6.14.1 → 6.14.2-beta.1
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 +2498 -2383
- package/dist/aliyun-rtc-sdk.umd.js +16 -16
- package/dist/types/index.d.ts +52 -0
- package/package.json +2 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -2395,6 +2395,28 @@ declare enum CodecType {
|
|
|
2395
2395
|
UNKNOWN = ""
|
|
2396
2396
|
}
|
|
2397
2397
|
|
|
2398
|
+
declare enum ConnectionLatencyStage {
|
|
2399
|
+
CREATE_ENGINE = "create_engine",
|
|
2400
|
+
JOIN = "join",
|
|
2401
|
+
WANT_INSERT_PUB_TASK = "wantInsertPubTask",
|
|
2402
|
+
INSERT_PUB_TASK = "InsertPubTask",
|
|
2403
|
+
HANDLE_PUB_TASK = "HandlePubTask",
|
|
2404
|
+
RECV_NOTIFY_PUBLISH = "RecvNotifyPublish",
|
|
2405
|
+
INSERT_SUB_TASK = "InsertSubTask",
|
|
2406
|
+
HANDLE_SUB_TASK = "HandleSubTask",
|
|
2407
|
+
FIRST_REMOTE = "first_remote"
|
|
2408
|
+
}
|
|
2409
|
+
|
|
2410
|
+
declare enum ConnectionLatencyStatus {
|
|
2411
|
+
START = "start",
|
|
2412
|
+
SEND_SIG = "send_sig",
|
|
2413
|
+
RECV_RST = "recv_rst",
|
|
2414
|
+
END = "end",
|
|
2415
|
+
RECEIVED = "received",
|
|
2416
|
+
DECODED = "decoded",
|
|
2417
|
+
PLAYED = "played"
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2398
2420
|
/**
|
|
2399
2421
|
* websocket链接状态
|
|
2400
2422
|
*/
|
|
@@ -2871,6 +2893,8 @@ declare class LogClient {
|
|
|
2871
2893
|
protected stsOpt?: any;
|
|
2872
2894
|
protected slsToken?: SLSSTSToken;
|
|
2873
2895
|
protected ossToken?: OSSSTSToken;
|
|
2896
|
+
protected ntpClock: NTPClient;
|
|
2897
|
+
constructor();
|
|
2874
2898
|
private createTracker;
|
|
2875
2899
|
start(info: AliRtcAuthInfo): void;
|
|
2876
2900
|
updateToken(slsToken: SLSSTSToken, ossToken?: OSSSTSToken): void;
|
|
@@ -2938,6 +2962,14 @@ declare enum MsidType {
|
|
|
2938
2962
|
Data = "sophon_data"
|
|
2939
2963
|
}
|
|
2940
2964
|
|
|
2965
|
+
declare class NTPClient {
|
|
2966
|
+
private static instance;
|
|
2967
|
+
private ntpClock;
|
|
2968
|
+
private constructor();
|
|
2969
|
+
static getInstance(): NTPClient;
|
|
2970
|
+
now(): number;
|
|
2971
|
+
}
|
|
2972
|
+
|
|
2941
2973
|
declare interface OSSSTSToken {
|
|
2942
2974
|
access_key_id: string;
|
|
2943
2975
|
access_key_secret: string;
|
|
@@ -3826,6 +3858,7 @@ declare class RtsManager extends default_2<RtsManagerEventListener> {
|
|
|
3826
3858
|
traceId: string;
|
|
3827
3859
|
l1ip?: string;
|
|
3828
3860
|
}>;
|
|
3861
|
+
private reportSubscribeLatency;
|
|
3829
3862
|
subscribe(remoteSubscribeOptions: RemoteSubscribeOptions, reason: SubscribeReason, callId: string, remoteCallId: string, startTs: number): Promise<any>;
|
|
3830
3863
|
getSubscribeVideoStats(streamUrl: string, msid?: string): Promise<unknown>;
|
|
3831
3864
|
getSubscribeAudioStats(streamUrl: string, msid?: string): Promise<unknown>;
|
|
@@ -3995,6 +4028,7 @@ declare class SLSReporter {
|
|
|
3995
4028
|
private engine;
|
|
3996
4029
|
protected logClient: LogClient;
|
|
3997
4030
|
protected authInfo?: AliRtcAuthInfo;
|
|
4031
|
+
private ntpClock;
|
|
3998
4032
|
private static staticClient;
|
|
3999
4033
|
private static getLogClient;
|
|
4000
4034
|
static reportOSSUpload(sessionId: string, date: string, responseCode?: number): void;
|
|
@@ -4131,6 +4165,15 @@ declare class SLSReporter {
|
|
|
4131
4165
|
reportSTSResult(code: number, startTs: number): void;
|
|
4132
4166
|
reportLeaveInvoked(): void;
|
|
4133
4167
|
reportSEIMessage(payloadType: number, length: number, repeatCount: number, delay: number, isKey: boolean): void;
|
|
4168
|
+
/**
|
|
4169
|
+
* 接通耗时事件(12001)
|
|
4170
|
+
* 用stage和status来区分接通过程中各个时间节点。
|
|
4171
|
+
* @param state
|
|
4172
|
+
* @param status
|
|
4173
|
+
* @param calid
|
|
4174
|
+
* @param tckid
|
|
4175
|
+
*/
|
|
4176
|
+
reportConnectionLatencyEvent<Stage extends keyof ValidStatusMap>(stage: Stage, status: ValidStatusMap[Stage], calid: string, tckid: string, tm?: number, ntptm?: number, http?: boolean): void;
|
|
4134
4177
|
/**
|
|
4135
4178
|
* 日志埋点
|
|
4136
4179
|
* 在埋点中增加tm字段,表示发生埋点的客户端本地时间
|
|
@@ -4397,6 +4440,15 @@ declare interface UserListener {
|
|
|
4397
4440
|
remoteDataChannelMessage: (uid: string, message: AliRtcDataChannelMsg) => void;
|
|
4398
4441
|
}
|
|
4399
4442
|
|
|
4443
|
+
declare type ValidStatusMap = {
|
|
4444
|
+
[ConnectionLatencyStage.CREATE_ENGINE]: ConnectionLatencyStatus.START | ConnectionLatencyStatus.END;
|
|
4445
|
+
[ConnectionLatencyStage.JOIN]: ConnectionLatencyStatus.START | ConnectionLatencyStatus.SEND_SIG | ConnectionLatencyStatus.RECV_RST | ConnectionLatencyStatus.END;
|
|
4446
|
+
[ConnectionLatencyStage.FIRST_REMOTE]: ConnectionLatencyStatus.RECEIVED | ConnectionLatencyStatus.DECODED | ConnectionLatencyStatus.PLAYED;
|
|
4447
|
+
[ConnectionLatencyStage.RECV_NOTIFY_PUBLISH]: any;
|
|
4448
|
+
[ConnectionLatencyStage.HANDLE_PUB_TASK]: ConnectionLatencyStatus.START | ConnectionLatencyStatus.END;
|
|
4449
|
+
[ConnectionLatencyStage.HANDLE_SUB_TASK]: ConnectionLatencyStatus.START | ConnectionLatencyStatus.END;
|
|
4450
|
+
};
|
|
4451
|
+
|
|
4400
4452
|
declare interface VideoScaler {
|
|
4401
4453
|
getVideoTrack: () => MediaStreamTrack;
|
|
4402
4454
|
updateOptions: (options: VideoScalerOptions) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aliyun-rtc-sdk",
|
|
3
|
-
"version": "6.14.1",
|
|
3
|
+
"version": "6.14.2-beta.1",
|
|
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.3",
|
|
13
|
-
"aliyun-rts-sdk": "
|
|
13
|
+
"aliyun-rts-sdk": "2.12.0-beta.0",
|
|
14
14
|
"crypto-js": "^4.1.1",
|
|
15
15
|
"dateformat": "^5.0.3",
|
|
16
16
|
"eventemitter3": "^5.0.1",
|