@vkontakte/videoplayer 1.0.8 → 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.
- package/es2015.cjs +20 -0
- package/es2015.esm.js +18 -4
- package/esnext.cjs +20 -0
- package/esnext.esm.js +18 -4
- package/evergreen.esm.js +20 -0
- package/package.json +38 -9
- package/types/VKVideoPlayer/HTMLElement.d.ts +2 -0
- package/types/VKVideoPlayer/defaultConfig.d.ts +5 -0
- package/types/VKVideoPlayer/index.svelte.d.ts +211 -0
- package/types/components/Ads/admanWrapper.d.ts +84 -0
- package/types/components/Ads/types.d.ts +20 -0
- package/types/components/Ads/utils.d.ts +6 -0
- package/types/components/Controls/contants/desktopButtonsLeftIds.d.ts +10 -0
- package/types/components/Controls/contants/desktopButtonsLeftWeights.d.ts +2 -0
- package/types/components/Controls/contants/desktopButtonsRightIds.d.ts +11 -0
- package/types/components/Controls/contants/desktopButtonsRightWeights.d.ts +2 -0
- package/types/components/Controls/types.d.ts +41 -0
- package/types/components/Controls/utils/isInnerButtonGuard.d.ts +2 -0
- package/types/components/Icons/constants.d.ts +8 -0
- package/types/components/Icons/utils.d.ts +2 -0
- package/types/components/Menus/constants/contextMenuItemIds.d.ts +11 -0
- package/types/components/Menus/constants/contextMenuItemWeights.d.ts +2 -0
- package/types/components/Menus/constants/defaultSubMenuMinWidth.d.ts +1 -0
- package/types/components/Menus/constants/index.d.ts +4 -0
- package/types/components/Menus/constants/openSubMenuItemsIds.d.ts +3 -0
- package/types/components/Menus/constants/settingsMenuItemIds.d.ts +11 -0
- package/types/components/Menus/constants/settingsMenuItemWeights.d.ts +2 -0
- package/types/components/Menus/constants/subMenuIds.d.ts +8 -0
- package/types/components/Menus/constants/topOffset.d.ts +1 -0
- package/types/components/Menus/subMenuTabs/rootMenuItems.d.ts +33 -0
- package/types/components/Menus/subMenuTabs/sharedMenuItems.d.ts +17 -0
- package/types/components/Menus/subMenuTabs/subMenuItems.d.ts +7 -0
- package/types/components/Menus/subMenuTabs/types.d.ts +151 -0
- package/types/components/Menus/subMenuTabs/utils.d.ts +3 -0
- package/types/components/Menus/types.d.ts +96 -0
- package/types/components/Menus/utils/constants.d.ts +1 -0
- package/types/components/Menus/utils/getCurrentQualityDisplayValue.d.ts +21 -0
- package/types/components/Menus/utils/getQualityIcon.d.ts +3 -0
- package/types/components/Menus/utils/getSubMenusStack.svelte.d.ts +10 -0
- package/types/components/Menus/utils/menuNavigation.d.ts +20 -0
- package/types/components/Qoe/constants.d.ts +9 -0
- package/types/components/Qoe/utils.d.ts +1 -0
- package/types/components/Root/types.d.ts +47 -0
- package/types/components/Root/utils.d.ts +2 -0
- package/types/components/Timeline/PreviewTrack/useTransitionToPreviewTrack.svelte.d.ts +21 -0
- package/types/components/Timeline/consts.d.ts +4 -0
- package/types/components/Tooltips/TimelinePreview.utils.d.ts +1 -0
- package/types/components/shared/interpolateUtils.d.ts +7 -0
- package/types/config.d.ts +315 -0
- package/types/constans/controls.d.ts +28 -0
- package/types/constans/debounce-timers.d.ts +1 -0
- package/types/constans/grid.d.ts +14 -0
- package/types/constans/index.d.ts +8 -0
- package/types/constans/interactives.d.ts +7 -0
- package/types/constans/keyboard.d.ts +50 -0
- package/types/constans/lang.d.ts +2 -0
- package/types/constans/storage-keys.d.ts +1 -0
- package/types/constans/subtitles.d.ts +1 -0
- package/types/constans/throttle-timers.d.ts +1 -0
- package/types/env.d.ts +2 -0
- package/types/index.d.ts +16 -68
- package/types/services/statistics.d.ts +17 -0
- package/types/store/composition.d.ts +32 -0
- package/types/store/index.d.ts +7 -0
- package/types/store/modules/fakeIsPlayingStore/fakeIsPlayingStore.module.d.ts +3 -0
- package/types/store/modules/fakeIsPlayingStore/fakeIsPlayingStore.store.d.ts +26 -0
- package/types/store/modules/fakeIsPlayingStore/fakeIsPlayingStore.token.d.ts +3 -0
- package/types/store/modules/fakeIsPlayingStore/index.d.ts +3 -0
- package/types/store/modules/graphIsOpenedStore/graphIsOpenedStore.module.d.ts +3 -0
- package/types/store/modules/graphIsOpenedStore/graphIsOpenedStore.store.d.ts +50 -0
- package/types/store/modules/graphIsOpenedStore/graphIsOpenedStore.token.d.ts +3 -0
- package/types/store/modules/graphIsOpenedStore/index.d.ts +3 -0
- package/types/store/modules/index.d.ts +20 -0
- package/types/store/modules/infrastructure/index.d.ts +3 -0
- package/types/store/modules/infrastructure/infrastructure.module.d.ts +21 -0
- package/types/store/modules/infrastructure/infrastructure.token.d.ts +26 -0
- package/types/store/modules/interactiveControlsOpacityStore/index.d.ts +3 -0
- package/types/store/modules/interactiveControlsOpacityStore/interactiveControlsOpacityStore.module.d.ts +3 -0
- package/types/store/modules/interactiveControlsOpacityStore/interactiveControlsOpacityStore.store.d.ts +34 -0
- package/types/store/modules/interactiveControlsOpacityStore/interactiveControlsOpacityStore.token.d.ts +3 -0
- package/types/store/modules/notificationsStore/index.d.ts +3 -0
- package/types/store/modules/notificationsStore/notificationsStore.module.d.ts +3 -0
- package/types/store/modules/notificationsStore/notificationsStore.store.d.ts +34 -0
- package/types/store/modules/notificationsStore/notificationsStore.token.d.ts +3 -0
- package/types/store/modules/pictureInPictureStore/index.d.ts +3 -0
- package/types/store/modules/pictureInPictureStore/pictureInPictureStore.module.d.ts +3 -0
- package/types/store/modules/pictureInPictureStore/pictureInPictureStore.store.d.ts +42 -0
- package/types/store/modules/pictureInPictureStore/pictureInPictureStore.token.d.ts +3 -0
- package/types/store/modules/qoeStore/index.d.ts +3 -0
- package/types/store/modules/qoeStore/qoeStore.module.d.ts +3 -0
- package/types/store/modules/qoeStore/qoeStore.store.d.ts +4 -0
- package/types/store/modules/qoeStore/qoeStore.token.d.ts +3 -0
- package/types/store/modules/qoeStore/types.d.ts +24 -0
- package/types/store/modules/seekToInteractiveDisabledTooltipStore/index.d.ts +3 -0
- package/types/store/modules/seekToInteractiveDisabledTooltipStore/seekToInteractiveDisabledTooltipStore.module.d.ts +3 -0
- package/types/store/modules/seekToInteractiveDisabledTooltipStore/seekToInteractiveDisabledTooltipStore.store.d.ts +26 -0
- package/types/store/modules/seekToInteractiveDisabledTooltipStore/seekToInteractiveDisabledTooltipStore.token.d.ts +3 -0
- package/types/store/modules/showInteractiveTimeIndicatorTooltipStore/index.d.ts +3 -0
- package/types/store/modules/showInteractiveTimeIndicatorTooltipStore/showInteractiveTimeIndicatorTooltipStore.module.d.ts +3 -0
- package/types/store/modules/showInteractiveTimeIndicatorTooltipStore/showInteractiveTimeIndicatorTooltipStore.store.d.ts +44 -0
- package/types/store/modules/showInteractiveTimeIndicatorTooltipStore/showInteractiveTimeIndicatorTooltipStore.token.d.ts +3 -0
- package/types/store/modules/utils.d.ts +6 -0
- package/types/store/types.d.ts +419 -0
- package/types/store/utils.d.ts +53 -0
- package/types/translation/index.d.ts +6 -0
- package/types/translation/labels.d.ts +3 -0
- package/types/translation/packs/en.d.ts +3 -0
- package/types/translation/packs/ru.d.ts +3 -0
- package/types/translation/types.d.ts +8 -0
- package/types/types/ads.d.ts +20 -0
- package/types/types/index.d.ts +634 -0
- package/types/types/qoe.d.ts +59 -0
- package/types/types/svg.d.d.ts +5 -0
- package/types/types/tmp.d.ts +1 -0
- package/types/utils/CaptionsPrepared.d.ts +17 -0
- package/types/utils/WebVttParser.d.ts +19 -0
- package/types/utils/attachments/defferedDisableByCondition.d.ts +4 -0
- package/types/utils/changeVolume.d.ts +9 -0
- package/{utils → types/utils}/clipboard.d.ts +1 -1
- package/{utils → types/utils}/dom.d.ts +3 -2
- package/types/utils/elementHelpers.d.ts +4 -0
- package/types/utils/fetchFile.d.ts +1 -0
- package/types/utils/findCurrentSubtltlePhrase.d.ts +2 -0
- package/{utils → types/utils}/formatSeconds.d.ts +1 -1
- package/types/utils/fullscreen.d.ts +29 -0
- package/types/utils/getActualEpisode.d.ts +10 -0
- package/types/utils/getControlInfo.d.ts +5 -0
- package/types/utils/getHotKeyMapData.d.ts +2 -0
- package/types/utils/grid.d.ts +6 -0
- package/types/utils/hooks/useIosSafariFullscreen.d.ts +6 -0
- package/types/utils/hooks/useIosSafariFullscreenSubtitles.d.ts +7 -0
- package/types/utils/keyboardHandleCases.d.ts +2 -0
- package/types/utils/landscapeUtils.d.ts +1 -0
- package/types/utils/notificationShowManager.d.ts +10 -0
- package/types/utils/roundFps.d.ts +1 -0
- package/types/utils/sanitizeHtml.d.ts +5 -0
- package/types/utils/sorts.d.ts +5 -0
- package/types/utils/stack/index.d.ts +9 -0
- package/types/utils/stack/node.d.ts +5 -0
- package/types/utils/subtitleLanguages.d.ts +3 -0
- package/types/utils/subtitles.d.ts +10 -0
- package/types/utils/timeout.d.ts +4 -0
- package/types/utils/updatePlayerControlBlocks.d.ts +3 -0
- package/types/utils/updatePlayerControlsInfo.d.ts +3 -0
- package/types/utils/userSettings.d.ts +58 -0
- package/types/utils/videoConfig.d.ts +6 -0
- package/types/utils/volumeChange.d.ts +5 -0
- package/types/utils/webAPI/annotationsApi/annotationsApi.d.ts +34 -0
- package/types/utils/webAPI/annotationsApi/errors.d.ts +7 -0
- package/types/utils/webAPI/focusLock.d.ts +34 -0
- package/types/utils/webAPI/focusManager.d.ts +17 -0
- package/types/utils/webAPI/language.d.ts +2 -0
- package/types/utils/webAPI/mediaSessionApi.d.ts +16 -0
- package/types/utils/webAPI/pictureInPictureApi/documentPictureInPictureApi.svelte.d.ts +47 -0
- package/types/utils/webAPI/pictureInPictureApi/factory.d.ts +3 -0
- package/types/utils/webAPI/pictureInPictureApi/index.d.ts +4 -0
- package/types/utils/webAPI/pictureInPictureApi/pictureInPictureApi.d.ts +49 -0
- package/types/utils/webAPI/pictureInPictureApi/types.d.ts +6 -0
- package/types/utils/webAPI/pictureInPictureApi/utils.d.ts +10 -0
- package/types/utils/webAPI/slotsApi.d.ts +53 -0
- package/VKVideoPlayer/index.d.ts +0 -38
- package/components/Ads/admanWrapper.d.ts +0 -71
- package/components/Ads/utils.d.ts +0 -1
- package/constans.d.ts +0 -31
- package/env.d.ts +0 -3
- package/es2015.cjs.js +0 -6
- package/es2018.cjs.js +0 -6
- package/es2018.esm.js +0 -6
- package/esnext.cjs.js +0 -6
- package/index.d.ts +0 -6
- package/store/index.d.ts +0 -110
- package/store/initStatistics.d.ts +0 -5
- package/store/utils.d.ts +0 -27
- package/utils/fullscreen.d.ts +0 -20
- package/utils/isios.d.ts +0 -1
- package/utils/roundFps.d.ts +0 -1
- package/utils/stack/index.d.ts +0 -9
- package/utils/stack/node.d.ts +0 -5
- package/utils/storage.d.ts +0 -5
- package/utils/volume.d.ts +0 -4
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import type { ExactVideoQuality, Seconds, IAppTracerConfig, TracerType } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import type { IOptionalTuningConfig as ICoreConfig } from "@vkontakte/videoplayer-core";
|
|
3
|
+
import { InterfaceLanguage } from "@vkontakte/videoplayer-shared";
|
|
4
|
+
import type { RecursivePartial } from "@vkontakte/videoplayer-shared";
|
|
5
|
+
import type { IOptionalConfig as IStatisticsConfig } from "@vkontakte/videoplayer-statistics";
|
|
6
|
+
import type { Milliseconds } from "@vkontakte/videoplayer-shared";
|
|
7
|
+
import type { Size } from "./types";
|
|
8
|
+
type ForceOrRelay = boolean | undefined;
|
|
9
|
+
export declare enum LogoType {
|
|
10
|
+
VK = "vk",
|
|
11
|
+
VK_VIDEO = "vk_video",
|
|
12
|
+
APP_STORE = "app_store",
|
|
13
|
+
PLAY_MARKET = "play_market",
|
|
14
|
+
VK_VIDEO_MOBILE = "vk_video_mobile"
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Определяет, когда показывать заголовок видео.
|
|
18
|
+
* fullscreen - только в фулскрине(дефолтное поведение)
|
|
19
|
+
* with-controls - показывается везде, когда контролы видны
|
|
20
|
+
* never - не показывать
|
|
21
|
+
* always - показыватьв всегда
|
|
22
|
+
*/
|
|
23
|
+
export type TitleShowBehaviour = "fullscreen" | "fullscreen-and-dpip" | "with-controls" | "never" | "always";
|
|
24
|
+
export interface IDpipConfig {
|
|
25
|
+
initialSize?: Size;
|
|
26
|
+
minimalView?: boolean;
|
|
27
|
+
showPrevNextButtons?: boolean;
|
|
28
|
+
showAutoplayToggle?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface IAdsConfig {
|
|
31
|
+
enable: ForceOrRelay;
|
|
32
|
+
loadTimeout: Milliseconds;
|
|
33
|
+
initTimeout: Milliseconds;
|
|
34
|
+
runtimeTimeout: Milliseconds;
|
|
35
|
+
slot?: number;
|
|
36
|
+
/** @deprecated, Вместо этого используйте paramsOverride: { preview } */
|
|
37
|
+
preview?: number;
|
|
38
|
+
paramsOverride?: Record<string, unknown>;
|
|
39
|
+
isMobileGoToSiteButton: boolean;
|
|
40
|
+
useAdmanFromNPM: boolean;
|
|
41
|
+
volumeMultiplier: number;
|
|
42
|
+
isVsidOriginal: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Включает режим переиспользования видеоэлемента рекламы между инстансами плеера
|
|
45
|
+
* (нужно для передачи разрешений браузера от одного плеера другому, например: стартовать со звуком)
|
|
46
|
+
* (Врядли имеет смысл без такого же включенного флага в настройках ядра)
|
|
47
|
+
*/
|
|
48
|
+
reuseOwnVideoElement: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Бывает, что баннер без звука или не смог с ним стартануть
|
|
51
|
+
* Этот флаг регулирует нужно ли передавать сомтояние мьюта в основной плеер
|
|
52
|
+
*/
|
|
53
|
+
preserveMutedState: boolean;
|
|
54
|
+
stopAdmanOnSwitch: boolean;
|
|
55
|
+
}
|
|
56
|
+
export interface IUIConfig {
|
|
57
|
+
isMobile: ForceOrRelay;
|
|
58
|
+
keepPlayerElement: boolean;
|
|
59
|
+
disableInvisibleComponentsTimeout: Milliseconds;
|
|
60
|
+
debugLog: boolean | {
|
|
61
|
+
tag?: string;
|
|
62
|
+
colors?: string[];
|
|
63
|
+
};
|
|
64
|
+
devNullLog: boolean;
|
|
65
|
+
isSmoothVideoRotate: boolean;
|
|
66
|
+
showSupport: boolean;
|
|
67
|
+
supportLink: string;
|
|
68
|
+
showLogo: ForceOrRelay;
|
|
69
|
+
logoLink: string;
|
|
70
|
+
logoType: LogoType;
|
|
71
|
+
defaultLanguage: InterfaceLanguage;
|
|
72
|
+
downloadVKLanguages: boolean;
|
|
73
|
+
updateBuiltinLanguages: boolean;
|
|
74
|
+
ads: IAdsConfig;
|
|
75
|
+
/**
|
|
76
|
+
* Если нет ранее сохранённого значения громкости будет использовано это
|
|
77
|
+
*/
|
|
78
|
+
volumeDefault: number;
|
|
79
|
+
volumeMinRestore: number;
|
|
80
|
+
loaderDelay: Milliseconds;
|
|
81
|
+
allowChangingFullscreenTarget: boolean;
|
|
82
|
+
minSubtitlesFontSize: number;
|
|
83
|
+
autoSubtitlesTimeout: Milliseconds;
|
|
84
|
+
trafficSavingLimit: ExactVideoQuality;
|
|
85
|
+
highQualityLimit: ExactVideoQuality;
|
|
86
|
+
episodeMinWidthPc: number;
|
|
87
|
+
controls: {
|
|
88
|
+
showOnStartupAtAutoplay: boolean;
|
|
89
|
+
hideTimeout: Milliseconds;
|
|
90
|
+
hideTimeoutMobile: Milliseconds;
|
|
91
|
+
hideTimeoutInitial: Milliseconds;
|
|
92
|
+
hideTimeoutFullscreen: Milliseconds;
|
|
93
|
+
hideTimeoutCursor: Milliseconds;
|
|
94
|
+
hideTimeoutTooltips: Milliseconds;
|
|
95
|
+
collapseMobileUnmute: Milliseconds;
|
|
96
|
+
hide360IconTimeout: Milliseconds;
|
|
97
|
+
volumeBarTimeout: Milliseconds;
|
|
98
|
+
hideHotKeyHelpers: Milliseconds;
|
|
99
|
+
playbackRateMin: number;
|
|
100
|
+
playbackRateMax: number;
|
|
101
|
+
playbackRateStep: number;
|
|
102
|
+
seekStepKeyboard: Milliseconds;
|
|
103
|
+
seekStepMobile: Milliseconds;
|
|
104
|
+
seekStepFrame: Milliseconds;
|
|
105
|
+
volumeStepKeyboard: number;
|
|
106
|
+
volumeStepWheel: number;
|
|
107
|
+
};
|
|
108
|
+
hideThumbTimerAfterTouch: boolean;
|
|
109
|
+
preventPauseOnVideoClick: boolean;
|
|
110
|
+
features: {
|
|
111
|
+
autoplay: boolean;
|
|
112
|
+
statistics: boolean;
|
|
113
|
+
thinStatistics: boolean;
|
|
114
|
+
preload: boolean;
|
|
115
|
+
subtitles: boolean;
|
|
116
|
+
timelinePreview: boolean;
|
|
117
|
+
episodes: boolean;
|
|
118
|
+
fullscreen: boolean;
|
|
119
|
+
mediaSession: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* @deprecated Использовать slotsApi.
|
|
122
|
+
*/
|
|
123
|
+
annotations: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* @deprecated Использовать slotsApi.
|
|
126
|
+
*/
|
|
127
|
+
annotationsInside: boolean;
|
|
128
|
+
slots: boolean;
|
|
129
|
+
download: boolean;
|
|
130
|
+
pip: boolean;
|
|
131
|
+
dpip: boolean | IDpipConfig;
|
|
132
|
+
liveRewind: boolean;
|
|
133
|
+
playbackRate: boolean;
|
|
134
|
+
trafficSaving: boolean;
|
|
135
|
+
episodesClustering: boolean;
|
|
136
|
+
copyVideoLink: boolean;
|
|
137
|
+
videoRotate: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* @deprecated Используйте tracerType
|
|
140
|
+
*/
|
|
141
|
+
tracer: boolean;
|
|
142
|
+
tracerType: TracerType;
|
|
143
|
+
/** Размер буфера для событий трейсера. 0 — буфер не используется */
|
|
144
|
+
tracerEventsBufferSize: number;
|
|
145
|
+
apptracer: IAppTracerConfig;
|
|
146
|
+
interactiveGraph: boolean;
|
|
147
|
+
interactiveResponsiveUi?: boolean;
|
|
148
|
+
seekToInteractive: boolean;
|
|
149
|
+
interactiveLastFrame: boolean;
|
|
150
|
+
interactiveTextPermanent: boolean;
|
|
151
|
+
interactiveHideTime: boolean;
|
|
152
|
+
interactivePlayPrevChapter: boolean;
|
|
153
|
+
interactiveTimeIndicator: boolean;
|
|
154
|
+
interactiveTimeOpenUri: boolean;
|
|
155
|
+
interactiveAreaControlShadow: boolean;
|
|
156
|
+
interactiveControlsExpectTimeBlinkAnimation: boolean;
|
|
157
|
+
interactiveControlsTapPlace: boolean;
|
|
158
|
+
interactiveControlsFillAnimation: boolean;
|
|
159
|
+
interactiveControlsHideAnimation: boolean;
|
|
160
|
+
interactiveHistoryEndChapterFix: boolean;
|
|
161
|
+
thumbTimer: boolean;
|
|
162
|
+
hotKeyMapModal: boolean;
|
|
163
|
+
hotKeyHelpers: boolean;
|
|
164
|
+
saveDebugInfoToFile: boolean;
|
|
165
|
+
additionalButtons: boolean;
|
|
166
|
+
additionalButtonsDesktopControlPanelRight: boolean;
|
|
167
|
+
additionalSettingsMenuItems: boolean;
|
|
168
|
+
additionalContextMenuItems: boolean;
|
|
169
|
+
contextMenuButton: boolean;
|
|
170
|
+
audioLanguages: boolean;
|
|
171
|
+
saveRate: boolean;
|
|
172
|
+
fullscreenInternalTargetPlayerContainer: boolean;
|
|
173
|
+
endScreen: boolean;
|
|
174
|
+
autoplayNext: boolean;
|
|
175
|
+
nextPrevButtons: boolean;
|
|
176
|
+
previewNoEmptySpace: boolean;
|
|
177
|
+
exposeInternalsToGlobal: boolean;
|
|
178
|
+
qualityDetailsSubMenuEnabled: boolean;
|
|
179
|
+
forceAutoQualityWhenSevereStallHappens: boolean;
|
|
180
|
+
showSlowVideoNotification: boolean;
|
|
181
|
+
maxCountShowSlowVideoNotification: number;
|
|
182
|
+
timeoutShowSlowVideoNotification: number;
|
|
183
|
+
forcePlayerDisplayBlock: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Отображать ли анимацию смены статуса проигрывания.
|
|
186
|
+
*/
|
|
187
|
+
playbackStatusShow: boolean;
|
|
188
|
+
/**
|
|
189
|
+
* Отображать ли анимацию при переключении видео на следующее или предыдущее.
|
|
190
|
+
*/
|
|
191
|
+
playbackStatusNextVideoShow: boolean;
|
|
192
|
+
/**
|
|
193
|
+
* Включает ранее выбранный язык субтитров при запуске видео
|
|
194
|
+
*/
|
|
195
|
+
initSubtitles: boolean;
|
|
196
|
+
/**
|
|
197
|
+
* При запуске предыдущего/следующего видео из MediaSession
|
|
198
|
+
* вместо переключения на видео из конфига будут вызываться соответствубщие колбэки
|
|
199
|
+
*/
|
|
200
|
+
useCallbackForMediaSessionNextPrevClick: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* Фикс производительности отрисовки.
|
|
203
|
+
*/
|
|
204
|
+
usePerformanceFix: boolean;
|
|
205
|
+
/**
|
|
206
|
+
* Включает восстановление выбранных настроек видео,
|
|
207
|
+
* например, звуковой дорожки и субтитров
|
|
208
|
+
*/
|
|
209
|
+
userVideoPrefs: boolean;
|
|
210
|
+
/**
|
|
211
|
+
* сохраняет выбранные состояния плеера в localStorage только от user actions
|
|
212
|
+
*/
|
|
213
|
+
savePreferredStatesOnUserActionOnly: boolean;
|
|
214
|
+
/**
|
|
215
|
+
* Если включен то за зацикливание одного видео будет отвечать флаг loop
|
|
216
|
+
*/
|
|
217
|
+
useLoopSetting: boolean;
|
|
218
|
+
doubleForwardAvailable: boolean;
|
|
219
|
+
/**
|
|
220
|
+
* Включает возможность точной перемотки.
|
|
221
|
+
*/
|
|
222
|
+
useRichSeek: boolean;
|
|
223
|
+
/**
|
|
224
|
+
* Выключает показ thumb перед запуском видео, если включен autoplay
|
|
225
|
+
*/
|
|
226
|
+
disableThumbUnstartedOnAutoplay: boolean;
|
|
227
|
+
/**
|
|
228
|
+
* При наведение на зону таймлайна таймлайн приподнимается от границ окна плеера.
|
|
229
|
+
*/
|
|
230
|
+
usePreviewTimelineWithHovering: boolean;
|
|
231
|
+
/** добавляет перехват кликов (`event.stopPropagation()`) на уровне Root компонента плеера */
|
|
232
|
+
rootStopPropagation: boolean;
|
|
233
|
+
/** расширяет высоту под-меню настроек в мобильной версии */
|
|
234
|
+
mobileSubMenuStretchHeight: boolean;
|
|
235
|
+
/** перенос кнопки с логотипом вк из верхнего-левого угла в контролы около кнопки звука */
|
|
236
|
+
mobileVkLogoViewOnBottomControls: boolean;
|
|
237
|
+
/** включить выбор аудиодорожки, по умолчанию, первую из списка в adaptation set. */
|
|
238
|
+
chooseFirstAudioStreamFromAdaptationSet: boolean;
|
|
239
|
+
/** показывает подписи с типом звуковой дорожки, например, "Объемный звук 5.1" */
|
|
240
|
+
audioChannelConfiguration: boolean;
|
|
241
|
+
/**
|
|
242
|
+
* Используем ли стратегию, что если callback слушатель RecoveryError не передан, то отключаем recovery флоу.
|
|
243
|
+
*/
|
|
244
|
+
canProviderHandleNetworkRecoverableError: boolean;
|
|
245
|
+
};
|
|
246
|
+
/**
|
|
247
|
+
* Отключает вызов колбэка uiInfo.onPlayerSizeChanged при ресайзе обычного pip
|
|
248
|
+
*/
|
|
249
|
+
disablePiPResizeHandling: boolean;
|
|
250
|
+
interactive: {
|
|
251
|
+
historyMaxLength: number;
|
|
252
|
+
noInteractionEventTimeout: number;
|
|
253
|
+
};
|
|
254
|
+
view: {
|
|
255
|
+
timelineSliderColor: string | null;
|
|
256
|
+
timelineSliderHandleColor: string | null;
|
|
257
|
+
timelineSliderFilledColor: string | null;
|
|
258
|
+
timelineSliderLoadedColor: string | null;
|
|
259
|
+
volumeSliderColor: string | null;
|
|
260
|
+
volumeSliderHandleColor: string | null;
|
|
261
|
+
volumeSliderFilledColor: string | null;
|
|
262
|
+
controlsTimeColor: string | null;
|
|
263
|
+
timelineSliderHandleActiveLiveColor: string | null;
|
|
264
|
+
timelineSliderFilledActiveLiveColor: string | null;
|
|
265
|
+
buttonColor: string | null;
|
|
266
|
+
buttonToggleOnColor: string | null;
|
|
267
|
+
focusedColor: string | null;
|
|
268
|
+
font: string | null;
|
|
269
|
+
focusedOutlineWidth: string | null;
|
|
270
|
+
focusedOutlineRadius: string | null;
|
|
271
|
+
controlsDesktopPaddingHorizontal: string | null;
|
|
272
|
+
controlsDesktopPaddingHorizontalMinimalView: string | null;
|
|
273
|
+
timelinePaddingHorizontal: string | null;
|
|
274
|
+
settingsBackgroundColor: string | null;
|
|
275
|
+
controlsGradientHeight: string | null;
|
|
276
|
+
controlsGradient: string | null;
|
|
277
|
+
};
|
|
278
|
+
/** уникальный идентификатор пользователя для сохранения настроек */
|
|
279
|
+
userSalt: string;
|
|
280
|
+
/**
|
|
281
|
+
* Время, которое нужно зажимать горячую клавишу, чтобы включилось х2 ускорение.
|
|
282
|
+
*/
|
|
283
|
+
doubleForwardActivationTime: number;
|
|
284
|
+
playbackStatusAnimationDuration: number;
|
|
285
|
+
/**
|
|
286
|
+
* Продолжительность анимации для переключения видео.
|
|
287
|
+
*/
|
|
288
|
+
playbackStatusNextVideoAnimationDuration: number;
|
|
289
|
+
/**
|
|
290
|
+
* Определяет подходящую длительность видео, после которой можно использовать точную перемотку.
|
|
291
|
+
* Передаются секунды.
|
|
292
|
+
*/
|
|
293
|
+
suitableDurationForUsingRichSeek: Seconds;
|
|
294
|
+
titleShowBehaviour: TitleShowBehaviour;
|
|
295
|
+
/**
|
|
296
|
+
* Отключаем слоты по идентификаторам.
|
|
297
|
+
*/
|
|
298
|
+
disabledSlotIds: string[];
|
|
299
|
+
/**
|
|
300
|
+
* Отключаем внешне переданные кнопки по идентификаторам.
|
|
301
|
+
*/
|
|
302
|
+
disabledAdditionalButtonIds: string[];
|
|
303
|
+
}
|
|
304
|
+
export declare const defaultConfig: IUIConfig;
|
|
305
|
+
export type IOptionalUIConfig = RecursivePartial<IUIConfig>;
|
|
306
|
+
export declare const fillDefault: (partial: IOptionalUIConfig) => IUIConfig;
|
|
307
|
+
export interface ISDKConfig {
|
|
308
|
+
ui: RecursivePartial<IUIConfig>;
|
|
309
|
+
core: ICoreConfig;
|
|
310
|
+
statistics: IStatisticsConfig;
|
|
311
|
+
meta?: string[];
|
|
312
|
+
}
|
|
313
|
+
export declare const setConfig: (config: IUIConfig) => IUIConfig;
|
|
314
|
+
export declare const getConfig: () => IUIConfig;
|
|
315
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare enum Controls {
|
|
2
|
+
PLAY_BUTTON = "PLAY_BUTTON",
|
|
3
|
+
REPLAY_BUTTON = "REPLAY_BUTTON",
|
|
4
|
+
NEXT_BUTTON = "NEXT_BUTTON",
|
|
5
|
+
PREV_BUTTON = "PREV_BUTTON",
|
|
6
|
+
PICTURE_IN_PICTURE = "PICTURE_IN_PICTURE",
|
|
7
|
+
FULLSCREEN_BUTTON = "FULLSCREEN_BUTTON",
|
|
8
|
+
SETTINGS_BUTTON = "SETTINGS_BUTTON",
|
|
9
|
+
LIVE_BUTTON = "LIVE_BUTTON",
|
|
10
|
+
GRAPH_BUTTON = "GRAPH_BUTTON",
|
|
11
|
+
PLAY_PREV_CHAPTER_BUTTON = "PLAY_PREV_CHAPTER_BUTTON",
|
|
12
|
+
SEEK_TO_INTERACTIVE_BUTTON = "SEEK_TO_INTERACTIVE_BUTTON",
|
|
13
|
+
TIMELINE = "TIMELINE",
|
|
14
|
+
VOLUME_BAR = "VOLUME_BAR",
|
|
15
|
+
MUTE_BUTTON = "MUTE_BUTTON",
|
|
16
|
+
SUBTITLES_BUTTON = "SUBTITLES_BUTTON",
|
|
17
|
+
CHROMECAST_BUTTON = "CHROMECAST_BUTTON",
|
|
18
|
+
VK_BUTTON = "VK_BUTTON",
|
|
19
|
+
EPISODE_BUTTON = "EPISODE_BUTTON",
|
|
20
|
+
INCREMENT_PLAYBACK_RATE = "INCREMENT_PLAYBACK_RATE",
|
|
21
|
+
DECREMENT_PLAYBACK_RATE = "DECREMENT_PLAYBACK_RATE",
|
|
22
|
+
AUTOPLAY_NEXT_TOGGLE = "AUTOPLAY_NEXT_TOGGLE"
|
|
23
|
+
}
|
|
24
|
+
export declare const PLAYER_CONTROLS_HEIGHT = 40;
|
|
25
|
+
export declare const PLAYER_CONTROLS_DESKTOP_MARGIN_LEFT_ELEMENTS = 4;
|
|
26
|
+
export declare const PLAYER_CONTROLS_TRANSITION_TIMEOUT_MS = 260;
|
|
27
|
+
export declare const PLAYER_CONTROLS_DESKTOP_EPISODES_COUNT_WIDTH = 60;
|
|
28
|
+
export declare const PLAYER_WRAPPER_PADDING = 8;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PLAYER_MENU_RENDER_TIMEOUT = 100;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Controls } from "./controls";
|
|
2
|
+
import type { Key } from "../translation/types";
|
|
3
|
+
export declare const InteractiveActionDisabledControls: Controls[];
|
|
4
|
+
export declare const OpenedGraphDisabledControls: Controls[];
|
|
5
|
+
export declare const ActionChoiceDisabledControls: Controls[];
|
|
6
|
+
export type PlayPrevChapterDisabledTooltipKey = Extract<Key, "tooltip_interactive_go_back_disabled" | "tooltip_interactive_go_back_disabled_first" | "tooltip_interactive_go_back_disabled_limit">;
|
|
7
|
+
export type SeekToInteractiveDisabledTooltipKey = Extract<Key, "tooltip_chapter_without_interactive" | "tooltip_interactive_of_chapter_completed" | "tooltip_disabled_when_interactive">;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare const enum ProcessedKeysCodes {
|
|
2
|
+
Alt = "Alt",
|
|
3
|
+
ArrowLeft = "ArrowLeft",
|
|
4
|
+
ArrowUp = "ArrowUp",
|
|
5
|
+
ArrowRight = "ArrowRight",
|
|
6
|
+
ArrowDown = "ArrowDown",
|
|
7
|
+
Comma = "Comma",
|
|
8
|
+
Control = "Control",
|
|
9
|
+
Period = "Period",
|
|
10
|
+
Space = "Space",
|
|
11
|
+
KeyC = "KeyC",
|
|
12
|
+
KeyF = "KeyF",
|
|
13
|
+
KeyI = "KeyI",
|
|
14
|
+
KeyJ = "KeyJ",
|
|
15
|
+
KeyK = "KeyK",
|
|
16
|
+
KeyL = "KeyL",
|
|
17
|
+
KeyM = "KeyM",
|
|
18
|
+
KeyN = "KeyN",
|
|
19
|
+
KeyP = "KeyP",
|
|
20
|
+
Digit1 = "Digit1",
|
|
21
|
+
Digit2 = "Digit2",
|
|
22
|
+
Digit3 = "Digit3",
|
|
23
|
+
Digit4 = "Digit4",
|
|
24
|
+
Digit5 = "Digit5",
|
|
25
|
+
Digit6 = "Digit6",
|
|
26
|
+
Digit7 = "Digit7",
|
|
27
|
+
Digit8 = "Digit8",
|
|
28
|
+
Digit9 = "Digit9",
|
|
29
|
+
Digit0 = "Digit0",
|
|
30
|
+
Numpad1 = "Numpad1",
|
|
31
|
+
Numpad2 = "Numpad2",
|
|
32
|
+
Numpad3 = "Numpad3",
|
|
33
|
+
Numpad4 = "Numpad4",
|
|
34
|
+
Numpad5 = "Numpad5",
|
|
35
|
+
Numpad6 = "Numpad6",
|
|
36
|
+
Numpad7 = "Numpad7",
|
|
37
|
+
Numpad8 = "Numpad8",
|
|
38
|
+
Numpad9 = "Numpad9",
|
|
39
|
+
Numpad0 = "Numpad0",
|
|
40
|
+
ShiftLeft = "ShiftLeft",
|
|
41
|
+
ShiftRight = "ShiftRight",
|
|
42
|
+
Slash = "Slash",
|
|
43
|
+
Tab = "Tab",
|
|
44
|
+
Escape = "Escape",
|
|
45
|
+
Enter = "Enter"
|
|
46
|
+
}
|
|
47
|
+
export declare const processedKeysCodesToKeyLabelMap: Record<string, string>;
|
|
48
|
+
export declare const seekKeys: Set<ProcessedKeysCodes>;
|
|
49
|
+
export declare const menuNavigationKeys: Set<ProcessedKeysCodes>;
|
|
50
|
+
export declare const doNotCloseMenuKeys: Set<ProcessedKeysCodes>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DEBUG_PANEL_OPENED_STORAGE_KEY = "vk_player_debug_panel_opened";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SUBTITLE_OFF_VALUE = "off";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PLAYER_RESIZE_THROTTLE_TIME = 300;
|
package/types/env.d.ts
ADDED
package/types/index.d.ts
CHANGED
|
@@ -1,68 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
onUnmute?: () => void;
|
|
18
|
-
onTimeupdate?: (duration: number, position: number) => void;
|
|
19
|
-
onSeek?: (from: number, to: number) => void;
|
|
20
|
-
}
|
|
21
|
-
export declare type AdsParams = Record<string, any>;
|
|
22
|
-
export interface IVideoData {
|
|
23
|
-
sources: ISources;
|
|
24
|
-
title: string;
|
|
25
|
-
thumbUrl: string;
|
|
26
|
-
unitedVideoId: number;
|
|
27
|
-
duration: number;
|
|
28
|
-
adsParams?: AdsParams;
|
|
29
|
-
}
|
|
30
|
-
export interface IVKVideoPlayerConfig {
|
|
31
|
-
videos: IVideoData[];
|
|
32
|
-
albumId?: string;
|
|
33
|
-
statPlace?: string;
|
|
34
|
-
autoplay?: boolean;
|
|
35
|
-
repeat?: boolean;
|
|
36
|
-
volume?: number;
|
|
37
|
-
muted?: boolean;
|
|
38
|
-
fromTime?: number;
|
|
39
|
-
canRewindLive?: boolean;
|
|
40
|
-
supportLink?: string;
|
|
41
|
-
showAds?: boolean;
|
|
42
|
-
adsSlotId?: number;
|
|
43
|
-
adsParams?: AdsParams;
|
|
44
|
-
adsPreviewParam?: number;
|
|
45
|
-
logoClickable?: boolean;
|
|
46
|
-
isMobile?: boolean;
|
|
47
|
-
callbacks?: IVKVideoPlayerCallbacks;
|
|
48
|
-
}
|
|
49
|
-
export declare const enum PlayerPhase {
|
|
50
|
-
Thumb = "thumb",
|
|
51
|
-
Video = "video",
|
|
52
|
-
Ads = "ads"
|
|
53
|
-
}
|
|
54
|
-
export declare const enum AdsSection {
|
|
55
|
-
Preroll = "preroll",
|
|
56
|
-
Midroll = "midroll",
|
|
57
|
-
Postroll = "postroll"
|
|
58
|
-
}
|
|
59
|
-
export declare const enum AdsPlaybackState {
|
|
60
|
-
INACTIVE = "inactive",
|
|
61
|
-
PLAYING = "playing",
|
|
62
|
-
PAUSED = "paused"
|
|
63
|
-
}
|
|
64
|
-
export declare type VideoQualityForRender = {
|
|
65
|
-
value: VideoQualityUI;
|
|
66
|
-
displayValue: string;
|
|
67
|
-
selected: boolean;
|
|
68
|
-
};
|
|
1
|
+
import { VKVideoPlayer } from "./VKVideoPlayer/index.svelte";
|
|
2
|
+
import type { AdsParams, IAdmanInitParamsExternalApi, IVKVideoPlayerConfig, IUpdatableVKVideoPlayerConfig, IControlInfo, ITimelinePreviewThumbsData, IUpcomingLiveViewControlInfo, IVKVideoPlayerCallbacks, IVideoData, HotKeyMapData, HotKeyMapItem, HotKeyMapGroup, IVideoLive, IInteractiveData, AdditionalButtonDeprecated, IVideoEpisode, IQoeConfig, IQoePoll, IQoeResult, IQoeQuestion, IQoeCallbacks, QoePollTranslations, VideoPlayerView } from "./types";
|
|
3
|
+
import type { LanguagePack, LanguageConfig } from "./translation/types";
|
|
4
|
+
import type { LogoType as VKLogoType, IAdsConfig, ISDKConfig, IDpipConfig } from "./config";
|
|
5
|
+
import type { ISources, IDashSource, URLSource, RawSource, URLSourceWithSeek } from "@vkontakte/videoplayer-core";
|
|
6
|
+
import type { Milliseconds, QualityLimits } from "@vkontakte/videoplayer-shared";
|
|
7
|
+
export { VERSION } from "./env";
|
|
8
|
+
export declare const registerPlayerWebComponent: () => void;
|
|
9
|
+
export { type AdditionalSettingsMenuItem, MenuItemType, type AdditionalClickSettingsMenuItem, type AdditionalSwitchSettingsMenuItem, type AdditionalContextMenuItem } from "./components/Menus/subMenuTabs/types";
|
|
10
|
+
export { type AdditionalButton, ControlButtonType } from "./components/Controls/types";
|
|
11
|
+
export type { VKVideoPlayer, IVKVideoPlayerConfig, IUpdatableVKVideoPlayerConfig, IControlInfo, ITimelinePreviewThumbsData, IUpcomingLiveViewControlInfo, IVKVideoPlayerCallbacks, IVideoData, AdsParams, HotKeyMapData, HotKeyMapItem, HotKeyMapGroup, ISources, IDashSource, URLSource, RawSource, URLSourceWithSeek, LanguagePack, LanguageConfig, Milliseconds, IVideoLive, IInteractiveData, AdditionalButtonDeprecated, QualityLimits, IAdsConfig, IVideoEpisode, IDpipConfig, IQoeConfig, IQoePoll, IQoeResult, IQoeQuestion, IQoeCallbacks, QoePollTranslations, ISDKConfig, VideoPlayerView, IAdmanInitParamsExternalApi, VKLogoType };
|
|
12
|
+
export { GridTypes } from "./constans";
|
|
13
|
+
export { PlayerPhase } from "./types";
|
|
14
|
+
export { isPiPSupported, isDpipSupported } from "./utils/webAPI/pictureInPictureApi";
|
|
15
|
+
export { InterfaceLanguage, VKNumericLanguage, loadVKLangPack } from "@vkontakte/videoplayer-shared";
|
|
16
|
+
export { VideoQuality, VideoFormat } from "@vkontakte/videoplayer-core";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ISubscription } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import { type IOneStat, type ThinOneStat, type IMediascopePixel } from "@vkontakte/videoplayer-statistics";
|
|
3
|
+
export interface IUIStatistics {
|
|
4
|
+
statSubscription: ISubscription;
|
|
5
|
+
oneStat?: IOneStat;
|
|
6
|
+
thinOneStat?: ThinOneStat.IThinOneStat;
|
|
7
|
+
mediascopePixel?: IMediascopePixel;
|
|
8
|
+
destroy: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare class UIOneStat implements IUIStatistics {
|
|
11
|
+
oneStat: IOneStat | undefined;
|
|
12
|
+
thinOneStat: ThinOneStat.IThinOneStat | undefined;
|
|
13
|
+
mediascopePixel: IMediascopePixel | undefined;
|
|
14
|
+
statSubscription: ISubscription;
|
|
15
|
+
constructor(oneStat: IOneStat | undefined, thinOneStat: ThinOneStat.IThinOneStat | undefined, mediascopePixel: IMediascopePixel | undefined, statSubscription?: ISubscription);
|
|
16
|
+
destroy(): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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, IQoeStore, 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
|
+
fakeIsPlayingStore: FakeIsPlayingStore;
|
|
15
|
+
graphIsOpenedStore: GraphIsOpenedStore;
|
|
16
|
+
interactiveControlsOpacityStore: InteractiveControlsOpacityStore;
|
|
17
|
+
notificationsStore: NotificationsStore;
|
|
18
|
+
pictureInPictureStore: PictureInPictureStore;
|
|
19
|
+
qoeStore: IQoeStore;
|
|
20
|
+
seekToInteractiveDisabledTooltipStore: SeekToInteractiveDisabledTooltipStore;
|
|
21
|
+
showInteractiveTimeIndicatorTooltipStore: ShowInteractiveTimeIndicatorTooltipStore;
|
|
22
|
+
};
|
|
23
|
+
/** Очистка ресурсов */
|
|
24
|
+
destroy(): void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Создаёт композицию всех store-модулей
|
|
28
|
+
*
|
|
29
|
+
* @param params - Параметры композиции
|
|
30
|
+
* @returns ICompositionResult
|
|
31
|
+
*/
|
|
32
|
+
export declare const createStoreComposition: (params: ICompositionParams) => ICompositionResult;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IStore, IStoreParams } from "./types";
|
|
2
|
+
export type { IStore, IAdsState, IUIState, EnrichedStore } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Store приложения.
|
|
5
|
+
* Если будет слишком большим - можно разделить его на модули
|
|
6
|
+
*/
|
|
7
|
+
export declare const createStore: ({ interfaceLanguage, isCyrillicRelatedInterface, initialVideoId, isTouch, isLiveCatchUpMode, statAuthToken, isAudioDisabled, canDownload, callbacks, webApi, videoEpisodes: initialVideoEpisodes, previewThumbsData: initialPreviewThumbsData, uiConfig, coreConfig, player: playerInstance, disabledControls, isInteractive, interactiveRanges$, isInteractiveTime$, replayInteractive, stopPlayer, hasInteractiveBranches, playPrevChapterDisabledTooltip, additionalButtons, additionalSettingsMenuItems, additionalContextMenuItems, playPrevVideo, playNextVideo, onVideoChanged, looped, getStatisticsService, saveRate, internalsExposure, playerView, playerId, metaConfig, getAppTracer, getAdmanWrapper, logger, adsEnabled }: IStoreParams) => IStore;
|
|
@@ -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;
|