@netless/slide 1.4.22 → 1.4.24
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/README.md +18 -0
- package/lib/AliTrackLogger.js +1 -1
- package/lib/FrozenTaskManager.js +2 -2
- package/lib/PlayerController.d.ts +2 -0
- package/lib/PlayerController.js +12 -1
- package/lib/RenderingTaskManager.js +2 -2
- package/lib/Slide.d.ts +1 -0
- package/lib/Slide.js +1 -1
- package/lib/Slide.js.map +1 -0
- package/lib/global.js +1 -1
- package/lib/typeGuard/SyncEvent.d.ts +10 -0
- package/lib/typeGuard/SyncEvent.js +27 -0
- package/package.json +2 -2
- package/lib/LocalFileSystem.d.ts +0 -0
- package/lib/LocalFileSystem.js +0 -1
- package/lib/StateDriveSlide.d.ts +0 -237
- package/lib/StateDriveSlide.js +0 -664
- package/lib/SyncEventQueue.d.ts +0 -13
- package/lib/SyncEventQueue.js +0 -83
- package/lib/Ticker.d.ts +0 -2
- package/lib/Ticker.js +0 -2
- package/lib/waitUntil.d.ts +0 -2
- package/lib/waitUntil.js +0 -56
package/README.md
CHANGED
|
@@ -4,6 +4,24 @@
|
|
|
4
4
|
|
|
5
5
|
## changelog
|
|
6
6
|
|
|
7
|
+
### 1.4.24 (2025-5-9)
|
|
8
|
+
* 优化部分 PPT 中图片缓存占用
|
|
9
|
+
* 优化图形特效 CPU 占用
|
|
10
|
+
* 优化切页动画响应时间
|
|
11
|
+
|
|
12
|
+
### 1.4.23 (2025-5-8)
|
|
13
|
+
* 添加 skipActionWhenFrozen 参数, 控制冻结时是否跳过动作, 默认为 false
|
|
14
|
+
* 修复 frozen / release 多次重复调用后 frozen 不生效问题
|
|
15
|
+
|
|
16
|
+
### 1.4.22 (2025-5-8)
|
|
17
|
+
* 添加 transitionResolutionLevel 参数, 控制切页动画截图分辨率, 默认为 2
|
|
18
|
+
* [0] 640 * 360
|
|
19
|
+
* [1] 960 * 540;
|
|
20
|
+
* [2] Normal 1280 * 720; --- default setting for mobile devices.
|
|
21
|
+
* [3] HD 1920 * 1080;
|
|
22
|
+
* [4] 3K 3200 × 1800, greater than 4 is calculated as 4; --- default setting for PC devices.
|
|
23
|
+
* 添加 preloadResource 方法, 只加载 json 和 图片资源, 不加载音视频资源, 不生成纹理
|
|
24
|
+
|
|
7
25
|
### 1.4.21 (2025-4-24)
|
|
8
26
|
* 增加缓存指定页码参数
|
|
9
27
|
|
package/lib/AliTrackLogger.js
CHANGED
|
@@ -13,7 +13,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
13
13
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
14
|
function step(op) {
|
|
15
15
|
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (_) try {
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
17
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
18
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
19
|
switch (op[0]) {
|
package/lib/FrozenTaskManager.js
CHANGED
|
@@ -11,14 +11,14 @@ var FrozenTaskManager = /** @class */ (function () {
|
|
|
11
11
|
task.status = "running";
|
|
12
12
|
task.fn.apply(null).then(function () {
|
|
13
13
|
if (_this.tasks.length > 0) {
|
|
14
|
-
|
|
14
|
+
setTimeout(_this.schedule);
|
|
15
15
|
}
|
|
16
16
|
else {
|
|
17
17
|
_this.isScheduling = false;
|
|
18
18
|
}
|
|
19
19
|
}).catch(function () {
|
|
20
20
|
if (_this.tasks.length > 0) {
|
|
21
|
-
|
|
21
|
+
setTimeout(_this.schedule);
|
|
22
22
|
}
|
|
23
23
|
else {
|
|
24
24
|
_this.isScheduling = false;
|
|
@@ -22,6 +22,8 @@ export declare class PlayerConfig {
|
|
|
22
22
|
set autoFPS(value: boolean);
|
|
23
23
|
get backgroundColor(): any;
|
|
24
24
|
set backgroundColor(value: any);
|
|
25
|
+
get maxResolutionLevel(): number;
|
|
26
|
+
set maxResolutionLevel(value: number);
|
|
25
27
|
}
|
|
26
28
|
export declare class PlayerController {
|
|
27
29
|
private stateId;
|
package/lib/PlayerController.js
CHANGED
|
@@ -41,7 +41,7 @@ var PlayerConfig = /** @class */ (function () {
|
|
|
41
41
|
Object.defineProperty(PlayerConfig.prototype, "size", {
|
|
42
42
|
get: function () {
|
|
43
43
|
var _a, _b;
|
|
44
|
-
return ((_a = this.player.view) === null || _a === void 0 ? void 0 : _a.width
|
|
44
|
+
return "".concat((_a = this.player.view) === null || _a === void 0 ? void 0 : _a.width, "*").concat((_b = this.player.view) === null || _b === void 0 ? void 0 : _b.height);
|
|
45
45
|
},
|
|
46
46
|
set: function (_) { },
|
|
47
47
|
enumerable: false,
|
|
@@ -97,6 +97,16 @@ var PlayerConfig = /** @class */ (function () {
|
|
|
97
97
|
enumerable: false,
|
|
98
98
|
configurable: true
|
|
99
99
|
});
|
|
100
|
+
Object.defineProperty(PlayerConfig.prototype, "maxResolutionLevel", {
|
|
101
|
+
get: function () {
|
|
102
|
+
return this.player.config.maxResolutionLevel;
|
|
103
|
+
},
|
|
104
|
+
set: function (value) {
|
|
105
|
+
this.player.updateConfig({ maxResolutionLevel: value });
|
|
106
|
+
},
|
|
107
|
+
enumerable: false,
|
|
108
|
+
configurable: true
|
|
109
|
+
});
|
|
100
110
|
return PlayerConfig;
|
|
101
111
|
}());
|
|
102
112
|
export { PlayerConfig };
|
|
@@ -145,6 +155,7 @@ var PlayerController = /** @class */ (function () {
|
|
|
145
155
|
resolution: gui.add(this.config, "resolution", 0.5, 8, 0.5),
|
|
146
156
|
autoResolution: gui.add(this.config, "autoResolution"),
|
|
147
157
|
autoFps: gui.add(this.config, "autoFPS"),
|
|
158
|
+
maxResolutionLevel: gui.add(this.config, "maxResolutionLevel", 0, 4, 1),
|
|
148
159
|
transactionBgColor: gui.addColor(this.config, "backgroundColor"),
|
|
149
160
|
};
|
|
150
161
|
return [gui, controller];
|
|
@@ -13,7 +13,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
13
13
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
14
|
function step(op) {
|
|
15
15
|
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (_) try {
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
17
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
18
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
19
|
switch (op[0]) {
|
|
@@ -95,7 +95,7 @@ var RenderingTaskManager = /** @class */ (function () {
|
|
|
95
95
|
_this.tasks.splice(selfIndex, 1);
|
|
96
96
|
_this.replaceIdleTask();
|
|
97
97
|
}
|
|
98
|
-
_this.eventHub.emit("task-end-"
|
|
98
|
+
_this.eventHub.emit("task-end-".concat(task.id));
|
|
99
99
|
});
|
|
100
100
|
this.eventHub.on("task-error", function (_a) {
|
|
101
101
|
var task = _a.task;
|