quickvo-sdk-js 1.6.50 → 1.6.52

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.
@@ -72,8 +72,10 @@ export declare class QuickVO {
72
72
  quitRoom: () => Promise<boolean>;
73
73
  quitRoomEx: () => Promise<boolean>;
74
74
  destroy: () => void;
75
- addRequestAnimationFrame: (key: string, func: FrameRequestCallback) => Promise<void>;
76
- clearRequestAnimationFrame: (keys?: string[]) => Promise<void>;
75
+ addRequestAnimationFrame: (key: string, func: FrameRequestCallback, options?: {
76
+ fps?: number;
77
+ }) => void;
78
+ clearRequestAnimationFrame: (keys?: string[]) => void;
77
79
  getLocalUserTrackReports: (mediaType: import('./enums').K_mediaType) => import('./types').TrackReport;
78
80
  getRemoteUserTrackReports: (userId: string, origin: "sfu" | "p2p", direction: "sends" | "recvs", mediaType: import('./enums').K_mediaType) => import('./types').TrackReport | undefined;
79
81
  _openP2P: (remoteUserId: string, mediaTypes: import('./enums').K_mediaType[], isRemotePush: boolean) => Promise<void>;
@@ -5,6 +5,10 @@ export declare class ActionSFU {
5
5
  base: Base;
6
6
  private _onOnline?;
7
7
  private _reconnectTimerId?;
8
+ /** 网络计算是否进行中,用于避免与 interval 重叠执行 */
9
+ private _networkCalculating;
10
+ /** 上次打印 generateTrackAnalysis 超时告警的时间,用于限流(每 30 秒最多一次) */
11
+ private _lastTrackAnalysisWarnTime;
8
12
  constructor({ base }: {
9
13
  base: Base;
10
14
  });
@@ -53,7 +53,7 @@ export declare class Base {
53
53
  mediaTypes: K_mediaType[];
54
54
  desc?: string;
55
55
  connectedTime?: string;
56
- }) => Promise<Pick<import('../protos/protoEvent').MessageRsp<"reportP2PConnectEx">, "sn" | "event" | "data" | "code" | "desc">>;
56
+ }) => Promise<Pick<import('../protos/protoEvent').MessageRsp<"reportP2PConnectEx">, "sn" | "event" | "data" | "code" | "desc">> | undefined;
57
57
  _reportLog: (_type: Report_Log_Type, describe?: string) => void;
58
58
  }
59
59
  export {};
@@ -1,17 +1,22 @@
1
1
  export declare class AnimationFrame {
2
2
  private _requestAnimationFrameId?;
3
3
  private _requestAnimationFrameItems;
4
+ /** 每个 key 对应的上次调用时间(ms),用于按 fps 节流 */
5
+ private _lastInvokeTime;
4
6
  /**
5
7
  * add FrameRequestCallback
6
8
  * @param key string
7
9
  * @param func FrameRequestCallback
10
+ * @param options.fps 目标帧率(每秒调用次数),默认 20
8
11
  */
9
- addRequestAnimationFrame: (key: string, func: FrameRequestCallback) => Promise<void>;
12
+ addRequestAnimationFrame: (key: string, func: FrameRequestCallback, options?: {
13
+ fps?: number;
14
+ }) => void;
10
15
  /**
11
16
  * clear FrameRequestCallback
12
17
  * @param keys string[] = []
13
18
  */
14
- clearRequestAnimationFrame: (keys?: string[]) => Promise<void>;
19
+ clearRequestAnimationFrame: (keys?: string[]) => void;
15
20
  init: () => void;
16
21
  stop: () => void;
17
22
  }
@@ -19,6 +19,10 @@ export declare class StreamRecorder {
19
19
  * stop
20
20
  */
21
21
  stop: () => Promise<void>;
22
+ /**
23
+ * 清理资源:清除定时器,若正在录制则先停止。实例丢弃前应调用 destroy 或 stop,避免定时器泄漏。
24
+ */
25
+ destroy: () => void;
22
26
  /**
23
27
  * getDuration
24
28
  */
@@ -28,6 +28,10 @@ export declare class CallsWebSocket {
28
28
  close?: (e: any) => void;
29
29
  open?: (e: any) => void;
30
30
  };
31
+ /** 日志写入节流:内存缓冲,避免每条消息都读写 localStorage */
32
+ private _logBuffer;
33
+ private _logFlushTimer;
34
+ private static _LOG_FLUSH_DELAY;
31
35
  constructor({ config }: {
32
36
  config: Config;
33
37
  });
@@ -39,4 +43,5 @@ export declare class CallsWebSocket {
39
43
  clearEvents: () => void;
40
44
  retryEvents: () => Promise<void>;
41
45
  private _updataLogs;
46
+ private _flushLogs;
42
47
  }
@@ -89,6 +89,7 @@ export declare class UserBase {
89
89
  localMedias: LocalMedias;
90
90
  });
91
91
  setMute: (mediaTypes: K_mediaType[], mute: boolean) => void;
92
+ setPublished: (mediaTypes: K_mediaType[], published: boolean) => void;
92
93
  /**
93
94
  * updateCallAction
94
95
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quickvo-sdk-js",
3
3
  "description": "提供快捷接入单对单、单对多、群体会议、舞台会议等音视频功能。",
4
- "version": "1.6.50",
4
+ "version": "1.6.52",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"