aliyun-rtc-sdk 6.14.1 → 6.14.2-beta.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.
@@ -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;
@@ -3995,6 +4027,7 @@ declare class SLSReporter {
3995
4027
  private engine;
3996
4028
  protected logClient: LogClient;
3997
4029
  protected authInfo?: AliRtcAuthInfo;
4030
+ private ntpClock;
3998
4031
  private static staticClient;
3999
4032
  private static getLogClient;
4000
4033
  static reportOSSUpload(sessionId: string, date: string, responseCode?: number): void;
@@ -4131,6 +4164,15 @@ declare class SLSReporter {
4131
4164
  reportSTSResult(code: number, startTs: number): void;
4132
4165
  reportLeaveInvoked(): void;
4133
4166
  reportSEIMessage(payloadType: number, length: number, repeatCount: number, delay: number, isKey: boolean): void;
4167
+ /**
4168
+ * 接通耗时事件(12001)
4169
+ * 用stage和status来区分接通过程中各个时间节点。
4170
+ * @param state
4171
+ * @param status
4172
+ * @param calid
4173
+ * @param tckid
4174
+ */
4175
+ reportConnectionLatencyEvent<Stage extends keyof ValidStatusMap>(stage: Stage, status: ValidStatusMap[Stage], calid: string, tckid: string, tm?: number, ntptm?: number): void;
4134
4176
  /**
4135
4177
  * 日志埋点
4136
4178
  * 在埋点中增加tm字段,表示发生埋点的客户端本地时间
@@ -4397,6 +4439,15 @@ declare interface UserListener {
4397
4439
  remoteDataChannelMessage: (uid: string, message: AliRtcDataChannelMsg) => void;
4398
4440
  }
4399
4441
 
4442
+ declare type ValidStatusMap = {
4443
+ [ConnectionLatencyStage.CREATE_ENGINE]: ConnectionLatencyStatus.START | ConnectionLatencyStatus.END;
4444
+ [ConnectionLatencyStage.JOIN]: ConnectionLatencyStatus.START | ConnectionLatencyStatus.SEND_SIG | ConnectionLatencyStatus.RECV_RST | ConnectionLatencyStatus.END;
4445
+ [ConnectionLatencyStage.FIRST_REMOTE]: ConnectionLatencyStatus.RECEIVED | ConnectionLatencyStatus.DECODED | ConnectionLatencyStatus.PLAYED;
4446
+ [ConnectionLatencyStage.RECV_NOTIFY_PUBLISH]: any;
4447
+ [ConnectionLatencyStage.HANDLE_PUB_TASK]: ConnectionLatencyStatus.START | ConnectionLatencyStatus.END;
4448
+ [ConnectionLatencyStage.HANDLE_SUB_TASK]: ConnectionLatencyStatus.START | ConnectionLatencyStatus.END;
4449
+ };
4450
+
4400
4451
  declare interface VideoScaler {
4401
4452
  getVideoTrack: () => MediaStreamTrack;
4402
4453
  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.0",
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": "^2.11.0",
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",