@vkontakte/videoplayer-interactive 1.0.61 → 1.0.62-dev.04ce2cd1.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 +8 -7
- package/es2015.esm.js +8 -7
- package/es2018.cjs +8 -7
- package/es2018.esm.js +8 -7
- package/es2024.cjs +8 -7
- package/es2024.esm.js +8 -7
- package/esnext.cjs +8 -7
- package/esnext.esm.js +8 -7
- package/evergreen.esm.js +8 -7
- package/package.json +4 -4
- package/types/index.d.ts +9 -8
- package/types/manifest/index.d.ts +3 -3
- package/types/manifest/utils.d.ts +33 -32
- package/types/modules/Graph/Graph.d.ts +47 -46
- package/types/modules/Graph/index.d.ts +1 -1
- package/types/modules/Interactives/Interactives.d.ts +138 -135
- package/types/modules/Interactives/Layout.d.ts +11 -11
- package/types/modules/Interactives/containers/ChoiceContainer.d.ts +31 -31
- package/types/modules/Interactives/containers/Container.d.ts +19 -19
- package/types/modules/Interactives/containers/index.d.ts +4 -4
- package/types/modules/Interactives/containers/types.d.ts +6 -6
- package/types/modules/Interactives/containers/utils.d.ts +3 -3
- package/types/modules/Interactives/controls/AreaControl.d.ts +17 -16
- package/types/modules/Interactives/controls/ButtonControl.d.ts +21 -20
- package/types/modules/Interactives/controls/Control.d.ts +42 -41
- package/types/modules/Interactives/controls/TextControl.d.ts +14 -13
- package/types/modules/Interactives/controls/index.d.ts +6 -6
- package/types/modules/Interactives/controls/types.d.ts +22 -19
- package/types/modules/Interactives/controls/utils.d.ts +10 -10
- package/types/modules/Interactives/index.d.ts +14 -95
- package/types/modules/Interactives/styles/index.d.ts +1 -1
- package/types/modules/Interactives/types.d.ts +64 -64
- package/types/modules/Interactives/utils/BlinkAnimationRef.d.ts +10 -10
- package/types/modules/Interactives/utils/ControlFillAnimation/ControlFillAnimation.d.ts +30 -30
- package/types/modules/Interactives/utils/ControlFillAnimation/index.d.ts +1 -1
- package/types/modules/Interactives/utils/ControlFillAnimation/utils.d.ts +9 -9
- package/types/modules/Interactives/utils/ControlTap/ControlTap.d.ts +12 -12
- package/types/modules/Interactives/utils/ControlTap/index.d.ts +1 -1
- package/types/modules/Interactives/utils/ControlTap/utils.d.ts +3 -3
- package/types/modules/Interactives/utils/GameController.d.ts +66 -66
- package/types/modules/Interactives/utils/GroupsStack.d.ts +18 -20
- package/types/modules/Interactives/utils/HistoryController.d.ts +39 -40
- package/types/modules/Interactives/utils/InteractiveEvents.d.ts +30 -29
- package/types/modules/Interactives/utils/ResizeManager.d.ts +10 -10
- package/types/modules/Interactives/utils/SelectBranches.d.ts +15 -15
- package/types/modules/Interactives/utils/SelectBranches.types.d.ts +53 -53
- package/types/modules/Interactives/utils/angleUtils.d.ts +13 -13
- package/types/modules/Interactives/utils/createControlText.d.ts +2 -2
- package/types/modules/Interactives/utils/emitOnError.d.ts +10 -10
- package/types/modules/Interactives/utils/events.d.ts +67 -67
- package/types/modules/Interactives/utils/events.types.d.ts +35 -32
- package/types/modules/Interactives/utils/fallbackStrategies.d.ts +15 -14
- package/types/modules/Interactives/utils/functionUtils.d.ts +9 -2
- package/types/modules/Interactives/utils/gameUtils.d.ts +22 -21
- package/types/modules/Interactives/utils/getInteractiveRanges.d.ts +5 -5
- package/types/modules/Interactives/utils/renderingUtils.d.ts +48 -53
- package/types/modules/Loaders/index.d.ts +1 -1
- package/types/modules/Loaders/movikaProjectIdLoader/index.d.ts +1 -1
- package/types/modules/Loaders/vkVideoLoader/CustomVkVideoLoader.d.ts +8 -8
- package/types/modules/Loaders/vkVideoLoader/index.d.ts +1 -1
- package/types/modules/Loaders/vkVideoLoader/types.d.ts +231 -231
- package/types/modules/Loaders/vkVideoLoader/utils.d.ts +1 -1
- package/types/modules/ManifestController/Loadable.d.ts +5 -5
- package/types/modules/ManifestController/ManifestController.d.ts +29 -29
- package/types/modules/ManifestController/index.d.ts +1 -1
- package/types/modules/ManifestController/utils.d.ts +6 -6
- package/types/modules/SeamlessController/InstanceManager.d.ts +10 -10
- package/types/modules/SeamlessController/SeamlessController.d.ts +30 -27
- package/types/modules/SeamlessController/utils.d.ts +6 -6
- package/types/modules/SeekToInteractiveController/SeekToInteractiveController.d.ts +8 -8
- package/types/modules/SeekToInteractiveController/index.d.ts +1 -1
- package/types/types/CustomError.d.ts +9 -9
- package/types/types/index.d.ts +2 -2
- package/types/utils/CssVarsManager.d.ts +21 -21
- package/types/utils/Error.d.ts +6 -6
- package/types/utils/EventEmitter.d.ts +10 -10
- package/types/utils/LastFrame.d.ts +29 -29
- package/types/utils/LastFrameCanvasAPI.d.ts +17 -17
- package/types/utils/MultiMap.d.ts +8 -8
- package/types/utils/Raf.d.ts +11 -11
- package/types/utils/chapterHelpers.d.ts +1 -1
- package/types/utils/compareVersions.d.ts +12 -12
- package/types/utils/extractVkMovieId.d.ts +1 -1
- package/types/utils/getVideoContentSize.d.ts +3 -3
- package/types/utils/hexToRgb.d.ts +2 -2
- package/types/utils/throttle.d.ts +1 -1
- package/types/utils/typeCheck.d.ts +7 -7
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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";
|
|
3
4
|
export declare const createAreaControl: ControlCreator<ControlOptions, AreaControl>;
|
|
4
5
|
declare class AreaControl extends Control {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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;
|
|
19
20
|
}
|
|
20
21
|
export {};
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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";
|
|
4
5
|
export declare const createButtonControl: ControlCreator<ControlOptions, ButtonControl>;
|
|
5
6
|
declare class ButtonControl extends Control {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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;
|
|
23
24
|
}
|
|
24
25
|
export {};
|
|
@@ -1,47 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
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";
|
|
6
7
|
type ControlContainer = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
element: HTMLElement;
|
|
9
|
+
dimensions: Dimensions;
|
|
10
|
+
isManifestContainerDisabled: () => boolean;
|
|
10
11
|
};
|
|
11
12
|
type ClickListener = (event: MouseEvent) => void;
|
|
12
13
|
export declare abstract class Control {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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;
|
|
46
47
|
}
|
|
47
48
|
export {};
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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";
|
|
3
4
|
export declare const createTextControl: ControlCreator<ControlOptions, TextControl>;
|
|
4
5
|
declare class TextControl extends Control {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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;
|
|
16
17
|
}
|
|
17
18
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
1
|
+
export * from "./AreaControl";
|
|
2
|
+
export * from "./ButtonControl";
|
|
3
|
+
export * from "./TextControl";
|
|
4
|
+
export * from "./Control";
|
|
5
|
+
export * from "./types";
|
|
6
|
+
export * from "./utils";
|
|
@@ -1,35 +1,38 @@
|
|
|
1
|
-
import type { Control as TControl, ControlEvent, ControlLayoutParams } from
|
|
2
|
-
import type { Control } from
|
|
3
|
-
import { AnimationsFeatureToggles } from
|
|
4
|
-
export { TControl };
|
|
1
|
+
import type { Control as TControl, ControlEvent, ControlLayoutParams } from "../../../manifest";
|
|
2
|
+
import type { Control } from "./Control";
|
|
3
|
+
import type { AnimationsFeatureToggles } from "../types";
|
|
4
|
+
export type { TControl };
|
|
5
5
|
export declare const CONTROLLER_PREFIX = "int";
|
|
6
6
|
export declare enum CONTROLLER_IDS {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
AREA = "int_area",
|
|
8
|
+
TEXT = "int_text",
|
|
9
|
+
BUTTON = "int_bttn"
|
|
10
10
|
}
|
|
11
11
|
export type Dimensions<T = string | number> = {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
width: T;
|
|
13
|
+
height: T;
|
|
14
14
|
};
|
|
15
15
|
export type Callbacks = {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
setControlLayout: (element: HTMLElement, controlLayoutParams: ControlLayoutParams) => void;
|
|
17
|
+
isContainerDisabled: () => boolean;
|
|
18
18
|
};
|
|
19
19
|
export type ControlCreateViewParams = {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
parentElement: HTMLElement;
|
|
21
|
+
callbacks: Callbacks;
|
|
22
22
|
};
|
|
23
23
|
export type Options = Record<string, unknown>;
|
|
24
24
|
export type ControlOptions = {
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
isTouch: boolean;
|
|
26
|
+
features: Pick<AnimationsFeatureToggles, "controlsExpectTimeBlinkAnimation" | "controlsTapPlace" | "controlsFillAnimation">;
|
|
27
27
|
};
|
|
28
28
|
export declare function isControlOptions(options: Options): options is ControlOptions;
|
|
29
29
|
type ControlEventCallbackParams = {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
action: ControlEvent["action"];
|
|
31
|
+
controlId: string;
|
|
32
|
+
controlType: TControl["type"];
|
|
33
33
|
};
|
|
34
34
|
export type ControlEventCallback = (params: ControlEventCallbackParams) => void;
|
|
35
|
-
export type ControlCreator<
|
|
35
|
+
export type ControlCreator<
|
|
36
|
+
O extends Options = Options,
|
|
37
|
+
C extends Control = Control
|
|
38
|
+
> = (control: TControl, options?: O) => C | undefined;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export declare const CONTROLS_CLASSNAME_PREFIX = "interactive-control";
|
|
2
2
|
export declare const controlsClassNames: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
13
|
};
|
|
14
14
|
export declare const TOUCH_DEVICES_CIRCLE_SIZE_PX = 40;
|
|
@@ -1,97 +1,16 @@
|
|
|
1
|
-
import { Container } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export {
|
|
7
|
-
export type {
|
|
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";
|
|
8
10
|
export declare const utils: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
disable(): void;
|
|
15
|
-
enable(): void;
|
|
16
|
-
getElement(): import("@vkontakte/videoplayer-shared").Nullable<HTMLElement>;
|
|
17
|
-
updateShadowStyles(isDark?: boolean): void;
|
|
18
|
-
toggleBlinkAnimation(enable?: boolean): void;
|
|
19
|
-
syncBlinkAnimation(refAnim: HTMLElement): void;
|
|
20
|
-
onBlinkHovering(): void;
|
|
21
|
-
setShowTimeRange(): void;
|
|
22
|
-
updateFillAnimationDimensions(): void;
|
|
23
|
-
onProgress(): void;
|
|
24
|
-
onResize(): void;
|
|
25
|
-
container: import("@vkontakte/videoplayer-shared").Nullable<{
|
|
26
|
-
element: HTMLElement;
|
|
27
|
-
dimensions: import("./controls").Dimensions;
|
|
28
|
-
isManifestContainerDisabled: () => boolean;
|
|
29
|
-
}>;
|
|
30
|
-
controlElement: import("@vkontakte/videoplayer-shared").Nullable<HTMLElement>;
|
|
31
|
-
subscriptions: import("@vkontakte/videoplayer-shared").Subscription;
|
|
32
|
-
error$: import("@vkontakte/videoplayer-shared").Subject<import("../..").CustomError>;
|
|
33
|
-
controlTap?: import("./utils/ControlTap").ControlTap;
|
|
34
|
-
isInteracted: boolean;
|
|
35
|
-
isRemoved: boolean;
|
|
36
|
-
cssVarsManager: import("@vkontakte/videoplayer-shared").Nullable<import("../../utils/CssVarsManager").CssVarsManager>;
|
|
37
|
-
control: import("@interactiveplatform/movika-manifest/dist/chapter-DI_7rDZW").e;
|
|
38
|
-
options?: import("./controls").Options | undefined;
|
|
39
|
-
setCssVarsManager(cssVarsManager: import("../../utils/CssVarsManager").CssVarsManager): void;
|
|
40
|
-
onControlSelect: () => void;
|
|
41
|
-
removeView(withTransition?: boolean): void;
|
|
42
|
-
onTransitionEnd: (event: TransitionEvent) => void;
|
|
43
|
-
onError(message: string | undefined, error: unknown): void;
|
|
44
|
-
addControlTap(controlElement: HTMLElement): void;
|
|
45
|
-
createContainerElement(callbacks: import("./controls").Callbacks): void;
|
|
46
|
-
createClickListener(callback: AnyFn): (event: MouseEvent) => void;
|
|
47
|
-
featureIsEnabled(name: keyof import("./controls").ControlOptions["features"]): boolean | undefined;
|
|
48
|
-
isTouch(): boolean | undefined;
|
|
49
|
-
setEvents(callback: import("./controls").ControlEventCallback): void;
|
|
50
|
-
removeListeners(): void;
|
|
51
|
-
}>;
|
|
52
|
-
createButtonControl: import("./controls").ControlCreator<import("./controls").ControlOptions, {
|
|
53
|
-
startTime?: number;
|
|
54
|
-
endTime?: number;
|
|
55
|
-
controlFillAnimation?: import("./utils/ControlFillAnimation").ControlFillAnimation;
|
|
56
|
-
createView({ parentElement, callbacks }: import("./controls").ControlCreateViewParams): void;
|
|
57
|
-
registerBlinkAnimationEvents(): void;
|
|
58
|
-
disable(): void;
|
|
59
|
-
enable(): void;
|
|
60
|
-
getElement(): import("@vkontakte/videoplayer-shared").Nullable<HTMLElement>;
|
|
61
|
-
toggleBlinkAnimation(enable?: boolean): void;
|
|
62
|
-
syncBlinkAnimation(refAnim: HTMLElement): void;
|
|
63
|
-
onBlinkHovering(): void;
|
|
64
|
-
updateFillAnimationDimensions(): void;
|
|
65
|
-
setShowTimeRange(startTime: number, endTime: number): void;
|
|
66
|
-
onProgress(currentTime: number): void;
|
|
67
|
-
onResize(): void;
|
|
68
|
-
updateShadowStyles(): void;
|
|
69
|
-
container: import("@vkontakte/videoplayer-shared").Nullable<{
|
|
70
|
-
element: HTMLElement;
|
|
71
|
-
dimensions: import("./controls").Dimensions;
|
|
72
|
-
isManifestContainerDisabled: () => boolean;
|
|
73
|
-
}>;
|
|
74
|
-
controlElement: import("@vkontakte/videoplayer-shared").Nullable<HTMLElement>;
|
|
75
|
-
subscriptions: import("@vkontakte/videoplayer-shared").Subscription;
|
|
76
|
-
error$: import("@vkontakte/videoplayer-shared").Subject<import("../..").CustomError>;
|
|
77
|
-
controlTap?: import("./utils/ControlTap").ControlTap;
|
|
78
|
-
isInteracted: boolean;
|
|
79
|
-
isRemoved: boolean;
|
|
80
|
-
cssVarsManager: import("@vkontakte/videoplayer-shared").Nullable<import("../../utils/CssVarsManager").CssVarsManager>;
|
|
81
|
-
control: import("@interactiveplatform/movika-manifest/dist/chapter-DI_7rDZW").e;
|
|
82
|
-
options?: import("./controls").Options | undefined;
|
|
83
|
-
setCssVarsManager(cssVarsManager: import("../../utils/CssVarsManager").CssVarsManager): void;
|
|
84
|
-
onControlSelect: () => void;
|
|
85
|
-
removeView(withTransition?: boolean): void;
|
|
86
|
-
onTransitionEnd: (event: TransitionEvent) => void;
|
|
87
|
-
onError(message: string | undefined, error: unknown): void;
|
|
88
|
-
addControlTap(controlElement: HTMLElement): void;
|
|
89
|
-
createContainerElement(callbacks: import("./controls").Callbacks): void;
|
|
90
|
-
createClickListener(callback: AnyFn): (event: MouseEvent) => void;
|
|
91
|
-
featureIsEnabled(name: keyof import("./controls").ControlOptions["features"]): boolean | undefined;
|
|
92
|
-
isTouch(): boolean | undefined;
|
|
93
|
-
setEvents(callback: import("./controls").ControlEventCallback): void;
|
|
94
|
-
removeListeners(): void;
|
|
95
|
-
}>;
|
|
96
|
-
classnamesPrefix: string;
|
|
11
|
+
Container: typeof Container;
|
|
12
|
+
createChoiceContainer: typeof createChoiceContainer;
|
|
13
|
+
createAreaControl: typeof createAreaControl;
|
|
14
|
+
createButtonControl: typeof createButtonControl;
|
|
15
|
+
classnamesPrefix: typeof classnamesPrefix;
|
|
97
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./utils";
|
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
import type { InterfaceLanguage } from
|
|
2
|
-
import type { IOptionalTuningConfig, IPlayer } from
|
|
3
|
-
import type { IOneStat } from
|
|
4
|
-
import type { Loaders } from
|
|
5
|
-
import type { HistoryApi, HistorySettings } from
|
|
6
|
-
import type { Chapter, ManifestVideo } from
|
|
7
|
-
export type { VideoInfo } from
|
|
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 "../ManifestController/Loadable";
|
|
5
|
+
import type { HistoryApi, HistorySettings } from "./utils/HistoryController";
|
|
6
|
+
import type { Chapter, ManifestVideo } from "../../manifest";
|
|
7
|
+
export type { VideoInfo } from "@interactiveplatform/movika-graph-editor";
|
|
8
8
|
export type InteractiveProjectInfo = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
videoId: string;
|
|
10
|
+
pid?: string;
|
|
11
|
+
title?: string;
|
|
12
|
+
variantPayloadType?: string;
|
|
13
13
|
};
|
|
14
|
-
export type RequiredOptions =
|
|
15
|
-
export type IOptionalInteractiveOptions = Partial<Omit<IInteractiveOptions, RequiredOptions |
|
|
16
|
-
|
|
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
17
|
};
|
|
18
18
|
export type AnimationsFeatureToggles = Partial<{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
areaControlShadow: boolean;
|
|
20
|
+
controlsExpectTimeBlinkAnimation: boolean;
|
|
21
|
+
controlsTapPlace: boolean;
|
|
22
|
+
controlsFillAnimation: boolean;
|
|
23
|
+
controlsHideAnimation: boolean;
|
|
24
24
|
}>;
|
|
25
25
|
export interface IInteractiveOptions {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
55
|
}
|
|
56
56
|
export type ChapterChangedData = {
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
chapter: Chapter;
|
|
58
|
+
manifestVideo: ManifestVideo;
|
|
59
59
|
};
|
|
60
60
|
export type PlayerChangedData<T = any> = {
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
player: IPlayer;
|
|
62
|
+
config: T;
|
|
63
63
|
};
|
|
64
64
|
export interface EachTickData {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
subjectId: string;
|
|
66
|
+
subjectName: string;
|
|
67
|
+
range: number[];
|
|
68
|
+
currentTime: number;
|
|
69
|
+
isInteractiveTime: boolean;
|
|
70
70
|
}
|
|
71
71
|
export type IgnoreExpectState = {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
72
|
+
isExpectTime: boolean;
|
|
73
|
+
hasOtherExpect: boolean;
|
|
74
|
+
hasOpenURIEvent: boolean;
|
|
75
|
+
hasOpenURIEventInCurrentContainer: boolean;
|
|
76
|
+
isAllOpenURIEventsValid: boolean;
|
|
77
|
+
isExpectEventForCurrentContainer: boolean;
|
|
78
|
+
hasShouldOpenNowEvent: boolean;
|
|
79
79
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export declare const BLINK_ANIM_CLASSNAME_PREFIX = "interactive-blink-anim-reference";
|
|
2
2
|
export declare const blinkAnimClassNames: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
common: string;
|
|
4
|
+
animation: string;
|
|
5
|
+
disabled: string;
|
|
6
6
|
};
|
|
7
7
|
export declare class BlinkAnimationRef {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
private _RAFId;
|
|
9
|
+
private _element;
|
|
10
|
+
get element(): HTMLDivElement | undefined;
|
|
11
|
+
create(): void;
|
|
12
|
+
restart(): void;
|
|
13
|
+
private cleanupRAF;
|
|
14
|
+
destroy(): void;
|
|
15
15
|
}
|