@vkontakte/videoplayer 1.0.9 → 1.0.95-dev.e4134bc49.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 (180) hide show
  1. package/es2015.cjs +20 -0
  2. package/es2015.esm.js +18 -4
  3. package/esnext.cjs +20 -0
  4. package/esnext.esm.js +18 -4
  5. package/evergreen.esm.js +20 -0
  6. package/package.json +38 -9
  7. package/types/VKVideoPlayer/HTMLElement.d.ts +2 -0
  8. package/types/VKVideoPlayer/defaultConfig.d.ts +5 -0
  9. package/types/VKVideoPlayer/index.svelte.d.ts +211 -0
  10. package/types/components/Ads/admanWrapper.d.ts +84 -0
  11. package/types/components/Ads/types.d.ts +20 -0
  12. package/types/components/Ads/utils.d.ts +6 -0
  13. package/types/components/Controls/contants/desktopButtonsLeftIds.d.ts +10 -0
  14. package/types/components/Controls/contants/desktopButtonsLeftWeights.d.ts +2 -0
  15. package/types/components/Controls/contants/desktopButtonsRightIds.d.ts +11 -0
  16. package/types/components/Controls/contants/desktopButtonsRightWeights.d.ts +2 -0
  17. package/types/components/Controls/types.d.ts +41 -0
  18. package/types/components/Controls/utils/isInnerButtonGuard.d.ts +2 -0
  19. package/types/components/Icons/constants.d.ts +8 -0
  20. package/types/components/Icons/utils.d.ts +2 -0
  21. package/types/components/Menus/constants/contextMenuItemIds.d.ts +11 -0
  22. package/types/components/Menus/constants/contextMenuItemWeights.d.ts +2 -0
  23. package/types/components/Menus/constants/defaultSubMenuMinWidth.d.ts +1 -0
  24. package/types/components/Menus/constants/index.d.ts +4 -0
  25. package/types/components/Menus/constants/openSubMenuItemsIds.d.ts +3 -0
  26. package/types/components/Menus/constants/settingsMenuItemIds.d.ts +11 -0
  27. package/types/components/Menus/constants/settingsMenuItemWeights.d.ts +2 -0
  28. package/types/components/Menus/constants/subMenuIds.d.ts +8 -0
  29. package/types/components/Menus/constants/topOffset.d.ts +1 -0
  30. package/types/components/Menus/subMenuTabs/rootMenuItems.d.ts +33 -0
  31. package/types/components/Menus/subMenuTabs/sharedMenuItems.d.ts +17 -0
  32. package/types/components/Menus/subMenuTabs/subMenuItems.d.ts +7 -0
  33. package/types/components/Menus/subMenuTabs/types.d.ts +151 -0
  34. package/types/components/Menus/subMenuTabs/utils.d.ts +3 -0
  35. package/types/components/Menus/types.d.ts +96 -0
  36. package/types/components/Menus/utils/constants.d.ts +1 -0
  37. package/types/components/Menus/utils/getCurrentQualityDisplayValue.d.ts +21 -0
  38. package/types/components/Menus/utils/getQualityIcon.d.ts +3 -0
  39. package/types/components/Menus/utils/getSubMenusStack.svelte.d.ts +10 -0
  40. package/types/components/Menus/utils/menuNavigation.d.ts +20 -0
  41. package/types/components/Qoe/constants.d.ts +9 -0
  42. package/types/components/Qoe/utils.d.ts +1 -0
  43. package/types/components/Root/types.d.ts +47 -0
  44. package/types/components/Root/utils.d.ts +2 -0
  45. package/types/components/Timeline/PreviewTrack/useTransitionToPreviewTrack.svelte.d.ts +21 -0
  46. package/types/components/Timeline/consts.d.ts +4 -0
  47. package/types/components/Tooltips/TimelinePreview.utils.d.ts +1 -0
  48. package/types/components/shared/interpolateUtils.d.ts +7 -0
  49. package/types/config.d.ts +315 -0
  50. package/types/constans/controls.d.ts +28 -0
  51. package/types/constans/debounce-timers.d.ts +1 -0
  52. package/types/constans/grid.d.ts +14 -0
  53. package/types/constans/index.d.ts +8 -0
  54. package/types/constans/interactives.d.ts +7 -0
  55. package/types/constans/keyboard.d.ts +50 -0
  56. package/types/constans/lang.d.ts +2 -0
  57. package/types/constans/storage-keys.d.ts +1 -0
  58. package/types/constans/subtitles.d.ts +1 -0
  59. package/types/constans/throttle-timers.d.ts +1 -0
  60. package/types/env.d.ts +2 -0
  61. package/types/index.d.ts +16 -68
  62. package/types/services/statistics.d.ts +17 -0
  63. package/types/store/composition.d.ts +32 -0
  64. package/types/store/index.d.ts +7 -0
  65. package/types/store/modules/fakeIsPlayingStore/fakeIsPlayingStore.module.d.ts +3 -0
  66. package/types/store/modules/fakeIsPlayingStore/fakeIsPlayingStore.store.d.ts +26 -0
  67. package/types/store/modules/fakeIsPlayingStore/fakeIsPlayingStore.token.d.ts +3 -0
  68. package/types/store/modules/fakeIsPlayingStore/index.d.ts +3 -0
  69. package/types/store/modules/graphIsOpenedStore/graphIsOpenedStore.module.d.ts +3 -0
  70. package/types/store/modules/graphIsOpenedStore/graphIsOpenedStore.store.d.ts +50 -0
  71. package/types/store/modules/graphIsOpenedStore/graphIsOpenedStore.token.d.ts +3 -0
  72. package/types/store/modules/graphIsOpenedStore/index.d.ts +3 -0
  73. package/types/store/modules/index.d.ts +20 -0
  74. package/types/store/modules/infrastructure/index.d.ts +3 -0
  75. package/types/store/modules/infrastructure/infrastructure.module.d.ts +21 -0
  76. package/types/store/modules/infrastructure/infrastructure.token.d.ts +26 -0
  77. package/types/store/modules/interactiveControlsOpacityStore/index.d.ts +3 -0
  78. package/types/store/modules/interactiveControlsOpacityStore/interactiveControlsOpacityStore.module.d.ts +3 -0
  79. package/types/store/modules/interactiveControlsOpacityStore/interactiveControlsOpacityStore.store.d.ts +34 -0
  80. package/types/store/modules/interactiveControlsOpacityStore/interactiveControlsOpacityStore.token.d.ts +3 -0
  81. package/types/store/modules/notificationsStore/index.d.ts +3 -0
  82. package/types/store/modules/notificationsStore/notificationsStore.module.d.ts +3 -0
  83. package/types/store/modules/notificationsStore/notificationsStore.store.d.ts +34 -0
  84. package/types/store/modules/notificationsStore/notificationsStore.token.d.ts +3 -0
  85. package/types/store/modules/pictureInPictureStore/index.d.ts +3 -0
  86. package/types/store/modules/pictureInPictureStore/pictureInPictureStore.module.d.ts +3 -0
  87. package/types/store/modules/pictureInPictureStore/pictureInPictureStore.store.d.ts +42 -0
  88. package/types/store/modules/pictureInPictureStore/pictureInPictureStore.token.d.ts +3 -0
  89. package/types/store/modules/qoeStore/index.d.ts +3 -0
  90. package/types/store/modules/qoeStore/qoeStore.module.d.ts +3 -0
  91. package/types/store/modules/qoeStore/qoeStore.store.d.ts +4 -0
  92. package/types/store/modules/qoeStore/qoeStore.token.d.ts +3 -0
  93. package/types/store/modules/qoeStore/types.d.ts +24 -0
  94. package/types/store/modules/seekToInteractiveDisabledTooltipStore/index.d.ts +3 -0
  95. package/types/store/modules/seekToInteractiveDisabledTooltipStore/seekToInteractiveDisabledTooltipStore.module.d.ts +3 -0
  96. package/types/store/modules/seekToInteractiveDisabledTooltipStore/seekToInteractiveDisabledTooltipStore.store.d.ts +26 -0
  97. package/types/store/modules/seekToInteractiveDisabledTooltipStore/seekToInteractiveDisabledTooltipStore.token.d.ts +3 -0
  98. package/types/store/modules/showInteractiveTimeIndicatorTooltipStore/index.d.ts +3 -0
  99. package/types/store/modules/showInteractiveTimeIndicatorTooltipStore/showInteractiveTimeIndicatorTooltipStore.module.d.ts +3 -0
  100. package/types/store/modules/showInteractiveTimeIndicatorTooltipStore/showInteractiveTimeIndicatorTooltipStore.store.d.ts +44 -0
  101. package/types/store/modules/showInteractiveTimeIndicatorTooltipStore/showInteractiveTimeIndicatorTooltipStore.token.d.ts +3 -0
  102. package/types/store/modules/utils.d.ts +6 -0
  103. package/types/store/types.d.ts +419 -0
  104. package/types/store/utils.d.ts +53 -0
  105. package/types/translation/index.d.ts +6 -0
  106. package/types/translation/labels.d.ts +3 -0
  107. package/types/translation/packs/en.d.ts +3 -0
  108. package/types/translation/packs/ru.d.ts +3 -0
  109. package/types/translation/types.d.ts +8 -0
  110. package/types/types/ads.d.ts +20 -0
  111. package/types/types/index.d.ts +634 -0
  112. package/types/types/qoe.d.ts +59 -0
  113. package/types/types/svg.d.d.ts +5 -0
  114. package/types/types/tmp.d.ts +1 -0
  115. package/types/utils/CaptionsPrepared.d.ts +17 -0
  116. package/types/utils/WebVttParser.d.ts +19 -0
  117. package/types/utils/attachments/defferedDisableByCondition.d.ts +4 -0
  118. package/types/utils/changeVolume.d.ts +9 -0
  119. package/{utils → types/utils}/clipboard.d.ts +1 -1
  120. package/{utils → types/utils}/dom.d.ts +3 -2
  121. package/types/utils/elementHelpers.d.ts +4 -0
  122. package/types/utils/fetchFile.d.ts +1 -0
  123. package/types/utils/findCurrentSubtltlePhrase.d.ts +2 -0
  124. package/{utils → types/utils}/formatSeconds.d.ts +1 -1
  125. package/types/utils/fullscreen.d.ts +29 -0
  126. package/types/utils/getActualEpisode.d.ts +10 -0
  127. package/types/utils/getControlInfo.d.ts +5 -0
  128. package/types/utils/getHotKeyMapData.d.ts +2 -0
  129. package/types/utils/grid.d.ts +6 -0
  130. package/types/utils/hooks/useIosSafariFullscreen.d.ts +6 -0
  131. package/types/utils/hooks/useIosSafariFullscreenSubtitles.d.ts +7 -0
  132. package/types/utils/keyboardHandleCases.d.ts +2 -0
  133. package/types/utils/landscapeUtils.d.ts +1 -0
  134. package/types/utils/notificationShowManager.d.ts +10 -0
  135. package/types/utils/roundFps.d.ts +1 -0
  136. package/types/utils/sanitizeHtml.d.ts +5 -0
  137. package/types/utils/sorts.d.ts +5 -0
  138. package/types/utils/stack/index.d.ts +9 -0
  139. package/types/utils/stack/node.d.ts +5 -0
  140. package/types/utils/subtitleLanguages.d.ts +3 -0
  141. package/types/utils/subtitles.d.ts +10 -0
  142. package/types/utils/timeout.d.ts +4 -0
  143. package/types/utils/updatePlayerControlBlocks.d.ts +3 -0
  144. package/types/utils/updatePlayerControlsInfo.d.ts +3 -0
  145. package/types/utils/userSettings.d.ts +58 -0
  146. package/types/utils/videoConfig.d.ts +6 -0
  147. package/types/utils/volumeChange.d.ts +5 -0
  148. package/types/utils/webAPI/annotationsApi/annotationsApi.d.ts +34 -0
  149. package/types/utils/webAPI/annotationsApi/errors.d.ts +7 -0
  150. package/types/utils/webAPI/focusLock.d.ts +34 -0
  151. package/types/utils/webAPI/focusManager.d.ts +17 -0
  152. package/types/utils/webAPI/language.d.ts +2 -0
  153. package/types/utils/webAPI/mediaSessionApi.d.ts +16 -0
  154. package/types/utils/webAPI/pictureInPictureApi/documentPictureInPictureApi.svelte.d.ts +47 -0
  155. package/types/utils/webAPI/pictureInPictureApi/factory.d.ts +3 -0
  156. package/types/utils/webAPI/pictureInPictureApi/index.d.ts +4 -0
  157. package/types/utils/webAPI/pictureInPictureApi/pictureInPictureApi.d.ts +49 -0
  158. package/types/utils/webAPI/pictureInPictureApi/types.d.ts +6 -0
  159. package/types/utils/webAPI/pictureInPictureApi/utils.d.ts +10 -0
  160. package/types/utils/webAPI/slotsApi.d.ts +53 -0
  161. package/VKVideoPlayer/index.d.ts +0 -38
  162. package/components/Ads/admanWrapper.d.ts +0 -71
  163. package/components/Ads/utils.d.ts +0 -1
  164. package/constans.d.ts +0 -31
  165. package/env.d.ts +0 -3
  166. package/es2015.cjs.js +0 -6
  167. package/es2018.cjs.js +0 -6
  168. package/es2018.esm.js +0 -6
  169. package/esnext.cjs.js +0 -6
  170. package/index.d.ts +0 -6
  171. package/store/index.d.ts +0 -110
  172. package/store/initStatistics.d.ts +0 -5
  173. package/store/utils.d.ts +0 -27
  174. package/utils/fullscreen.d.ts +0 -20
  175. package/utils/isios.d.ts +0 -1
  176. package/utils/roundFps.d.ts +0 -1
  177. package/utils/stack/index.d.ts +0 -9
  178. package/utils/stack/node.d.ts +0 -5
  179. package/utils/storage.d.ts +0 -5
  180. package/utils/volume.d.ts +0 -4
