@netless/slide 0.3.7 → 0.3.10
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 +10 -0
- package/lib/RenderingTaskManager.d.ts +1 -0
- package/lib/RenderingTaskManager.js +3 -0
- package/lib/Slide.d.ts +20 -3
- package/lib/Slide.js +4 -4
- package/lib/SyncTaskManager.d.ts +2 -0
- package/lib/SyncTaskManager.js +5 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -493,3 +493,13 @@ static clearLocalCache(): void;
|
|
|
493
493
|
* Slide.destroy 方法里添加移除所有事件监听器的逻辑
|
|
494
494
|
* 修复触发器动画切页后没有重置 slideState 的问题
|
|
495
495
|
|
|
496
|
+
#### 0.3.8
|
|
497
|
+
* subtask 错误添加子任务类型输出,方便定位 bug
|
|
498
|
+
|
|
499
|
+
#### 0.3.9
|
|
500
|
+
* 新增 resourceTimeout 配置
|
|
501
|
+
* 修复资源加载引起的错误无法跳转下一页的问题
|
|
502
|
+
|
|
503
|
+
#### 0.3.10
|
|
504
|
+
* 新增本地日志下载功能
|
|
505
|
+
* 修复加载状态不一致导致无法下一步的问题
|
|
@@ -131,6 +131,9 @@ var RenderingTaskManager = /** @class */ (function () {
|
|
|
131
131
|
RenderingTaskManager.prototype.hasStartTask = function () {
|
|
132
132
|
return this.tasks.some(function (t) { return t.state === "start"; });
|
|
133
133
|
};
|
|
134
|
+
RenderingTaskManager.prototype.destroy = function () {
|
|
135
|
+
this.eventHub.removeAllListeners();
|
|
136
|
+
};
|
|
134
137
|
return RenderingTaskManager;
|
|
135
138
|
}());
|
|
136
139
|
export { RenderingTaskManager };
|
package/lib/Slide.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SlideError } from "@netless/ppt-player";
|
|
1
2
|
export { ErrorType } from "@netless/ppt-player";
|
|
2
3
|
export interface RtcAudio {
|
|
3
4
|
/**
|
|
@@ -153,6 +154,10 @@ export interface ISlideConfig {
|
|
|
153
154
|
* 默认为 true
|
|
154
155
|
*/
|
|
155
156
|
useLocalCache?: boolean;
|
|
157
|
+
/**
|
|
158
|
+
* 资源加载超时时间, 默认 15 秒
|
|
159
|
+
*/
|
|
160
|
+
resourceTimeout?: number;
|
|
156
161
|
}
|
|
157
162
|
interface MediaState {
|
|
158
163
|
type: "pause" | "play";
|
|
@@ -235,11 +240,11 @@ export interface SlideEventEmitter {
|
|
|
235
240
|
emit(event: typeof SLIDE_EVENTS.syncReceive, args: SyncEvent): boolean;
|
|
236
241
|
on(event: typeof SLIDE_EVENTS.syncReceive, listener: (event: SyncEvent) => void): this;
|
|
237
242
|
emit(event: typeof SLIDE_EVENTS.renderError, args: {
|
|
238
|
-
error:
|
|
243
|
+
error: SlideError;
|
|
239
244
|
index: number;
|
|
240
245
|
}): boolean;
|
|
241
246
|
on(event: typeof SLIDE_EVENTS.renderError, listener: (args: {
|
|
242
|
-
error:
|
|
247
|
+
error: SlideError;
|
|
243
248
|
index: number;
|
|
244
249
|
}) => void): this;
|
|
245
250
|
emit(event: typeof SLIDE_EVENTS.animateStart): boolean;
|
|
@@ -257,6 +262,10 @@ export interface SlideEventEmitter {
|
|
|
257
262
|
}
|
|
258
263
|
declare const Slide_base: new () => SlideEventEmitter;
|
|
259
264
|
export declare class Slide extends Slide_base {
|
|
265
|
+
static logStore: LocalForage;
|
|
266
|
+
static _tempLog: string;
|
|
267
|
+
static _tempLogIndex: number;
|
|
268
|
+
static flushLog(): Promise<void>;
|
|
260
269
|
private iosResetCache;
|
|
261
270
|
private iosNewPlayer?;
|
|
262
271
|
private needClearCacheImage;
|
|
@@ -264,6 +273,7 @@ export declare class Slide extends Slide_base {
|
|
|
264
273
|
private __slideState;
|
|
265
274
|
private userInputTime;
|
|
266
275
|
private isSyncingSlideState;
|
|
276
|
+
private randomId;
|
|
267
277
|
private resize;
|
|
268
278
|
private isAnimating;
|
|
269
279
|
private renderingTaskManager;
|
|
@@ -299,6 +309,7 @@ export declare class Slide extends Slide_base {
|
|
|
299
309
|
private _receiveIncrId;
|
|
300
310
|
private get dispatchIncrId();
|
|
301
311
|
constructor(config: ISlideConfig);
|
|
312
|
+
static handleLogDownload: () => Promise<void>;
|
|
302
313
|
private initPlayer;
|
|
303
314
|
private userInputHandle;
|
|
304
315
|
private handleViewClick;
|
|
@@ -408,7 +419,13 @@ export declare class Slide extends Slide_base {
|
|
|
408
419
|
renderSlide(index: number, isForward?: boolean): void;
|
|
409
420
|
private needCreateNewPlayer;
|
|
410
421
|
private poseRenderSlide;
|
|
411
|
-
|
|
422
|
+
/**
|
|
423
|
+
* 直接渲染 index 指定的页码, 不论当前是 sync 还是 interactive 模式.
|
|
424
|
+
* 即调用此方法不会触发 syncDispatch 事件
|
|
425
|
+
* @param index 要渲染的页码
|
|
426
|
+
* @param isForward 是否向前翻页, 影响切页动画时正放还是倒放
|
|
427
|
+
*/
|
|
428
|
+
doRenderSlide(index: number, isForward?: boolean): Promise<void>;
|
|
412
429
|
/**
|
|
413
430
|
* 执行下一个主序列动画
|
|
414
431
|
*/
|