@vkontakte/videoplayer 1.1.102-dev.a5a2d3fc3.0 → 1.1.102-dev.cb6e2e206.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 +11 -12
- package/es2015.esm.js +11 -12
- package/esnext.cjs +11 -12
- package/esnext.esm.js +12 -13
- package/evergreen.esm.js +12 -13
- package/package.json +5 -5
- package/types/components/Ads/admanWrapper.d.ts +1 -0
- package/types/config.d.ts +4 -3
- package/types/store/composition.d.ts +12 -4
- package/types/store/index.d.ts +1 -1
- package/types/store/modules/index.d.ts +2 -4
- package/types/store/modules/infrastructure/index.d.ts +1 -2
- package/types/store/modules/infrastructure/infrastructure.module.d.ts +12 -3
- package/types/store/modules/infrastructure/infrastructure.token.d.ts +14 -3
- package/types/store/types.d.ts +22 -1
- package/types/store/utils.d.ts +2 -4
- package/types/types/index.d.ts +1 -1
- package/types/store/modules/infrastructure/types.d.ts +0 -19
- package/types/store/modules/settingsStore/index.d.ts +0 -3
- package/types/store/modules/settingsStore/settingsStore.module.d.ts +0 -3
- package/types/store/modules/settingsStore/settingsStore.store.d.ts +0 -44
- package/types/store/modules/settingsStore/settingsStore.token.d.ts +0 -3
- package/types/utils/timers.d.ts +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer",
|
|
3
|
-
"version": "1.1.102-dev.
|
|
3
|
+
"version": "1.1.102-dev.cb6e2e206.0",
|
|
4
4
|
"author": "vk.ru",
|
|
5
5
|
"description": "Videoplayer based on the vk.ru platform",
|
|
6
6
|
"homepage": "https://vk.ru",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@adtech/rbadman": "2.2.57",
|
|
46
|
-
"@vkontakte/videoplayer-core": "2.0.171-dev.
|
|
47
|
-
"@vkontakte/videoplayer-interactive": "1.0.77-dev.
|
|
48
|
-
"@vkontakte/videoplayer-shared": "1.0.100-dev.
|
|
49
|
-
"@vkontakte/videoplayer-statistics": "1.0.117-dev.
|
|
46
|
+
"@vkontakte/videoplayer-core": "2.0.171-dev.cb6e2e206.0",
|
|
47
|
+
"@vkontakte/videoplayer-interactive": "1.0.77-dev.cb6e2e206.0",
|
|
48
|
+
"@vkontakte/videoplayer-shared": "1.0.100-dev.cb6e2e206.0",
|
|
49
|
+
"@vkontakte/videoplayer-statistics": "1.0.117-dev.cb6e2e206.0"
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -57,6 +57,7 @@ export declare class AdmanWrapper {
|
|
|
57
57
|
initAdman(initParams: AdmanInitParams): Promise<void>;
|
|
58
58
|
private switchToVideo;
|
|
59
59
|
private setPostrollPassed;
|
|
60
|
+
private setAdsBlocked;
|
|
60
61
|
togglePlay(): void;
|
|
61
62
|
setInitialVolume(volume: number): void;
|
|
62
63
|
setVolume(volume: number): void;
|
package/types/config.d.ts
CHANGED
|
@@ -160,9 +160,6 @@ export interface IUIConfig {
|
|
|
160
160
|
tracerPausedAtInit: boolean;
|
|
161
161
|
/** Размер буфера для событий трейсера. 0 — буфер не используется */
|
|
162
162
|
tracerEventsBufferSize: number;
|
|
163
|
-
tracerResumeOnFormatSwitch: boolean;
|
|
164
|
-
tracerResumeOnFatalError: boolean;
|
|
165
|
-
tracerSpanOnRecoverableError: boolean;
|
|
166
163
|
apptracer: IAppTracerConfig;
|
|
167
164
|
interactiveGraph: boolean;
|
|
168
165
|
interactiveResponsiveUi?: boolean;
|
|
@@ -219,6 +216,10 @@ export interface IUIConfig {
|
|
|
219
216
|
*/
|
|
220
217
|
useCallbackForMediaSessionNextPrevClick: boolean;
|
|
221
218
|
/**
|
|
219
|
+
* Фикс производительности отрисовки.
|
|
220
|
+
*/
|
|
221
|
+
usePerformanceFix: boolean;
|
|
222
|
+
/**
|
|
222
223
|
* Включает восстановление выбранных настроек видео,
|
|
223
224
|
* например, звуковой дорожки и субтитров
|
|
224
225
|
*/
|
|
@@ -1,9 +1,18 @@
|
|
|
1
|
+
import type { IUIConfig } from "../config";
|
|
2
|
+
import type { IVKVideoPlayerConfig } from "../types";
|
|
3
|
+
import type { IUIStatistics } from "../services/statistics";
|
|
1
4
|
import type { IStore } from "./index";
|
|
2
|
-
import type { FakeIsPlayingStore, GraphIsOpenedStore, HighlightedMenuItemsStore, InteractiveControlsOpacityStore, LanguageStore, NotificationsStore, PictureInPictureStore, IQoeStore, SeekToInteractiveDisabledTooltipStore, ShowInteractiveTimeIndicatorTooltipStore, SubtitlesStore, QualityStore, PlaybackRateStore, AudioVideoStreamsStore
|
|
3
|
-
import type {
|
|
5
|
+
import type { FakeIsPlayingStore, GraphIsOpenedStore, HighlightedMenuItemsStore, InteractiveControlsOpacityStore, LanguageStore, NotificationsStore, PictureInPictureStore, IQoeStore, SeekToInteractiveDisabledTooltipStore, ShowInteractiveTimeIndicatorTooltipStore, SubtitlesStore, QualityStore, PlaybackRateStore, AudioVideoStreamsStore } from "./modules";
|
|
6
|
+
import type { AppTracer, ITracer } from "@vkontakte/videoplayer-shared";
|
|
7
|
+
import type { Interactives } from "@vkontakte/videoplayer-interactive";
|
|
4
8
|
export interface ICompositionParams {
|
|
5
9
|
legacyStore: IStore;
|
|
6
|
-
|
|
10
|
+
uiConfig: IUIConfig;
|
|
11
|
+
config: IVKVideoPlayerConfig;
|
|
12
|
+
interactiveController: Interactives | undefined;
|
|
13
|
+
getStatisticsService: () => IUIStatistics | undefined;
|
|
14
|
+
getAppTracer: () => AppTracer | undefined;
|
|
15
|
+
tracer: ITracer;
|
|
7
16
|
}
|
|
8
17
|
export interface ICompositionResult {
|
|
9
18
|
stores: {
|
|
@@ -21,7 +30,6 @@ export interface ICompositionResult {
|
|
|
21
30
|
qualityStore: QualityStore;
|
|
22
31
|
playbackRateStore: PlaybackRateStore;
|
|
23
32
|
audioVideoStreamsStore: AudioVideoStreamsStore;
|
|
24
|
-
settingsStore: SettingsStore;
|
|
25
33
|
};
|
|
26
34
|
/** Очистка ресурсов */
|
|
27
35
|
destroy(): void;
|
package/types/store/index.d.ts
CHANGED
|
@@ -4,4 +4,4 @@ export type { IStore, IAdsState, IUIState, EnrichedStore } from "./types";
|
|
|
4
4
|
* Store приложения.
|
|
5
5
|
* Если будет слишком большим - можно разделить его на модули
|
|
6
6
|
*/
|
|
7
|
-
export declare const createStore: ({ initialVideoId, isTouch, isLiveCatchUpMode, isAudioDisabled, canDownload, callbacks, webApi, videoEpisodes: initialVideoEpisodes, previewThumbsData: initialPreviewThumbsData, uiConfig, coreConfig, player: playerInstance, disabledControls, isInteractive, interactiveRanges$, isInteractiveTime$, replayInteractive, stopPlayer, hasInteractiveBranches, playPrevChapterDisabledTooltip, additionalButtons, additionalContextMenuItems, playPrevVideo, playNextVideo, onVideoChanged, looped, getStatisticsService, internalsExposure, playerView, playerId, metaConfig, getAppTracer, getAdmanWrapper, logger, adsEnabled, rootTracer, tracer }: IStoreParams) => IStore;
|
|
7
|
+
export declare const createStore: ({ initialVideoId, isTouch, isLiveCatchUpMode, 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, internalsExposure, playerView, playerId, metaConfig, getAppTracer, getAdmanWrapper, logger, adsEnabled, rootTracer, tracer }: IStoreParams) => IStore;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { SUBSCRIPTION_TOKEN, PLAYER_TOKEN, LOGGER_TOKEN, LEGACY_STORE_TOKEN,
|
|
2
|
-
export type { InfrastructureParams
|
|
1
|
+
export { SUBSCRIPTION_TOKEN, PLAYER_TOKEN, LOGGER_TOKEN, UI_CONFIG_TOKEN, PLAYER_CONFIG_TOKEN, LEGACY_STORE_TOKEN, INTERACTIVE_CONTROLLER_TOKEN, GET_STATISTICS_SERVICE_TOKEN, APP_TRACER_TOKEN, registerInfrastructure } from "./infrastructure";
|
|
2
|
+
export type { InfrastructureParams } from "./infrastructure";
|
|
3
3
|
export { registerModules } from "./utils";
|
|
4
4
|
export type { Module } from "./utils";
|
|
5
5
|
export type { FakeIsPlayingStoreState, FakeIsPlayingStore, FakeIsPlayingStoreActions } from "./fakeIsPlayingStore";
|
|
@@ -29,5 +29,3 @@ export type { PlaybackRateStoreDeps, PlaybackRateStoreState, PlaybackRateStoreAc
|
|
|
29
29
|
export { playbackRateModule, PLAYBACK_RATE_STORE_TOKEN } from "./playbackRateStore";
|
|
30
30
|
export type { AudioVideoStreamsStoreDeps, AudioVideoStreamsStoreState, AudioVideoStreamsStoreActions, AudioVideoStreamsStoreExternalActions, AudioVideoStreamsStore } from "./audioVideoStreamsStore";
|
|
31
31
|
export { audioVideoStreamsModule, AUDIO_VIDEO_STREAMS_STORE_TOKEN } from "./audioVideoStreamsStore";
|
|
32
|
-
export type { SettingsStoreDeps, SettingsStoreState, SettingsStoreActions, SettingsStoreExternalActions, SettingsStore } from "./settingsStore";
|
|
33
|
-
export { settingsModule, SETTINGS_STORE_TOKEN } from "./settingsStore";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { SUBSCRIPTION_TOKEN, PLAYER_TOKEN, LOGGER_TOKEN, LEGACY_STORE_TOKEN,
|
|
1
|
+
export { SUBSCRIPTION_TOKEN, PLAYER_TOKEN, LOGGER_TOKEN, UI_CONFIG_TOKEN, PLAYER_CONFIG_TOKEN, LEGACY_STORE_TOKEN, INTERACTIVE_CONTROLLER_TOKEN, TRACER_STORE_TOKEN, GET_STATISTICS_SERVICE_TOKEN, APP_TRACER_TOKEN } from "./infrastructure.token";
|
|
2
2
|
export { registerInfrastructure } from "./infrastructure.module";
|
|
3
3
|
export type { InfrastructureParams } from "./infrastructure.module";
|
|
4
|
-
export type { IStoreContext } from "./types";
|
|
@@ -3,13 +3,22 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Регистрация базовых зависимостей и store-модулей.
|
|
5
5
|
*/
|
|
6
|
-
import type { IDIContainer, Subscription } from "@vkontakte/videoplayer-shared";
|
|
6
|
+
import type { IDIContainer, Subscription, AppTracer } from "@vkontakte/videoplayer-shared";
|
|
7
|
+
import type { IUIConfig } from "../../../config";
|
|
8
|
+
import type { IVKVideoPlayerConfig } from "../../../types";
|
|
7
9
|
import type { IStore } from "../../index";
|
|
8
|
-
import type {
|
|
10
|
+
import type { Interactives } from "@vkontakte/videoplayer-interactive";
|
|
11
|
+
import type { IUIStatistics } from "../../../services/statistics";
|
|
12
|
+
import type { ITracer } from "@vkontakte/videoplayer-shared";
|
|
9
13
|
export interface InfrastructureParams {
|
|
10
14
|
legacyStore: IStore;
|
|
15
|
+
uiConfig: IUIConfig;
|
|
16
|
+
config: IVKVideoPlayerConfig;
|
|
17
|
+
interactiveController: Interactives | undefined;
|
|
11
18
|
subscription: Subscription;
|
|
12
|
-
|
|
19
|
+
tracer: ITracer;
|
|
20
|
+
getStatisticsService: () => IUIStatistics | undefined;
|
|
21
|
+
getAppTracer: () => AppTracer | undefined;
|
|
13
22
|
}
|
|
14
23
|
/**
|
|
15
24
|
* Регистрирует базовые зависимости в DI контейнере
|
|
@@ -4,16 +4,27 @@
|
|
|
4
4
|
* Core DI токены для базовых зависимостей.
|
|
5
5
|
*/
|
|
6
6
|
import { InjectionToken } from "@vkontakte/videoplayer-shared";
|
|
7
|
-
import type { Subscription, ILogger } from "@vkontakte/videoplayer-shared";
|
|
7
|
+
import type { Subscription, ILogger, ITracer, AppTracer } from "@vkontakte/videoplayer-shared";
|
|
8
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";
|
|
9
12
|
import type { IStore } from "../../index";
|
|
10
|
-
import type {
|
|
13
|
+
import type { IUIStatistics } from "../../../services/statistics";
|
|
11
14
|
/** Общий subscription для всех rxjs подписок */
|
|
12
15
|
export declare const SUBSCRIPTION_TOKEN: InjectionToken<Subscription>;
|
|
13
16
|
/** Инстанс плеера */
|
|
14
17
|
export declare const PLAYER_TOKEN: InjectionToken<IPlayer>;
|
|
15
18
|
/** Логгер для store */
|
|
16
19
|
export declare const LOGGER_TOKEN: InjectionToken<ILogger>;
|
|
20
|
+
/** Конфигурация ui */
|
|
21
|
+
export declare const UI_CONFIG_TOKEN: InjectionToken<IUIConfig>;
|
|
22
|
+
/** Конфигурация плеера */
|
|
23
|
+
export declare const PLAYER_CONFIG_TOKEN: InjectionToken<IVKVideoPlayerConfig>;
|
|
17
24
|
/** Legacy store (монолитный стор для миграции) */
|
|
18
25
|
export declare const LEGACY_STORE_TOKEN: InjectionToken<IStore>;
|
|
19
|
-
|
|
26
|
+
/** Интерактивный контроллер */
|
|
27
|
+
export declare const INTERACTIVE_CONTROLLER_TOKEN: InjectionToken<Interactives | undefined>;
|
|
28
|
+
export declare const TRACER_STORE_TOKEN: InjectionToken<ITracer>;
|
|
29
|
+
export declare const GET_STATISTICS_SERVICE_TOKEN: InjectionToken<() => IUIStatistics | undefined>;
|
|
30
|
+
export declare const APP_TRACER_TOKEN: InjectionToken<() => AppTracer | undefined>;
|
package/types/store/types.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import type { AdmanWrapper } from "../components/Ads/admanWrapper";
|
|
|
8
8
|
import type { QualitySettingsAppliesTo } from "../utils/userSettings";
|
|
9
9
|
import type { GridTypes, PlayPrevChapterDisabledTooltipKey } from "../constans";
|
|
10
10
|
import type { AdditionalButton, AdditionalDesktopControlPanelButton } from "../components/Controls/types";
|
|
11
|
-
import type { AdditionalContextMenuItem, ContextMenuItem } from "../components/Menus/subMenuTabs/types";
|
|
11
|
+
import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem, ContextMenuItem, SettingsMenuItem } from "../components/Menus/subMenuTabs/types";
|
|
12
12
|
import type { SlotsApi } from "../utils/webAPI/slotsApi";
|
|
13
13
|
import type { FocusManager } from "../utils/webAPI/focusManager";
|
|
14
14
|
import type { ISDKConfig, IUIConfig } from "../config";
|
|
@@ -21,6 +21,7 @@ export interface SetQualityInfo {
|
|
|
21
21
|
byUser?: boolean;
|
|
22
22
|
}
|
|
23
23
|
export interface IAdsStateValues {
|
|
24
|
+
blocked: boolean;
|
|
24
25
|
position: number;
|
|
25
26
|
duration: number;
|
|
26
27
|
playbackState: AdsPlaybackState;
|
|
@@ -102,11 +103,22 @@ export interface IUIState {
|
|
|
102
103
|
interactiveHideMobileControls: Writable<boolean>;
|
|
103
104
|
additionalButtonsDeprecated$: Readable<AdditionalButtonDeprecated[]>;
|
|
104
105
|
additionalDesktopControlPanelRightButtons$: Readable<AdditionalDesktopControlPanelButton[]>;
|
|
106
|
+
additionalSettingsMenuItems$: Readable<SettingsMenuItem[]>;
|
|
105
107
|
additionalContextMenuItems$: Readable<ContextMenuItem[]>;
|
|
106
108
|
overlayContainer$: Writable<HTMLDivElement | undefined>;
|
|
107
109
|
startedByKeyboard$: Writable<boolean>;
|
|
108
110
|
autoplayNextEnabled$: Writable<boolean>;
|
|
109
111
|
timerNextVideoRunning$: Writable<boolean>;
|
|
112
|
+
settingsMenu: {
|
|
113
|
+
visible$: Writable<boolean>;
|
|
114
|
+
ref$: Writable<HTMLElement | undefined>;
|
|
115
|
+
openedByBtnKeyboard$: Writable<boolean>;
|
|
116
|
+
};
|
|
117
|
+
settingsSubMenu: {
|
|
118
|
+
visible$: Writable<boolean>;
|
|
119
|
+
ref$: Writable<HTMLElement | undefined>;
|
|
120
|
+
name$: Writable<string | undefined>;
|
|
121
|
+
};
|
|
110
122
|
/**
|
|
111
123
|
* Отключаем любое действие пользователя.
|
|
112
124
|
*/
|
|
@@ -179,6 +191,10 @@ export interface IStoreInternalActions {
|
|
|
179
191
|
pause: () => void;
|
|
180
192
|
togglePlay: () => void;
|
|
181
193
|
toggleMuted: () => void;
|
|
194
|
+
openSettingsMenu: (wasOpenedByKey?: boolean, tick?: () => Promise<void>) => void;
|
|
195
|
+
closeSettingsMenu: (fromSubMenu?: boolean) => void;
|
|
196
|
+
openSettingsSubMenu: (name: string, ref: HTMLElement) => void;
|
|
197
|
+
closeSettingsSubMenu: (ref: HTMLElement, isClosing?: boolean) => void;
|
|
182
198
|
setVolume: (volume: number) => void;
|
|
183
199
|
setMuted: (muted: boolean) => void;
|
|
184
200
|
startVolumeChanging: () => void;
|
|
@@ -241,6 +257,9 @@ export interface IStoreExternalActions {
|
|
|
241
257
|
setMuted: (muted: boolean) => void;
|
|
242
258
|
setVolume: (volume: number) => void;
|
|
243
259
|
returnFocusToEpisodes: () => void;
|
|
260
|
+
updateAdditionalSettingsItem: (itemId: string, fields: Partial<Omit<AdditionalSettingsMenuItem, "id" | "type">>) => void;
|
|
261
|
+
addAdditionalSettingsItem: (newItem: AdditionalSettingsMenuItem) => void;
|
|
262
|
+
removeAdditionalSettingsItem: (itemId: string) => void;
|
|
244
263
|
updateAdditionalContextItem: (itemId: string, fields: Partial<Omit<AdditionalContextMenuItem, "id">>) => void;
|
|
245
264
|
addAdditionalContextItem: (newItem: AdditionalContextMenuItem) => void;
|
|
246
265
|
removeAdditionalContextItem: (itemId: string) => void;
|
|
@@ -265,6 +284,7 @@ export interface IStoreEvents {
|
|
|
265
284
|
actionRewind$: ISubject<void>;
|
|
266
285
|
actionSeek$: IValueSubject<SeekAction | ThinOneStat.ActionSeekType>;
|
|
267
286
|
nextMovie$: ISubject<number>;
|
|
287
|
+
fatalError$: ISubject<ThinOneStat.IUIFatalError | undefined>;
|
|
268
288
|
}
|
|
269
289
|
export interface IStore {
|
|
270
290
|
initVideo: (config: IStoreInitVideoConfig) => void;
|
|
@@ -322,6 +342,7 @@ export interface IStoreParams {
|
|
|
322
342
|
disabledControls: ControlsKeys;
|
|
323
343
|
playPrevChapterDisabledTooltip: PlayPrevChapterDisabledTooltipKey;
|
|
324
344
|
additionalButtons: Array<AdditionalButtonDeprecated | AdditionalDesktopControlPanelButton>;
|
|
345
|
+
additionalSettingsMenuItems: AdditionalSettingsMenuItem[];
|
|
325
346
|
additionalContextMenuItems: AdditionalContextMenuItem[];
|
|
326
347
|
playPrevVideo: () => void;
|
|
327
348
|
playNextVideo: () => void;
|
package/types/store/utils.d.ts
CHANGED
|
@@ -21,10 +21,8 @@ export type DebugData = {
|
|
|
21
21
|
id?: number;
|
|
22
22
|
volume: number;
|
|
23
23
|
videoSize?: string;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
nativeVideoBuffer?: number;
|
|
27
|
-
nativeAudioBuffer?: number;
|
|
24
|
+
buffer?: number;
|
|
25
|
+
nativeBuffer?: number;
|
|
28
26
|
position?: number;
|
|
29
27
|
speed?: number;
|
|
30
28
|
bitrate?: number;
|
package/types/types/index.d.ts
CHANGED
|
@@ -338,7 +338,7 @@ export interface IVKVideoPlayerConfig {
|
|
|
338
338
|
/**
|
|
339
339
|
* Поля, которые можно обновить, сохранив итстанс плеера
|
|
340
340
|
*/
|
|
341
|
-
export type IUpdatableVKVideoPlayerConfig = Pick<Omit<IVKVideoPlayerConfig, "callbacks" | "interactiveData">, "adsSlotId" | "adsParams" | "albumId" | "canDownload" | "canRewindLive" | "failoverHosts" | "fromTime" | "isAudioDisabled" | "mediascopePixels" | "loop" | "muted" | "repeat" | "preload" | "showAutoplayNext" | "showNextPrevButtons" | "statTrackCode" | "videoIndex" | "volumeMultiplier"> & {
|
|
341
|
+
export type IUpdatableVKVideoPlayerConfig = Pick<Omit<IVKVideoPlayerConfig, "callbacks" | "interactiveData">, "adsSlotId" | "adsParams" | "adsPreviewParam" | "albumId" | "canDownload" | "canRewindLive" | "failoverHosts" | "fromTime" | "isAudioDisabled" | "mediascopePixels" | "loop" | "muted" | "repeat" | "preload" | "showAutoplayNext" | "showNextPrevButtons" | "statTrackCode" | "videoIndex" | "volumeMultiplier"> & {
|
|
342
342
|
videos?: IVideoData[];
|
|
343
343
|
};
|
|
344
344
|
export interface IControlInfo {
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ITracer, AppTracer } from "@vkontakte/videoplayer-shared";
|
|
2
|
-
import type { Interactives } from "@vkontakte/videoplayer-interactive";
|
|
3
|
-
import type { IUIConfig } from "../../../config";
|
|
4
|
-
import type { IVKVideoPlayerConfig } from "../../../types";
|
|
5
|
-
import type { IUIStatistics } from "../../../services/statistics";
|
|
6
|
-
import type { AdditionalSettingsMenuItem } from "../../../components/Menus/subMenuTabs/types";
|
|
7
|
-
/**
|
|
8
|
-
* Контекст store-модулей — конфигурация и сервисы, передаваемые извне.
|
|
9
|
-
* Не включает legacyStore, subscription, player, logger (они структурно отдельные).
|
|
10
|
-
*/
|
|
11
|
-
export interface IStoreContext {
|
|
12
|
-
uiConfig: IUIConfig;
|
|
13
|
-
config: IVKVideoPlayerConfig;
|
|
14
|
-
tracer: ITracer;
|
|
15
|
-
interactiveController: Interactives | undefined;
|
|
16
|
-
getStatisticsService: () => IUIStatistics | undefined;
|
|
17
|
-
getAppTracer: () => AppTracer | undefined;
|
|
18
|
-
additionalSettingsMenuItems: AdditionalSettingsMenuItem[];
|
|
19
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { createSettingsStore, type SettingsStoreDeps, type SettingsStoreState, type SettingsStoreActions, type SettingsStoreExternalActions, type SettingsStore } from "./settingsStore.store";
|
|
2
|
-
export { settingsModule } from "./settingsStore.module";
|
|
3
|
-
export { SETTINGS_STORE_TOKEN } from "./settingsStore.token";
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { Readable, Writable } from "svelte/store";
|
|
2
|
-
import type { ITracer, IComponentLogger } from "@vkontakte/videoplayer-shared";
|
|
3
|
-
import type { IVKVideoPlayerCallbacks } from "../../../types";
|
|
4
|
-
import type { AdditionalSettingsMenuItem, SettingsMenuItem } from "../../../components/Menus/subMenuTabs/types";
|
|
5
|
-
export interface SettingsStoreDeps {
|
|
6
|
-
/** Трассировщик */
|
|
7
|
-
tracer: ITracer;
|
|
8
|
-
/** Логгер */
|
|
9
|
-
log: IComponentLogger;
|
|
10
|
-
/** Коллбэки плеера */
|
|
11
|
-
callbacks?: IVKVideoPlayerCallbacks;
|
|
12
|
-
/** Функция получения video-элемента */
|
|
13
|
-
getVideoElement: () => HTMLVideoElement | null;
|
|
14
|
-
/** Включены ли дополнительные пункты меню настроек */
|
|
15
|
-
additionalSettingsMenuItemsEnabled: boolean;
|
|
16
|
-
/** Начальные дополнительные пункты меню настроек */
|
|
17
|
-
initialAdditionalSettingsMenuItems: AdditionalSettingsMenuItem[];
|
|
18
|
-
}
|
|
19
|
-
export interface SettingsStoreState {
|
|
20
|
-
visible$: Writable<boolean>;
|
|
21
|
-
ref$: Writable<HTMLElement | undefined>;
|
|
22
|
-
openedByBtnKeyboard$: Writable<boolean>;
|
|
23
|
-
subMenuVisible$: Writable<boolean>;
|
|
24
|
-
subMenuRef$: Writable<HTMLElement | undefined>;
|
|
25
|
-
subMenuName$: Writable<string | undefined>;
|
|
26
|
-
additionalSettingsMenuItems$: Readable<SettingsMenuItem[]>;
|
|
27
|
-
}
|
|
28
|
-
export interface SettingsStoreActions {
|
|
29
|
-
openSettingsMenu: (wasOpenedByKeyboard?: boolean, tick?: () => Promise<void>) => void;
|
|
30
|
-
closeSettingsMenu: () => void;
|
|
31
|
-
openSettingsSubMenu: (name: string, ref: HTMLElement) => void;
|
|
32
|
-
closeSettingsSubMenu: (ref: HTMLElement, isClosing?: boolean) => void;
|
|
33
|
-
}
|
|
34
|
-
export interface SettingsStoreExternalActions {
|
|
35
|
-
updateAdditionalSettingsItem: (id: string, fields: Partial<Omit<AdditionalSettingsMenuItem, "id" | "type">>) => void;
|
|
36
|
-
addAdditionalSettingsItem: (newItem: AdditionalSettingsMenuItem) => void;
|
|
37
|
-
removeAdditionalSettingsItem: (id: string) => void;
|
|
38
|
-
}
|
|
39
|
-
export interface SettingsStore {
|
|
40
|
-
state: SettingsStoreState;
|
|
41
|
-
actions: SettingsStoreActions;
|
|
42
|
-
externalActions: SettingsStoreExternalActions;
|
|
43
|
-
}
|
|
44
|
-
export declare const createSettingsStore: (deps: SettingsStoreDeps) => SettingsStore;
|
package/types/utils/timers.d.ts
DELETED