@vkontakte/videoplayer-interactive 1.0.19-dev.d432d6cd.0 → 1.0.19-dev.d6f5a76a.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 +6 -6
- package/es2015.esm.js +6 -6
- package/es2018.cjs.js +6 -6
- package/es2018.esm.js +6 -6
- package/esnext.cjs.js +6 -6
- package/esnext.esm.js +6 -6
- package/evergreen.esm.js +6 -6
- package/package.json +5 -5
- package/types/index.d.ts +3 -2
- package/types/modules/Graph/Graph.d.ts +2 -2
- package/types/modules/Interactives/Interactives.d.ts +18 -14
- package/types/modules/Interactives/Layout.d.ts +7 -7
- package/types/modules/Interactives/controls/Control.d.ts +4 -3
- package/types/modules/Interactives/controls/types.d.ts +5 -4
- package/types/modules/Interactives/index.d.ts +1 -1
- package/types/modules/Interactives/types.d.ts +5 -0
- package/types/modules/Interactives/utils/GameController.d.ts +19 -36
- package/types/modules/Interactives/utils/GroupsStack.d.ts +21 -31
- package/types/modules/Interactives/utils/HistoryController.d.ts +13 -3
- package/types/modules/Interactives/utils/InteractiveEvents.d.ts +10 -16
- package/types/modules/Interactives/utils/ResizeManager.d.ts +1 -8
- package/types/modules/Interactives/utils/SelectBranches.d.ts +51 -15
- package/types/modules/Interactives/utils/fallbackStrategies.d.ts +6 -23
- package/types/modules/Interactives/utils/gameUtils.d.ts +26 -28
- package/types/modules/Interactives/utils/getInteractiveRanges.d.ts +1 -1
- package/types/modules/Interactives/utils/renderingUtils.d.ts +59 -64
- package/types/modules/Loaders/vkVideoLoader/types.d.ts +2 -2
- package/types/modules/Loaders/vkVideoLoader/utils.d.ts +1 -1
- package/types/modules/ManifestController/ManifestController.d.ts +12 -11
- package/types/modules/ManifestController/utils.d.ts +6 -6
- package/types/modules/SeamlessController/SeamlessController.d.ts +2 -2
- package/types/modules/SeamlessController/utils.d.ts +2 -2
- package/types/modules/SeekToInteractiveController/SeekToInteractiveController.d.ts +2 -2
- package/types/movika.core/manifest/index.d.ts +24 -0
- package/types/movika.core/manifest/manifest_3_2/chapter.d.ts +62 -0
- package/types/movika.core/manifest/manifest_3_2/control.d.ts +67 -0
- package/types/movika.core/manifest/manifest_3_2/manifest.d.ts +50 -0
- package/types/movika.core/manifest/manifest_3_2/template.d.ts +34 -0
- package/types/movika.core/manifest/manifest_3_3/chapter.d.ts +70 -0
- package/types/movika.core/manifest/manifest_3_3/control.d.ts +66 -0
- package/types/movika.core/manifest/manifest_3_3/graph.d.ts +73 -0
- package/types/movika.core/manifest/manifest_3_3/manifest.d.ts +52 -0
- package/types/movika.core/manifest/manifest_3_3/template.d.ts +34 -0
- package/types/movika.core/manifest/migrations/index.d.ts +1 -0
- package/types/movika.core/manifest/migrations/migrateManifestToLatestVersion.d.ts +1 -0
- package/types/movika.core/manifest/migrations/migrate_from_3_0_to_3_1.d.ts +21 -0
- package/types/movika.core/manifest/migrations/migrate_from_3_1_to_3_2.d.ts +2 -0
- package/types/movika.core/manifest/migrations/migrate_from_3_2_to_3_3.d.ts +8 -0
- package/types/movika.core/manifest/types.d.ts +29 -0
- package/types/movika.core/manifest/utils.d.ts +5 -0
- package/types/utils/LastFrame.d.ts +1 -1
- package/types/utils/chapterHelpers.d.ts +1 -1
- package/types/utils/extractVkMovieId.d.ts +1 -1
- package/types/manifest/index.d.ts +0 -3
- package/types/manifest/utils.d.ts +0 -11
- package/types/modules/Interactives/utils/SelectBranches.types.d.ts +0 -73
|
@@ -1,49 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import type { InteractiveEventsType } from './InteractiveEvents';
|
|
4
|
-
import type { ChapterBranch, ChapterContainer } from '../../../manifest';
|
|
5
|
-
import type { EventEmitter } from '../../../utils/EventEmitter';
|
|
6
|
-
import { SelectBranches } from './SelectBranches';
|
|
7
|
-
import { GameStates } from './gameUtils';
|
|
8
|
-
type Container = {
|
|
9
|
-
container: ChapterContainer;
|
|
10
|
-
getElement: () => HTMLElement;
|
|
11
|
-
disable: () => void;
|
|
12
|
-
enable: () => void;
|
|
13
|
-
hide: () => void;
|
|
14
|
-
show: () => void;
|
|
15
|
-
createView: AnyFn;
|
|
16
|
-
removeView: () => void;
|
|
17
|
-
isDisabled: boolean;
|
|
18
|
-
isRemoved: boolean;
|
|
19
|
-
};
|
|
20
|
-
export declare class GameController {
|
|
21
|
-
container: Container;
|
|
22
|
-
branches: ChapterBranch[];
|
|
23
|
-
selectBranches: ReturnType<typeof SelectBranches>;
|
|
24
|
-
subscription: ISubscription;
|
|
25
|
-
player: IPlayer;
|
|
26
|
-
interactiveEvents: InteractiveEventsType;
|
|
27
|
-
ignoreContainerEvent: () => boolean;
|
|
28
|
-
isPermanentText: boolean;
|
|
29
|
-
disabledControls$: IValueSubject<boolean>;
|
|
30
|
-
onRemove: () => void;
|
|
31
|
-
globalEventEmitter: EventEmitter;
|
|
32
|
-
gameState: GameStates;
|
|
33
|
-
isSelectedControlEvent: boolean;
|
|
34
|
-
isSelectedContainerEvent: boolean;
|
|
35
|
-
constructor({ player, container, branches, selectBranches, interactiveEvents, globalEventEmitter, ignoreContainerEvent, permanentTextControls, disabledControls$, onRemove, }: {
|
|
1
|
+
export class GameController {
|
|
2
|
+
constructor({ player, container, branches, selectBranches, interactiveEvents, globalEvents, globalEventEmitter, ignoreContainerEvent, permanentTextControls, disabledControls$, onRemove, }: {
|
|
36
3
|
player: any;
|
|
37
4
|
container: any;
|
|
38
5
|
branches: any;
|
|
39
6
|
selectBranches: any;
|
|
40
7
|
interactiveEvents: any;
|
|
8
|
+
globalEvents: any;
|
|
41
9
|
globalEventEmitter: any;
|
|
42
10
|
ignoreContainerEvent: any;
|
|
43
11
|
permanentTextControls: any;
|
|
44
12
|
disabledControls$: any;
|
|
45
13
|
onRemove: any;
|
|
46
14
|
});
|
|
15
|
+
container: any;
|
|
16
|
+
branches: any;
|
|
17
|
+
selectBranches: any;
|
|
18
|
+
subscription: Subscription;
|
|
19
|
+
player: any;
|
|
20
|
+
interactiveEvents: any;
|
|
21
|
+
ignoreContainerEvent: any;
|
|
22
|
+
isPermanentText: any;
|
|
23
|
+
disabledControls$: any;
|
|
24
|
+
onRemove: any;
|
|
25
|
+
globalEventEmitter: any;
|
|
26
|
+
globalEvents: any;
|
|
27
|
+
gameState: 0;
|
|
28
|
+
isSelectedControlEvent: boolean;
|
|
29
|
+
isSelectedContainerEvent: boolean;
|
|
47
30
|
registerEvents(): void;
|
|
48
31
|
hide: () => void;
|
|
49
32
|
show: () => void;
|
|
@@ -57,4 +40,4 @@ export declare class GameController {
|
|
|
57
40
|
removeView(): void;
|
|
58
41
|
destroy(): void;
|
|
59
42
|
}
|
|
60
|
-
|
|
43
|
+
import { Subscription } from '@vkontakte/videoplayer-shared';
|
|
@@ -1,32 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export function GroupsStack(): {
|
|
2
|
+
map: {};
|
|
3
|
+
remove: ({ timestamp, priority, initiator }: {
|
|
4
|
+
timestamp: any;
|
|
5
|
+
priority: any;
|
|
6
|
+
initiator: any;
|
|
7
|
+
}) => boolean | undefined;
|
|
8
|
+
add: ({ timestamp, priority, initiator, ...rest }: {
|
|
9
|
+
[x: string]: any;
|
|
10
|
+
timestamp: any;
|
|
11
|
+
priority: any;
|
|
12
|
+
initiator: any;
|
|
13
|
+
}) => void;
|
|
14
|
+
removeAll: () => boolean;
|
|
15
|
+
get: ({ timestamp, priority, initiator }: {
|
|
16
|
+
timestamp: any;
|
|
17
|
+
priority: any;
|
|
18
|
+
initiator: any;
|
|
19
|
+
}) => any;
|
|
20
|
+
getLte: (timestamp: any) => {};
|
|
21
|
+
getGte: (timestamp: any) => {};
|
|
6
22
|
};
|
|
7
|
-
export type TMapInitiator = {
|
|
8
|
-
[initiator: string]: TPayload[];
|
|
9
|
-
};
|
|
10
|
-
type TMapPriority = {
|
|
11
|
-
[priority in TPriority]?: TMapInitiator;
|
|
12
|
-
};
|
|
13
|
-
type TMap = {
|
|
14
|
-
[timestamp: number]: TMapPriority;
|
|
15
|
-
};
|
|
16
|
-
export type TMapFlattened = {
|
|
17
|
-
timestamp: number;
|
|
18
|
-
priority: TPriority;
|
|
19
|
-
initiator: string;
|
|
20
|
-
} & TPayload;
|
|
21
|
-
type GetAndRemoveArgType = Partial<Omit<TMapFlattened, keyof TPayload>> & Pick<TMapFlattened, 'timestamp'>;
|
|
22
|
-
export type TGroupsStack = ReturnType<typeof GroupsStack>;
|
|
23
|
-
export declare function GroupsStack(): {
|
|
24
|
-
map: TMap;
|
|
25
|
-
remove: ({ timestamp, priority, initiator }: GetAndRemoveArgType) => boolean;
|
|
26
|
-
add: ({ timestamp, priority, initiator, ...rest }: TMapFlattened) => void;
|
|
27
|
-
removeAll: () => void;
|
|
28
|
-
get: ({ timestamp, priority, initiator }: GetAndRemoveArgType) => TMapInitiator | TPayload[] | TMapPriority | null;
|
|
29
|
-
getLte: (timestamp: number) => TMap;
|
|
30
|
-
getGte: (timestamp: number) => TMap;
|
|
31
|
-
};
|
|
32
|
-
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { Nullable } from '@vkontakte/videoplayer-shared';
|
|
1
|
+
import { Nullable, Subject } from '@vkontakte/videoplayer-shared';
|
|
2
2
|
import type { IValueSubject } from '@vkontakte/videoplayer-shared';
|
|
3
3
|
import { EventEmitter } from '../../../utils/EventEmitter';
|
|
4
|
-
import type { VideoId } from '../../../manifest';
|
|
5
|
-
import type { Interactives } from '../../../modules/Interactives';
|
|
4
|
+
import type { VideoId } from '../../../movika.core/manifest';
|
|
5
|
+
import type { Interactives, VideoInfo } from '../../../modules/Interactives';
|
|
6
|
+
import { CustomError } from '../../../utils/Error';
|
|
6
7
|
export interface HistoryApi {
|
|
7
8
|
get: (rawId: string) => Promise<number[]>;
|
|
8
9
|
save: (rawId: string, videoIds: number[]) => Promise<void>;
|
|
@@ -25,9 +26,18 @@ export interface HistoryControllerState {
|
|
|
25
26
|
isInitialChapter$: IValueSubject<boolean>;
|
|
26
27
|
isGoBackLimited$: IValueSubject<boolean>;
|
|
27
28
|
}
|
|
29
|
+
interface HistoryInitedEventData {
|
|
30
|
+
initChapterId: string;
|
|
31
|
+
videosInfo?: VideoInfo[];
|
|
32
|
+
}
|
|
28
33
|
export default class HistoryController {
|
|
29
34
|
#private;
|
|
30
35
|
state: HistoryControllerState;
|
|
36
|
+
events: {
|
|
37
|
+
inited$: Subject<HistoryInitedEventData>;
|
|
38
|
+
destroyed$: Subject<void>;
|
|
39
|
+
error$: Subject<CustomError>;
|
|
40
|
+
};
|
|
31
41
|
constructor({ globalEventEmitter, videoId, interactiveController, historyApi, settings }: HistoryControllerParams);
|
|
32
42
|
setManifest(manifest: any): Promise<void>;
|
|
33
43
|
get inited(): boolean;
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
import { type Container } from '../../../manifest';
|
|
2
|
-
import { type TPayload, type TGroupsStack } from './GroupsStack';
|
|
3
|
-
import type { IPlayer } from '@vkontakte/videoplayer-core';
|
|
4
|
-
export type InteractiveEventsType = ReturnType<typeof InteractiveEvents>;
|
|
5
|
-
type AddMethodParamType = Parameters<TGroupsStack['add']>[0];
|
|
6
|
-
type RemoveMethodParamType = Parameters<TGroupsStack['remove']>[0];
|
|
7
1
|
/**
|
|
8
2
|
* Executes an events at different times of the current chapter
|
|
3
|
+
* @param {object} player
|
|
9
4
|
*/
|
|
10
|
-
export
|
|
11
|
-
setPlayer: (player:
|
|
12
|
-
add: (args:
|
|
13
|
-
remove: (args:
|
|
14
|
-
exec: (timestamp:
|
|
5
|
+
export function InteractiveEvents(player: object): {
|
|
6
|
+
setPlayer: (player: any) => void;
|
|
7
|
+
add: (args: any) => void;
|
|
8
|
+
remove: (args: any) => void;
|
|
9
|
+
exec: (timestamp: any) => void;
|
|
15
10
|
execEndOfVideo: () => void;
|
|
16
11
|
listen: () => void;
|
|
17
12
|
unlisten: () => void;
|
|
@@ -21,11 +16,10 @@ export declare function InteractiveEvents(player: IPlayer): {
|
|
|
21
16
|
timestamp: any;
|
|
22
17
|
id: any;
|
|
23
18
|
}) => void;
|
|
24
|
-
setData: (containers?:
|
|
25
|
-
resetCalled: (timestamp:
|
|
26
|
-
isReady: (timestamp:
|
|
19
|
+
setData: (containers?: any[]) => void;
|
|
20
|
+
resetCalled: (timestamp: any) => void;
|
|
21
|
+
isReady: (timestamp: any) => boolean;
|
|
27
22
|
release: () => void;
|
|
28
23
|
};
|
|
29
|
-
getPreparedToExecActions: (timestamp?: number) =>
|
|
24
|
+
getPreparedToExecActions: (timestamp?: number) => any[];
|
|
30
25
|
};
|
|
31
|
-
export {};
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
type ResizeManagerArg = () => {
|
|
3
|
-
parentElement: HTMLElement;
|
|
4
|
-
player?: Nullable<IPlayer>;
|
|
5
|
-
fns?: AnyFn[];
|
|
6
|
-
};
|
|
7
|
-
export declare function ResizeManager(getOptions: ResizeManagerArg): {
|
|
1
|
+
export function ResizeManager(getOptions: any): {
|
|
8
2
|
resizeObserver: ResizeObserver;
|
|
9
3
|
calc: () => void;
|
|
10
4
|
release: () => void;
|
|
11
5
|
};
|
|
12
|
-
export {};
|
|
@@ -1,18 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
export const defaultArgs: Readonly<{
|
|
2
|
+
shouldOpenNow: true;
|
|
3
|
+
isDetachContainer: true;
|
|
4
|
+
}>;
|
|
5
|
+
export function extendArgs(action: any, rewrite?: boolean): any;
|
|
6
|
+
export function SelectBranches({ globalEventEmitter, player, interactiveEvents, removeControllers }: {
|
|
7
|
+
globalEventEmitter: any;
|
|
8
|
+
player: any;
|
|
9
|
+
interactiveEvents: any;
|
|
10
|
+
removeControllers: any;
|
|
11
|
+
}): {
|
|
12
|
+
onControlEvent: ({ action, controlType, controlId, containerId, branches, onEvent, isEOV, isDisabled, }: {
|
|
13
|
+
action: any;
|
|
14
|
+
controlType: any;
|
|
15
|
+
controlId: any;
|
|
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;
|
|
16
52
|
stopExpect: () => void;
|
|
17
53
|
state: {
|
|
18
54
|
isExpect: boolean;
|
|
@@ -1,23 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
/**
|
|
8
|
-
* Finds the value with minimal weight number
|
|
9
|
-
*/
|
|
10
|
-
export declare const minFallbackStrategy: (branches: ChapterBranch[]) => Nullable<ChapterBranch>;
|
|
11
|
-
/**
|
|
12
|
-
* Finds the value with maximal weight number
|
|
13
|
-
*/
|
|
14
|
-
export declare const maxFallbackStrategy: (branches: ChapterBranch[]) => Nullable<ChapterBranch>;
|
|
15
|
-
/**
|
|
16
|
-
* Finds first branch with `isDefault === true` value
|
|
17
|
-
*/
|
|
18
|
-
export declare const defaultFallbackStrategy: (branches: ChapterBranch[]) => ChapterBranch | undefined;
|
|
19
|
-
/**
|
|
20
|
-
* Returns the random branch
|
|
21
|
-
*/
|
|
22
|
-
export declare const weightlessRandomFallbackStrategy: (branches: ChapterBranch[]) => ChapterBranch;
|
|
23
|
-
export declare const weightyRandomFallbackStrategy: (branches: ChapterBranch[]) => ChapterBranch;
|
|
1
|
+
export function getRandomNumber(limit: number): number;
|
|
2
|
+
export function minFallbackStrategy(branches: any[]): string;
|
|
3
|
+
export function maxFallbackStrategy(branches: any): string;
|
|
4
|
+
export function defaultFallbackStrategy(branches: any[]): string;
|
|
5
|
+
export function weightlessRandomFallbackStrategy(branches: any[]): string;
|
|
6
|
+
export function weightyRandomFallbackStrategy(branches: any): any;
|
|
@@ -1,28 +1,26 @@
|
|
|
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
|
|
27
|
-
export declare const shouldIgnoreContainerEvent: (container: ChapterContainer, gameControllers: GameController[]) => boolean;
|
|
28
|
-
export {};
|
|
1
|
+
export function excludeTextControl(containers?: any[]): any[];
|
|
2
|
+
export const gameStates: Readonly<{
|
|
3
|
+
nothing: 0;
|
|
4
|
+
beforeInteractive: 1;
|
|
5
|
+
interactive: 2;
|
|
6
|
+
afterInteractive: 3;
|
|
7
|
+
end: 4;
|
|
8
|
+
removed: 5;
|
|
9
|
+
destroyed: 6;
|
|
10
|
+
}>;
|
|
11
|
+
export function isControlsExist(controls: any): boolean;
|
|
12
|
+
export function isLastChapter(chapter: any): boolean;
|
|
13
|
+
export function hasEndTemplate(chapter: any): boolean;
|
|
14
|
+
export function isBeforeStartTime(currentTime: any, container: any): boolean;
|
|
15
|
+
export function isInteractiveTime(currentTime: any, container: any): boolean;
|
|
16
|
+
export function isAfterInteractiveTime(currentTime: any, container: any): boolean;
|
|
17
|
+
export function isExpectEvent(events: any): any;
|
|
18
|
+
export function getExpectEvent(events: any): any;
|
|
19
|
+
export function isOneCtrlOneContainer(controls: any): boolean;
|
|
20
|
+
export function isOneTextCtrlContainer(controls: any): boolean;
|
|
21
|
+
export function isEOVEndTime(target: any, endTime: any): boolean;
|
|
22
|
+
export function partial({ fn, type }: {
|
|
23
|
+
fn: any;
|
|
24
|
+
type?: number | undefined;
|
|
25
|
+
}, ...presetArgs: any[]): (...laterArgs: any[]) => any;
|
|
26
|
+
export function shouldIgnoreContainerEvent(container: any, gameControllers: any): any;
|
|
@@ -1,67 +1,62 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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"
|
|
1
|
+
export const classnamesPrefix: "interactive";
|
|
2
|
+
export const rootElClassName: "interactive-controls-container";
|
|
3
|
+
export function getRootEl(): Element | null;
|
|
4
|
+
export const DISABLE_OPACITY: 0.4;
|
|
5
|
+
export namespace controlStylesFallbacks {
|
|
6
|
+
let textColor: string;
|
|
7
|
+
let textSize: number;
|
|
8
|
+
let textContent: string;
|
|
9
|
+
let roundCorners: number;
|
|
10
|
+
let borderWidth: number;
|
|
11
|
+
let borderColor: string;
|
|
12
|
+
let borderAlpha: number;
|
|
13
|
+
let backgroundColor: string;
|
|
14
|
+
let backgroundAlpha: number;
|
|
15
|
+
let innerSizesDependOn: string;
|
|
16
|
+
let angle: number;
|
|
25
17
|
}
|
|
26
|
-
export
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
center
|
|
18
|
+
export namespace ALIGN_ITEMS {
|
|
19
|
+
let top: string;
|
|
20
|
+
let bottom: string;
|
|
21
|
+
let center: string;
|
|
30
22
|
}
|
|
31
|
-
export
|
|
32
|
-
start
|
|
33
|
-
end
|
|
34
|
-
|
|
23
|
+
export namespace JUSTIFY_CONTENT {
|
|
24
|
+
export let start: string;
|
|
25
|
+
export let end: string;
|
|
26
|
+
let center_1: string;
|
|
27
|
+
export { center_1 as center };
|
|
35
28
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
export
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
target:
|
|
50
|
-
props:
|
|
51
|
-
fallback:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
target:
|
|
56
|
-
props:
|
|
57
|
-
fallback:
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
29
|
+
export namespace TEXT_ALIGN {
|
|
30
|
+
let start_1: string;
|
|
31
|
+
export { start_1 as start };
|
|
32
|
+
let end_1: string;
|
|
33
|
+
export { end_1 as end };
|
|
34
|
+
let center_2: string;
|
|
35
|
+
export { center_2 as center };
|
|
36
|
+
}
|
|
37
|
+
export function setTextPositionStyles({ target, props }: {
|
|
38
|
+
target: any;
|
|
39
|
+
props: any;
|
|
40
|
+
}): void;
|
|
41
|
+
export function setTextStyles({ target, props, fallback, dependsOn }: {
|
|
42
|
+
target: any;
|
|
43
|
+
props: any;
|
|
44
|
+
fallback: any;
|
|
45
|
+
dependsOn: any;
|
|
46
|
+
}): void;
|
|
47
|
+
export function setBackgroundStyles({ target, props, fallback }: {
|
|
48
|
+
target: any;
|
|
49
|
+
props: any;
|
|
50
|
+
fallback: any;
|
|
51
|
+
}): void;
|
|
52
|
+
export function setBorderStyles({ target, props, fallback, dependsOn }: {
|
|
53
|
+
target: any;
|
|
54
|
+
props: any;
|
|
55
|
+
fallback: any;
|
|
56
|
+
dependsOn: any;
|
|
57
|
+
}): void;
|
|
58
|
+
export function setAngle({ target, layoutParams, fallback }: {
|
|
59
|
+
target: any;
|
|
60
|
+
layoutParams: any;
|
|
61
|
+
fallback: any;
|
|
62
|
+
}): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ManifestVideo, ManifestVideoVariant } from '../../../manifest';
|
|
2
|
-
export type {
|
|
1
|
+
import type { ManifestVideo, ManifestVideoVariant } from '../../../movika.core/manifest';
|
|
2
|
+
export type { Extensions, Standard } from '../../../movika.core/manifest';
|
|
3
3
|
export interface GetVKVideoParams {
|
|
4
4
|
access_token: string;
|
|
5
5
|
owner_id?: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ManifestVideoVariant } from '../../../manifest';
|
|
1
|
+
import type { ManifestVideoVariant } from '../../../movika.core/manifest';
|
|
2
2
|
import type { FullRequestParams, VideoVideoImage } from './types';
|
|
3
3
|
export declare function createRequestURL({ baseURL, requestParams }: FullRequestParams): string;
|
|
4
4
|
export declare function findMaxResolutionFrame(frames?: VideoVideoImage[]): VideoVideoImage | undefined;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import type { IValueSubject } from '@vkontakte/videoplayer-shared';
|
|
2
|
-
import type { ChapterBranch, ManifestVideo,
|
|
2
|
+
import type { ChapterBranch, ManifestVideo, LatestChapter, LatestManifest, LatestManifestVideo } from '../../movika.core/manifest';
|
|
3
|
+
import type { GraphEditChapter, GraphViewChapter } from '../../movika.core/manifest/manifest_3_3/graph';
|
|
3
4
|
import { Loadable } from './Loadable';
|
|
4
5
|
type BranchesData = {
|
|
5
|
-
chapter:
|
|
6
|
+
chapter: LatestChapter;
|
|
6
7
|
graph: GraphEditChapter | GraphViewChapter | undefined;
|
|
7
8
|
media: ManifestVideo;
|
|
8
9
|
};
|
|
9
10
|
export declare class ManifestController extends Loadable {
|
|
10
|
-
manifest: Nullable<
|
|
11
|
-
chapter: Nullable<
|
|
12
|
-
media: Nullable<
|
|
13
|
-
graph: Nullable<
|
|
14
|
-
prevChapter$: IValueSubject<
|
|
11
|
+
manifest: Nullable<LatestManifest>;
|
|
12
|
+
chapter: Nullable<LatestChapter>;
|
|
13
|
+
media: Nullable<LatestManifestVideo>;
|
|
14
|
+
graph: Nullable<LatestManifest['graph']>;
|
|
15
|
+
prevChapter$: IValueSubject<LatestChapter | null>;
|
|
15
16
|
onError: Function;
|
|
16
17
|
constructor(loaders: any, onError: Function);
|
|
17
18
|
release(): this;
|
|
18
|
-
setManifest(source:
|
|
19
|
+
setManifest(source: LatestManifest): Promise<ManifestController>;
|
|
19
20
|
setInitial(): Promise<ManifestController>;
|
|
20
21
|
setNext(chapterId?: string | undefined): Promise<ManifestController>;
|
|
21
22
|
errorHandler(errors: unknown): void;
|
|
@@ -24,9 +25,9 @@ export declare class ManifestController extends Loadable {
|
|
|
24
25
|
getBranches(chapterId?: string | undefined): BranchesData[];
|
|
25
26
|
getByBranches(branches?: ChapterBranch[]): BranchesData[];
|
|
26
27
|
getCurrent(): {
|
|
27
|
-
chapter: Nullable<Chapter>;
|
|
28
|
-
media: Nullable<ManifestVideo>;
|
|
29
|
-
graph: Nullable<import("
|
|
28
|
+
chapter: Nullable<import("../../movika.core/manifest/types").Chapter>;
|
|
29
|
+
media: Nullable<import("../../movika.core/manifest/manifest_3_3/manifest").ManifestVideo>;
|
|
30
|
+
graph: Nullable<import("../../movika.core/manifest/manifest_3_3/graph").GraphDesign>;
|
|
30
31
|
};
|
|
31
32
|
isInitialChapter(): boolean;
|
|
32
33
|
isEndChapter(): boolean;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { Manifest,
|
|
1
|
+
import type { Manifest, LatestManifest, Media, Chapter } from '../../movika.core/manifest';
|
|
2
2
|
type ManifestInfo = {
|
|
3
|
-
manifest:
|
|
3
|
+
manifest: Manifest;
|
|
4
4
|
manifestURL: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const convertToObject: (manifest:
|
|
7
|
-
export declare function fetchManifest(manifest:
|
|
6
|
+
export declare const convertToObject: (manifest: Manifest | string) => Promise<Partial<ManifestInfo>>;
|
|
7
|
+
export declare function fetchManifest(manifest: Manifest): Promise<LatestManifest>;
|
|
8
8
|
export declare function getInitialChapter(manifest: any): Chapter | undefined;
|
|
9
9
|
export declare function getChapter(chapters: Chapter[], chapterId?: string): Chapter | undefined;
|
|
10
|
-
export declare function getGraphItem(graphObj:
|
|
11
|
-
export declare function getMedia(media: Media, videoId?: string): import("
|
|
10
|
+
export declare function getGraphItem(graphObj: LatestManifest['graph'], chapterId: string): import("../../movika.core/manifest/manifest_3_3/graph").GraphEditChapter | import("../../movika.core/manifest/manifest_3_3/graph").GraphViewChapter | undefined;
|
|
11
|
+
export declare function getMedia(media: Media, videoId?: string): import("../../movika.core/manifest/manifest_3_2/manifest").ManifestVideo | undefined;
|
|
12
12
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IConfig, PlaybackRate, VideoQuality } from '@vkontakte/videoplayer-core';
|
|
2
2
|
import { ValueSubject } from '@vkontakte/videoplayer-shared';
|
|
3
|
-
import type { ManifestVideo,
|
|
3
|
+
import type { ManifestVideo, Extensions } from '../../movika.core/manifest';
|
|
4
4
|
import { type Interactives } from '../../modules/Interactives';
|
|
5
5
|
import type { Instance } from './InstanceManager';
|
|
6
6
|
interface CreatePlayerParams extends Omit<IConfig, 'sources' | 'container'> {
|
|
@@ -9,7 +9,7 @@ interface CreatePlayerParams extends Omit<IConfig, 'sources' | 'container'> {
|
|
|
9
9
|
prefetch?: boolean;
|
|
10
10
|
setAsActive?: boolean;
|
|
11
11
|
autoplay?: boolean;
|
|
12
|
-
preferredExt?: Array<
|
|
12
|
+
preferredExt?: Array<Extensions>;
|
|
13
13
|
quality?: VideoQuality;
|
|
14
14
|
playbackRate?: PlaybackRate;
|
|
15
15
|
title?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IPlayer, ISources } from '@vkontakte/videoplayer-core';
|
|
2
|
-
import type { ManifestVideo,
|
|
2
|
+
import type { ManifestVideo, Extensions } from '../../movika.core/manifest';
|
|
3
3
|
import { VideoQuality } from '@vkontakte/videoplayer-core';
|
|
4
|
-
export declare function genPlayerCfgVideoData(mediaObj: ManifestVideo, allowList?: Array<
|
|
4
|
+
export declare function genPlayerCfgVideoData(mediaObj: ManifestVideo, allowList?: Array<Extensions>): {
|
|
5
5
|
sources: ISources;
|
|
6
6
|
thumbUrl?: string | null;
|
|
7
7
|
title: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { IPlayer } from '@vkontakte/videoplayer-core';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ChapterContainers } from '../../movika.core/manifest/types';
|
|
3
3
|
export declare class SeekToInteractiveController {
|
|
4
4
|
private _containers;
|
|
5
5
|
private _player;
|
|
6
6
|
setPlayer: (player: IPlayer) => void;
|
|
7
|
-
setContainers: (containers:
|
|
7
|
+
setContainers: (containers: ChapterContainers) => void;
|
|
8
8
|
deleteContainer: (id: string) => void;
|
|
9
9
|
getNextInteractiveTime: (offsetMs?: number) => number | null;
|
|
10
10
|
}
|