@netless/slide 1.4.55-alpha.3 → 1.4.55-alpha.4
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/lib/Lock.js +1 -17
- package/lib/Slide.d.ts +5 -0
- package/lib/Slide.js +28 -28
- package/lib/SyncTaskManager.js +10 -182
- package/lib/global.js +1 -1
- package/package.json +2 -2
package/lib/Lock.js
CHANGED
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
var Lock = /** @class */ (function () {
|
|
5
5
|
function Lock(available) {
|
|
6
6
|
this.autoUnlock = Object.create(null);
|
|
7
|
-
this.localKeyAutoRemove = Object.create(null);
|
|
8
|
-
this.localKeys = Object.create(null);
|
|
9
7
|
this.locks = Object.create(null);
|
|
10
8
|
this.available = false;
|
|
11
9
|
this.available = available;
|
|
@@ -16,32 +14,18 @@ var Lock = /** @class */ (function () {
|
|
|
16
14
|
return;
|
|
17
15
|
}
|
|
18
16
|
this.locks[type] = key;
|
|
19
|
-
this.localKeys[key] = true;
|
|
20
|
-
this.localKeyAutoRemove[key] = window.setTimeout(function () {
|
|
21
|
-
delete _this.localKeys[key];
|
|
22
|
-
delete _this.localKeyAutoRemove[key];
|
|
23
|
-
}, 60 * 1000);
|
|
24
17
|
this.autoUnlock[type] = window.setTimeout(function () {
|
|
25
18
|
delete _this.locks[type];
|
|
26
|
-
delete _this.autoUnlock[type];
|
|
27
19
|
}, 3000);
|
|
28
20
|
};
|
|
29
21
|
Lock.prototype.unlock = function (type, key) {
|
|
30
22
|
if (!this.available) {
|
|
31
|
-
return
|
|
32
|
-
}
|
|
33
|
-
var isLocalEvent = !!key && !!this.localKeys[key];
|
|
34
|
-
if (key && isLocalEvent) {
|
|
35
|
-
window.clearTimeout(this.localKeyAutoRemove[key]);
|
|
36
|
-
delete this.localKeys[key];
|
|
37
|
-
delete this.localKeyAutoRemove[key];
|
|
23
|
+
return;
|
|
38
24
|
}
|
|
39
25
|
if (key && this.locks[type] && this.locks[type] === key) {
|
|
40
26
|
window.clearTimeout(this.autoUnlock[type]);
|
|
41
27
|
delete this.locks[type];
|
|
42
|
-
delete this.autoUnlock[type];
|
|
43
28
|
}
|
|
44
|
-
return isLocalEvent;
|
|
45
29
|
};
|
|
46
30
|
Lock.prototype.isLocked = function (type) {
|
|
47
31
|
if (!this.available) {
|
package/lib/Slide.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { AliTrackLogger } from "./AliTrackLogger";
|
|
|
5
5
|
import { preloadResource } from "./global";
|
|
6
6
|
export { ErrorType, PreloadCancelledError } from "@netless/ppt-player";
|
|
7
7
|
export type { SyncEventQueuePolicy } from "./SyncTaskManager";
|
|
8
|
+
export declare const LOCAL_GIF_RUNTIME_CAPABILITY = "netless-slide-local-gif-production-client-geometry";
|
|
8
9
|
export declare type UrlInterrupter = (url: string) => Promise<string>;
|
|
9
10
|
export interface ILoaderDelegate {
|
|
10
11
|
/**
|
|
@@ -179,6 +180,10 @@ export interface ISlideRenderOptions {
|
|
|
179
180
|
*/
|
|
180
181
|
transitionResolutionLevel?: number;
|
|
181
182
|
antialias?: boolean;
|
|
183
|
+
/** Maximum compressed bytes accepted for one client-decoded GIF. */
|
|
184
|
+
localGifMaxCompressedBytes?: number;
|
|
185
|
+
/** Maximum estimated GIF working set for one cached slide. */
|
|
186
|
+
localGifMaxWorkingSetBytes?: number;
|
|
182
187
|
}
|
|
183
188
|
export interface INavigatorDelegate {
|
|
184
189
|
gotoPage?: (index: number) => void;
|