@netless/slide 1.4.55-alpha.2 → 1.4.55-alpha.3
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/FrozenMediaState.d.ts +13 -0
- package/lib/Slide.d.ts +13 -1
- package/lib/Slide.js +2 -2
- package/package.json +3 -3
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface FrozenMediaPlaybackState {
|
|
2
|
+
type: "pause" | "play";
|
|
3
|
+
time: number;
|
|
4
|
+
}
|
|
5
|
+
export declare type FrozenMediaTimes = {
|
|
6
|
+
[key: string]: number;
|
|
7
|
+
};
|
|
8
|
+
export declare function captureFrozenMediaTimes(mediaState: {
|
|
9
|
+
[key: string]: FrozenMediaPlaybackState;
|
|
10
|
+
}, frozenTime: number): FrozenMediaTimes;
|
|
11
|
+
export declare function applyFrozenMediaTimes(mediaState: {
|
|
12
|
+
[key: string]: FrozenMediaPlaybackState;
|
|
13
|
+
}, frozenMediaTimes: FrozenMediaTimes, releaseTime: number): void;
|
package/lib/Slide.d.ts
CHANGED
|
@@ -284,13 +284,18 @@ export interface ISlideConfig {
|
|
|
284
284
|
skipActionWhenFrozen?: boolean;
|
|
285
285
|
enableAutoForward?: boolean;
|
|
286
286
|
customLinks?: CustomLink[];
|
|
287
|
+
/**
|
|
288
|
+
* Disable the built-in ResizeObserver and rely on external notifyFrameResize() calls.
|
|
289
|
+
* Set this to true when using window-manager's boxSizeChange event as the resize signal.
|
|
290
|
+
* @default false
|
|
291
|
+
*/
|
|
292
|
+
disableFrameResizeObserver?: boolean;
|
|
287
293
|
resourceMaxRetries?: number;
|
|
288
294
|
onResourceMaxRetries?: (url: string, error: Error) => void;
|
|
289
295
|
}
|
|
290
296
|
interface MediaState {
|
|
291
297
|
type: "pause" | "play";
|
|
292
298
|
time: number;
|
|
293
|
-
frozenTime?: number;
|
|
294
299
|
fullscreen?: boolean;
|
|
295
300
|
}
|
|
296
301
|
interface TimeNodeSeqState {
|
|
@@ -441,6 +446,7 @@ export declare class Slide extends Slide_base {
|
|
|
441
446
|
private userInputTime;
|
|
442
447
|
private isSyncingSlideState;
|
|
443
448
|
private frozenTaskManager;
|
|
449
|
+
private frozenMediaTimes;
|
|
444
450
|
private randomId;
|
|
445
451
|
private resize;
|
|
446
452
|
private isAnimating;
|
|
@@ -509,6 +515,12 @@ export declare class Slide extends Slide_base {
|
|
|
509
515
|
private updateStageCountLimit;
|
|
510
516
|
private setMedianControllerAttribute;
|
|
511
517
|
private frameResizeHandler;
|
|
518
|
+
/**
|
|
519
|
+
* Notify the slide that its frame container may have changed size.
|
|
520
|
+
* Call this when using an external resize signal (e.g. window-manager's boxSizeChange event)
|
|
521
|
+
* instead of the built-in ResizeObserver.
|
|
522
|
+
*/
|
|
523
|
+
notifyFrameResize(): void;
|
|
512
524
|
/**
|
|
513
525
|
* Update ppt fixed height and width, this method only takes effect when the fixedFrameSize configuration item is set.
|
|
514
526
|
* @param width Width value that needs to be updated, unit px.
|