@vkontakte/videoplayer 1.1.91-dev.ff8ccb48.0 → 1.1.92-beta.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.
Files changed (62) hide show
  1. package/es2015.cjs +35 -39
  2. package/es2015.esm.js +35 -39
  3. package/esnext.cjs +35 -39
  4. package/esnext.esm.js +34 -38
  5. package/evergreen.esm.js +34 -38
  6. package/package.json +5 -5
  7. package/types/VKVideoPlayer/index.svelte.d.ts +1 -1
  8. package/types/components/Menus/constants/contextMenuItemIds.d.ts +0 -1
  9. package/types/components/Menus/constants/settingsMenuItemIds.d.ts +0 -1
  10. package/types/components/Menus/subMenuTabs/rootMenuItems.d.ts +0 -1
  11. package/types/components/Menus/subMenuTabs/types.d.ts +0 -1
  12. package/types/components/Root/types.d.ts +3 -4
  13. package/types/config.d.ts +14 -5
  14. package/types/constans/keyboard.d.ts +2 -0
  15. package/types/store/composition.d.ts +31 -0
  16. package/types/store/index.d.ts +1 -1
  17. package/types/store/modules/fakeIsPlayingStore/fakeIsPlayingStore.module.d.ts +3 -0
  18. package/types/store/modules/fakeIsPlayingStore/fakeIsPlayingStore.store.d.ts +26 -0
  19. package/types/store/modules/fakeIsPlayingStore/fakeIsPlayingStore.token.d.ts +3 -0
  20. package/types/store/modules/fakeIsPlayingStore/index.d.ts +3 -0
  21. package/types/store/modules/graphIsOpenedStore/graphIsOpenedStore.module.d.ts +3 -0
  22. package/types/store/modules/graphIsOpenedStore/graphIsOpenedStore.store.d.ts +50 -0
  23. package/types/store/modules/graphIsOpenedStore/graphIsOpenedStore.token.d.ts +3 -0
  24. package/types/store/modules/graphIsOpenedStore/index.d.ts +3 -0
  25. package/types/store/modules/index.d.ts +18 -0
  26. package/types/store/modules/infrastructure/index.d.ts +3 -0
  27. package/types/store/modules/infrastructure/infrastructure.module.d.ts +21 -0
  28. package/types/store/modules/infrastructure/infrastructure.token.d.ts +26 -0
  29. package/types/store/modules/interactiveControlsOpacityStore/index.d.ts +3 -0
  30. package/types/store/modules/interactiveControlsOpacityStore/interactiveControlsOpacityStore.module.d.ts +3 -0
  31. package/types/store/modules/interactiveControlsOpacityStore/interactiveControlsOpacityStore.store.d.ts +34 -0
  32. package/types/store/modules/interactiveControlsOpacityStore/interactiveControlsOpacityStore.token.d.ts +3 -0
  33. package/types/store/modules/notificationsStore/index.d.ts +3 -0
  34. package/types/store/modules/notificationsStore/notificationsStore.module.d.ts +3 -0
  35. package/types/store/modules/notificationsStore/notificationsStore.store.d.ts +34 -0
  36. package/types/store/modules/notificationsStore/notificationsStore.token.d.ts +3 -0
  37. package/types/store/modules/pictureInPictureStore/index.d.ts +3 -0
  38. package/types/store/modules/pictureInPictureStore/pictureInPictureStore.module.d.ts +3 -0
  39. package/types/store/modules/pictureInPictureStore/pictureInPictureStore.store.d.ts +42 -0
  40. package/types/store/modules/pictureInPictureStore/pictureInPictureStore.token.d.ts +3 -0
  41. package/types/store/modules/seekToInteractiveDisabledTooltipStore/index.d.ts +3 -0
  42. package/types/store/modules/seekToInteractiveDisabledTooltipStore/seekToInteractiveDisabledTooltipStore.module.d.ts +3 -0
  43. package/types/store/modules/seekToInteractiveDisabledTooltipStore/seekToInteractiveDisabledTooltipStore.store.d.ts +26 -0
  44. package/types/store/modules/seekToInteractiveDisabledTooltipStore/seekToInteractiveDisabledTooltipStore.token.d.ts +3 -0
  45. package/types/store/modules/showInteractiveTimeIndicatorTooltipStore/index.d.ts +3 -0
  46. package/types/store/modules/showInteractiveTimeIndicatorTooltipStore/showInteractiveTimeIndicatorTooltipStore.module.d.ts +3 -0
  47. package/types/store/modules/showInteractiveTimeIndicatorTooltipStore/showInteractiveTimeIndicatorTooltipStore.store.d.ts +44 -0
  48. package/types/store/modules/showInteractiveTimeIndicatorTooltipStore/showInteractiveTimeIndicatorTooltipStore.token.d.ts +3 -0
  49. package/types/store/modules/utils.d.ts +6 -0
  50. package/types/store/types.d.ts +16 -8
  51. package/types/store/utils.d.ts +5 -5
  52. package/types/types/index.d.ts +16 -55
  53. package/types/utils/webAPI/pictureInPictureApi/documentPictureInPictureApi.svelte.d.ts +5 -2
  54. package/types/store/micro/base.d.ts +0 -8
  55. package/types/store/micro/fakeIsPlaying.d.ts +0 -10
  56. package/types/store/micro/graphIsOpened.d.ts +0 -13
  57. package/types/store/micro/index.d.ts +0 -2
  58. package/types/store/micro/interactiveControlsOpacity.d.ts +0 -10
  59. package/types/store/micro/notifications.d.ts +0 -9
  60. package/types/store/micro/pictureInPicture.d.ts +0 -8
  61. package/types/store/micro/seekToInteractiveDisabledTooltip.d.ts +0 -10
  62. package/types/store/micro/showInteractiveTimeIndicatorTooltip.d.ts +0 -15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/videoplayer",
