@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,34 +1,34 @@
|
|
|
1
1
|
export type Options = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
startTime: number;
|
|
3
|
+
endTime: number;
|
|
4
|
+
rotateAngle: number;
|
|
5
|
+
borderRadius: string;
|
|
6
|
+
debug?: boolean;
|
|
7
7
|
};
|
|
8
8
|
export declare class ControlFillAnimation {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
9
|
+
fillAnimationElement: HTMLDivElement;
|
|
10
|
+
private fillAnimationFillerElement;
|
|
11
|
+
private fillAnimationFillerWrapperElement;
|
|
12
|
+
private startTime;
|
|
13
|
+
private endTime;
|
|
14
|
+
private shouldFillHeight;
|
|
15
|
+
private widthExpansionCoef;
|
|
16
|
+
private isDebug;
|
|
17
|
+
private fromLeft;
|
|
18
|
+
private useSkew;
|
|
19
|
+
private rotateAngle;
|
|
20
|
+
constructor(opts: Options);
|
|
21
|
+
updateDimension(opts: {
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
borderWidth: number;
|
|
25
|
+
}): void;
|
|
26
|
+
updateAnimation(currentTime: number): void;
|
|
27
|
+
/**
|
|
28
|
+
* Когда мы применяем scew для контрол, расстояние между крайними left & right
|
|
29
|
+
* точками становится больше. Это значит, что нужно увеличивать
|
|
30
|
+
* элемент-заполнитель, чтобы он заполнял контрол полностью. Этот метод
|
|
31
|
+
* возвращает коэффцицент увеличения для элемента-заполнителя.
|
|
32
|
+
*/
|
|
33
|
+
private calcWidthExpansionCoef;
|
|
34
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./ControlFillAnimation";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export declare const CONTROL_FILL_ANIMATION_CLASSNAME_PREFIX = "interactive-control-fill-animation";
|
|
2
2
|
export declare const controlFillAnimationClassNames: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
common: string;
|
|
4
|
+
fillerWrapper: string;
|
|
5
|
+
filler: string;
|
|
6
|
+
fillHeight: string;
|
|
7
|
+
fillWidth: string;
|
|
8
|
+
fromTop: string;
|
|
9
|
+
fromBottom: string;
|
|
10
|
+
fromLeft: string;
|
|
11
|
+
fromRight: string;
|
|
12
12
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
type Options = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
controlRotateAngleRad: number;
|
|
3
|
+
circleDiameterPx?: number;
|
|
4
|
+
useDimensionsBasedSize?: boolean;
|
|
5
|
+
clickCancelCondition: () => boolean;
|
|
6
6
|
};
|
|
7
7
|
export declare class ControlTap {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
element: HTMLDivElement;
|
|
9
|
+
controlRotateAngleRad: number;
|
|
10
|
+
clickCancelCondition: () => boolean;
|
|
11
|
+
circleDiameterPx: number;
|
|
12
|
+
useDimensionsBasedSize: boolean;
|
|
13
|
+
constructor({ controlRotateAngleRad, clickCancelCondition, circleDiameterPx, useDimensionsBasedSize }: Options);
|
|
14
|
+
onElementClick: (e: MouseEvent) => void;
|
|
15
|
+
onAnimationEnd: (e: TransitionEvent) => void;
|
|
16
16
|
}
|
|
17
17
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./ControlTap";
|
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
import { type ISubscription, type IValueSubject } from
|
|
2
|
-
import { type IPlayer } from
|
|
3
|
-
import type { InteractiveEventsType } from
|
|
4
|
-
import type { ChapterBranch } from
|
|
5
|
-
import type { EventEmitter } from
|
|
6
|
-
import { CustomError } from
|
|
7
|
-
import type { SelectBranchesType } from
|
|
8
|
-
import type { IgnoreExpectState, AnimationsFeatureToggles, IInteractiveOptions } from
|
|
9
|
-
import type { ChoiceContainer } from
|
|
10
|
-
import { type GlobalEvents } from
|
|
11
|
-
import { GameStates } from
|
|
12
|
-
type Features = Pick<AnimationsFeatureToggles,
|
|
1
|
+
import { type ISubscription, type IValueSubject } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import { type IPlayer } from "@vkontakte/videoplayer-core";
|
|
3
|
+
import type { InteractiveEventsType } from "./InteractiveEvents";
|
|
4
|
+
import type { ChapterBranch } from "../../../manifest";
|
|
5
|
+
import type { EventEmitter } from "../../../utils/EventEmitter";
|
|
6
|
+
import type { CustomError } from "../../../utils/Error";
|
|
7
|
+
import type { SelectBranchesType } from "./SelectBranches";
|
|
8
|
+
import type { IgnoreExpectState, AnimationsFeatureToggles, IInteractiveOptions } from "../types";
|
|
9
|
+
import type { ChoiceContainer } from "../containers";
|
|
10
|
+
import { type GlobalEvents } from "./events";
|
|
11
|
+
import { GameStates } from "./gameUtils";
|
|
12
|
+
type Features = Pick<AnimationsFeatureToggles, "controlsHideAnimation"> & Pick<IInteractiveOptions, "enableAvPlayerSupport">;
|
|
13
13
|
type ConstructorArg = {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
14
|
+
player: IPlayer;
|
|
15
|
+
container: ChoiceContainer;
|
|
16
|
+
branches: ChapterBranch[];
|
|
17
|
+
selectBranches: ReturnType<SelectBranchesType>;
|
|
18
|
+
interactiveEvents: InteractiveEventsType;
|
|
19
|
+
globalEventEmitter: EventEmitter;
|
|
20
|
+
globalEvents: GlobalEvents;
|
|
21
|
+
getContainerEventState: () => IgnoreExpectState;
|
|
22
|
+
permanentTextControls: boolean;
|
|
23
|
+
interactiveTimeOpenUri: boolean;
|
|
24
|
+
disabledControls$: IValueSubject<boolean>;
|
|
25
|
+
onRemove: () => void;
|
|
26
|
+
onError: (error: CustomError) => void;
|
|
27
|
+
disableTextControlContainerVisibilityEvents?: boolean;
|
|
28
|
+
features: Features;
|
|
29
29
|
};
|
|
30
30
|
export declare class GameController {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
31
|
+
container: ChoiceContainer;
|
|
32
|
+
branches: ChapterBranch[];
|
|
33
|
+
selectBranches: ReturnType<SelectBranchesType>;
|
|
34
|
+
subscription: ISubscription;
|
|
35
|
+
player: IPlayer;
|
|
36
|
+
interactiveEvents: InteractiveEventsType;
|
|
37
|
+
getContainerEventState: () => IgnoreExpectState;
|
|
38
|
+
isPermanentText: boolean;
|
|
39
|
+
interactiveTimeOpenUri: boolean;
|
|
40
|
+
disabledControls$: IValueSubject<boolean>;
|
|
41
|
+
onRemove: () => void;
|
|
42
|
+
globalEventEmitter: EventEmitter;
|
|
43
|
+
gameState: GameStates;
|
|
44
|
+
isSelectedControlEvent: boolean;
|
|
45
|
+
isSelectedContainerEvent: boolean;
|
|
46
|
+
globalEvents: GlobalEvents;
|
|
47
|
+
onError: ConstructorArg["onError"];
|
|
48
|
+
disableTextControlContainerVisibilityEvents: boolean;
|
|
49
|
+
features: Features;
|
|
50
|
+
constructor({ player, container, branches, selectBranches, interactiveEvents, globalEvents, globalEventEmitter, getContainerEventState, permanentTextControls, interactiveTimeOpenUri, disabledControls$, onRemove, onError, disableTextControlContainerVisibilityEvents, features }: ConstructorArg);
|
|
51
|
+
private emitContainerVisibilityEvent;
|
|
52
|
+
registerEvents(): void;
|
|
53
|
+
hide: () => void;
|
|
54
|
+
show: () => void;
|
|
55
|
+
selectContainerEvent(isEOV?: boolean): void;
|
|
56
|
+
onStartTime(): void;
|
|
57
|
+
onEndTime(): void;
|
|
58
|
+
onBeforeStartTime(): void;
|
|
59
|
+
onEndOfVideo: () => void;
|
|
60
|
+
whilePlaying: () => void;
|
|
61
|
+
onResize(isInteractiveTime: boolean): void;
|
|
62
|
+
reset(): void;
|
|
63
|
+
removeView(withTransition?: boolean | undefined): void;
|
|
64
|
+
fakeRemoveView(remove?: boolean): void;
|
|
65
|
+
updateControlsShadowStyles(isDark?: boolean): void;
|
|
66
|
+
toggleBlinkAnimation(value: boolean): void;
|
|
67
|
+
isInteracted(): boolean;
|
|
68
|
+
isRemovedOrDestroyed(includeWillRemovedState?: boolean): boolean;
|
|
69
|
+
destroy(withTransition?: boolean): void;
|
|
70
70
|
}
|
|
71
71
|
export {};
|
|
@@ -1,32 +1,30 @@
|
|
|
1
|
-
import type { EventActionKeys } from
|
|
2
|
-
export type TPriority =
|
|
1
|
+
import type { EventActionKeys } from "../../../manifest";
|
|
2
|
+
export type TPriority = "chapter" | "container" | "control";
|
|
3
3
|
export type TPayload = {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
actionType: EventActionKeys;
|
|
5
|
+
action: AnyFn;
|
|
6
6
|
};
|
|
7
7
|
export type TMapInitiator = {
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
type TMapPriority = {
|
|
11
|
-
[priority in TPriority]?: TMapInitiator;
|
|
8
|
+
[initiator: string]: TPayload[];
|
|
12
9
|
};
|
|
10
|
+
type TMapPriority = { [priority in TPriority]? : TMapInitiator };
|
|
13
11
|
type TMap = {
|
|
14
|
-
|
|
12
|
+
[timestamp: number]: TMapPriority;
|
|
15
13
|
};
|
|
16
14
|
export type TMapFlattened = {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
timestamp: number;
|
|
16
|
+
priority: TPriority;
|
|
17
|
+
initiator: string;
|
|
20
18
|
} & TPayload;
|
|
21
|
-
type GetAndRemoveArgType = Partial<Omit<TMapFlattened, keyof TPayload>> & Pick<TMapFlattened,
|
|
19
|
+
type GetAndRemoveArgType = Partial<Omit<TMapFlattened, keyof TPayload>> & Pick<TMapFlattened, "timestamp">;
|
|
22
20
|
export type TGroupsStack = ReturnType<typeof GroupsStack>;
|
|
23
21
|
export declare function GroupsStack(): {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
map: TMap;
|
|
23
|
+
remove: (args: GetAndRemoveArgType) => boolean;
|
|
24
|
+
add: (args: TMapFlattened) => void;
|
|
25
|
+
removeAll: () => void;
|
|
26
|
+
get: (args: GetAndRemoveArgType) => TMapPriority | TMapInitiator | TPayload[] | null;
|
|
27
|
+
getLte: (timestamp: number) => TMap;
|
|
28
|
+
getGte: (timestamp: number) => TMap;
|
|
31
29
|
};
|
|
32
30
|
export {};
|
|
@@ -1,52 +1,51 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { IValueSubject } from
|
|
3
|
-
import { EventEmitter } from
|
|
4
|
-
import type { VideoId } from
|
|
5
|
-
import type { VideoInfo } from
|
|
6
|
-
import type { Interactives } from
|
|
7
|
-
import { CustomError } from
|
|
1
|
+
import { Subject } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import type { IValueSubject, Nullable } from "@vkontakte/videoplayer-shared";
|
|
3
|
+
import type { EventEmitter } from "../../../utils/EventEmitter";
|
|
4
|
+
import type { Manifest, VideoId } from "../../../manifest";
|
|
5
|
+
import type { VideoInfo } from "..";
|
|
6
|
+
import type { Interactives } from "..";
|
|
7
|
+
import { CustomError } from "../../../utils/Error";
|
|
8
8
|
export interface HistoryApi {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
get: (rawId: string) => Promise<number[]>;
|
|
10
|
+
save: (rawId: string, videoIds: number[]) => Promise<void>;
|
|
11
11
|
}
|
|
12
12
|
export interface HistorySettings {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
maxLength: number;
|
|
14
|
+
initChapterId?: string;
|
|
15
15
|
}
|
|
16
16
|
interface HistoryControllerParams {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
globalEventEmitter: EventEmitter;
|
|
18
|
+
interactiveController: Interactives;
|
|
19
|
+
settings: HistorySettings;
|
|
20
|
+
videoId?: string;
|
|
21
|
+
historyApi?: Nullable<HistoryApi>;
|
|
22
22
|
}
|
|
23
23
|
export interface HistoryControllerState {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
history$: IValueSubject<string[]>;
|
|
25
|
+
hasPrevChapter$: IValueSubject<boolean>;
|
|
26
|
+
prevChapter$: IValueSubject<Nullable<string>>;
|
|
27
|
+
isInitialChapter$: IValueSubject<boolean>;
|
|
28
|
+
isGoBackLimited$: IValueSubject<boolean>;
|
|
29
29
|
}
|
|
30
30
|
interface HistoryInitedEventData {
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
initChapterId: string;
|
|
32
|
+
videosInfo?: VideoInfo[];
|
|
33
33
|
}
|
|
34
34
|
export default class HistoryController {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
35
|
+
#private;
|
|
36
|
+
state: HistoryControllerState;
|
|
37
|
+
events: {
|
|
38
|
+
inited$: Subject<HistoryInitedEventData>;
|
|
39
|
+
destroyed$: Subject<void>;
|
|
40
|
+
error$: Subject<CustomError>;
|
|
41
|
+
};
|
|
42
|
+
constructor({ globalEventEmitter, videoId, interactiveController, historyApi, settings }: HistoryControllerParams);
|
|
43
|
+
setManifest(manifest: Manifest): Promise<void>;
|
|
44
|
+
get inited(): boolean;
|
|
45
|
+
updateHistory(chapterIds: string[], shouldSave?: boolean): Promise<void>;
|
|
46
|
+
goBack(): Promise<void>;
|
|
47
|
+
getProjectHistory(): Promise<void>;
|
|
48
|
+
getInitialChapterId(): string;
|
|
49
|
+
getInitialVideoId(): VideoId | null;
|
|
50
|
+
destroy(): void;
|
|
51
51
|
}
|
|
52
|
-
export {};
|
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import { type Container } from
|
|
2
|
-
import { type TPayload, type TGroupsStack } from
|
|
3
|
-
import type { IPlayer } from
|
|
4
|
-
|
|
5
|
-
type
|
|
6
|
-
|
|
1
|
+
import { type Container } from "../../../manifest";
|
|
2
|
+
import { type TPayload, type TGroupsStack } from "./GroupsStack";
|
|
3
|
+
import type { IPlayer } from "@vkontakte/videoplayer-core";
|
|
4
|
+
type AddMethodParamType = Parameters<TGroupsStack["add"]>[0];
|
|
5
|
+
type RemoveMethodParamType = Parameters<TGroupsStack["remove"]>[0];
|
|
6
|
+
export interface ContainersEventsCallStateType {
|
|
7
|
+
setCalled: (args: {
|
|
8
|
+
timestamp: number;
|
|
9
|
+
id: string;
|
|
10
|
+
}) => void;
|
|
11
|
+
setData: (containers?: Container[]) => void;
|
|
12
|
+
resetCalled: (timestamp: number) => void;
|
|
13
|
+
isReady: (timestamp: number) => boolean;
|
|
14
|
+
release: () => void;
|
|
15
|
+
}
|
|
16
|
+
export interface InteractiveEventsType {
|
|
17
|
+
setPlayer: (player: IPlayer) => void;
|
|
18
|
+
add: (args: AddMethodParamType) => void;
|
|
19
|
+
remove: (args: RemoveMethodParamType) => void;
|
|
20
|
+
exec: (timestamp: number) => void;
|
|
21
|
+
execEndOfVideo: () => void;
|
|
22
|
+
listen: () => void;
|
|
23
|
+
unlisten: () => void;
|
|
24
|
+
release: () => void;
|
|
25
|
+
containersEventsCallState: ContainersEventsCallStateType;
|
|
26
|
+
getPreparedToExecActions: (timestamp?: number) => TPayload[];
|
|
27
|
+
}
|
|
7
28
|
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare function InteractiveEvents(player: IPlayer, interactiveTimeOpenUri: boolean):
|
|
11
|
-
setPlayer: (player: IPlayer) => void;
|
|
12
|
-
add: (args: AddMethodParamType) => void;
|
|
13
|
-
remove: (args: RemoveMethodParamType) => void;
|
|
14
|
-
exec: (timestamp: number) => void;
|
|
15
|
-
execEndOfVideo: () => void;
|
|
16
|
-
listen: () => void;
|
|
17
|
-
unlisten: () => void;
|
|
18
|
-
release: () => void;
|
|
19
|
-
containersEventsCallState: {
|
|
20
|
-
setCalled: ({ timestamp, id }: {
|
|
21
|
-
timestamp: number;
|
|
22
|
-
id: string;
|
|
23
|
-
}) => void;
|
|
24
|
-
setData: (containers?: Container[]) => void;
|
|
25
|
-
resetCalled: (timestamp: number) => void;
|
|
26
|
-
isReady: (timestamp: number) => boolean;
|
|
27
|
-
release: () => void;
|
|
28
|
-
};
|
|
29
|
-
getPreparedToExecActions: (timestamp?: number) => TPayload[];
|
|
30
|
-
};
|
|
29
|
+
* Executes an events at different times of the current chapter
|
|
30
|
+
*/
|
|
31
|
+
export declare function InteractiveEvents(player: IPlayer, interactiveTimeOpenUri: boolean): InteractiveEventsType;
|
|
31
32
|
export {};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type { IPlayer } from
|
|
2
|
-
import { Nullable } from
|
|
3
|
-
import { CssVarsManager } from
|
|
1
|
+
import type { IPlayer } from "@vkontakte/videoplayer-core";
|
|
2
|
+
import type { Nullable } from "@vkontakte/videoplayer-shared";
|
|
3
|
+
import type { CssVarsManager } from "../../../utils/CssVarsManager";
|
|
4
4
|
type ResizeManagerArg = () => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
parentElement: HTMLElement;
|
|
6
|
+
cssVarsManager: CssVarsManager;
|
|
7
|
+
player?: Nullable<IPlayer>;
|
|
8
|
+
fns?: AnyFn[];
|
|
9
9
|
};
|
|
10
10
|
export declare function ResizeManager(getOptions: ResizeManagerArg): {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
resizeObserver: ResizeObserver;
|
|
12
|
+
calc: () => void;
|
|
13
|
+
release: () => void;
|
|
14
14
|
};
|
|
15
15
|
export {};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import type { Chapter } from
|
|
2
|
-
import type { SelectBranchesArg, OnControlEventArg, ContinuePlaybackArg, ExpectEventHandlerArg, OnChapterEventArg, OnContainerEventArg, OnExpectEventArg, SetManifestContainerEventsArg, ActionMap, AnyAction, AfterExpectActionType } from
|
|
1
|
+
import type { Chapter } from "../../../manifest";
|
|
2
|
+
import type { SelectBranchesArg, OnControlEventArg, ChangeChapterArg, ContinuePlaybackArg, ExpectEventHandlerArg, OnChapterEventArg, OnContainerEventArg, OnExpectEventArg, SetManifestContainerEventsArg, OpenURIArg, ActionMap, AnyAction, AfterExpectActionType } from "./SelectBranches.types";
|
|
3
3
|
export declare const defaultArgs: {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
readonly shouldOpenNow: true;
|
|
5
|
+
readonly isDetachContainer: true;
|
|
6
6
|
};
|
|
7
7
|
export declare const AFTER_EXPECT_ACTION: AfterExpectActionType;
|
|
8
8
|
export declare const extendArgs: <T extends AnyAction>(action: T, rewrite?: boolean) => T;
|
|
9
9
|
export type ExtendArgsReturnType = ReturnType<typeof extendArgs>;
|
|
10
10
|
export declare const SelectBranches: ({ globalEventEmitter, globalEvents, player, interactiveEvents }: SelectBranchesArg) => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
onControlEvent: (arg: OnControlEventArg) => void;
|
|
12
|
+
onContainerEvent: (arg: OnContainerEventArg) => void;
|
|
13
|
+
onChapterEvent: (arg: OnChapterEventArg) => (() => ChangeChapterArg<"chapter">) | (() => ContinuePlaybackArg<"chapter">) | (() => OpenURIArg<"chapter">) | undefined;
|
|
14
|
+
onExpectEvent: <T extends keyof ActionMap>(arg: OnExpectEventArg<T>) => void;
|
|
15
|
+
expectEventHandler: <T extends keyof ActionMap>(arg: ExpectEventHandlerArg<T>) => void;
|
|
16
|
+
setManifestChapterEvents: (chapter: Chapter) => void;
|
|
17
|
+
setManifestContainerEvents: (arg: SetManifestContainerEventsArg) => void;
|
|
18
|
+
stopExpect: () => void;
|
|
19
|
+
state: {
|
|
20
|
+
isExpect: boolean;
|
|
21
|
+
};
|
|
22
22
|
};
|
|
23
23
|
export type SelectBranchesType = typeof SelectBranches;
|