@netless/slide 0.3.2 → 0.3.5

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/Slide.d.ts CHANGED
@@ -144,6 +144,11 @@ export interface ISlideConfig {
144
144
  * 提供 logger 对象, 用以记录运行日志
145
145
  */
146
146
  logger?: ILogger;
147
+ /**
148
+ * 是否启用本地缓存,启用后会将 ppt 远程资源缓存在 indexDB 中
149
+ * 默认为 true
150
+ */
151
+ useLocalCache?: boolean;
147
152
  }
148
153
  interface MediaState {
149
154
  type: "pause" | "play";
@@ -267,7 +272,6 @@ export declare class Slide extends Slide_base {
267
272
  private mode;
268
273
  private enableGlobalClick;
269
274
  private lastEmitedState;
270
- private persistLogId;
271
275
  private syncQueue;
272
276
  private playerController;
273
277
  private lock;
@@ -433,9 +437,22 @@ export declare class Slide extends Slide_base {
433
437
  * 从冻结状态恢复
434
438
  */
435
439
  release(): Promise<void>;
440
+ private _doDestroy;
441
+ private waitLoadEnd;
436
442
  /**
437
443
  * 销毁方法.
438
444
  */
439
445
  destroy(): void;
446
+ /**
447
+ * 销毁当前 Slide 实例的本地缓存, 需要在 destroy 之前调用。
448
+ */
449
+ clearSlideCache(): void;
450
+ /**
451
+ * 销毁历史所有本地缓存
452
+ */
453
+ static clearLocalCache(): void;
454
+ /**
455
+ * @deprecated 该 api 已经失效, 请用 slideInstance.clearSlideCache 和 Slide.clearLocalCache 替代
456
+ */
440
457
  static disposeLocalCache(): void;
441
458
  }