quickvo-sdk-js 0.9.1 → 0.9.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.
@@ -7,7 +7,6 @@ type Options = QuickOptions & RoomOptions & CallsWebSocketOptions & {
7
7
  earlyId?: string;
8
8
  };
9
9
  export declare class RoomBase {
10
- #private;
11
10
  options: Options;
12
11
  sdk_service_version: string;
13
12
  prohibitNotify: boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quickvo-sdk-js",
3
3
  "description": "提供快捷接入单对单、单对多、群体会议、舞台会议等音视频功能。",
4
- "version": "0.9.1",
4
+ "version": "0.9.3",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "pako": "^2.1.0",
23
- "pr-task-queue": "^0.4.3",
23
+ "pr-task-queue": "^0.4.4",
24
24
  "pr-tools": "^1.5.7",
25
25
  "pr-ws": "^0.2.5",
26
26
  "sdp-transform": "^2.15.0"
@@ -1,154 +0,0 @@
1
- interface Options {
2
- /**
3
- * 调试模式
4
- */
5
- debug?: boolean;
6
- }
7
- interface Task<T> {
8
- /**
9
- * 任务唯一标识
10
- */
11
- key: string;
12
- /**
13
- * 任务描述
14
- */
15
- describe: string;
16
- /**
17
- * 严格模式
18
- * @description 如果开启 则不自动清除该任务 需要由外部调用 taskQueue.clear([task.key]) 来清除
19
- * @description 如果关闭 则无论任务执行的结果 只要该任务符合并且执行过一次则自动销毁
20
- */
21
- strict: boolean;
22
- /**
23
- * 任务执行条件 (当所有条件均为true时 该任务才执行)
24
- */
25
- conditionKeys: T[];
26
- /**
27
- * 是否正在运行
28
- */
29
- runing: boolean;
30
- /**
31
- * 任务函数
32
- */
33
- func: () => Promise<unknown>;
34
- /**
35
- * 当前任务是否符合执行条件
36
- */
37
- checkAccord: () => boolean;
38
- /**
39
- * 任务完成
40
- */
41
- success: (_e: any) => void;
42
- /**
43
- * 任务失败
44
- */
45
- fail: (_e: any) => void;
46
- /**
47
- * 任务结束
48
- */
49
- complete: () => void;
50
- /**
51
- * 执行任务
52
- */
53
- run: () => Promise<void>;
54
- /**
55
- * 重试任务
56
- */
57
- retry: () => Promise<void>;
58
- /**
59
- * 清除任务
60
- */
61
- clear: () => void;
62
- }
63
- interface CreateTask<T> {
64
- /**
65
- * 任务描述
66
- */
67
- describe?: string;
68
- /**
69
- * 严格模式
70
- * @description 如果开启 则不自动清除该任务 需要由外部调用 taskQueue.clear([task.key]) 来清除
71
- * @description 如果关闭 则无论任务执行的结果 只要该任务符合并且执行过一次则自动销毁
72
- */
73
- strict?: boolean;
74
- /**
75
- * 任务超时时间(ms) 任务超时也属于任务执行结果
76
- */
77
- timeout?: number;
78
- /**
79
- * 任务执行条件 (当所有条件均为true时 该任务才执行)
80
- */
81
- conditionKeys: T[];
82
- /**
83
- * 任务函数
84
- */
85
- func: () => Promise<unknown>;
86
- /**
87
- * 任务完成
88
- */
89
- success?: (_e: any) => void;
90
- /**
91
- * 任务失败
92
- */
93
- fail?: (_e: any) => void;
94
- /**
95
- * 任务结束
96
- */
97
- complete?: () => void;
98
- }
99
- export declare class PrTaskQueue<T extends string> {
100
- #private;
101
- /**
102
- * 初始化条件
103
- * @example const taskQueue = new PrTaskQueue(['login','isAdmin'])
104
- * @param conditionKeys 条件keys string[]
105
- */
106
- constructor(conditionKeys: T[], _options?: Options);
107
- /**
108
- * 设置条件
109
- * @param conditionKey 条件名
110
- * @param accord 条件状态
111
- */
112
- setCondition: (conditionKey: T, accord: boolean) => Promise<void>;
113
- /**
114
- * 创建任务
115
- * @param options.describe 描述信息
116
- * @param options.conditionKeys 执行条件 (所有条件符合时才执行该任务)
117
- * @param options.func 任务函数
118
- */
119
- createTask: (options: CreateTask<T>) => Promise<{
120
- key: string;
121
- describe: string;
122
- strict: boolean;
123
- conditionKeys: T[];
124
- runing: boolean;
125
- func: () => Promise<unknown>;
126
- checkAccord: () => boolean;
127
- success: (_e: any) => void;
128
- fail: (_e: any) => void;
129
- complete: () => void;
130
- run: () => Promise<void>;
131
- retry: () => Promise<void>;
132
- clear: () => void;
133
- }>;
134
- /**
135
- * 尝试执行任务
136
- */
137
- executeTasks: () => Promise<void>;
138
- /**
139
- * 清理任务
140
- * @param taskKey 任务keys
141
- */
142
- clear: (taskKeys?: string[]) => void;
143
- /**
144
- * 查询所有条件当前状态
145
- */
146
- getConditions: () => {
147
- [k: string]: boolean;
148
- };
149
- /**
150
- * 查询所有待执行任务
151
- */
152
- getTasks: () => Map<String, Task<T>>;
153
- }
154
- export {};