3
- "version": "1.1.91-dev.ff8ccb48.0",
3
+ "version": "1.1.92-beta.0",
4
4
  "author": "vk.com",
5
5
  "description": "Videoplayer based on the vk.com platform",
6
6
  "homepage": "https://vk.com",
@@ -43,9 +43,9 @@
43
43
  ],
44
44
  "dependencies": {
45
45
  "@adtech/rbadman": "2.2.57",
46
- "@vkontakte/videoplayer-core": "2.0.160-dev.ff8ccb48.0",
47
- "@vkontakte/videoplayer-interactive": "1.0.66-dev.ff8ccb48.0",
48
- "@vkontakte/videoplayer-shared": "1.0.89-dev.ff8ccb48.0",
49
- "@vkontakte/videoplayer-statistics": "1.0.106-dev.ff8ccb48.0"
46
+ "@vkontakte/videoplayer-core": "2.0.161-beta.0",
47
+ "@vkontakte/videoplayer-interactive": "1.0.67-beta.0",
48
+ "@vkontakte/videoplayer-shared": "1.0.90-beta.0",
49
+ "@vkontakte/videoplayer-statistics": "1.0.107-beta.0"
50
50
  }
51
51
  }
@@ -20,7 +20,6 @@ export declare class VKVideoPlayer extends HTMLElement {
20
20
  private sveltePersistentLayerComponent?;
21
21
  private svelteErrorComponent?;
22
22
  private store?;
23
- private microStoresRoot?;
24
23
  private statistics?;
25
24
  private appTracer?;
26
25
  private admanWrapper?;
@@ -84,6 +83,7 @@ export declare class VKVideoPlayer extends HTMLElement {
84
83
  private addPlayerInfoSubscriptions;
85
84
  playNextVideo(): void;
86
85
  playPrevVideo(): void;
86
+ toggleFullscreen(): void;
87
87
  /**
88
88
  * !!! Сейчас нее будет полноценно работать,
89
89
  * потому что часть полей которые реально относятся к видео передаются в videoConfig
@@ -7,6 +7,5 @@ export declare enum ContextMenuItemIds {
7
7
  ROTATE = "rotate",
8
8
  REPORT = "report",
9
9
  SAVE_DEBUG = "save-debug",
10
- SAVE_TRACE = "save-trace",
11
10
  DEBUG_INFO = "debug-info"
12
11
  }
@@ -7,6 +7,5 @@ export declare enum SettingsMenuItemIds {
7
7
  DOWNLOAD = "download",
8
8
  REPORT = "report",
9
9
  COPY_DATA = "copy-data",
10
- SAVE_TRACE_INFO = "save-trace-info",
11
10
  DEBUG_INFO = "debug-info"
12
11
  }
@@ -18,7 +18,6 @@ export type Context = {
18
18
  onDownloadClick: () => void;
19
19
  onReportProblemClick: () => void;
20
20
  onCopyDataClick: () => void;
21
- onSaveTraceDataClick: () => void;
22
21
  toggleShowDebugInfo: () => void;
23
22
  };
24
23
  /**
@@ -26,7 +26,6 @@ export declare enum RootMenuId {
26
26
  DOWNLOAD = "download",
27
27
  SHOW_SUPPORT = "show-support",
28
28
  COPY_DATA = "copy-data",
29
- SAVE_TRACE_INFO = "save-trace-info",
30
29
  DEBUG_INFO = "debug-info"
31
30
  }
32
31
  export type Context = {
@@ -1,14 +1,13 @@
1
- import type { IStore } from "../../store";
2
- import type { AdmanInitParams, IMicroStoresRoot, IVideoData, IVKVideoPlayerConfig } from "../../types";
1
+ import type { EnrichedStore } from "../../store";
2
+ import type { AdmanInitParams, IVideoData, IVKVideoPlayerConfig } from "../../types";
3
3
  import type { IUIConfig } from "../../config";
4
4
  import type { Interactives } from "@vkontakte/videoplayer-interactive";
5
5
  import type KeyboardControls from "../KeyboardControls.svelte";
6
6
  import type { AdmanWrapper } from "../Ads/admanWrapper";
7
7
  export interface RootProps {
8
8
  videoData: IVideoData;
9
- store: IStore;
9
+ store: EnrichedStore;
10
10
  admanWrapper: AdmanWrapper;
11
- microStoresRoot: IMicroStoresRoot;
12
11
  videoConfig: IVKVideoPlayerConfig;
13
12
  uiConfig: IUIConfig;
14
13
  interactiveContainer: HTMLElement | undefined;
package/types/config.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ExactVideoQuality, Seconds, IAppTracerOptions } from "@vkontakte/videoplayer-shared";
1
+ import type { ExactVideoQuality, Seconds, IAppTracerConfig, TracerType } from "@vkontakte/videoplayer-shared";
2
2
  import type { IOptionalTuningConfig as ICoreConfig } from "@vkontakte/videoplayer-core";
3
3
  import { InterfaceLanguage } from "@vkontakte/videoplayer-shared";
4
4
  import type { RecursivePartial } from "@vkontakte/videoplayer-shared";
@@ -20,10 +20,12 @@ export declare enum LogoType {
20
20
  * never - не показывать
21
21
  * always - показыватьв всегда
22
22
  */
23
- export type TitleShowBehaviour = "fullscreen" | "with-controls" | "never" | "always";
23
+ export type TitleShowBehaviour = "fullscreen" | "fullscreen-and-dpip" | "with-controls" | "never" | "always";
24
24
  export interface IDpipConfig {
25
- minimalView?: boolean;
26
25
  initialSize?: Size;
26
+ minimalView?: boolean;
27
+ showPrevNextButtons?: boolean;
28
+ showAutoplayToggle?: boolean;
27
29
  }
28
30
  export interface IAdsConfig {
29
31
  enable: ForceOrRelay;
@@ -132,8 +134,12 @@ export interface IUIConfig {
132
134
  episodesClustering: boolean;
133
135
  copyVideoLink: boolean;
134
136
  videoRotate: boolean;
137
+ /**
138
+ * @deprecated Используйте tracerType
139
+ */
135
140
  tracer: boolean;
136
- apptracer: IAppTracerOptions;
141
+ tracerType: TracerType;
142
+ apptracer: IAppTracerConfig;
137
143
  interactiveGraph: boolean;
138
144
  interactiveResponsiveUi?: boolean;
139
145
  seekToInteractive: boolean;
@@ -153,7 +159,6 @@ export interface IUIConfig {
153
159
  hotKeyMapModal: boolean;
154
160
  hotKeyHelpers: boolean;
155
161
  saveDebugInfoToFile: boolean;
156
- saveTraceInfoToFile: boolean;
157
162
  additionalButtons: boolean;
158
163
  additionalButtonsDesktopControlPanelRight: boolean;
159
164
  additionalSettingsMenuItems: boolean;
@@ -222,6 +227,10 @@ export interface IUIConfig {
222
227
  usePreviewTimelineWithHovering: boolean;
223
228
  /** добавляет перехват кликов (`event.stopPropagation()`) на уровне Root компонента плеера */
224
229
  rootStopPropagation: boolean;
230
+ /** расширяет высоту под-меню настроек в мобильной версии */
231
+ mobileSubMenuStretchHeight: boolean;
232
+ /** перенос кнопки с логотипом вк из верхнего-левого угла в контролы около кнопки звука */
233
+ mobileVkLogoViewOnBottomControls: boolean;
225
234
  };
226
235
  /**
227
236
  * Отключает вызов колбэка uiInfo.onPlayerSizeChanged при ресайзе обычного pip
@@ -1,9 +1,11 @@
1
1
  export declare const enum ProcessedKeysCodes {
2
+ Alt = "Alt",
2
3
  ArrowLeft = "ArrowLeft",
3
4
  ArrowUp = "ArrowUp",
4
5
  ArrowRight = "ArrowRight",
5
6
  ArrowDown = "ArrowDown",
6
7
  Comma = "Comma",
8
+ Control = "Control",
7
9
  Period = "Period",
8
10
  Space = "Space",
9
11
  KeyC = "KeyC",
@@ -0,0 +1,31 @@
1
+ import type { IUIConfig } from "../config";
2
+ import type { IVKVideoPlayerConfig } from "../types";
3
+ import type { IStore } from "./index";
4
+ import type { FakeIsPlayingStore, GraphIsOpenedStore, InteractiveControlsOpacityStore, NotificationsStore, PictureInPictureStore, SeekToInteractiveDisabledTooltipStore, ShowInteractiveTimeIndicatorTooltipStore } from "./modules";
5
+ import type { Interactives } from "@vkontakte/videoplayer-interactive";
6
+ export interface ICompositionParams {
7
+ legacyStore: IStore;
8
+ uiConfig: IUIConfig;
9
+ config: IVKVideoPlayerConfig;
10
+ interactiveController: Interactives | undefined;
11
+ }
12
+ export interface ICompositionResult {
13
+ stores: {
14
+ notificationsStore: NotificationsStore;
15
+ pictureInPictureStore: PictureInPictureStore;
16
+ fakeIsPlayingStore: FakeIsPlayingStore;
17
+ seekToInteractiveDisabledTooltipStore: SeekToInteractiveDisabledTooltipStore;
18
+ showInteractiveTimeIndicatorTooltipStore: ShowInteractiveTimeIndicatorTooltipStore;
19
+ graphIsOpenedStore: GraphIsOpenedStore;
20
+ interactiveControlsOpacityStore: InteractiveControlsOpacityStore;
21
+ };
22
+ /** Очистка ресурсов */
23
+ destroy(): void;
24
+ }
25
+ /**
26
+ * Создаёт композицию всех store-модулей
27
+ *
28
+ * @param params - Параметры композиции
29
+ * @returns ICompositionResult
30
+ */
31
+ export declare const createStoreComposition: (params: ICompositionParams) => ICompositionResult;
@@ -1,5 +1,5 @@
1
1
  import type { IStore, IStoreParams } from "./types";
2
- export type { IStore, IAdsState, IUIState } from "./types";
2
+ export type { IStore, IAdsState, IUIState, EnrichedStore } from "./types";
3
3
  /**
4
4
  * Store приложения.
5
5
  * Если будет слишком большим - можно разделить его на модули
@@ -0,0 +1,3 @@
1
+ import { type FakeIsPlayingStore } from "./fakeIsPlayingStore.store";
2
+ import type { Module } from "../utils";
3
+ export declare const fakeIsPlayingModule: Module<FakeIsPlayingStore>;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * FakeIsPlaying Store Module
3
+ *
4
+ * Управляет состоянием fakeIsPlaying для интерактивных видео.
5
+ * Используется для отображения "фейкового" состояния воспроизведения
6
+ * в интерактивных видео во время паузы.
7
+ */
8
+ import type { Subscription } from "@vkontakte/videoplayer-shared";
9
+ import type { Writable } from "svelte/store";
10
+ import type { IStore } from "../../types";
11
+ export type Deps = {
12
+ isInteractiveExpectation$: IStore["state"]["isInteractiveExpectation$"];
13
+ subscription: Subscription;
14
+ };
15
+ export interface FakeIsPlayingStoreState {
16
+ fakeIsPlaying$: Writable<boolean | null>;
17
+ }
18
+ export interface FakeIsPlayingStoreActions {
19
+ /** Переключить состояние */
20
+ toggle(): void;
21
+ }
22
+ export interface FakeIsPlayingStore {
23
+ state: FakeIsPlayingStoreState;
24
+ actions: FakeIsPlayingStoreActions;
25
+ }
26
+ export declare const createFakeIsPlayingStore: (deps: Deps) => FakeIsPlayingStore;
@@ -0,0 +1,3 @@
1
+ import { InjectionToken } from "@vkontakte/videoplayer-shared";
2
+ import type { FakeIsPlayingStore } from "../fakeIsPlayingStore";
3
+ export declare const FAKE_IS_PLAYING_STORE_TOKEN: InjectionToken<FakeIsPlayingStore>;
@@ -0,0 +1,3 @@
1
+ export type { FakeIsPlayingStoreState, FakeIsPlayingStore, FakeIsPlayingStoreActions } from "./fakeIsPlayingStore.store";
2
+ export { fakeIsPlayingModule } from "./fakeIsPlayingStore.module";
3
+ export { FAKE_IS_PLAYING_STORE_TOKEN } from "./fakeIsPlayingStore.token";
@@ -0,0 +1,3 @@
1
+ import { type GraphIsOpenedStore } from "./graphIsOpenedStore.store";
2
+ import type { Module } from "../utils";
3
+ export declare const graphIsOpenedModule: Module<GraphIsOpenedStore>;
@@ -0,0 +1,50 @@
1
+ /**
2
+ * GraphIsOpened Store Module
3
+ *
4
+ * Управляет открытием/закрытием графа интерактивных действий.
5
+ */
6
+ import type { Readable, Writable } from "svelte/store";
7
+ import type { ILogger, Subscription } from "@vkontakte/videoplayer-shared";
8
+ import type { Interactives } from "@vkontakte/videoplayer-interactive";
9
+ import type { PlaybackState } from "@vkontakte/videoplayer-core";
10
+ import type { IDisabledControls } from "../../../types";
11
+ import { GridTypes } from "../../../constans";
12
+ /**
13
+ * Зависимости модуля graphIsOpened
14
+ */
15
+ export interface Deps {
16
+ /** Общий subscription для всех подписок */
17
+ subscription: Subscription;
18
+ /** Логгер */
19
+ logger: ILogger;
20
+ /** Текущий тип сетки */
21
+ currentGridType$: Readable<GridTypes>;
22
+ /** Интерактивный контроллер */
23
+ interactiveController?: Interactives;
24
+ /** Флаг окончания видео */
25
+ isEnded$: Readable<boolean>;
26
+ /** Состояние воспроизведения */
27
+ playbackState$: Readable<PlaybackState | undefined>;
28
+ /** Заблокированные контролы */
29
+ disabledControls$: IDisabledControls;
30
+ /** Экшены воспроизведения */
31
+ playActions: {
32
+ play(): void;
33
+ pause(): void;
34
+ };
35
+ }
36
+ export interface GraphIsOpenedStoreState {
37
+ /** Открыт ли граф */
38
+ graphIsOpened$: Writable<boolean | null>;
39
+ }
40
+ export interface GraphIsOpenedStoreActions {
41
+ /** Переключить состояние графа */
42
+ toggle(): Promise<void>;
43
+ }
44
+ export interface GraphIsOpenedStore {
45
+ /** Состояние */
46
+ state: GraphIsOpenedStoreState;
47
+ /** Экшены */
48
+ actions: GraphIsOpenedStoreActions;
49
+ }
50
+ export declare const createGraphIsOpenedStore: (deps: Deps) => GraphIsOpenedStore;
@@ -0,0 +1,3 @@
1
+ import { InjectionToken } from "@vkontakte/videoplayer-shared";
2
+ import type { GraphIsOpenedStore } from "./graphIsOpenedStore.store";
3
+ export declare const GRAPH_IS_OPENED_STORE_TOKEN: InjectionToken<GraphIsOpenedStore>;
@@ -0,0 +1,3 @@
1
+ export type { GraphIsOpenedStoreState, GraphIsOpenedStore, GraphIsOpenedStoreActions, Deps as GraphIsOpenedStoreDeps } from "./graphIsOpenedStore.store";
2
+ export { graphIsOpenedModule } from "./graphIsOpenedStore.module";
3
+ export { GRAPH_IS_OPENED_STORE_TOKEN } from "./graphIsOpenedStore.token";
@@ -0,0 +1,18 @@
1
+ export { SUBSCRIPTION_TOKEN, PLAYER_TOKEN, LOGGER_TOKEN, UI_CONFIG_TOKEN, PLAYER_CONFIG_TOKEN, LEGACY_STORE_TOKEN, INTERACTIVE_CONTROLLER_TOKEN, registerInfrastructure } from "./infrastructure";
2
+ export type { InfrastructureParams } from "./infrastructure";
3
+ export { registerModules } from "./utils";
4
+ export type { Module } from "./utils";
5
+ export type { FakeIsPlayingStoreState, FakeIsPlayingStore, FakeIsPlayingStoreActions } from "./fakeIsPlayingStore";
6
+ export { fakeIsPlayingModule, FAKE_IS_PLAYING_STORE_TOKEN } from "./fakeIsPlayingStore";
7
+ export type { GraphIsOpenedStoreState, GraphIsOpenedStore, GraphIsOpenedStoreActions, GraphIsOpenedStoreDeps } from "./graphIsOpenedStore";
8
+ export { graphIsOpenedModule, GRAPH_IS_OPENED_STORE_TOKEN } from "./graphIsOpenedStore";
9
+ export type { InteractiveControlsOpacityStoreState, InteractiveControlsOpacityStore, InteractiveControlsOpacityStoreActions, InteractiveControlsOpacityStoreDeps } from "./interactiveControlsOpacityStore";
10
+ export { interactiveControlsOpacityModule, INTERACTIVE_CONTROLS_OPACITY_STORE_TOKEN } from "./interactiveControlsOpacityStore";
11
+ export type { NotificationsStoreState, NotificationsStore, NotificationsStoreActions, NotificationsStoreDeps } from "./notificationsStore";
12
+ export { notificationsModule, NOTIFICATIONS_STORE_TOKEN } from "./notificationsStore";
13
+ export type { PictureInPictureStoreState, PictureInPictureStore, PictureInPictureStoreDeps } from "./pictureInPictureStore";
14
+ export { pictureInPictureModule, PICTURE_IN_PICTURE_STORE_TOKEN } from "./pictureInPictureStore";
15
+ export type { SeekToInteractiveDisabledTooltipStoreState, SeekToInteractiveDisabledTooltipStore, SeekToInteractiveDisabledTooltipStoreDeps } from "./seekToInteractiveDisabledTooltipStore";
16
+ export { seekToInteractiveDisabledTooltipModule, SEEK_TO_INTERACTIVE_DISABLED_TOOLTIP_STORE_TOKEN } from "./seekToInteractiveDisabledTooltipStore";
17
+ export type { ShowInteractiveTimeIndicatorTooltipStoreState, ShowInteractiveTimeIndicatorTooltipStore, ShowInteractiveTimeIndicatorTooltipStoreActions, ShowInteractiveTimeIndicatorTooltipStoreDeps } from "./showInteractiveTimeIndicatorTooltipStore";
18
+ export { showInteractiveTimeIndicatorTooltipModule, SHOW_INTERACTIVE_TIME_INDICATOR_TOOLTIP_STORE_TOKEN } from "./showInteractiveTimeIndicatorTooltipStore";
@@ -0,0 +1,3 @@
1
+ export { SUBSCRIPTION_TOKEN, PLAYER_TOKEN, LOGGER_TOKEN, UI_CONFIG_TOKEN, PLAYER_CONFIG_TOKEN, LEGACY_STORE_TOKEN, INTERACTIVE_CONTROLLER_TOKEN } from "./infrastructure.token";
2
+ export { registerInfrastructure } from "./infrastructure.module";
3
+ export type { InfrastructureParams } from "./infrastructure.module";
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Infrastructure Module
3
+ *
4
+ * Регистрация базовых зависимостей и store-модулей.
5
+ */
6
+ import type { IDIContainer, Subscription } from "@vkontakte/videoplayer-shared";
7
+ import type { IUIConfig } from "../../../config";
8
+ import type { IVKVideoPlayerConfig } from "../../../types";
9
+ import type { IStore } from "../../index";
10
+ import type { Interactives } from "@vkontakte/videoplayer-interactive";
11
+ export interface InfrastructureParams {
12
+ legacyStore: IStore;
13
+ uiConfig: IUIConfig;
14
+ config: IVKVideoPlayerConfig;
15
+ interactiveController: Interactives | undefined;
16
+ subscription: Subscription;
17
+ }
18
+ /**
19
+ * Регистрирует базовые зависимости в DI контейнере
20
+ */
21
+ export declare const registerInfrastructure: (container: IDIContainer, params: InfrastructureParams) => void;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Infrastructure Tokens
3
+ *
4
+ * Core DI токены для базовых зависимостей.
5
+ */
6
+ import { InjectionToken } from "@vkontakte/videoplayer-shared";
7
+ import type { Subscription, ILogger } from "@vkontakte/videoplayer-shared";
8
+ import type { IPlayer } from "@vkontakte/videoplayer-core";
9
+ import type { Interactives } from "@vkontakte/videoplayer-interactive";
10
+ import type { IUIConfig } from "../../../config";
11
+ import type { IVKVideoPlayerConfig } from "../../../types";
12
+ import type { IStore } from "../../index";
13
+ /** Общий subscription для всех rxjs подписок */
14
+ export declare const SUBSCRIPTION_TOKEN: InjectionToken<Subscription>;
15
+ /** Инстанс плеера */
16
+ export declare const PLAYER_TOKEN: InjectionToken<IPlayer>;
17
+ /** Логгер для store */
18
+ export declare const LOGGER_TOKEN: InjectionToken<ILogger>;
19
+ /** Конфигурация ui */
20
+ export declare const UI_CONFIG_TOKEN: InjectionToken<IUIConfig>;
21
+ /** Конфигурация плеера */
22
+ export declare const PLAYER_CONFIG_TOKEN: InjectionToken<IVKVideoPlayerConfig>;
23
+ /** Legacy store (монолитный стор для миграции) */
24
+ export declare const LEGACY_STORE_TOKEN: InjectionToken<IStore>;
25
+ /** Интерактивный контроллер */
26
+ export declare const INTERACTIVE_CONTROLLER_TOKEN: InjectionToken<Interactives | undefined>;
@@ -0,0 +1,3 @@
1
+ export type { InteractiveControlsOpacityStoreState, InteractiveControlsOpacityStore, InteractiveControlsOpacityStoreActions, Deps as InteractiveControlsOpacityStoreDeps } from "./interactiveControlsOpacityStore.store";
2
+ export { interactiveControlsOpacityModule } from "./interactiveControlsOpacityStore.module";
3
+ export { INTERACTIVE_CONTROLS_OPACITY_STORE_TOKEN } from "./interactiveControlsOpacityStore.token";
@@ -0,0 +1,3 @@
1
+ import { type InteractiveControlsOpacityStore } from "./interactiveControlsOpacityStore.store";
2
+ import type { Module } from "../utils";
3
+ export declare const interactiveControlsOpacityModule: Module<InteractiveControlsOpacityStore>;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * InteractiveControlsOpacity Store Module
3
+ *
4
+ * Управляет прозрачностью контролов на мобильных устройствах
5
+ * в интерактивных видео.
6
+ */
7
+ import type { Readable, Writable } from "svelte/store";
8
+ import type { Subscription } from "@vkontakte/videoplayer-shared";
9
+ export interface Deps {
10
+ /** Общий subscription для всех подписок */
11
+ subscription: Subscription;
12
+ /** fakeIsPlaying из FakeIsPlayingStore */
13
+ fakeIsPlaying$: Readable<boolean | null>;
14
+ /** Флаг ожидания интерактивного контента */
15
+ isInteractiveExpectation$: Readable<boolean>;
16
+ /** Флаг воспроизведения */
17
+ isPlaying$: Readable<boolean>;
18
+ /** Флаг видимости контролов */
19
+ controlsVisible$: Readable<boolean>;
20
+ /** Флаг мобильного устройства */
21
+ isMobile$: Readable<boolean>;
22
+ }
23
+ export interface InteractiveControlsOpacityStoreState {
24
+ interactiveControlsOpacity$: Writable<boolean | null>;
25
+ }
26
+ export interface InteractiveControlsOpacityStoreActions {
27
+ /** Переключить состояние */
28
+ toggle(): void;
29
+ }
30
+ export interface InteractiveControlsOpacityStore {
31
+ state: InteractiveControlsOpacityStoreState;
32
+ actions: InteractiveControlsOpacityStoreActions;
33
+ }
34
+ export declare const createInteractiveControlsOpacityStore: (deps: Deps) => InteractiveControlsOpacityStore;
@@ -0,0 +1,3 @@
1
+ import { InjectionToken } from "@vkontakte/videoplayer-shared";
2
+ import type { InteractiveControlsOpacityStore } from "./interactiveControlsOpacityStore.store";
3
+ export declare const INTERACTIVE_CONTROLS_OPACITY_STORE_TOKEN: InjectionToken<InteractiveControlsOpacityStore>;
@@ -0,0 +1,3 @@
1
+ export type { NotificationsStoreState, NotificationsStore, NotificationsStoreActions, Deps as NotificationsStoreDeps } from "./notificationsStore.store";
2
+ export { notificationsModule } from "./notificationsStore.module";
3
+ export { NOTIFICATIONS_STORE_TOKEN } from "./notificationsStore.token";
@@ -0,0 +1,3 @@
1
+ import { type NotificationsStore } from "./notificationsStore.store";
2
+ import type { Module } from "../utils";
3
+ export declare const notificationsModule: Module<NotificationsStore>;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Notifications Store Module
3
+ *
4
+ * Управляет уведомлениями плеера (например, slow_video).
5
+ */
6
+ import type { Writable } from "svelte/store";
7
+ import type { Subscription } from "@vkontakte/videoplayer-shared";
8
+ import type { IPlayer } from "@vkontakte/videoplayer-core";
9
+ import type { NotificationId, VideoQualityUI } from "../../../types";
10
+ import type { IUIConfig } from "../../../config";
11
+ export interface Deps {
12
+ /** Общий subscription для всех подписок */
13
+ subscription: Subscription;
14
+ /** Конфигурация UI */
15
+ config: IUIConfig;
16
+ /** Плеер */
17
+ player: IPlayer;
18
+ /** Установить качество */
19
+ setQuality: (quality: VideoQualityUI) => void;
20
+ }
21
+ export interface NotificationsStoreState {
22
+ notificationsToShow$: Writable<Partial<Record<NotificationId, boolean>>>;
23
+ }
24
+ export interface NotificationsStoreActions {
25
+ showNotification(id: NotificationId): void;
26
+ closeNotification(id: NotificationId): void;
27
+ }
28
+ export interface NotificationsStore {
29
+ /** Состояние */
30
+ state: NotificationsStoreState;
31
+ /** Экшены */
32
+ actions: NotificationsStoreActions;
33
+ }
34
+ export declare const createNotificationsStore: (deps: Deps) => NotificationsStore;
@@ -0,0 +1,3 @@
1
+ import { InjectionToken } from "@vkontakte/videoplayer-shared";
2
+ import type { NotificationsStore } from "./notificationsStore.store";
3
+ export declare const NOTIFICATIONS_STORE_TOKEN: InjectionToken<NotificationsStore>;
@@ -0,0 +1,3 @@
1
+ export type { PictureInPictureStoreState, PictureInPictureStore, Deps as PictureInPictureStoreDeps } from "./pictureInPictureStore.store";
2
+ export { pictureInPictureModule } from "./pictureInPictureStore.module";
3
+ export { PICTURE_IN_PICTURE_STORE_TOKEN } from "./pictureInPictureStore.token";
@@ -0,0 +1,3 @@
1
+ import { type PictureInPictureStore } from "./pictureInPictureStore.store";
2
+ import type { Module } from "../utils";
3
+ export declare const pictureInPictureModule: Module<PictureInPictureStore>;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * PictureInPicture Store Module
3
+ *
4
+ * Управляет состоянием Picture-in-Picture режима.
5
+ */
6
+ import type { Readable } from "svelte/store";
7
+ import { type IPictureInPictureApi, PictureInPictureType } from "../../../types";
8
+ /**
9
+ * Зависимости модуля pictureInPicture
10
+ */
11
+ export interface Deps {
12
+ /** API Picture-in-Picture */
13
+ pictureInPictureApi?: IPictureInPictureApi;
14
+ }
15
+ export interface DpipHiddenFeatures {
16
+ autoplayToggle?: boolean;
17
+ prevNext?: boolean;
18
+ }
19
+ /**
20
+ * Состояние модуля pictureInPicture
21
+ */
22
+ export interface PictureInPictureStoreState {
23
+ isActive$: Readable<boolean>;
24
+ isDpipActive$: Readable<boolean>;
25
+ isEnabled$: Readable<boolean>;
26
+ type$: Readable<PictureInPictureType | undefined>;
27
+ hiddenFeatures$: Readable<DpipHiddenFeatures | undefined>;
28
+ }
29
+ /**
30
+ * Результат создания pictureInPicture store
31
+ */
32
+ export interface PictureInPictureStore {
33
+ /** Состояние */
34
+ state: PictureInPictureStoreState;
35
+ }
36
+ /**
37
+ * Создаёт pictureInPicture store
38
+ *
39
+ * @param deps - Зависимости модуля
40
+ * @returns PictureInPictureStore
41
+ */
42
+ export declare const createPictureInPictureStore: (deps: Deps) => PictureInPictureStore;
@@ -0,0 +1,3 @@
1
+ import { InjectionToken } from "@vkontakte/videoplayer-shared";
2
+ import type { PictureInPictureStore } from "./pictureInPictureStore.store";
3
+ export declare const PICTURE_IN_PICTURE_STORE_TOKEN: InjectionToken<PictureInPictureStore>;
@@ -0,0 +1,3 @@
1
+ export type { SeekToInteractiveDisabledTooltipStoreState, SeekToInteractiveDisabledTooltipStore, Deps as SeekToInteractiveDisabledTooltipStoreDeps } from "./seekToInteractiveDisabledTooltipStore.store";
2
+ export { seekToInteractiveDisabledTooltipModule } from "./seekToInteractiveDisabledTooltipStore.module";
3
+ export { SEEK_TO_INTERACTIVE_DISABLED_TOOLTIP_STORE_TOKEN } from "./seekToInteractiveDisabledTooltipStore.token";
@@ -0,0 +1,3 @@
1
+ import { type SeekToInteractiveDisabledTooltipStore } from "./seekToInteractiveDisabledTooltipStore.store";
2
+ import type { Module } from "../utils";
3
+ export declare const seekToInteractiveDisabledTooltipModule: Module<SeekToInteractiveDisabledTooltipStore>;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * SeekToInteractiveDisabledTooltip Store Module
3
+ *
4
+ * Управляет текстом тултипа для заблокированной перемотки в интерактивных видео.
5
+ */
6
+ import type { Readable, Writable } from "svelte/store";
7
+ import type { Subscription } from "@vkontakte/videoplayer-shared";
8
+ import type { IVideoEpisode } from "../../../types";
9
+ import type { SeekToInteractiveDisabledTooltipKey } from "../../../constans";
10
+ export interface Deps {
11
+ /** Общий subscription для всех подписок */
12
+ subscription: Subscription;
13
+ /** Интерактивные эпизоды */
14
+ interactiveEpisodes$: Readable<IVideoEpisode[]>;
15
+ }
16
+ export interface SeekToInteractiveDisabledTooltipStoreState {
17
+ /** Ключ тултипа */
18
+ seekToInteractiveDisabledTooltip$: Writable<SeekToInteractiveDisabledTooltipKey>;
19
+ }
20
+ /**
21
+ * Результат создания seekToInteractiveDisabledTooltip store
22
+ */
23
+ export interface SeekToInteractiveDisabledTooltipStore {
24
+ state: SeekToInteractiveDisabledTooltipStoreState;
25
+ }
26
+ export declare const createSeekToInteractiveDisabledTooltipStore: (deps: Deps) => SeekToInteractiveDisabledTooltipStore;
@@ -0,0 +1,3 @@
1
+ import { InjectionToken } from "@vkontakte/videoplayer-shared";
2
+ import type { SeekToInteractiveDisabledTooltipStore } from "./seekToInteractiveDisabledTooltipStore.store";
3
+ export declare const SEEK_TO_INTERACTIVE_DISABLED_TOOLTIP_STORE_TOKEN: InjectionToken<SeekToInteractiveDisabledTooltipStore>;
@@ -0,0 +1,3 @@
1
+ export type { ShowInteractiveTimeIndicatorTooltipStoreState, ShowInteractiveTimeIndicatorTooltipStore, ShowInteractiveTimeIndicatorTooltipStoreActions, Deps as ShowInteractiveTimeIndicatorTooltipStoreDeps } from "./showInteractiveTimeIndicatorTooltipStore.store";
2
+ export { showInteractiveTimeIndicatorTooltipModule } from "./showInteractiveTimeIndicatorTooltipStore.module";
3
+ export { SHOW_INTERACTIVE_TIME_INDICATOR_TOOLTIP_STORE_TOKEN } from "./showInteractiveTimeIndicatorTooltipStore.token";
@@ -0,0 +1,3 @@
1
+ import { type ShowInteractiveTimeIndicatorTooltipStore } from "./showInteractiveTimeIndicatorTooltipStore.store";
2
+ import type { Module } from "../utils";
3
+ export declare const showInteractiveTimeIndicatorTooltipModule: Module<ShowInteractiveTimeIndicatorTooltipStore>;