@@ -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,20 @@
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 { QoeStoreActions, QoeStoreState, IQoeStore } from "./qoeStore";
16
+ export { qoeModule, QOE_STORE_TOKEN } from "./qoeStore";
17
+ export type { SeekToInteractiveDisabledTooltipStoreState, SeekToInteractiveDisabledTooltipStore, SeekToInteractiveDisabledTooltipStoreDeps } from "./seekToInteractiveDisabledTooltipStore";
18
+ export { seekToInteractiveDisabledTooltipModule, SEEK_TO_INTERACTIVE_DISABLED_TOOLTIP_STORE_TOKEN } from "./seekToInteractiveDisabledTooltipStore";
19
+ export type { ShowInteractiveTimeIndicatorTooltipStoreState, ShowInteractiveTimeIndicatorTooltipStore, ShowInteractiveTimeIndicatorTooltipStoreActions, ShowInteractiveTimeIndicatorTooltipStoreDeps } from "./showInteractiveTimeIndicatorTooltipStore";
20
+ 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 { QoeStoreActions, QoeStoreState, IQoeStore } from "./types";
2
+ export { qoeModule } from "./qoeStore.module";
3
+ export { QOE_STORE_TOKEN } from "./qoeStore.token";
@@ -0,0 +1,3 @@
1
+ import type { Module } from "../utils";
2
+ import type { IQoeStore } from "./types";
3
+ export declare const qoeModule: Module<IQoeStore>;
@@ -0,0 +1,4 @@
1
+ import type { QoeStoreFactoryDeps } from "../../../types";
2
+ import type { IQoeStore } from "./types";
3
+ export declare const CLOSE_DELAY = 1500;
4
+ export declare const createQoeStore: (deps: QoeStoreFactoryDeps) => IQoeStore;
@@ -0,0 +1,3 @@
1
+ import { InjectionToken } from "@vkontakte/videoplayer-shared";
2
+ import type { IQoeStore } from "./types";
3
+ export declare const QOE_STORE_TOKEN: InjectionToken<IQoeStore>;
@@ -0,0 +1,24 @@
1
+ import type { Readable } from "svelte/store";
2
+ import type { IQoePoll, IQoeAnswer, IQoeQuestion, QoePollTranslationKeys, IQoeResult } from "../../../types";
3
+ export interface QoeStoreState {
4
+ complete$: Readable<boolean>;
5
+ active$: Readable<boolean>;
6
+ poll$: Readable<IQoePoll | undefined>;
7
+ pollResult$: Readable<IQoeResult | undefined>;
8
+ questionIndex$: Readable<number | undefined>;
9
+ }
10
+ export type QoeClosePollReason = "manual" | "auto" | "final";
11
+ export interface QoeStoreActions {
12
+ closePoll: (reason?: QoeClosePollReason) => void;
13
+ completePoll: VoidFunction;
14
+ answerQuestion: (answer: Pick<IQoeAnswer, "numeric" | "text">) => void;
15
+ switchQuestion: (step: 1 | -1) => void;
16
+ startPoll: VoidFunction;
17
+ }
18
+ export interface IQoeStore {
19
+ actions: QoeStoreActions;
20
+ enabled: boolean;
21
+ getTranslation(key: QoePollTranslationKeys): string;
22
+ isQuestionAnswerEditable(question: IQoeQuestion): boolean;
23
+ state: QoeStoreState;
24
+ }
@@ -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>;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * ShowInteractiveTimeIndicatorTooltip Store Module
3
+ *
4
+ * Управляет отображением тултипа для индикатора интерактивного времени.
5
+ */
6
+ import type { Readable, Writable } from "svelte/store";
7
+ import type { Subscription } from "@vkontakte/videoplayer-shared";
8
+ import type { IControlInfo, IVKVideoPlayerConfig } from "../../../types";
9
+ type ShowInteractiveTimeIndicatorTooltipState = Writable<boolean> & {
10
+ set: (newValue: boolean, useTimeout?: boolean) => void;
11
+ clearTimeout: () => void;
12
+ };
13
+ export interface Deps {
14
+ /** Общий subscription для всех подписок */
15
+ subscription: Subscription;
16
+ /** Флаг воспроизведения */
17
+ isPlaying$: Readable<boolean>;
18
+ /** Флаг интерактивного времени */
19
+ isInteractiveTime$: Readable<boolean>;
20
+ /** Информация об индикаторе интерактивного времени */
21
+ interactiveTimeIndicator$: Readable<IControlInfo | undefined>;
22
+ /** Флаг видимости контролов (touched) */
23
+ controlsVisible$: Readable<boolean>;
24
+ /** Конфигурация интерактивных данных */
25
+ interactiveDataConfig?: IVKVideoPlayerConfig["interactiveData"];
26
+ /** Колбэк при деактивации подсказки */
27
+ onInteractiveTimeIndicatorHintDeactivated?: () => void;
28
+ }
29
+ export interface ShowInteractiveTimeIndicatorTooltipStoreState {
30
+ /** Показывать ли тултип */
31
+ showInteractiveTimeIndicatorTooltip$: ShowInteractiveTimeIndicatorTooltipState;
32
+ }
33
+ /**
34
+ * Экшены модуля showInteractiveTimeIndicatorTooltip
35
+ */
36
+ export interface ShowInteractiveTimeIndicatorTooltipStoreActions {
37
+ clearTimeout(): void;
38
+ }
39
+ export interface ShowInteractiveTimeIndicatorTooltipStore {
40
+ state: ShowInteractiveTimeIndicatorTooltipStoreState;
41
+ actions: ShowInteractiveTimeIndicatorTooltipStoreActions;
42
+ }
43
+ export declare const createShowInteractiveTimeIndicatorTooltipStore: (deps: Deps) => ShowInteractiveTimeIndicatorTooltipStore;
44
+ export {};
@@ -0,0 +1,3 @@
1
+ import { InjectionToken } from "@vkontakte/videoplayer-shared";
2
+ import type { ShowInteractiveTimeIndicatorTooltipStore } from "./showInteractiveTimeIndicatorTooltipStore.store";
3
+ export declare const SHOW_INTERACTIVE_TIME_INDICATOR_TOOLTIP_STORE_TOKEN: InjectionToken<ShowInteractiveTimeIndicatorTooltipStore>;
@@ -0,0 +1,6 @@
1
+ import type { IDIContainer, InjectionToken } from "@vkontakte/videoplayer-shared";
2
+ export type Module<T> = {
3
+ token: InjectionToken<T>;
4
+ factory: (container: IDIContainer) => T;
5
+ };
6
+ export declare const registerModules: <T extends any[]>(container: IDIContainer, modules: { [K in keyof T] : Module<T[K]> }) => void;