@netless/slide 1.4.36 → 1.4.37

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 CHANGED
@@ -4,6 +4,9 @@
4
4
 
5
5
  ## changelog
6
6
 
7
+ ### 1.4.37 (2025-7-16)
8
+ * 添加 `setStageCountLimit` 静态方法, 用于设置强行清除最大限制, 需设置 `window.__nativeTags.platform`
9
+
7
10
  ### 1.4.36 (2025-6-26)
8
11
  * 修复`safari`无法在播放前调整进度问题
9
12
 
@@ -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
- window.requestAnimationFrame(_this.schedule);
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
- window.requestAnimationFrame(_this.schedule);
21
+ setTimeout(_this.schedule);
22
22
  }
23
23
  else {
24
24
  _this.isScheduling = 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];
@@ -104,6 +104,7 @@ var RenderingTaskManager = /** @class */ (function () {
104
104
  _this.tasks.splice(selfIndex, 1);
105
105
  _this.replaceIdleTask();
106
106
  }
107
+ _this.eventHub.emit("task-error-".concat(task.id));
107
108
  });
108
109
  }
109
110
  RenderingTaskManager.prototype.replaceIdleTask = function () {
package/lib/Slide.d.ts CHANGED
@@ -420,6 +420,8 @@ export declare class Slide extends Slide_base {
420
420
  * 设置全局音量, 对所有 Slide 实例都生效
421
421
  */
422
422
  static volumeAdjuster: VolumeAdjuster;
423
+ static __stageCountLimit: number;
424
+ static setStageCountLimit(limit: number): void;
423
425
  private iosResetCache;
424
426
  private iosNewPlayer?;
425
427
  private version?;
@@ -485,6 +487,7 @@ export declare class Slide extends Slide_base {
485
487
  private handleViewTouchEnd;
486
488
  private createController;
487
489
  private handleSlideRef;
490
+ private updateStageCountLimit;
488
491
  private setMedianControllerAttribute;
489
492
  private frameResizeHandler;
490
493
  /**