narraleaf-react 0.14.0 → 0.15.0
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.
|
@@ -150,5 +150,5 @@ export declare const VideoActionTypes: {
|
|
|
150
150
|
readonly seek: "video:seek";
|
|
151
151
|
};
|
|
152
152
|
export type VideoActionContentType = {
|
|
153
|
-
[K in typeof VideoActionTypes[keyof typeof VideoActionTypes]]: K extends "video:action" ? any : K extends "video:show" | "video:hide" | "video:play" | "video:pause" | "video:stop" ? [] : K extends "video:seek" ? [number] : any;
|
|
153
|
+
[K in typeof VideoActionTypes[keyof typeof VideoActionTypes]]: K extends "video:action" ? any : K extends "video:show" | "video:hide" | "video:play" | "video:pause" | "video:stop" | "video:resume" ? [] : K extends "video:seek" ? [number] : any;
|
|
154
154
|
};
|
|
@@ -32,4 +32,30 @@ export declare class Video extends Actionable<VideoStateRaw> {
|
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
34
|
play(): ChainedVideo;
|
|
35
|
+
/**
|
|
36
|
+
* Pause the video, keeping its current position.
|
|
37
|
+
* @chainable
|
|
38
|
+
*/
|
|
39
|
+
pause(): ChainedVideo;
|
|
40
|
+
/**
|
|
41
|
+
* Resume playback from the current position.
|
|
42
|
+
*
|
|
43
|
+
* Unlike {@link play}, this does not wait for the video to finish.
|
|
44
|
+
* @chainable
|
|
45
|
+
*/
|
|
46
|
+
resume(): ChainedVideo;
|
|
47
|
+
/**
|
|
48
|
+
* Stop the video: pause it and end any pending {@link play} so the story continues.
|
|
49
|
+
* @chainable
|
|
50
|
+
*/
|
|
51
|
+
stop(): ChainedVideo;
|
|
52
|
+
/**
|
|
53
|
+
* Seek to a specific time (in seconds).
|
|
54
|
+
* @chainable
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* video.seek(3);
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
seek(time: number): ChainedVideo;
|
|
35
61
|
}
|