@vkontakte/videoplayer-interactive 1.0.21 → 1.0.22-dev.71ddf25e.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.
- package/es2015.cjs.js +7 -7
- package/es2015.esm.js +7 -7
- package/es2018.cjs.js +7 -7
- package/es2018.esm.js +7 -7
- package/esnext.cjs.js +7 -7
- package/esnext.esm.js +7 -7
- package/evergreen.esm.js +7 -7
- package/package.json +4 -4
- package/types/modules/Interactives/Interactives.d.ts +3 -1
- package/types/modules/Interactives/types.d.ts +5 -0
- package/types/modules/Interactives/utils/GameController.d.ts +35 -16
- package/types/modules/Interactives/utils/GroupsStack.d.ts +31 -21
- package/types/modules/Interactives/utils/InteractiveEvents.d.ts +16 -10
- package/types/modules/Interactives/utils/ResizeManager.d.ts +8 -1
- package/types/modules/Interactives/utils/SelectBranches.d.ts +15 -51
- package/types/modules/Interactives/utils/SelectBranches.types.d.ts +73 -0
- package/types/modules/Interactives/utils/events.d.ts +3 -0
- package/types/modules/Interactives/utils/fallbackStrategies.d.ts +23 -6
- package/types/modules/Interactives/utils/gameUtils.d.ts +28 -26
- package/types/modules/Interactives/utils/renderingUtils.d.ts +64 -59
- package/types/modules/SeamlessController/SeamlessController.d.ts +1 -1
- package/types/movika.core/manifest/index.d.ts +4 -0
- package/types/movika.core/manifest/manifest_3_2/chapter.d.ts +1 -0
- package/types/movika.core/manifest/manifest_3_3/chapter.d.ts +3 -1
- package/types/movika.core/manifest/types.d.ts +26 -25
|
@@ -1,54 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
containerId: any;
|
|
17
|
-
branches?: any[] | undefined;
|
|
18
|
-
onEvent: any;
|
|
19
|
-
isEOV?: (() => boolean) | undefined;
|
|
20
|
-
isDisabled?: (() => boolean) | undefined;
|
|
21
|
-
}) => void;
|
|
22
|
-
onContainerEvent: ({ action, container: { id: containerId, endTime }, branches, isEOV, autoSelected, }: {
|
|
23
|
-
action: any;
|
|
24
|
-
container: {
|
|
25
|
-
id: any;
|
|
26
|
-
endTime: any;
|
|
27
|
-
};
|
|
28
|
-
branches?: any[] | undefined;
|
|
29
|
-
isEOV?: boolean | undefined;
|
|
30
|
-
autoSelected?: boolean | undefined;
|
|
31
|
-
}) => void;
|
|
32
|
-
onChapterEvent: ({ chapterId, action, branches }: {
|
|
33
|
-
chapterId: any;
|
|
34
|
-
action: any;
|
|
35
|
-
branches?: any[] | undefined;
|
|
36
|
-
}) => (() => void) | undefined;
|
|
37
|
-
onExpectEvent: ({ subjectId, subjectName, action }: {
|
|
38
|
-
subjectId: any;
|
|
39
|
-
subjectName: any;
|
|
40
|
-
action: any;
|
|
41
|
-
}) => void;
|
|
42
|
-
expectEventHandler: ({ subjectId, subjectName }: {
|
|
43
|
-
subjectId: any;
|
|
44
|
-
subjectName: any;
|
|
45
|
-
}) => void;
|
|
46
|
-
setManifestChapterEvents: (chapter: any) => void;
|
|
47
|
-
setManifestContainerEvents: ({ container, branches, isEOV }: {
|
|
48
|
-
container: any;
|
|
49
|
-
branches: any;
|
|
50
|
-
isEOV?: boolean | undefined;
|
|
51
|
-
}) => void;
|
|
1
|
+
import type { LatestChapter } from '../../../movika.core/manifest';
|
|
2
|
+
import type { SelectBranchesArg, OnControlEventArg, ContinuePlaybackArg, ExpectEventHandlerArg, OnChapterEventArg, OnContainerEventArg, OnExpectEventArg, SetManifestContainerEventsArg, ActionMap, AnyAction } from './SelectBranches.types';
|
|
3
|
+
export declare const defaultArgs: {
|
|
4
|
+
readonly shouldOpenNow: true;
|
|
5
|
+
readonly isDetachContainer: true;
|
|
6
|
+
};
|
|
7
|
+
export declare const extendArgs: <T extends AnyAction>(action: T, rewrite?: boolean) => T;
|
|
8
|
+
export declare const SelectBranches: ({ globalEventEmitter, player, interactiveEvents, removeControllers, }: SelectBranchesArg) => {
|
|
9
|
+
onControlEvent: ({ action, controlType, controlId, containerId, branches, onEvent, isEOV, isDisabled, }: OnControlEventArg) => void;
|
|
10
|
+
onContainerEvent: ({ action, container: { id: containerId, endTime }, branches, isEOV, autoSelected, }: OnContainerEventArg) => void;
|
|
11
|
+
onChapterEvent: ({ chapterId, action, branches }: OnChapterEventArg) => (() => ContinuePlaybackArg<"chapter">) | undefined;
|
|
12
|
+
onExpectEvent: <T extends keyof ActionMap>({ subjectId, subjectName }: OnExpectEventArg<T>) => void;
|
|
13
|
+
expectEventHandler: <T extends keyof ActionMap>({ subjectId, subjectName }: ExpectEventHandlerArg<T>) => void;
|
|
14
|
+
setManifestChapterEvents: (chapter: LatestChapter) => void;
|
|
15
|
+
setManifestContainerEvents: ({ container, branches, isEOV }: SetManifestContainerEventsArg) => void;
|
|
52
16
|
stopExpect: () => void;
|
|
53
17
|
state: {
|
|
54
18
|
isExpect: boolean;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { LatestContainer, ControlEvent, LatestControl, LatestChapterBranch, ContainerEvent, ChapterEvent } from '../../../movika.core/manifest';
|
|
2
|
+
import type { EventEmitter } from '../../../utils/EventEmitter';
|
|
3
|
+
import type { IPlayer } from '@vkontakte/videoplayer-core';
|
|
4
|
+
import type { InteractiveEventsType } from './InteractiveEvents';
|
|
5
|
+
export type SubjectName = 'chapter' | 'container' | 'control';
|
|
6
|
+
export type SelectBranchesArg = {
|
|
7
|
+
globalEventEmitter: EventEmitter;
|
|
8
|
+
player: IPlayer;
|
|
9
|
+
interactiveEvents: InteractiveEventsType;
|
|
10
|
+
removeControllers?: AnyFn;
|
|
11
|
+
};
|
|
12
|
+
export type OnControlEventArg = {
|
|
13
|
+
action: ControlEvent['action'];
|
|
14
|
+
controlType: LatestControl['type'];
|
|
15
|
+
controlId: LatestControl['id'];
|
|
16
|
+
containerId: LatestContainer['id'];
|
|
17
|
+
onEvent: AnyFn;
|
|
18
|
+
branches?: LatestChapterBranch[];
|
|
19
|
+
isEOV?: () => boolean;
|
|
20
|
+
isDisabled?: () => boolean;
|
|
21
|
+
};
|
|
22
|
+
export type OnContainerEventArg = {
|
|
23
|
+
action: ContainerEvent['action'];
|
|
24
|
+
container: LatestContainer;
|
|
25
|
+
autoSelected?: boolean;
|
|
26
|
+
branches?: LatestChapterBranch[];
|
|
27
|
+
isEOV?: boolean;
|
|
28
|
+
};
|
|
29
|
+
export type OnChapterEventArg = {
|
|
30
|
+
action: ChapterEvent['action'];
|
|
31
|
+
chapterId: string;
|
|
32
|
+
branches?: LatestChapterBranch[];
|
|
33
|
+
};
|
|
34
|
+
export type SetManifestContainerEventsArg = {
|
|
35
|
+
container: LatestContainer;
|
|
36
|
+
branches: LatestChapterBranch[];
|
|
37
|
+
isEOV?: boolean;
|
|
38
|
+
};
|
|
39
|
+
export type AnyAction = ControlEvent['action'] | ContainerEvent['action'] | ChapterEvent['action'];
|
|
40
|
+
export type ActionMap = {
|
|
41
|
+
control: ControlEvent['action'];
|
|
42
|
+
container: ContainerEvent['action'];
|
|
43
|
+
chapter: ChapterEvent['action'];
|
|
44
|
+
};
|
|
45
|
+
export type SubjectType<T extends keyof ActionMap> = T extends 'control' ? LatestControl['type'] : undefined;
|
|
46
|
+
export type EventActionCommon<T extends keyof ActionMap> = {
|
|
47
|
+
subjectId: string;
|
|
48
|
+
subjectName: T;
|
|
49
|
+
subjectType?: SubjectType<T>;
|
|
50
|
+
};
|
|
51
|
+
export type EventActionCommonWithAction<T extends keyof ActionMap> = EventActionCommon<T> & {
|
|
52
|
+
action: ActionMap[T];
|
|
53
|
+
};
|
|
54
|
+
export type OpenURIArg<T extends keyof ActionMap> = EventActionCommonWithAction<T> & {
|
|
55
|
+
payload: {
|
|
56
|
+
URI?: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
export type ChangeManifestArg<T extends keyof ActionMap> = EventActionCommonWithAction<T> & {
|
|
60
|
+
payload: {
|
|
61
|
+
behaviour?: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export type ChangeChapterArg<T extends keyof ActionMap> = EventActionCommonWithAction<T> & {
|
|
65
|
+
payload: {
|
|
66
|
+
chapterId: string;
|
|
67
|
+
autoSelect: boolean;
|
|
68
|
+
behaviour?: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
export type ContinuePlaybackArg<T extends keyof ActionMap> = EventActionCommonWithAction<T>;
|
|
72
|
+
export type OnExpectEventArg<T extends keyof ActionMap> = EventActionCommon<T>;
|
|
73
|
+
export type ExpectEventHandlerArg<T extends keyof ActionMap> = EventActionCommon<T>;
|
|
@@ -5,6 +5,9 @@ export declare const EVENT_NAMES: {
|
|
|
5
5
|
*/
|
|
6
6
|
readonly graph: "graph";
|
|
7
7
|
readonly interactives: "interactives";
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Используйте interactivesInstance.events.chapterChanged$
|
|
10
|
+
*/
|
|
8
11
|
readonly chapterChanged: "chapter-changed";
|
|
9
12
|
readonly playerChanged: "player-changed";
|
|
10
13
|
readonly manifestChanged: "manifest-changed";
|
|
@@ -1,6 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export
|
|
1
|
+
import { type LatestChapterBranch } from '../../../movika.core/manifest';
|
|
2
|
+
/**
|
|
3
|
+
* Returns a random number in the range [0, limit) or [limit, 0) if the 'limit'
|
|
4
|
+
* value is negative
|
|
5
|
+
*/
|
|
6
|
+
export declare const getRandomNumber: (limit: number) => number;
|
|
7
|
+
/**
|
|
8
|
+
* Finds the value with minimal weight number
|
|
9
|
+
*/
|
|
10
|
+
export declare const minFallbackStrategy: (branches: LatestChapterBranch[]) => Nullable<import("../../../movika.core/manifest/manifest_3_3/chapter").ChapterBranch>;
|
|
11
|
+
/**
|
|
12
|
+
* Finds the value with maximal weight number
|
|
13
|
+
*/
|
|
14
|
+
export declare const maxFallbackStrategy: (branches: LatestChapterBranch[]) => Nullable<import("../../../movika.core/manifest/manifest_3_3/chapter").ChapterBranch>;
|
|
15
|
+
/**
|
|
16
|
+
* Finds first branch with `isDefault === true` value
|
|
17
|
+
*/
|
|
18
|
+
export declare const defaultFallbackStrategy: (branches: LatestChapterBranch[]) => import("../../../movika.core/manifest/manifest_3_3/chapter").ChapterBranch | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Returns the random branch
|
|
21
|
+
*/
|
|
22
|
+
export declare const weightlessRandomFallbackStrategy: (branches: LatestChapterBranch[]) => import("../../../movika.core/manifest/manifest_3_3/chapter").ChapterBranch;
|
|
23
|
+
export declare const weightyRandomFallbackStrategy: (branches: LatestChapterBranch[]) => import("../../../movika.core/manifest/manifest_3_3/chapter").ChapterBranch;
|
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
export function
|
|
1
|
+
import { type LatestControl, type LatestChapter, type LatestContainer } from '../../../movika.core/manifest';
|
|
2
|
+
import type { GameController } from './GameController';
|
|
3
|
+
export declare enum GameStates {
|
|
4
|
+
nothing = 0,
|
|
5
|
+
beforeInteractive = 1,
|
|
6
|
+
interactive = 2,
|
|
7
|
+
afterInteractive = 3,
|
|
8
|
+
end = 4,
|
|
9
|
+
removed = 5,
|
|
10
|
+
destroyed = 6
|
|
11
|
+
}
|
|
12
|
+
export declare const isControlsExist: (controls: LatestControl[]) => boolean;
|
|
13
|
+
export declare const isLastChapter: (chapter: LatestChapter) => boolean;
|
|
14
|
+
export declare const hasEndTemplate: (chapter: LatestChapter) => boolean;
|
|
15
|
+
export declare const isBeforeStartTime: (currentTime: number, container: LatestContainer) => boolean;
|
|
16
|
+
export declare const isInteractiveTime: (currentTime: number, container: LatestContainer) => boolean;
|
|
17
|
+
export declare const isAfterInteractiveTime: (currentTime: number, container: LatestContainer) => boolean;
|
|
18
|
+
type AnyEvent = LatestContainer['events'] | LatestChapter['events'] | LatestControl['events'];
|
|
19
|
+
export declare const isExpectEvent: (events?: AnyEvent) => boolean;
|
|
20
|
+
export declare const getExpectEvent: (events?: AnyEvent) => import("../../../movika.core/manifest").ControlEvent | import("../../../movika.core/manifest").ChapterEvent | import("../../../movika.core/manifest").ContainerEvent | undefined;
|
|
21
|
+
export declare const isOneCtrlOneContainer: (controls: LatestControl[]) => boolean;
|
|
22
|
+
export declare const isOneTextCtrlContainer: (controls: LatestControl[]) => boolean;
|
|
23
|
+
export declare function excludeTextControl(containers?: LatestContainer[]): import("../../../movika.core/manifest/manifest_3_3/chapter").ChapterContainer[];
|
|
24
|
+
export declare const isEOVEndTime: (target: HTMLVideoElement, endTime: LatestContainer["endTime"]) => boolean;
|
|
25
|
+
export declare function partial<T extends unknown[], U extends unknown[], R>(fn: (...args: [...T, ...U]) => R, ...presetArgs: T): (...laterArgs: U) => R;
|
|
26
|
+
export declare function partial<T extends Record<string, unknown>, P extends Partial<T>>(fn: (args: T) => unknown, presetArgs: P): (laterArgs: Omit<T, keyof P>) => ReturnType<typeof fn>;
|
|
27
|
+
export declare const shouldIgnoreContainerEvent: (container: LatestContainer, gameControllers: GameController[]) => boolean;
|
|
28
|
+
export {};
|
|
@@ -1,62 +1,67 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export const
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { type LatestControl } from '../../../movika.core/manifest';
|
|
2
|
+
import { type Dimensions } from '../../../modules/Interactives/controls';
|
|
3
|
+
export declare const classnamesPrefix = "interactive";
|
|
4
|
+
export declare const rootElClassName = "interactive-controls-container";
|
|
5
|
+
export declare const getRootEl: () => Element | null;
|
|
6
|
+
export declare const DISABLE_OPACITY = 0.4;
|
|
7
|
+
export declare const controlStylesFallbacks: {
|
|
8
|
+
textColor: string;
|
|
9
|
+
textSize: number;
|
|
10
|
+
textContent: string;
|
|
11
|
+
roundCorners: number;
|
|
12
|
+
borderWidth: number;
|
|
13
|
+
borderColor: string;
|
|
14
|
+
borderAlpha: number;
|
|
15
|
+
backgroundColor: string;
|
|
16
|
+
backgroundAlpha: number;
|
|
17
|
+
innerSizesDependOn: string;
|
|
18
|
+
angle: number;
|
|
19
|
+
};
|
|
20
|
+
type ControlStylesFallbacks = typeof controlStylesFallbacks;
|
|
21
|
+
export declare enum ALIGN_ITEMS {
|
|
22
|
+
top = "flex-start",
|
|
23
|
+
bottom = "flex-end",
|
|
24
|
+
center = "center"
|
|
17
25
|
}
|
|
18
|
-
export
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
26
|
+
export declare enum JUSTIFY_CONTENT {
|
|
27
|
+
start = "flex-start",
|
|
28
|
+
end = "flex-end",
|
|
29
|
+
center = "center"
|
|
22
30
|
}
|
|
23
|
-
export
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
export { center_1 as center };
|
|
31
|
+
export declare enum TEXT_ALIGN {
|
|
32
|
+
start = "left",
|
|
33
|
+
end = "right",
|
|
34
|
+
center = "center"
|
|
28
35
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
target:
|
|
43
|
-
props:
|
|
44
|
-
fallback:
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
target:
|
|
49
|
-
props:
|
|
50
|
-
fallback:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
fallback: any;
|
|
62
|
-
}): void;
|
|
36
|
+
type SetTextPositionStylesProps = {
|
|
37
|
+
target: HTMLElement;
|
|
38
|
+
props: LatestControl['props'];
|
|
39
|
+
};
|
|
40
|
+
export declare const setTextPositionStyles: ({ target, props }: SetTextPositionStylesProps) => void;
|
|
41
|
+
type SetTextStylesProps = {
|
|
42
|
+
target: HTMLElement;
|
|
43
|
+
props: LatestControl['props'];
|
|
44
|
+
fallback: ControlStylesFallbacks;
|
|
45
|
+
dependsOn: Dimensions;
|
|
46
|
+
};
|
|
47
|
+
export declare const setTextStyles: ({ target, props, fallback, dependsOn }: SetTextStylesProps) => void;
|
|
48
|
+
type SetBackgroundStylesProps = {
|
|
49
|
+
target: HTMLElement;
|
|
50
|
+
props: LatestControl['props'];
|
|
51
|
+
fallback: ControlStylesFallbacks;
|
|
52
|
+
};
|
|
53
|
+
export declare const setBackgroundStyles: ({ target, props, fallback }: SetBackgroundStylesProps) => void;
|
|
54
|
+
type SetBorderStylesProps = {
|
|
55
|
+
target: HTMLElement;
|
|
56
|
+
props: LatestControl['props'];
|
|
57
|
+
fallback: ControlStylesFallbacks;
|
|
58
|
+
dependsOn: Dimensions;
|
|
59
|
+
};
|
|
60
|
+
export declare const setBorderStyles: ({ target, props, fallback, dependsOn }: SetBorderStylesProps) => void;
|
|
61
|
+
type SetAngleProps = {
|
|
62
|
+
target: HTMLElement;
|
|
63
|
+
fallback: ControlStylesFallbacks;
|
|
64
|
+
layoutParams: LatestControl['layoutParams'];
|
|
65
|
+
};
|
|
66
|
+
export declare const setAngle: ({ target, layoutParams, fallback }: SetAngleProps) => void;
|
|
67
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IConfig, PlaybackRate, VideoQuality } from '@vkontakte/videoplayer-core';
|
|
2
2
|
import { ValueSubject } from '@vkontakte/videoplayer-shared';
|
|
3
3
|
import type { ManifestVideo, Extensions } from '../../movika.core/manifest';
|
|
4
|
-
import {
|
|
4
|
+
import type { Interactives } from '../../modules/Interactives';
|
|
5
5
|
import type { Instance } from './InstanceManager';
|
|
6
6
|
interface CreatePlayerParams extends Omit<IConfig, 'sources' | 'container'> {
|
|
7
7
|
media: ManifestVideo;
|
|
@@ -19,6 +19,10 @@ export type LatestManifest = Manifest_3_3;
|
|
|
19
19
|
export type LatestContainer = ChapterContainer_3_3;
|
|
20
20
|
export type LatestControl = Control;
|
|
21
21
|
export type LatestControlLayoutParams = ControlLayoutParams;
|
|
22
|
+
export type LatestChapterBranch = ChapterBranch_3_3;
|
|
23
|
+
export type { ControlEvent } from './manifest_3_3/control';
|
|
24
|
+
export type { ContainerEvent } from './manifest_3_3/chapter';
|
|
25
|
+
export type { ChapterEvent } from './manifest_3_3/chapter';
|
|
22
26
|
export * from './migrations';
|
|
23
27
|
export * from './types';
|
|
24
28
|
export * from './utils';
|
|
@@ -2,7 +2,7 @@ import type { Control } from './control';
|
|
|
2
2
|
export type ChapterEventType = 'onSuspense';
|
|
3
3
|
export type ContainerEventType = 'onSuspense';
|
|
4
4
|
export type ChapterSuspenseActionType = 'setNextBranch' | 'setWeightlessRandomBranch' | 'setRandomBranch' | 'setMaxWeightBranch' | 'setMinWeightBranch' | 'setDefaultBranch' | 'continuePlayback' | 'openURI' | 'expect';
|
|
5
|
-
export type ContainerSuspenseActionType = 'setNextBranch' | 'continuePlayback' | 'expect';
|
|
5
|
+
export type ContainerSuspenseActionType = 'setNextBranch' | 'continuePlayback' | 'expect' | 'openURI';
|
|
6
6
|
export interface ChapterEvent {
|
|
7
7
|
type: ChapterEventType;
|
|
8
8
|
action: {
|
|
@@ -20,6 +20,7 @@ export interface ChapterBranch {
|
|
|
20
20
|
chapterId: string;
|
|
21
21
|
weight?: number;
|
|
22
22
|
manifestUrl?: string;
|
|
23
|
+
isDefault?: boolean;
|
|
23
24
|
}
|
|
24
25
|
export interface ContainerEvent {
|
|
25
26
|
type: ContainerEventType;
|
|
@@ -29,6 +30,7 @@ export interface ContainerEvent {
|
|
|
29
30
|
branchId?: string;
|
|
30
31
|
shouldOpenNow: boolean;
|
|
31
32
|
isDetachContainer?: boolean;
|
|
33
|
+
uri?: string;
|
|
32
34
|
};
|
|
33
35
|
};
|
|
34
36
|
}
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
export type { Control } from './manifest_3_3/control';
|
|
2
1
|
import type { Chapter } from './manifest_3_3/chapter';
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
2
|
+
export type { Control } from './manifest_3_3/control';
|
|
3
|
+
export declare const containerTypes: {
|
|
4
|
+
readonly Choice: "Choice";
|
|
5
|
+
readonly TextInput: "TextInput";
|
|
6
|
+
};
|
|
7
|
+
export declare const controlTypes: {
|
|
8
|
+
readonly Button: "Button";
|
|
9
|
+
readonly Area: "Area";
|
|
10
|
+
readonly Text: "Text";
|
|
11
|
+
};
|
|
12
|
+
export declare const eventTypes: {
|
|
13
|
+
readonly onClick: "onClick";
|
|
14
|
+
readonly onSuspense: "onSuspense";
|
|
15
|
+
};
|
|
16
|
+
export declare const eventActionTypes: {
|
|
17
|
+
readonly openURI: "openURI";
|
|
18
|
+
readonly setNextBranch: "setNextBranch";
|
|
19
|
+
readonly setWeightlessRandomBranch: "setWeightlessRandomBranch";
|
|
20
|
+
readonly setRandomBranch: "setRandomBranch";
|
|
21
|
+
readonly setMaxWeightBranch: "setMaxWeightBranch";
|
|
22
|
+
readonly setMinWeightBranch: "setMinWeightBranch";
|
|
23
|
+
readonly setDefaultBranch: "setDefaultBranch";
|
|
24
|
+
readonly continuePlayback: "continuePlayback";
|
|
25
|
+
readonly expect: "expect";
|
|
26
|
+
};
|
|
27
|
+
export type EventActionTypes = typeof eventActionTypes[keyof typeof eventActionTypes];
|
|
27
28
|
export type VideoId = number | string;
|
|
28
29
|
export type ChapterContainers = Chapter['containers'];
|
|
29
30
|
export type { Chapter } from './manifest_3_3/chapter';
|