@vkontakte/videoplayer-interactive 1.0.62 → 1.0.63-dev.30efab63.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/index.d.ts +11 -0
- package/{types/manifest → manifest}/index.d.ts +3 -3
- package/manifest/utils.d.ts +48 -0
- package/modules/Graph/Graph.d.ts +54 -0
- package/modules/Graph/index.d.ts +1 -0
- package/modules/Interactives/Interactives.d.ts +143 -0
- package/modules/Interactives/Layout.d.ts +16 -0
- package/modules/Interactives/containers/ChoiceContainer.d.ts +34 -0
- package/modules/Interactives/containers/Container.d.ts +21 -0
- package/modules/Interactives/containers/index.d.ts +4 -0
- package/modules/Interactives/containers/types.d.ts +11 -0
- package/{types/modules → modules}/Interactives/containers/utils.d.ts +3 -3
- package/modules/Interactives/controls/AreaControl.d.ts +21 -0
- package/modules/Interactives/controls/ButtonControl.d.ts +25 -0
- package/modules/Interactives/controls/Control.d.ts +48 -0
- package/modules/Interactives/controls/TextControl.d.ts +18 -0
- package/modules/Interactives/controls/index.d.ts +6 -0
- package/modules/Interactives/controls/types.d.ts +35 -0
- package/modules/Interactives/controls/utils.d.ts +14 -0
- package/modules/Interactives/index.d.ts +16 -0
- package/modules/Interactives/styles/index.d.ts +1 -0
- package/modules/Interactives/types.d.ts +79 -0
- package/modules/Interactives/utils/BlinkAnimationRef.d.ts +15 -0
- package/modules/Interactives/utils/ControlFillAnimation/ControlFillAnimation.d.ts +34 -0
- package/modules/Interactives/utils/ControlFillAnimation/index.d.ts +1 -0
- package/modules/Interactives/utils/ControlFillAnimation/utils.d.ts +12 -0
- package/modules/Interactives/utils/ControlTap/ControlTap.d.ts +17 -0
- package/modules/Interactives/utils/ControlTap/index.d.ts +1 -0
- package/{types/modules → modules}/Interactives/utils/ControlTap/utils.d.ts +3 -3
- package/modules/Interactives/utils/GameController.d.ts +71 -0
- package/modules/Interactives/utils/GroupsStack.d.ts +32 -0
- package/modules/Interactives/utils/HistoryController.d.ts +52 -0
- package/modules/Interactives/utils/InteractiveEvents.d.ts +32 -0
- package/modules/Interactives/utils/ResizeManager.d.ts +15 -0
- package/modules/Interactives/utils/SelectBranches.d.ts +23 -0
- package/modules/Interactives/utils/SelectBranches.types.d.ts +78 -0
- package/{types/modules → modules}/Interactives/utils/angleUtils.d.ts +12 -12
- package/modules/Interactives/utils/createControlText.d.ts +4 -0
- package/modules/Interactives/utils/emitOnError.d.ts +13 -0
- package/modules/Interactives/utils/events.d.ts +79 -0
- package/modules/Interactives/utils/events.types.d.ts +52 -0
- package/{types/modules → modules}/Interactives/utils/fallbackStrategies.d.ts +13 -13
- package/modules/Interactives/utils/functionUtils.d.ts +5 -0
- package/{types/modules → modules}/Interactives/utils/gameUtils.d.ts +20 -20
- package/{types/modules → modules}/Interactives/utils/getInteractiveRanges.d.ts +5 -5
- package/modules/Interactives/utils/renderingUtils.d.ts +75 -0
- package/modules/Loaders/index.d.ts +1 -0
- package/modules/Loaders/movikaProjectIdLoader/index.d.ts +1 -0
- package/modules/Loaders/vkVideoLoader/CustomVkVideoLoader.d.ts +10 -0
- package/modules/Loaders/vkVideoLoader/index.d.ts +1 -0
- package/modules/Loaders/vkVideoLoader/types.d.ts +257 -0
- package/{types/modules → modules}/Loaders/vkVideoLoader/utils.d.ts +1 -1
- package/{types/modules → modules}/ManifestController/Loadable.d.ts +5 -5
- package/modules/ManifestController/ManifestController.d.ts +34 -0
- package/modules/ManifestController/index.d.ts +1 -0
- package/{types/modules → modules}/ManifestController/utils.d.ts +5 -5
- package/modules/SeamlessController/InstanceManager.d.ts +15 -0
- package/modules/SeamlessController/SeamlessController.d.ts +34 -0
- package/modules/SeamlessController/utils.d.ts +9 -0
- package/modules/SeekToInteractiveController/SeekToInteractiveController.d.ts +10 -0
- package/modules/SeekToInteractiveController/index.d.ts +1 -0
- package/package.json +9 -32
- package/types/CustomError.d.ts +13 -0
- package/types/index.d.ts +2 -11
- package/utils/CssVarsManager.d.ts +23 -0
- package/utils/Error.d.ts +8 -0
- package/utils/EventEmitter.d.ts +12 -0
- package/utils/LastFrame.d.ts +35 -0
- package/utils/LastFrameCanvasAPI.d.ts +19 -0
- package/utils/MultiMap.d.ts +10 -0
- package/utils/Raf.d.ts +13 -0
- package/{types/utils → utils}/chapterHelpers.d.ts +1 -1
- package/utils/compareVersions.d.ts +14 -0
- package/{types/utils → utils}/extractVkMovieId.d.ts +1 -1
- package/utils/getVideoContentSize.d.ts +5 -0
- package/{types/utils → utils}/hexToRgb.d.ts +2 -2
- package/{types/utils → utils}/typeCheck.d.ts +6 -6
- package/es2015.cjs +0 -286
- package/es2015.esm.js +0 -286
- package/es2018.cjs +0 -286
- package/es2018.esm.js +0 -286
- package/es2024.cjs +0 -286
- package/es2024.esm.js +0 -286
- package/esnext.cjs +0 -286
- package/esnext.esm.js +0 -286
- package/evergreen.esm.js +0 -286
- package/types/manifest/utils.d.ts +0 -48
- package/types/modules/Graph/Graph.d.ts +0 -54
- package/types/modules/Graph/index.d.ts +0 -1
- package/types/modules/Interactives/Interactives.d.ts +0 -143
- package/types/modules/Interactives/Layout.d.ts +0 -16
- package/types/modules/Interactives/containers/ChoiceContainer.d.ts +0 -34
- package/types/modules/Interactives/containers/Container.d.ts +0 -21
- package/types/modules/Interactives/containers/index.d.ts +0 -4
- package/types/modules/Interactives/containers/types.d.ts +0 -11
- package/types/modules/Interactives/controls/AreaControl.d.ts +0 -21
- package/types/modules/Interactives/controls/ButtonControl.d.ts +0 -25
- package/types/modules/Interactives/controls/Control.d.ts +0 -48
- package/types/modules/Interactives/controls/TextControl.d.ts +0 -18
- package/types/modules/Interactives/controls/index.d.ts +0 -6
- package/types/modules/Interactives/controls/types.d.ts +0 -38
- package/types/modules/Interactives/controls/utils.d.ts +0 -14
- package/types/modules/Interactives/index.d.ts +0 -16
- package/types/modules/Interactives/styles/index.d.ts +0 -1
- package/types/modules/Interactives/types.d.ts +0 -79
- package/types/modules/Interactives/utils/BlinkAnimationRef.d.ts +0 -15
- package/types/modules/Interactives/utils/ControlFillAnimation/ControlFillAnimation.d.ts +0 -34
- package/types/modules/Interactives/utils/ControlFillAnimation/index.d.ts +0 -1
- package/types/modules/Interactives/utils/ControlFillAnimation/utils.d.ts +0 -12
- package/types/modules/Interactives/utils/ControlTap/ControlTap.d.ts +0 -17
- package/types/modules/Interactives/utils/ControlTap/index.d.ts +0 -1
- package/types/modules/Interactives/utils/GameController.d.ts +0 -71
- package/types/modules/Interactives/utils/GroupsStack.d.ts +0 -30
- package/types/modules/Interactives/utils/HistoryController.d.ts +0 -51
- package/types/modules/Interactives/utils/InteractiveEvents.d.ts +0 -32
- package/types/modules/Interactives/utils/ResizeManager.d.ts +0 -15
- package/types/modules/Interactives/utils/SelectBranches.d.ts +0 -23
- package/types/modules/Interactives/utils/SelectBranches.types.d.ts +0 -78
- package/types/modules/Interactives/utils/createControlText.d.ts +0 -4
- package/types/modules/Interactives/utils/emitOnError.d.ts +0 -13
- package/types/modules/Interactives/utils/events.d.ts +0 -79
- package/types/modules/Interactives/utils/events.types.d.ts +0 -55
- package/types/modules/Interactives/utils/functionUtils.d.ts +0 -12
- package/types/modules/Interactives/utils/renderingUtils.d.ts +0 -75
- package/types/modules/Loaders/index.d.ts +0 -1
- package/types/modules/Loaders/movikaProjectIdLoader/index.d.ts +0 -1
- package/types/modules/Loaders/vkVideoLoader/CustomVkVideoLoader.d.ts +0 -10
- package/types/modules/Loaders/vkVideoLoader/index.d.ts +0 -1
- package/types/modules/Loaders/vkVideoLoader/types.d.ts +0 -257
- package/types/modules/ManifestController/ManifestController.d.ts +0 -34
- package/types/modules/ManifestController/index.d.ts +0 -1
- package/types/modules/SeamlessController/InstanceManager.d.ts +0 -15
- package/types/modules/SeamlessController/SeamlessController.d.ts +0 -33
- package/types/modules/SeamlessController/utils.d.ts +0 -9
- package/types/modules/SeekToInteractiveController/SeekToInteractiveController.d.ts +0 -10
- package/types/modules/SeekToInteractiveController/index.d.ts +0 -1
- package/types/types/CustomError.d.ts +0 -13
- package/types/types/index.d.ts +0 -2
- package/types/utils/CssVarsManager.d.ts +0 -23
- package/types/utils/Error.d.ts +0 -8
- package/types/utils/EventEmitter.d.ts +0 -12
- package/types/utils/LastFrame.d.ts +0 -35
- package/types/utils/LastFrameCanvasAPI.d.ts +0 -19
- package/types/utils/MultiMap.d.ts +0 -10
- package/types/utils/Raf.d.ts +0 -13
- package/types/utils/compareVersions.d.ts +0 -14
- package/types/utils/getVideoContentSize.d.ts +0 -5
- /package/{types/constants.d.ts → constants.d.ts} +0 -0
- /package/{types/env.d.ts → env.d.ts} +0 -0
- /package/{types/modules → modules}/Interactives/styles/utils.d.ts +0 -0
- /package/{types/modules → modules}/Loaders/movikaProjectIdLoader/movikaProjectIdLoader.d.ts +0 -0
- /package/types/{types/dom.d.ts → dom.d.ts} +0 -0
- /package/{types/utils → utils}/debounce.d.ts +0 -0
- /package/{types/utils → utils}/throttle.d.ts +0 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type { HistoryApi } from './modules/Interactives';
|
|
2
|
+
export { EVENT_NAMES, Interactives, utils, graphEventTypes, interactivesEventTypes, isLastChapter, hasEndTemplate, isOneTextCtrlContainer, } from './modules/Interactives';
|
|
3
|
+
export type { IInteractiveOptions, InteractiveRange, InteractiveProjectInfo, PlayerChangedData, VideoInfo, } from './modules/Interactives';
|
|
4
|
+
export { ManifestController } from './modules/ManifestController';
|
|
5
|
+
export * from './manifest';
|
|
6
|
+
export { compareVersions } from './utils/compareVersions';
|
|
7
|
+
export { CustomError } from './utils/Error';
|
|
8
|
+
export * from './utils/chapterHelpers';
|
|
9
|
+
export declare const SDKInfo: {
|
|
10
|
+
version: string;
|
|
11
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { ChapterContainer, ChapterContainer as Container, Chapter, Control, Manifest, ManifestVideo, ManifestVideoVariant, Media, Metadata, VideoId, CustomManifestVideoVariant, Extension, AnyManifest, AnyControl, GraphEditChapter, GraphViewChapter, ChapterBranch, Standard, ControlLayoutParams, ControlEvent, ContainerEvent, ChapterEvent } from
|
|
2
|
-
export { isSupportedManifest, ContainerTypes, ControlTypes, EventActionTypes, EventTypes, migrateManifestToLatestVersion, compareVersions } from
|
|
3
|
-
export * from
|
|
1
|
+
export type { ChapterContainer, ChapterContainer as Container, Chapter, Control, Manifest, ManifestVideo, ManifestVideoVariant, Media, Metadata, VideoId, CustomManifestVideoVariant, Extension, AnyManifest, AnyControl, GraphEditChapter, GraphViewChapter, ChapterBranch, Standard, ControlLayoutParams, ControlEvent, ContainerEvent, ChapterEvent, } from '@interactiveplatform/movika-manifest';
|
|
2
|
+
export { isSupportedManifest, ContainerTypes, ControlTypes, EventActionTypes, EventTypes, migrateManifestToLatestVersion, compareVersions, } from '@interactiveplatform/movika-manifest';
|
|
3
|
+
export * from './utils';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { EventActionTypes } from '#/manifest';
|
|
2
|
+
import { type AnyManifest, type AnyControl } from '#/manifest';
|
|
3
|
+
/**
|
|
4
|
+
* checks manifest object validity
|
|
5
|
+
* @param manifest - manifest to check
|
|
6
|
+
* @returns true is valid, false is invalid
|
|
7
|
+
*/
|
|
8
|
+
export declare const isValidManifest: (manifest: AnyManifest) => boolean;
|
|
9
|
+
export declare function isTextControl(controlItem: AnyControl): boolean;
|
|
10
|
+
export declare function isButtonControl(controlItem: AnyControl): boolean;
|
|
11
|
+
export declare function isAreaControl(controlItem: AnyControl): boolean;
|
|
12
|
+
export type EventActionKeys = keyof typeof EventActionTypes;
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated use ContainerTypes enum instead
|
|
15
|
+
*/
|
|
16
|
+
export declare const containerTypes: {
|
|
17
|
+
readonly Choice: "Choice";
|
|
18
|
+
readonly TextInput: "TextInput";
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated use ControlTypes enum instead
|
|
22
|
+
*/
|
|
23
|
+
export declare const controlTypes: {
|
|
24
|
+
readonly Button: "Button";
|
|
25
|
+
readonly Area: "Area";
|
|
26
|
+
readonly Text: "Text";
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated use EventTypes enum instead
|
|
30
|
+
*/
|
|
31
|
+
export declare const eventTypes: {
|
|
32
|
+
readonly onClick: "onClick";
|
|
33
|
+
readonly onSuspense: "onSuspense";
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated use EventActionTypes enum instead
|
|
37
|
+
*/
|
|
38
|
+
export declare const eventActionTypes: {
|
|
39
|
+
readonly openURI: "openURI";
|
|
40
|
+
readonly setNextBranch: "setNextBranch";
|
|
41
|
+
readonly setWeightlessRandomBranch: "setWeightlessRandomBranch";
|
|
42
|
+
readonly setRandomBranch: "setRandomBranch";
|
|
43
|
+
readonly setMaxWeightBranch: "setMaxWeightBranch";
|
|
44
|
+
readonly setMinWeightBranch: "setMinWeightBranch";
|
|
45
|
+
readonly setDefaultBranch: "setDefaultBranch";
|
|
46
|
+
readonly continuePlayback: "continuePlayback";
|
|
47
|
+
readonly expect: "expect";
|
|
48
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { Nullable } from '@vkontakte/videoplayer-shared';
|
|
2
|
+
import { type InterfaceLanguage } from '@vkontakte/videoplayer-shared';
|
|
3
|
+
import type { VideoInfo } from '#/modules/Interactives';
|
|
4
|
+
import type { GraphEditor } from '@interactiveplatform/movika-graph-editor';
|
|
5
|
+
import type { Chapter, Manifest } from '#/manifest';
|
|
6
|
+
interface GraphOptions {
|
|
7
|
+
lang: InterfaceLanguage | string;
|
|
8
|
+
root: HTMLElement;
|
|
9
|
+
onError: (msg: string) => void;
|
|
10
|
+
onOpenPreviewClick: (chapterId: string) => void;
|
|
11
|
+
visitedChapters?: string[];
|
|
12
|
+
}
|
|
13
|
+
type Coordinates = Nullable<{
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
value: number;
|
|
17
|
+
}>;
|
|
18
|
+
export declare class Graph {
|
|
19
|
+
isHidden: boolean;
|
|
20
|
+
currentManifestId: Nullable<string>;
|
|
21
|
+
currentChapterId: Nullable<string>;
|
|
22
|
+
visitedChapterIds: Set<string>;
|
|
23
|
+
onOpenPreviewClick?: GraphOptions['onOpenPreviewClick'];
|
|
24
|
+
onError: GraphOptions['onError'];
|
|
25
|
+
lang: GraphOptions['lang'];
|
|
26
|
+
zoom: number;
|
|
27
|
+
lastZoomInfo: Coordinates;
|
|
28
|
+
isReady: boolean;
|
|
29
|
+
ngEditor: Nullable<GraphEditor>;
|
|
30
|
+
ngEditorSize: Nullable<{
|
|
31
|
+
width: number;
|
|
32
|
+
height: number;
|
|
33
|
+
}>;
|
|
34
|
+
graphWrapperElement: HTMLDivElement;
|
|
35
|
+
resizeObserver: ResizeObserver;
|
|
36
|
+
private manifest;
|
|
37
|
+
constructor(options: GraphOptions);
|
|
38
|
+
init({ root, onOpenPreviewClick, onError, lang, visitedChapters }: GraphOptions): void;
|
|
39
|
+
private handleZoomChange;
|
|
40
|
+
onResize: (entries: ResizeObserverEntry[]) => void;
|
|
41
|
+
getNextPoint(ngEditorSize?: Nullable<{
|
|
42
|
+
width: number;
|
|
43
|
+
height: number;
|
|
44
|
+
}>): Nullable<[number, number]>;
|
|
45
|
+
handleChapterChange: (chapter: Chapter) => void;
|
|
46
|
+
handleManifestChange: (manifest: Manifest, visitedChapters?: string[]) => void;
|
|
47
|
+
setVisitedChapters(chapterIds: string[]): void;
|
|
48
|
+
updateVideosInfo(videosInfo: VideoInfo[]): void;
|
|
49
|
+
show(): Promise<void>;
|
|
50
|
+
private initNgEditor;
|
|
51
|
+
hide(): void;
|
|
52
|
+
destroy(): void;
|
|
53
|
+
}
|
|
54
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Graph } from './Graph';
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import type { Nullable } from '@vkontakte/videoplayer-shared';
|
|
2
|
+
import { Observable, ValueSubject } from '@vkontakte/videoplayer-shared';
|
|
3
|
+
import { InteractiveInterfaceClick } from '@vkontakte/videoplayer-statistics';
|
|
4
|
+
import type { Chapter, Manifest, AnyManifest, ManifestVideo, GraphEditChapter, GraphViewChapter } from '#/manifest';
|
|
5
|
+
import { type GlobalEvents } from './utils/events';
|
|
6
|
+
import { type InteractiveRange } from './utils/getInteractiveRanges';
|
|
7
|
+
import { type HistoryControllerState } from './utils/HistoryController';
|
|
8
|
+
import type { IInteractiveOptions, IOptionalInteractiveOptions, VideoInfo } from './types';
|
|
9
|
+
import type { IPlayer } from '@vkontakte/videoplayer-core';
|
|
10
|
+
import type { InstanceStatistics } from '#/modules/SeamlessController/InstanceManager';
|
|
11
|
+
declare enum INTERACTIVE_APP_STATES {
|
|
12
|
+
created = 0,
|
|
13
|
+
initiated = 1,
|
|
14
|
+
ready = 2,
|
|
15
|
+
destroyed = 3
|
|
16
|
+
}
|
|
17
|
+
export declare class Interactives {
|
|
18
|
+
private playerSubscriptions;
|
|
19
|
+
private subscriptions;
|
|
20
|
+
private globalEventEmitter;
|
|
21
|
+
private animation;
|
|
22
|
+
private seekToInteractiveController;
|
|
23
|
+
private endedRanges;
|
|
24
|
+
private gameControllers;
|
|
25
|
+
private rootElement;
|
|
26
|
+
private factories;
|
|
27
|
+
private isFirstChapterFetched;
|
|
28
|
+
private _options;
|
|
29
|
+
private manifestController;
|
|
30
|
+
private resizeManager;
|
|
31
|
+
private readonly cssVarsManager;
|
|
32
|
+
private historyController;
|
|
33
|
+
private player;
|
|
34
|
+
private interactiveEvents;
|
|
35
|
+
private selectBranches;
|
|
36
|
+
private seamlessController;
|
|
37
|
+
private seamlessControllerSubs;
|
|
38
|
+
private graph;
|
|
39
|
+
private lastFrame;
|
|
40
|
+
private noInteractionTimeout;
|
|
41
|
+
private blinkAnimationRef;
|
|
42
|
+
appState: INTERACTIVE_APP_STATES;
|
|
43
|
+
state: {
|
|
44
|
+
prevChapter$: ValueSubject<Nullable<Chapter>>;
|
|
45
|
+
isInitialChapter$: ValueSubject<boolean>;
|
|
46
|
+
isFirstChapter$: ValueSubject<boolean>;
|
|
47
|
+
isEndChapter$: ValueSubject<boolean>;
|
|
48
|
+
isInteractiveExpectation$: ValueSubject<boolean>;
|
|
49
|
+
isReplay$: ValueSubject<boolean>;
|
|
50
|
+
calledByInteractive$: ValueSubject<boolean>;
|
|
51
|
+
lastChapterChangeWasInitiatedByInteractive$: ValueSubject<boolean>;
|
|
52
|
+
disabledControls$: ValueSubject<boolean>;
|
|
53
|
+
interactiveRanges$: ValueSubject<InteractiveRange[]>;
|
|
54
|
+
isInteractiveTime$: ValueSubject<boolean>;
|
|
55
|
+
statistics$: ValueSubject<Nullable<InstanceStatistics>>;
|
|
56
|
+
isSeekable$: ValueSubject<boolean>;
|
|
57
|
+
};
|
|
58
|
+
events: GlobalEvents;
|
|
59
|
+
constructor(options: IOptionalInteractiveOptions);
|
|
60
|
+
private emitErrorEvent;
|
|
61
|
+
private clearHistoryIfEnded;
|
|
62
|
+
private initSubscriptions;
|
|
63
|
+
private initSeamless;
|
|
64
|
+
private handleSeamlessPlayerChanged;
|
|
65
|
+
private onPlaybackStarted;
|
|
66
|
+
private handlePositionChange;
|
|
67
|
+
private registerVideoEvents;
|
|
68
|
+
private destroyGameControllers;
|
|
69
|
+
private setGameControllers;
|
|
70
|
+
private getGameControllers;
|
|
71
|
+
private checkIfSeekable;
|
|
72
|
+
private updateLastEventInfo;
|
|
73
|
+
private pushChapterToHistory;
|
|
74
|
+
private completeInteractiveRange;
|
|
75
|
+
private handleFakeRemoval;
|
|
76
|
+
private clearNoInteractionTimeout;
|
|
77
|
+
private reset;
|
|
78
|
+
private toggleBlinkAnimation;
|
|
79
|
+
private updateControlsShadowStyles;
|
|
80
|
+
get options(): IInteractiveOptions;
|
|
81
|
+
init(): void;
|
|
82
|
+
setManifest(manifest: AnyManifest | string): Promise<Manifest | undefined>;
|
|
83
|
+
setPlayer(player: IPlayer): void;
|
|
84
|
+
setChapter({ chapterId, pushToHistory, playPrev, }?: {
|
|
85
|
+
chapterId?: string;
|
|
86
|
+
pushToHistory?: boolean;
|
|
87
|
+
playPrev?: boolean;
|
|
88
|
+
}): Promise<void>;
|
|
89
|
+
getStatEvents(): {
|
|
90
|
+
click$: Observable<InteractiveInterfaceClick>;
|
|
91
|
+
nextMovie$: Observable<number>;
|
|
92
|
+
};
|
|
93
|
+
toggleGraphView(show?: boolean): Promise<void>;
|
|
94
|
+
setVisitedChapters(chapterIds: string[]): void;
|
|
95
|
+
updateGraphVideosInfo(videosInfo: VideoInfo[]): void;
|
|
96
|
+
deadEndCheck(): boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Проверяет, удалены ли все контроллы.
|
|
99
|
+
*
|
|
100
|
+
* Контрол считается удалённым, если его флаг `isRemoved` установлен в `true`.
|
|
101
|
+
* Однако, есть исключение для `openURI` — если с ним было взаимодействие, он
|
|
102
|
+
* получит `isRemoved = true`, но может оставаться в DOM до завершения эпизода
|
|
103
|
+
* (`endTime`).
|
|
104
|
+
*
|
|
105
|
+
* Из-за этого метод может вернуть `true` (что все контроллы "удалены"), хотя
|
|
106
|
+
* `openURI` всё ещё присутствует в DOM.
|
|
107
|
+
*
|
|
108
|
+
* includeWillRemovedState - нужно ли считать состояние 'willRemoved' как
|
|
109
|
+
* 'removed'
|
|
110
|
+
*/
|
|
111
|
+
allControlsAreRemoved(includeWillRemovedState?: boolean): boolean;
|
|
112
|
+
isEndedExpectation(): boolean;
|
|
113
|
+
playPrevChapter(): void;
|
|
114
|
+
setDisabledControls(value: boolean): void;
|
|
115
|
+
isSupport(manifest?: Nullable<Manifest>): boolean;
|
|
116
|
+
getInitialVideoInfo(): {
|
|
117
|
+
videoId: string | null;
|
|
118
|
+
chapterId: string;
|
|
119
|
+
};
|
|
120
|
+
getHistoryState(): HistoryControllerState;
|
|
121
|
+
/**
|
|
122
|
+
* @deprecated Используйте this.state.isSeekable$
|
|
123
|
+
*/
|
|
124
|
+
getIsSeekable(): ValueSubject<boolean>;
|
|
125
|
+
getInteractiveRanges(): InteractiveRange[];
|
|
126
|
+
getNextInteractiveStartTime(offsetMs?: number): number | null;
|
|
127
|
+
getChapterBranches(chapterId?: string): Array<{
|
|
128
|
+
chapter: Chapter;
|
|
129
|
+
graph: GraphEditChapter | GraphViewChapter | undefined;
|
|
130
|
+
media: ManifestVideo;
|
|
131
|
+
}>;
|
|
132
|
+
getCurrentChapter(): {
|
|
133
|
+
chapter: Nullable<Chapter>;
|
|
134
|
+
media: Nullable<ManifestVideo>;
|
|
135
|
+
graph: Nullable<Manifest['graph']>;
|
|
136
|
+
};
|
|
137
|
+
getCurrentManifest(): Nullable<Manifest>;
|
|
138
|
+
on(eventName: string, fn: AnyFn): this;
|
|
139
|
+
off(eventName: string, fn: AnyFn): this;
|
|
140
|
+
once(eventName: string, fn: AnyFn): this;
|
|
141
|
+
destroy(): void;
|
|
142
|
+
}
|
|
143
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ChapterContainer, ControlLayoutParams } from '#/manifest';
|
|
2
|
+
import type { CssVarsManager } from '#/utils/CssVarsManager';
|
|
3
|
+
declare abstract class Layout {
|
|
4
|
+
layout: ChapterContainer['layout'];
|
|
5
|
+
cssVarsManager: CssVarsManager;
|
|
6
|
+
protected constructor(layout: ChapterContainer['layout'], cssVarsManager: CssVarsManager);
|
|
7
|
+
abstract setContainerLayout(target: HTMLElement): void;
|
|
8
|
+
abstract setControlLayout(target: HTMLElement, layoutParams: ControlLayoutParams): void;
|
|
9
|
+
}
|
|
10
|
+
export declare class RelativeLayout extends Layout {
|
|
11
|
+
cssVarsManager: CssVarsManager;
|
|
12
|
+
constructor(layout: ChapterContainer['layout'], cssVarsManager: CssVarsManager);
|
|
13
|
+
setContainerLayout(target: HTMLElement): void;
|
|
14
|
+
setControlLayout(target: HTMLElement, layoutParams: ControlLayoutParams): void;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Container } from './Container';
|
|
2
|
+
import type { ChapterContainer } from '#/manifest';
|
|
3
|
+
import type { ChoiceContainerOptions, ContainerCreateViewParams } from './types';
|
|
4
|
+
import type { Nullable } from '@vkontakte/videoplayer-shared';
|
|
5
|
+
import type { CssVarsManager } from '#/utils/CssVarsManager';
|
|
6
|
+
export declare const createChoiceContainer: (container: ChapterContainer, rootElement: HTMLElement, cssVarsManager: CssVarsManager, options?: ChoiceContainerOptions) => ChoiceContainer | undefined;
|
|
7
|
+
export declare class ChoiceContainer extends Container {
|
|
8
|
+
private rootElement;
|
|
9
|
+
private containerElement;
|
|
10
|
+
private layout;
|
|
11
|
+
private subscriptions;
|
|
12
|
+
isRemoved: boolean;
|
|
13
|
+
isDisabled: boolean;
|
|
14
|
+
willRemoved: boolean;
|
|
15
|
+
readonly cssVarsManager: CssVarsManager;
|
|
16
|
+
constructor(container: ChapterContainer, rootElement: HTMLElement, cssVarsManager: CssVarsManager, options?: ChoiceContainerOptions);
|
|
17
|
+
createView({ eventCallback, videoDurationMs }: ContainerCreateViewParams): HTMLElement;
|
|
18
|
+
updateControlsFillAnimationDimensions(): void;
|
|
19
|
+
hide(): void;
|
|
20
|
+
show(): void;
|
|
21
|
+
enable(): void;
|
|
22
|
+
disable(): void;
|
|
23
|
+
removeView(withTransition?: boolean, useDelay?: boolean): void;
|
|
24
|
+
private onTransitionEnd;
|
|
25
|
+
removeAllControls(withTransition?: boolean): void;
|
|
26
|
+
removeNonInteractedControls(withTransition?: boolean): void;
|
|
27
|
+
isInteracted(): boolean;
|
|
28
|
+
fakeRemove(): void;
|
|
29
|
+
getElement(): Nullable<HTMLElement>;
|
|
30
|
+
onProgress(currentTimeMs: number, isInteractiveTime: boolean): void;
|
|
31
|
+
onResize(isInteractiveTime: boolean): void;
|
|
32
|
+
updateControlsShadowStyles(isDark?: boolean): void;
|
|
33
|
+
toggleBlinkAnimation(enable?: boolean): void;
|
|
34
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Subject } from '@vkontakte/videoplayer-shared';
|
|
2
|
+
import type { CustomError } from '#/utils/Error';
|
|
3
|
+
import type { ChapterContainer } from '#/manifest';
|
|
4
|
+
import { type Control, type ControlCreator, type Options } from '#/modules/Interactives/controls';
|
|
5
|
+
import { type ChoiceContainerOptions } from './types';
|
|
6
|
+
import type { CssVarsManager } from '#/utils/CssVarsManager';
|
|
7
|
+
export declare class Container {
|
|
8
|
+
container: ChapterContainer;
|
|
9
|
+
options?: Options;
|
|
10
|
+
private factories;
|
|
11
|
+
controls: Control[];
|
|
12
|
+
error$: Subject<CustomError>;
|
|
13
|
+
readonly cssVarsManager: CssVarsManager;
|
|
14
|
+
constructor(container: ChapterContainer, cssVarsManager: CssVarsManager, options?: Options);
|
|
15
|
+
featureIsEnabled(name: keyof ChoiceContainerOptions['features']): boolean;
|
|
16
|
+
onError(message: string | undefined, error: unknown): void;
|
|
17
|
+
addControlFactory(type: string, factory: ControlCreator<any>): void;
|
|
18
|
+
removeControlFactory(type: string): void;
|
|
19
|
+
private setControls;
|
|
20
|
+
private chooseControls;
|
|
21
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Options, ControlEventCallback } from '../controls';
|
|
2
|
+
import type { AnimationsFeatureToggles } from '../types';
|
|
3
|
+
export type ChoiceContainerOptions = {
|
|
4
|
+
isTouch: boolean;
|
|
5
|
+
features: Pick<AnimationsFeatureToggles, 'controlsExpectTimeBlinkAnimation' | 'controlsTapPlace' | 'controlsFillAnimation'>;
|
|
6
|
+
};
|
|
7
|
+
export declare function isChoiceContainerOptions(options: Options): options is ChoiceContainerOptions;
|
|
8
|
+
export type ContainerCreateViewParams = {
|
|
9
|
+
eventCallback: ControlEventCallback;
|
|
10
|
+
videoDurationMs: number;
|
|
11
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type Nullable } from '@vkontakte/videoplayer-shared';
|
|
2
|
+
import { Control } from './Control';
|
|
3
|
+
import { type ControlCreator, type ControlCreateViewParams, type TControl, type ControlOptions } from './types';
|
|
4
|
+
export declare const createAreaControl: ControlCreator<ControlOptions, AreaControl>;
|
|
5
|
+
declare class AreaControl extends Control {
|
|
6
|
+
constructor(control: TControl, options?: ControlOptions);
|
|
7
|
+
createView({ parentElement, callbacks }: ControlCreateViewParams): void;
|
|
8
|
+
registerBlinkAnimationEvents(): void;
|
|
9
|
+
disable(): void;
|
|
10
|
+
enable(): void;
|
|
11
|
+
getElement(): Nullable<HTMLElement>;
|
|
12
|
+
updateShadowStyles(isDark?: boolean): void;
|
|
13
|
+
toggleBlinkAnimation(enable?: boolean): void;
|
|
14
|
+
syncBlinkAnimation(refAnim: HTMLElement): void;
|
|
15
|
+
onBlinkHovering(): void;
|
|
16
|
+
setShowTimeRange(): void;
|
|
17
|
+
updateFillAnimationDimensions(): void;
|
|
18
|
+
onProgress(): void;
|
|
19
|
+
onResize(): void;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type Nullable } from '@vkontakte/videoplayer-shared';
|
|
2
|
+
import { Control } from './Control';
|
|
3
|
+
import { type ControlCreator, type ControlCreateViewParams, type TControl, type ControlOptions } from './types';
|
|
4
|
+
import { ControlFillAnimation } from '../utils/ControlFillAnimation';
|
|
5
|
+
export declare const createButtonControl: ControlCreator<ControlOptions, ButtonControl>;
|
|
6
|
+
declare class ButtonControl extends Control {
|
|
7
|
+
startTime?: number;
|
|
8
|
+
endTime?: number;
|
|
9
|
+
controlFillAnimation?: ControlFillAnimation;
|
|
10
|
+
constructor(control: TControl, options?: ControlOptions);
|
|
11
|
+
createView({ parentElement, callbacks }: ControlCreateViewParams): void;
|
|
12
|
+
registerBlinkAnimationEvents(): void;
|
|
13
|
+
disable(): void;
|
|
14
|
+
enable(): void;
|
|
15
|
+
getElement(): Nullable<HTMLElement>;
|
|
16
|
+
toggleBlinkAnimation(enable?: boolean): void;
|
|
17
|
+
syncBlinkAnimation(refAnim: HTMLElement): void;
|
|
18
|
+
onBlinkHovering(): void;
|
|
19
|
+
updateFillAnimationDimensions(): void;
|
|
20
|
+
setShowTimeRange(startTime: number, endTime: number): void;
|
|
21
|
+
onProgress(currentTime: number): void;
|
|
22
|
+
onResize(): void;
|
|
23
|
+
updateShadowStyles(): void;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { Nullable } from '@vkontakte/videoplayer-shared';
|
|
2
|
+
import { Subject, Subscription } from '@vkontakte/videoplayer-shared';
|
|
3
|
+
import type { CustomError } from '#/utils/Error';
|
|
4
|
+
import { ControlTap } from '../utils/ControlTap';
|
|
5
|
+
import type { ControlEventCallback, ControlCreateViewParams, Dimensions, Callbacks, Options, TControl, ControlOptions } from './types';
|
|
6
|
+
import type { CssVarsManager } from '#/utils/CssVarsManager';
|
|
7
|
+
type ControlContainer = {
|
|
8
|
+
element: HTMLElement;
|
|
9
|
+
dimensions: Dimensions;
|
|
10
|
+
isManifestContainerDisabled: () => boolean;
|
|
11
|
+
};
|
|
12
|
+
type ClickListener = (event: MouseEvent) => void;
|
|
13
|
+
export declare abstract class Control {
|
|
14
|
+
control: TControl;
|
|
15
|
+
options: Options | undefined;
|
|
16
|
+
container: Nullable<ControlContainer>;
|
|
17
|
+
controlElement: Nullable<HTMLElement>;
|
|
18
|
+
subscriptions: Subscription;
|
|
19
|
+
error$: Subject<CustomError>;
|
|
20
|
+
controlTap?: ControlTap;
|
|
21
|
+
isInteracted: boolean;
|
|
22
|
+
isRemoved: boolean;
|
|
23
|
+
cssVarsManager: Nullable<CssVarsManager>;
|
|
24
|
+
constructor(control: TControl, options?: Options | undefined);
|
|
25
|
+
setCssVarsManager(cssVarsManager: CssVarsManager): void;
|
|
26
|
+
abstract createView(params: ControlCreateViewParams): void;
|
|
27
|
+
abstract getElement(): Nullable<HTMLElement>;
|
|
28
|
+
abstract disable(): void;
|
|
29
|
+
abstract enable(): void;
|
|
30
|
+
abstract onProgress(currentTimeMs: number): void;
|
|
31
|
+
abstract onResize(): void;
|
|
32
|
+
abstract setShowTimeRange(startTime: number, endTime: number): void;
|
|
33
|
+
abstract updateFillAnimationDimensions(): void;
|
|
34
|
+
abstract updateShadowStyles(isDark?: boolean): void;
|
|
35
|
+
abstract toggleBlinkAnimation(enable?: boolean): void;
|
|
36
|
+
onControlSelect: () => void;
|
|
37
|
+
removeView(withTransition?: boolean): void;
|
|
38
|
+
onTransitionEnd: (event: TransitionEvent) => void;
|
|
39
|
+
onError(message: string | undefined, error: unknown): void;
|
|
40
|
+
addControlTap(controlElement: HTMLElement): void;
|
|
41
|
+
createContainerElement(callbacks: Callbacks): void;
|
|
42
|
+
createClickListener(callback: AnyFn): ClickListener;
|
|
43
|
+
featureIsEnabled(name: keyof ControlOptions['features']): boolean;
|
|
44
|
+
isTouch(): boolean;
|
|
45
|
+
setEvents(callback: ControlEventCallback): void;
|
|
46
|
+
removeListeners(): void;
|
|
47
|
+
}
|
|
48
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Nullable } from '@vkontakte/videoplayer-shared';
|
|
2
|
+
import { Control } from './Control';
|
|
3
|
+
import { type ControlCreator, type ControlCreateViewParams, type TControl, type ControlOptions } from './types';
|
|
4
|
+
export declare const createTextControl: ControlCreator<ControlOptions, TextControl>;
|
|
5
|
+
declare class TextControl extends Control {
|
|
6
|
+
constructor(control: TControl, options?: ControlOptions);
|
|
7
|
+
createView({ parentElement, callbacks }: ControlCreateViewParams): void;
|
|
8
|
+
getElement(): Nullable<HTMLElement>;
|
|
9
|
+
disable(): void;
|
|
10
|
+
enable(): void;
|
|
11
|
+
onProgress(): void;
|
|
12
|
+
onResize(): void;
|
|
13
|
+
updateShadowStyles(): void;
|
|
14
|
+
toggleBlinkAnimation(): void;
|
|
15
|
+
setShowTimeRange(): void;
|
|
16
|
+
updateFillAnimationDimensions(): void;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Control as TControl, ControlEvent, ControlLayoutParams } from '#/manifest';
|
|
2
|
+
import type { Control } from '#/modules/Interactives/controls/Control';
|
|
3
|
+
import type { AnimationsFeatureToggles } from '#/modules/Interactives/types';
|
|
4
|
+
export type { TControl };
|
|
5
|
+
export declare const CONTROLLER_PREFIX = "int";
|
|
6
|
+
export declare enum CONTROLLER_IDS {
|
|
7
|
+
AREA = "int_area",
|
|
8
|
+
TEXT = "int_text",
|
|
9
|
+
BUTTON = "int_bttn"
|
|
10
|
+
}
|
|
11
|
+
export type Dimensions<T = string | number> = {
|
|
12
|
+
width: T;
|
|
13
|
+
height: T;
|
|
14
|
+
};
|
|
15
|
+
export type Callbacks = {
|
|
16
|
+
setControlLayout: (element: HTMLElement, controlLayoutParams: ControlLayoutParams) => void;
|
|
17
|
+
isContainerDisabled: () => boolean;
|
|
18
|
+
};
|
|
19
|
+
export type ControlCreateViewParams = {
|
|
20
|
+
parentElement: HTMLElement;
|
|
21
|
+
callbacks: Callbacks;
|
|
22
|
+
};
|
|
23
|
+
export type Options = Record<string, unknown>;
|
|
24
|
+
export type ControlOptions = {
|
|
25
|
+
isTouch: boolean;
|
|
26
|
+
features: Pick<AnimationsFeatureToggles, 'controlsExpectTimeBlinkAnimation' | 'controlsTapPlace' | 'controlsFillAnimation'>;
|
|
27
|
+
};
|
|
28
|
+
export declare function isControlOptions(options: Options): options is ControlOptions;
|
|
29
|
+
type ControlEventCallbackParams = {
|
|
30
|
+
action: ControlEvent['action'];
|
|
31
|
+
controlId: string;
|
|
32
|
+
controlType: TControl['type'];
|
|
33
|
+
};
|
|
34
|
+
export type ControlEventCallback = (params: ControlEventCallbackParams) => void;
|
|
35
|
+
export type ControlCreator<O extends Options = Options, C extends Control = Control> = (control: TControl, options?: O) => C | undefined;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const CONTROLS_CLASSNAME_PREFIX = "interactive-control";
|
|
2
|
+
export declare const controlsClassNames: {
|
|
3
|
+
common: string;
|
|
4
|
+
selected: string;
|
|
5
|
+
wrapper: string;
|
|
6
|
+
disabled: string;
|
|
7
|
+
button: string;
|
|
8
|
+
area: string;
|
|
9
|
+
text: string;
|
|
10
|
+
blinkAnim: string;
|
|
11
|
+
blinkAnimButton: string;
|
|
12
|
+
blinkAnimArea: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const TOUCH_DEVICES_CIRCLE_SIZE_PX = 40;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Container, createChoiceContainer } from './containers/index';
|
|
2
|
+
import { createAreaControl, createButtonControl } from './controls';
|
|
3
|
+
import { classnamesPrefix } from './utils/renderingUtils';
|
|
4
|
+
export { Interactives } from './Interactives';
|
|
5
|
+
export { EVENT_NAMES, graphEventTypes, interactivesEventTypes } from './utils/events';
|
|
6
|
+
export type { InteractiveProjectInfo, PlayerChangedData, VideoInfo, IInteractiveOptions } from './types';
|
|
7
|
+
export type { HistoryApi } from './utils/HistoryController';
|
|
8
|
+
export { isLastChapter, hasEndTemplate, isOneTextCtrlContainer } from './utils/gameUtils';
|
|
9
|
+
export type { InteractiveRange } from './utils/getInteractiveRanges';
|
|
10
|
+
export declare const utils: {
|
|
11
|
+
Container: typeof Container;
|
|
12
|
+
createChoiceContainer: typeof createChoiceContainer;
|
|
13
|
+
createAreaControl: typeof createAreaControl;
|
|
14
|
+
createButtonControl: typeof createButtonControl;
|
|
15
|
+
classnamesPrefix: typeof classnamesPrefix;
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './utils';
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { InterfaceLanguage } from '@vkontakte/videoplayer-shared';
|
|
2
|
+
import type { IOptionalTuningConfig, IPlayer } from '@vkontakte/videoplayer-core';
|
|
3
|
+
import type { IOneStat } from '@vkontakte/videoplayer-statistics';
|
|
4
|
+
import type { Loaders } from '#/modules/ManifestController/Loadable';
|
|
5
|
+
import type { HistoryApi, HistorySettings } from '#/modules/Interactives/utils/HistoryController';
|
|
6
|
+
import type { Chapter, ManifestVideo } from '#/manifest';
|
|
7
|
+
export type { VideoInfo } from '@interactiveplatform/movika-graph-editor';
|
|
8
|
+
export type InteractiveProjectInfo = {
|
|
9
|
+
videoId: string;
|
|
10
|
+
pid?: string;
|
|
11
|
+
title?: string;
|
|
12
|
+
variantPayloadType?: string;
|
|
13
|
+
};
|
|
14
|
+
export type RequiredOptions = 'parentElement' | 'fullscreenTargetElement';
|
|
15
|
+
export type IOptionalInteractiveOptions = Partial<Omit<IInteractiveOptions, RequiredOptions | 'config'>> & Required<Pick<IInteractiveOptions, RequiredOptions>> & {
|
|
16
|
+
config?: Partial<IInteractiveOptions['config']>;
|
|
17
|
+
};
|
|
18
|
+
export type AnimationsFeatureToggles = Partial<{
|
|
19
|
+
areaControlShadow: boolean;
|
|
20
|
+
controlsExpectTimeBlinkAnimation: boolean;
|
|
21
|
+
controlsTapPlace: boolean;
|
|
22
|
+
controlsFillAnimation: boolean;
|
|
23
|
+
controlsHideAnimation: boolean;
|
|
24
|
+
}>;
|
|
25
|
+
export interface IInteractiveOptions {
|
|
26
|
+
parentElement: HTMLElement;
|
|
27
|
+
fullscreenTargetElement: HTMLElement;
|
|
28
|
+
lang: InterfaceLanguage | string;
|
|
29
|
+
config: {
|
|
30
|
+
historyMaxLength: number;
|
|
31
|
+
noInteractionEventTimeout: number;
|
|
32
|
+
};
|
|
33
|
+
graph: boolean;
|
|
34
|
+
lastFrame: boolean;
|
|
35
|
+
initSeamless: boolean;
|
|
36
|
+
permanentTextControls: boolean;
|
|
37
|
+
interactiveTimeOpenUri: boolean;
|
|
38
|
+
loaders: Partial<Loaders>;
|
|
39
|
+
initChapterId?: string;
|
|
40
|
+
projectInfo?: InteractiveProjectInfo;
|
|
41
|
+
historyApi?: HistoryApi;
|
|
42
|
+
historySettings?: HistorySettings;
|
|
43
|
+
coreConfig?: IOptionalTuningConfig;
|
|
44
|
+
vkVideoLoader?: (owner_id: string, video_id: string) => unknown;
|
|
45
|
+
createOneStat?: (video: any, configOverwrite?: any) => IOneStat | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated
|
|
48
|
+
* */
|
|
49
|
+
disableControlsOnPause?: boolean;
|
|
50
|
+
disableTextControlContainerVisibilityEvents?: boolean;
|
|
51
|
+
isTouch?: boolean;
|
|
52
|
+
animationsFeatureToggles?: AnimationsFeatureToggles;
|
|
53
|
+
enableAvPlayerSupport?: boolean;
|
|
54
|
+
endChapterHistoryFix?: boolean;
|
|
55
|
+
}
|
|
56
|
+
export type ChapterChangedData = {
|
|
57
|
+
chapter: Chapter;
|
|
58
|
+
manifestVideo: ManifestVideo;
|
|
59
|
+
};
|
|
60
|
+
export type PlayerChangedData<T = any> = {
|
|
61
|
+
player: IPlayer;
|
|
62
|
+
config: T;
|
|
63
|
+
};
|
|
64
|
+
export interface EachTickData {
|
|
65
|
+
subjectId: string;
|
|
66
|
+
subjectName: string;
|
|
67
|
+
range: number[];
|
|
68
|
+
currentTime: number;
|
|
69
|
+
isInteractiveTime: boolean;
|
|
70
|
+
}
|
|
71
|
+
export type IgnoreExpectState = {
|
|
72
|
+
isExpectTime: boolean;
|
|
73
|
+
hasOtherExpect: boolean;
|
|
74
|
+
hasOpenURIEvent: boolean;
|
|
75
|
+
hasOpenURIEventInCurrentContainer: boolean;
|
|
76
|
+
isAllOpenURIEventsValid: boolean;
|
|
77
|
+
isExpectEventForCurrentContainer: boolean;
|
|
78
|
+
hasShouldOpenNowEvent: boolean;
|
|
79
|
+
};
|