@vkontakte/videoplayer 1.1.94-dev.53fc4c12e.0 → 1.1.94-dev.5f4dee4ba.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 +10 -10
- package/es2015.esm.js +10 -10
- package/esnext.cjs +9 -9
- package/esnext.esm.js +10 -10
- package/evergreen.esm.js +10 -10
- package/package.json +5 -5
- package/types/VKVideoPlayer/index.svelte.d.ts +2 -2
- package/types/components/Ads/admanWrapper.d.ts +1 -0
- package/types/components/Ads/types.d.ts +1 -0
- package/types/components/Menus/subMenuTabs/types.d.ts +6 -0
- package/types/config.d.ts +1 -0
- package/types/index.d.ts +1 -1
- package/types/store/composition.d.ts +2 -9
- package/types/store/index.d.ts +1 -1
- package/types/store/modules/highlightedMenuItemsStore/highlightedMenuItems.module.d.ts +3 -0
- package/types/store/modules/highlightedMenuItemsStore/highlightedMenuItems.store.d.ts +21 -0
- package/types/store/modules/highlightedMenuItemsStore/highlightedMenuItems.token.d.ts +5 -0
- package/types/store/modules/highlightedMenuItemsStore/index.d.ts +3 -0
- package/types/store/modules/index.d.ts +3 -9
- package/types/store/modules/infrastructure/index.d.ts +1 -1
- package/types/store/modules/infrastructure/infrastructure.module.d.ts +1 -6
- package/types/store/modules/infrastructure/infrastructure.token.d.ts +1 -5
- package/types/store/types.d.ts +7 -12
- package/types/translation/types.d.ts +0 -1
- package/types/utils/sanitizeSvg.d.ts +5 -0
- package/types/store/connectors/statisticsConnector.d.ts +0 -15
- package/types/store/modules/languageStore/index.d.ts +0 -9
- package/types/store/modules/languageStore/languageStore.module.d.ts +0 -3
- package/types/store/modules/languageStore/languageStore.store.d.ts +0 -51
- package/types/store/modules/languageStore/languageStore.token.d.ts +0 -6
- package/types/store/modules/playbackRateStore/index.d.ts +0 -6
- package/types/store/modules/playbackRateStore/playbackRateStore.module.d.ts +0 -8
- package/types/store/modules/playbackRateStore/playbackRateStore.store.d.ts +0 -40
- package/types/store/modules/playbackRateStore/playbackRateStore.token.d.ts +0 -6
- package/types/store/modules/qualityStore/index.d.ts +0 -6
- package/types/store/modules/qualityStore/qualityStore.module.d.ts +0 -8
- package/types/store/modules/qualityStore/qualityStore.store.d.ts +0 -37
- package/types/store/modules/qualityStore/qualityStore.token.d.ts +0 -6
- package/types/store/modules/subtitlesStore/index.d.ts +0 -9
- package/types/store/modules/subtitlesStore/subtitlesStore.module.d.ts +0 -8
- package/types/store/modules/subtitlesStore/subtitlesStore.store.d.ts +0 -130
- package/types/store/modules/subtitlesStore/subtitlesStore.token.d.ts +0 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer",
|
|
3
|
-
"version": "1.1.94-dev.
|
|
3
|
+
"version": "1.1.94-dev.5f4dee4ba.0",
|
|
4
4
|
"author": "vk.com",
|
|
5
5
|
"description": "Videoplayer based on the vk.com platform",
|
|
6
6
|
"homepage": "https://vk.com",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@adtech/rbadman": "2.2.57",
|
|
46
|
-
"@vkontakte/videoplayer-core": "2.0.163-dev.
|
|
47
|
-
"@vkontakte/videoplayer-interactive": "1.0.69-dev.
|
|
48
|
-
"@vkontakte/videoplayer-shared": "1.0.92-dev.
|
|
49
|
-
"@vkontakte/videoplayer-statistics": "1.0.109-dev.
|
|
46
|
+
"@vkontakte/videoplayer-core": "2.0.163-dev.5f4dee4ba.0",
|
|
47
|
+
"@vkontakte/videoplayer-interactive": "1.0.69-dev.5f4dee4ba.0",
|
|
48
|
+
"@vkontakte/videoplayer-shared": "1.0.92-dev.5f4dee4ba.0",
|
|
49
|
+
"@vkontakte/videoplayer-statistics": "1.0.109-dev.5f4dee4ba.0"
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -7,7 +7,7 @@ import type { PlaybackRate } from "@vkontakte/videoplayer-core";
|
|
|
7
7
|
import { type IStatContext } from "@vkontakte/videoplayer-statistics";
|
|
8
8
|
import { ThinOneStat } from "@vkontakte/videoplayer-statistics";
|
|
9
9
|
import { AnnotationsApi } from "../utils/webAPI/annotationsApi/annotationsApi";
|
|
10
|
-
import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem } from "../components/Menus/subMenuTabs/types";
|
|
10
|
+
import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem, MenuItemHighlight, RootMenuId } from "../components/Menus/subMenuTabs/types";
|
|
11
11
|
import type { AdditionalButton } from "../components/Controls/types";
|
|
12
12
|
import { SlotsApi } from "../utils/webAPI/slotsApi";
|
|
13
13
|
import { HTMLElement } from "./HTMLElement";
|
|
@@ -69,7 +69,6 @@ export declare class VKVideoPlayer extends HTMLElement {
|
|
|
69
69
|
private readonly createOneStat;
|
|
70
70
|
private createThinOneStat;
|
|
71
71
|
private createStatisticsForVideo;
|
|
72
|
-
private attachStatistics;
|
|
73
72
|
private createAppTracerForVideo;
|
|
74
73
|
private createAdsParamsForVideo;
|
|
75
74
|
private createPlayer;
|
|
@@ -159,6 +158,7 @@ export declare class VKVideoPlayer extends HTMLElement {
|
|
|
159
158
|
*/
|
|
160
159
|
toggleHighQuality(value: boolean): void;
|
|
161
160
|
changeAudioStream(id: string): void;
|
|
161
|
+
setHighlightedMenuItems(items: Partial<Record<RootMenuId, MenuItemHighlight>> | undefined): void;
|
|
162
162
|
addLanguage(config: LanguageConfig): void;
|
|
163
163
|
setLanguage(language: InterfaceLanguage | string): Promise<void>;
|
|
164
164
|
private replaceVideoDataInConfig;
|
|
@@ -111,6 +111,12 @@ export declare enum MenuItemType {
|
|
|
111
111
|
CLICK = "CLICK",
|
|
112
112
|
SWITCH = "SWITCH"
|
|
113
113
|
}
|
|
114
|
+
export interface MenuItemHighlight {
|
|
115
|
+
/** SVG как строка или URL на SVG-файл */
|
|
116
|
+
svg: string;
|
|
117
|
+
/** CSS стили для контейнера с SVG */
|
|
118
|
+
styleSvgContainer?: string;
|
|
119
|
+
}
|
|
114
120
|
export declare enum SubMenuItemType {
|
|
115
121
|
OPEN_SUB_MENU = "OPEN_SUB_MENU",
|
|
116
122
|
SELECT_VALUE = "SELECT_VALUE"
|
package/types/config.d.ts
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { ISources, IDashSource, URLSource, RawSource, URLSourceWithSeek } f
|
|
|
6
6
|
import type { Milliseconds, QualityLimits } from "@vkontakte/videoplayer-shared";
|
|
7
7
|
export { VERSION } from "./env";
|
|
8
8
|
export declare const registerPlayerWebComponent: () => void;
|
|
9
|
-
export { type AdditionalSettingsMenuItem, MenuItemType, type AdditionalClickSettingsMenuItem, type AdditionalSwitchSettingsMenuItem, type AdditionalContextMenuItem } from "./components/Menus/subMenuTabs/types";
|
|
9
|
+
export { type AdditionalSettingsMenuItem, MenuItemType, type AdditionalClickSettingsMenuItem, type AdditionalSwitchSettingsMenuItem, type AdditionalContextMenuItem, RootMenuId } from "./components/Menus/subMenuTabs/types";
|
|
10
10
|
export { type AdditionalButton, ControlButtonType } from "./components/Controls/types";
|
|
11
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, ISDKConfig, VideoPlayerView, IAdmanInitParamsExternalApi, VKLogoType };
|
|
12
12
|
export { GridTypes } from "./constans";
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
import type { IUIConfig } from "../config";
|
|
2
2
|
import type { IVKVideoPlayerConfig } from "../types";
|
|
3
|
-
import type { IUIStatistics } from "../services/statistics";
|
|
4
3
|
import type { IStore } from "./index";
|
|
5
|
-
import type { FakeIsPlayingStore, GraphIsOpenedStore,
|
|
6
|
-
import type { AppTracer } from "@vkontakte/videoplayer-shared";
|
|
4
|
+
import type { FakeIsPlayingStore, GraphIsOpenedStore, HighlightedMenuItemsStore, InteractiveControlsOpacityStore, NotificationsStore, PictureInPictureStore, SeekToInteractiveDisabledTooltipStore, ShowInteractiveTimeIndicatorTooltipStore } from "./modules";
|
|
7
5
|
import type { Interactives } from "@vkontakte/videoplayer-interactive";
|
|
8
6
|
export interface ICompositionParams {
|
|
9
7
|
legacyStore: IStore;
|
|
10
8
|
uiConfig: IUIConfig;
|
|
11
9
|
config: IVKVideoPlayerConfig;
|
|
12
10
|
interactiveController: Interactives | undefined;
|
|
13
|
-
getStatisticsService: () => IUIStatistics | undefined;
|
|
14
|
-
getAppTracer: () => AppTracer | undefined;
|
|
15
11
|
}
|
|
16
12
|
export interface ICompositionResult {
|
|
17
13
|
stores: {
|
|
@@ -22,10 +18,7 @@ export interface ICompositionResult {
|
|
|
22
18
|
showInteractiveTimeIndicatorTooltipStore: ShowInteractiveTimeIndicatorTooltipStore;
|
|
23
19
|
graphIsOpenedStore: GraphIsOpenedStore;
|
|
24
20
|
interactiveControlsOpacityStore: InteractiveControlsOpacityStore;
|
|
25
|
-
|
|
26
|
-
subtitlesStore: SubtitlesStore;
|
|
27
|
-
qualityStore: QualityStore;
|
|
28
|
-
playbackRateStore: PlaybackRateStore;
|
|
21
|
+
highlightedMenuItemsStore: HighlightedMenuItemsStore;
|
|
29
22
|
};
|
|
30
23
|
/** Очистка ресурсов */
|
|
31
24
|
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: ({ interfaceLanguage, isCyrillicRelatedInterface, 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, saveRate, internalsExposure, playerView, playerId, metaConfig, getAppTracer, getAdmanWrapper, logger, adsEnabled }: IStoreParams) => IStore;
|
|
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,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HighlightedMenuItems Store
|
|
3
|
+
*
|
|
4
|
+
* Управляет подсветкой пунктов меню настроек.
|
|
5
|
+
*/
|
|
6
|
+
import type { Writable } from "svelte/store";
|
|
7
|
+
import type { MenuItemHighlight, RootMenuId } from "../../../components/Menus/subMenuTabs/types";
|
|
8
|
+
export interface HighlightedMenuItemsStoreState {
|
|
9
|
+
items$: Writable<Partial<Record<RootMenuId, MenuItemHighlight>> | undefined>;
|
|
10
|
+
}
|
|
11
|
+
export interface HighlightedMenuItemsStoreActions {
|
|
12
|
+
/** Установить подсвеченные пункты меню */
|
|
13
|
+
setHighlightedMenuItems(items: Partial<Record<RootMenuId, MenuItemHighlight>> | undefined): void;
|
|
14
|
+
/** Очистить подсветку */
|
|
15
|
+
clear(): void;
|
|
16
|
+
}
|
|
17
|
+
export interface HighlightedMenuItemsStore {
|
|
18
|
+
state: HighlightedMenuItemsStoreState;
|
|
19
|
+
actions: HighlightedMenuItemsStoreActions;
|
|
20
|
+
}
|
|
21
|
+
export declare const createHighlightedMenuItemsStore: () => HighlightedMenuItemsStore;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { InjectionToken } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
export declare const HIGHLIGHTED_MENU_ITEMS_STORE_TOKEN: InjectionToken<HIGHLIGHTED_MENU_ITEMS_STORE_STORE>;
|
|
3
|
+
import type { HighlightedMenuItemsStore } from "./highlightedMenuItems.store";
|
|
4
|
+
type HIGHLIGHTED_MENU_ITEMS_STORE_STORE = HighlightedMenuItemsStore;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type { HighlightedMenuItemsStoreState, HighlightedMenuItemsStore, HighlightedMenuItemsStoreActions } from "./highlightedMenuItems.store";
|
|
2
|
+
export { highlightedMenuItemsModule } from "./highlightedMenuItems.module";
|
|
3
|
+
export { HIGHLIGHTED_MENU_ITEMS_STORE_TOKEN } from "./highlightedMenuItems.token";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { SUBSCRIPTION_TOKEN, PLAYER_TOKEN, LOGGER_TOKEN, UI_CONFIG_TOKEN, PLAYER_CONFIG_TOKEN, LEGACY_STORE_TOKEN, INTERACTIVE_CONTROLLER_TOKEN,
|
|
1
|
+
export { SUBSCRIPTION_TOKEN, PLAYER_TOKEN, LOGGER_TOKEN, UI_CONFIG_TOKEN, PLAYER_CONFIG_TOKEN, LEGACY_STORE_TOKEN, INTERACTIVE_CONTROLLER_TOKEN, registerInfrastructure } from "./infrastructure";
|
|
2
2
|
export type { InfrastructureParams } from "./infrastructure";
|
|
3
3
|
export { registerModules } from "./utils";
|
|
4
4
|
export type { Module } from "./utils";
|
|
@@ -8,8 +8,6 @@ export type { GraphIsOpenedStoreState, GraphIsOpenedStore, GraphIsOpenedStoreAct
|
|
|
8
8
|
export { graphIsOpenedModule, GRAPH_IS_OPENED_STORE_TOKEN } from "./graphIsOpenedStore";
|
|
9
9
|
export type { InteractiveControlsOpacityStoreState, InteractiveControlsOpacityStore, InteractiveControlsOpacityStoreActions, InteractiveControlsOpacityStoreDeps } from "./interactiveControlsOpacityStore";
|
|
10
10
|
export { interactiveControlsOpacityModule, INTERACTIVE_CONTROLS_OPACITY_STORE_TOKEN } from "./interactiveControlsOpacityStore";
|
|
11
|
-
export type { LanguageStoreState, LanguageStoreActions, LanguageStore, LanguageStoreDeps } from "./languageStore";
|
|
12
|
-
export { languageModule, LANGUAGE_STORE_TOKEN } from "./languageStore";
|
|
13
11
|
export type { NotificationsStoreState, NotificationsStore, NotificationsStoreActions, NotificationsStoreDeps } from "./notificationsStore";
|
|
14
12
|
export { notificationsModule, NOTIFICATIONS_STORE_TOKEN } from "./notificationsStore";
|
|
15
13
|
export type { PictureInPictureStoreState, PictureInPictureStore, PictureInPictureStoreDeps } from "./pictureInPictureStore";
|
|
@@ -18,9 +16,5 @@ export type { SeekToInteractiveDisabledTooltipStoreState, SeekToInteractiveDisab
|
|
|
18
16
|
export { seekToInteractiveDisabledTooltipModule, SEEK_TO_INTERACTIVE_DISABLED_TOOLTIP_STORE_TOKEN } from "./seekToInteractiveDisabledTooltipStore";
|
|
19
17
|
export type { ShowInteractiveTimeIndicatorTooltipStoreState, ShowInteractiveTimeIndicatorTooltipStore, ShowInteractiveTimeIndicatorTooltipStoreActions, ShowInteractiveTimeIndicatorTooltipStoreDeps } from "./showInteractiveTimeIndicatorTooltipStore";
|
|
20
18
|
export { showInteractiveTimeIndicatorTooltipModule, SHOW_INTERACTIVE_TIME_INDICATOR_TOOLTIP_STORE_TOKEN } from "./showInteractiveTimeIndicatorTooltipStore";
|
|
21
|
-
export type {
|
|
22
|
-
export {
|
|
23
|
-
export type { QualityStoreDeps, QualityStoreState, QualityStore } from "./qualityStore";
|
|
24
|
-
export { qualityModule, QUALITY_STORE_TOKEN } from "./qualityStore";
|
|
25
|
-
export type { PlaybackRateStoreDeps, PlaybackRateStoreState, PlaybackRateStore } from "./playbackRateStore";
|
|
26
|
-
export { playbackRateModule, PLAYBACK_RATE_STORE_TOKEN } from "./playbackRateStore";
|
|
19
|
+
export type { HighlightedMenuItemsStoreState, HighlightedMenuItemsStore, HighlightedMenuItemsStoreActions } from "./highlightedMenuItemsStore";
|
|
20
|
+
export { highlightedMenuItemsModule, HIGHLIGHTED_MENU_ITEMS_STORE_TOKEN } from "./highlightedMenuItemsStore";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { SUBSCRIPTION_TOKEN, PLAYER_TOKEN, LOGGER_TOKEN, UI_CONFIG_TOKEN, PLAYER_CONFIG_TOKEN, LEGACY_STORE_TOKEN, INTERACTIVE_CONTROLLER_TOKEN
|
|
1
|
+
export { SUBSCRIPTION_TOKEN, PLAYER_TOKEN, LOGGER_TOKEN, UI_CONFIG_TOKEN, PLAYER_CONFIG_TOKEN, LEGACY_STORE_TOKEN, INTERACTIVE_CONTROLLER_TOKEN } from "./infrastructure.token";
|
|
2
2
|
export { registerInfrastructure } from "./infrastructure.module";
|
|
3
3
|
export type { InfrastructureParams } from "./infrastructure.module";
|
|
@@ -3,22 +3,17 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Регистрация базовых зависимостей и store-модулей.
|
|
5
5
|
*/
|
|
6
|
-
import type { IDIContainer, Subscription
|
|
6
|
+
import type { IDIContainer, Subscription } from "@vkontakte/videoplayer-shared";
|
|
7
7
|
import type { IUIConfig } from "../../../config";
|
|
8
8
|
import type { IVKVideoPlayerConfig } from "../../../types";
|
|
9
9
|
import type { IStore } from "../../index";
|
|
10
10
|
import type { Interactives } from "@vkontakte/videoplayer-interactive";
|
|
11
|
-
import type { IUIStatistics } from "../../../services/statistics";
|
|
12
|
-
import type { ITracer } from "@vkontakte/videoplayer-shared";
|
|
13
11
|
export interface InfrastructureParams {
|
|
14
12
|
legacyStore: IStore;
|
|
15
13
|
uiConfig: IUIConfig;
|
|
16
14
|
config: IVKVideoPlayerConfig;
|
|
17
15
|
interactiveController: Interactives | undefined;
|
|
18
16
|
subscription: Subscription;
|
|
19
|
-
tracer: ITracer;
|
|
20
|
-
getStatisticsService: () => IUIStatistics | undefined;
|
|
21
|
-
getAppTracer: () => AppTracer | undefined;
|
|
22
17
|
}
|
|
23
18
|
/**
|
|
24
19
|
* Регистрирует базовые зависимости в DI контейнере
|
|
@@ -4,13 +4,12 @@
|
|
|
4
4
|
* Core DI токены для базовых зависимостей.
|
|
5
5
|
*/
|
|
6
6
|
import { InjectionToken } from "@vkontakte/videoplayer-shared";
|
|
7
|
-
import type { Subscription, ILogger
|
|
7
|
+
import type { Subscription, ILogger } from "@vkontakte/videoplayer-shared";
|
|
8
8
|
import type { IPlayer } from "@vkontakte/videoplayer-core";
|
|
9
9
|
import type { Interactives } from "@vkontakte/videoplayer-interactive";
|
|
10
10
|
import type { IUIConfig } from "../../../config";
|
|
11
11
|
import type { IVKVideoPlayerConfig } from "../../../types";
|
|
12
12
|
import type { IStore } from "../../index";
|
|
13
|
-
import type { IUIStatistics } from "../../../services/statistics";
|
|
14
13
|
/** Общий subscription для всех rxjs подписок */
|
|
15
14
|
export declare const SUBSCRIPTION_TOKEN: InjectionToken<Subscription>;
|
|
16
15
|
/** Инстанс плеера */
|
|
@@ -25,6 +24,3 @@ export declare const PLAYER_CONFIG_TOKEN: InjectionToken<IVKVideoPlayerConfig>;
|
|
|
25
24
|
export declare const LEGACY_STORE_TOKEN: InjectionToken<IStore>;
|
|
26
25
|
/** Интерактивный контроллер */
|
|
27
26
|
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
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { ChromecastState, IAudioStream, IConfig as ICoreInitVideoConfig, IExternalTextTrack, IOptionalTuningConfig, IPlayer, ISources, ITextTrack, IVideoStream, PlaybackRate, PlaybackState, VideoFormat } from "@vkontakte/videoplayer-core";
|
|
2
2
|
import type { InteractiveRange } from "@vkontakte/videoplayer-interactive";
|
|
3
|
-
import type { AppTracer, IError, ILogger, InterfaceLanguage, InternalsExposure, IRectangle,
|
|
3
|
+
import type { AppTracer, IError, ILogger, InterfaceLanguage, InternalsExposure, IRectangle, IValueObservable, QualityLimits, VideoQuality } from "@vkontakte/videoplayer-shared";
|
|
4
4
|
import type { SeekAction, ThinOneStat } from "@vkontakte/videoplayer-statistics";
|
|
5
5
|
import type { Readable, Writable } from "svelte/store";
|
|
6
6
|
import type { AdditionalButtonDeprecated, AdsPlaybackState, ControlBlocksRefs, ControlsKeys, HotKeyMapData, IAnnotationsApi, IControlInfo, IDisabledControls, IInteractiveData, IPictureInPictureApi, IPlayerControlsRef, IPlayerPhase, ITimelinePreviewThumbsData, IVideoEpisode, IVKVideoPlayerCallbacks, IVKVideoPlayerUICallbacks, PlaybackStateRealistic, Position, Size, VideoPlaybackRate, VideoPlayerView, VideoQualityForRender, VideoQualityUI, VideoSubtitle, VideoSubtitleParsed } from "../types";
|
|
7
7
|
import type { AdmanWrapper } from "../components/Ads/admanWrapper";
|
|
8
|
-
import type { Key } from "../translation/types";
|
|
8
|
+
import type { Key, LanguageConfig } from "../translation/types";
|
|
9
9
|
import type { QualitySettingsAppliesTo } from "../utils/userSettings";
|
|
10
10
|
import type { GridTypes, PlayPrevChapterDisabledTooltipKey } from "../constans";
|
|
11
11
|
import type { AdditionalButton, AdditionalDesktopControlPanelButton } from "../components/Controls/types";
|
|
@@ -272,7 +272,8 @@ export interface IStoreInternalActions {
|
|
|
272
272
|
holdCamera(): void;
|
|
273
273
|
releaseCamera(): void;
|
|
274
274
|
downloadVideo: () => void;
|
|
275
|
-
|
|
275
|
+
addLanguage: (config: LanguageConfig) => void;
|
|
276
|
+
setLanguage: (language: InterfaceLanguage | string) => void;
|
|
276
277
|
nextMovie: (movieId: number) => void;
|
|
277
278
|
correctSeekTimeToInteractive: (time: number) => number;
|
|
278
279
|
replayInteractive?: () => void;
|
|
@@ -333,25 +334,18 @@ export interface IStoreInitVideoConfig extends ICoreInitVideoConfig {
|
|
|
333
334
|
canDownload?: boolean;
|
|
334
335
|
previewThumbsData?: ITimelinePreviewThumbsData;
|
|
335
336
|
subtitles?: Omit<IExternalTextTrack, "type">[];
|
|
337
|
+
subtitlesForcedLanguage?: string;
|
|
336
338
|
unitedVideoId?: number;
|
|
337
339
|
videoEpisodes?: IVideoEpisode[];
|
|
338
340
|
}
|
|
339
|
-
export interface IStoreEvents {
|
|
340
|
-
actionRewind$: ISubject<void>;
|
|
341
|
-
actionSeek$: IValueSubject<SeekAction | ThinOneStat.ActionSeekType>;
|
|
342
|
-
actionQuality$: ISubject<ThinOneStat.ActionQualityType>;
|
|
343
|
-
nextMovie$: ISubject<number>;
|
|
344
|
-
}
|
|
345
341
|
export interface IStore {
|
|
346
342
|
initVideo: (config: IStoreInitVideoConfig) => void;
|
|
347
343
|
videoId$: Writable<number | undefined>;
|
|
348
344
|
playerPhase: IPlayerPhase;
|
|
349
345
|
interfaceLanguage$: Readable<InterfaceLanguage | string>;
|
|
350
|
-
interfaceLanguageUpdated$: ISubject<void>;
|
|
351
346
|
isCyrillicRelatedInterface$: Readable<boolean>;
|
|
352
347
|
interactiveData?: IInteractiveData;
|
|
353
|
-
vsid$:
|
|
354
|
-
events: IStoreEvents;
|
|
348
|
+
vsid$: Readable<string | undefined>;
|
|
355
349
|
state: IPlayerState;
|
|
356
350
|
ui: IUIState;
|
|
357
351
|
ads: IAdsState;
|
|
@@ -366,6 +360,7 @@ export interface IStore {
|
|
|
366
360
|
initOnFinishedCallback: VoidFunction;
|
|
367
361
|
resetAdsState: VoidFunction;
|
|
368
362
|
updateAdmanWrapperSubscriptions: VoidFunction;
|
|
363
|
+
updateStatisticsSubscriptions: VoidFunction;
|
|
369
364
|
updateAppTracerSubscriptions: VoidFunction;
|
|
370
365
|
updateTracerSubscriptions: VoidFunction;
|
|
371
366
|
getLogger: () => ILogger;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { ISubject, IValueSubject } from "@vkontakte/videoplayer-shared";
|
|
2
|
-
import type { SeekAction, ThinOneStat } from "@vkontakte/videoplayer-statistics";
|
|
3
|
-
import type { EnrichedStore } from "../types";
|
|
4
|
-
import type { IUIStatistics } from "../../services/statistics";
|
|
5
|
-
export interface IConnectStatisticsParams {
|
|
6
|
-
store: EnrichedStore;
|
|
7
|
-
statistics: IUIStatistics;
|
|
8
|
-
}
|
|
9
|
-
export interface IStoreEvents {
|
|
10
|
-
actionRewind$: ISubject<void>;
|
|
11
|
-
actionSeek$: IValueSubject<SeekAction | ThinOneStat.ActionSeekType>;
|
|
12
|
-
actionQuality$: ISubject<ThinOneStat.ActionQualityType>;
|
|
13
|
-
nextMovie$: ISubject<number>;
|
|
14
|
-
}
|
|
15
|
-
export declare function connectStatisticsToStore(params: IConnectStatisticsParams): void;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Language Store Module
|
|
3
|
-
*
|
|
4
|
-
* Экспорты модуля языка интерфейса.
|
|
5
|
-
*/
|
|
6
|
-
export type { LanguageStoreState, LanguageStoreActions, LanguageStore, Deps as LanguageStoreDeps } from "./languageStore.store";
|
|
7
|
-
export { createLanguageStore } from "./languageStore.store";
|
|
8
|
-
export { languageModule } from "./languageStore.module";
|
|
9
|
-
export { LANGUAGE_STORE_TOKEN } from "./languageStore.token";
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Language Store Module
|
|
3
|
-
*
|
|
4
|
-
* Управляет состоянием языка интерфейса: загрузка языковых пакетов, установка языка, функция перевода.
|
|
5
|
-
*/
|
|
6
|
-
import type { Writable } from "svelte/store";
|
|
7
|
-
import { InterfaceLanguage, Subject } from "@vkontakte/videoplayer-shared";
|
|
8
|
-
import type { AppTracer } from "@vkontakte/videoplayer-shared";
|
|
9
|
-
import type { IUIConfig } from "../../../config";
|
|
10
|
-
import type { Key } from "../../../translation/types";
|
|
11
|
-
/**
|
|
12
|
-
* Зависимости модуля language
|
|
13
|
-
*/
|
|
14
|
-
export interface Deps {
|
|
15
|
-
/** UI конфиг */
|
|
16
|
-
uiConfig: IUIConfig;
|
|
17
|
-
/** Начальный язык интерфейса */
|
|
18
|
-
initialInterfaceLanguage: InterfaceLanguage | string;
|
|
19
|
-
/** Признак кириллического интерфейса */
|
|
20
|
-
initialIsCyrillicRelatedInterface: boolean;
|
|
21
|
-
/** Функция для получения сервиса статистики */
|
|
22
|
-
getStatisticsService?: () => {
|
|
23
|
-
oneStat?: {
|
|
24
|
-
logError: (params: {
|
|
25
|
-
errorType: string;
|
|
26
|
-
fatal: boolean;
|
|
27
|
-
}) => void;
|
|
28
|
-
};
|
|
29
|
-
} | undefined;
|
|
30
|
-
/** Функция для получения AppTracer для error reporting */
|
|
31
|
-
getAppTracer?: () => AppTracer | undefined;
|
|
32
|
-
}
|
|
33
|
-
export interface LanguageStoreState {
|
|
34
|
-
/** Текущий язык интерфейса */
|
|
35
|
-
interfaceLanguage$: Writable<InterfaceLanguage | string>;
|
|
36
|
-
/** Событие обновления языка */
|
|
37
|
-
interfaceLanguageUpdated$: Subject<void>;
|
|
38
|
-
/** Признак кириллического интерфейса */
|
|
39
|
-
isCyrillicRelatedInterface$: Writable<boolean>;
|
|
40
|
-
}
|
|
41
|
-
export interface LanguageStoreActions {
|
|
42
|
-
/** Установить язык интерфейса */
|
|
43
|
-
setLanguage: (language: InterfaceLanguage | string) => Promise<void>;
|
|
44
|
-
/** Функция перевода */
|
|
45
|
-
t: (key: Key, params?: Record<string, string>) => string;
|
|
46
|
-
}
|
|
47
|
-
export interface LanguageStore {
|
|
48
|
-
state: LanguageStoreState;
|
|
49
|
-
actions: LanguageStoreActions;
|
|
50
|
-
}
|
|
51
|
-
export declare const createLanguageStore: (deps: Deps) => LanguageStore;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Playback Rate Store Module
|
|
3
|
-
*/
|
|
4
|
-
export { createPlaybackRateStore, type PlaybackRateStoreDeps, type PlaybackRateStoreState, type PlaybackRateStore } from "./playbackRateStore.store";
|
|
5
|
-
export { playbackRateModule } from "./playbackRateStore.module";
|
|
6
|
-
export { PLAYBACK_RATE_STORE_TOKEN } from "./playbackRateStore.token";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Playback Rate Store Module
|
|
3
|
-
*
|
|
4
|
-
* Композиция модуля через Dependency Injection.
|
|
5
|
-
*/
|
|
6
|
-
import { type PlaybackRateStore } from "./playbackRateStore.store";
|
|
7
|
-
import type { Module } from "../utils";
|
|
8
|
-
export declare const playbackRateModule: Module<PlaybackRateStore>;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Playback Rate Store Module
|
|
3
|
-
*
|
|
4
|
-
* Управляет состоянием скорости воспроизведения: доступные скорости.
|
|
5
|
-
*/
|
|
6
|
-
import type { Readable } from "svelte/store";
|
|
7
|
-
import type { IPlayer } from "@vkontakte/videoplayer-core";
|
|
8
|
-
import type { IUIConfig } from "../../../config";
|
|
9
|
-
import type { Key } from "../../../translation/types";
|
|
10
|
-
import type { VideoPlaybackRate } from "../../../types";
|
|
11
|
-
/**
|
|
12
|
-
* Зависимости модуля playback rate
|
|
13
|
-
*/
|
|
14
|
-
export interface PlaybackRateStoreDeps {
|
|
15
|
-
/** Плеер */
|
|
16
|
-
player: IPlayer;
|
|
17
|
-
/** UI конфиг */
|
|
18
|
-
uiConfig: IUIConfig;
|
|
19
|
-
/** Функция перевода */
|
|
20
|
-
t: (key: Key, params?: Record<string, string>) => string;
|
|
21
|
-
/** Признак интерактивного видео */
|
|
22
|
-
isInteractive: boolean;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Состояние модуля playback rate
|
|
26
|
-
*/
|
|
27
|
-
export interface PlaybackRateStoreState {
|
|
28
|
-
/** Доступные скорости воспроизведения */
|
|
29
|
-
availablePlaybackRates$: Readable<VideoPlaybackRate[]>;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Результат создания playback rate store
|
|
33
|
-
*/
|
|
34
|
-
export interface PlaybackRateStore {
|
|
35
|
-
state: PlaybackRateStoreState;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Создаёт playback rate store
|
|
39
|
-
*/
|
|
40
|
-
export declare const createPlaybackRateStore: (deps: PlaybackRateStoreDeps) => PlaybackRateStore;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Quality Store Module
|
|
3
|
-
*/
|
|
4
|
-
export { createQualityStore, type QualityStoreDeps, type QualityStoreState, type QualityStore } from "./qualityStore.store";
|
|
5
|
-
export { qualityModule } from "./qualityStore.module";
|
|
6
|
-
export { QUALITY_STORE_TOKEN } from "./qualityStore.token";
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Quality Store Module
|
|
3
|
-
*
|
|
4
|
-
* Управляет состоянием качества видео: доступные качества, авто-качество.
|
|
5
|
-
*/
|
|
6
|
-
import type { Readable } from "svelte/store";
|
|
7
|
-
import type { IPlayer } from "@vkontakte/videoplayer-core";
|
|
8
|
-
import type { Key } from "../../../translation/types";
|
|
9
|
-
import type { VideoQualityForRender } from "../../../types";
|
|
10
|
-
/**
|
|
11
|
-
* Зависимости модуля quality
|
|
12
|
-
*/
|
|
13
|
-
export interface QualityStoreDeps {
|
|
14
|
-
/** Плеер */
|
|
15
|
-
player: IPlayer;
|
|
16
|
-
/** Функция перевода */
|
|
17
|
-
t: (key: Key, params?: Record<string, string>) => string;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Состояние модуля quality
|
|
21
|
-
*/
|
|
22
|
-
export interface QualityStoreState {
|
|
23
|
-
/** Доступные качества для рендера */
|
|
24
|
-
availableQualities$: Readable<VideoQualityForRender[]>;
|
|
25
|
-
/** Признак доступности авто-качества */
|
|
26
|
-
isAutoQualityAvailable$: Readable<boolean>;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Результат создания quality store
|
|
30
|
-
*/
|
|
31
|
-
export interface QualityStore {
|
|
32
|
-
state: QualityStoreState;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Создаёт quality store
|
|
36
|
-
*/
|
|
37
|
-
export declare const createQualityStore: (deps: QualityStoreDeps) => QualityStore;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Subtitles Store Module
|
|
3
|
-
*
|
|
4
|
-
* Экспорты модуля субтитров.
|
|
5
|
-
*/
|
|
6
|
-
export type { SubtitlesStoreState, SubtitlesStoreInternalActions, SubtitlesStoreExternalActions, SubtitlesStore, Deps as SubtitlesStoreDeps } from "./subtitlesStore.store";
|
|
7
|
-
export { createSubtitlesStore } from "./subtitlesStore.store";
|
|
8
|
-
export { subtitlesModule } from "./subtitlesStore.module";
|
|
9
|
-
export { SUBTITLES_STORE_TOKEN } from "./subtitlesStore.token";
|