@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,419 @@
|
|
|
1
|
+
import type { ChromecastState, IAudioStream, IConfig as ICoreInitVideoConfig, IExternalTextTrack, IOptionalTuningConfig, IPlayer, ISources, ITextTrack, IVideoStream, PlaybackRate, PlaybackState, VideoFormat } from "@vkontakte/videoplayer-core";
|
|
2
|
+
import type { InteractiveRange } from "@vkontakte/videoplayer-interactive";
|
|
3
|
+
import type { AppTracer, IError, ILogger, InterfaceLanguage, InternalsExposure, IRectangle, IValueObservable, QualityLimits, VideoQuality } from "@vkontakte/videoplayer-shared";
|
|
4
|
+
import type { SeekAction, ThinOneStat } from "@vkontakte/videoplayer-statistics";
|
|
5
|
+
import type { Readable, Writable } from "svelte/store";
|
|
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
|
+
import type { AdmanWrapper } from "../components/Ads/admanWrapper";
|
|
8
|
+
import type { Key, LanguageConfig } from "../translation/types";
|
|
9
|
+
import type { QualitySettingsAppliesTo } from "../utils/userSettings";
|
|
10
|
+
import type { GridTypes, PlayPrevChapterDisabledTooltipKey } from "../constans";
|
|
11
|
+
import type { AdditionalButton, AdditionalDesktopControlPanelButton } from "../components/Controls/types";
|
|
12
|
+
import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem, ContextMenuItem, SettingsMenuItem } from "../components/Menus/subMenuTabs/types";
|
|
13
|
+
import type { SlotsApi } from "../utils/webAPI/slotsApi";
|
|
14
|
+
import type { FocusManager } from "../utils/webAPI/focusManager";
|
|
15
|
+
import type { ISDKConfig, IUIConfig } from "../config";
|
|
16
|
+
import type { IUIStatistics } from "../services/statistics";
|
|
17
|
+
import type { DebugData } from "./utils";
|
|
18
|
+
import type { ICompositionResult } from "./composition";
|
|
19
|
+
export interface SetQualityInfo {
|
|
20
|
+
appliesTo?: QualitySettingsAppliesTo;
|
|
21
|
+
changeReason?: "default" | "limit-changed";
|
|
22
|
+
byUser?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface IAdsStateValues {
|
|
25
|
+
position: number;
|
|
26
|
+
duration: number;
|
|
27
|
+
playbackState: AdsPlaybackState;
|
|
28
|
+
canSkip: boolean;
|
|
29
|
+
secondsToWatchBeforeSkip: number;
|
|
30
|
+
postrollPassed: boolean;
|
|
31
|
+
}
|
|
32
|
+
export type IAdsState = { [K in keyof IAdsStateValues] : Writable<IAdsStateValues[K]> };
|
|
33
|
+
export interface IUIState {
|
|
34
|
+
t: (key: Key, params?: Record<string, string>) => string;
|
|
35
|
+
isMinimalView$: Writable<boolean>;
|
|
36
|
+
controlsVisible: Writable<boolean>;
|
|
37
|
+
/**
|
|
38
|
+
* Точечно скрываем контролы.
|
|
39
|
+
*/
|
|
40
|
+
hiddenControls: Partial<Record<keyof IPlayerControlsRef, Writable<boolean>>>;
|
|
41
|
+
/**
|
|
42
|
+
* Определяет, могут ли вообще контролы быть показаны.
|
|
43
|
+
*/
|
|
44
|
+
isControlsAvailable: Writable<boolean>;
|
|
45
|
+
controlBlocks: { [key in keyof Required<ControlBlocksRefs>] : Writable<IControlInfo | undefined> };
|
|
46
|
+
touched: Writable<boolean>;
|
|
47
|
+
controls: {
|
|
48
|
+
prevButton: Writable<IControlInfo | undefined>;
|
|
49
|
+
playButton: Writable<IControlInfo | undefined>;
|
|
50
|
+
replayButton: Writable<IControlInfo | undefined>;
|
|
51
|
+
nextButton: Writable<IControlInfo | undefined>;
|
|
52
|
+
playPrevChapterButton: Writable<IControlInfo | undefined>;
|
|
53
|
+
seekToInteractiveButton: Writable<IControlInfo | undefined>;
|
|
54
|
+
interactiveGraphButton: Writable<IControlInfo | undefined>;
|
|
55
|
+
liveButton: Writable<IControlInfo | undefined>;
|
|
56
|
+
time: Writable<IControlInfo | undefined>;
|
|
57
|
+
episodes: Writable<IControlInfo | undefined>;
|
|
58
|
+
volume: Writable<IControlInfo | undefined>;
|
|
59
|
+
subtitles: Writable<IControlInfo | undefined>;
|
|
60
|
+
settings: Writable<IControlInfo | undefined>;
|
|
61
|
+
context: Writable<IControlInfo | undefined>;
|
|
62
|
+
fullscreen: Writable<IControlInfo | undefined>;
|
|
63
|
+
chromecast: Writable<IControlInfo | undefined>;
|
|
64
|
+
pip: Writable<IControlInfo | undefined>;
|
|
65
|
+
"theater-mode-button": Writable<IControlInfo | undefined>;
|
|
66
|
+
vkLogo: Writable<IControlInfo | undefined>;
|
|
67
|
+
interactiveTimeIndicator: Writable<IControlInfo | undefined>;
|
|
68
|
+
timeline: Writable<IControlInfo | undefined>;
|
|
69
|
+
autoplayNextToggle: Writable<IControlInfo | undefined>;
|
|
70
|
+
disabledControls$: IDisabledControls;
|
|
71
|
+
additionalButtons: Writable<IControlInfo | undefined>[];
|
|
72
|
+
};
|
|
73
|
+
modals: {
|
|
74
|
+
hotKeyMap: {
|
|
75
|
+
show: Writable<boolean>;
|
|
76
|
+
data: Writable<HotKeyMapData>;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
isFullscreen: Writable<boolean>;
|
|
80
|
+
isFullscreenOpenedByKeyboard: Writable<boolean>;
|
|
81
|
+
rotateAlpha: Writable<number>;
|
|
82
|
+
isAutoplay: Writable<boolean>;
|
|
83
|
+
debugPanelVisible: Writable<boolean>;
|
|
84
|
+
episodes: {
|
|
85
|
+
panelOpened$: Writable<boolean>;
|
|
86
|
+
openedByKeyboard$: Writable<boolean>;
|
|
87
|
+
};
|
|
88
|
+
contextMenu: {
|
|
89
|
+
visible$: Writable<boolean>;
|
|
90
|
+
btnRef$: Writable<HTMLButtonElement | undefined>;
|
|
91
|
+
openedByBtnKeyboard$: Writable<boolean>;
|
|
92
|
+
openedByHotKey$: Writable<boolean>;
|
|
93
|
+
lastActiveElem$: Writable<HTMLButtonElement | undefined>;
|
|
94
|
+
showContextMenuBtn$: Writable<boolean>;
|
|
95
|
+
position$: Writable<Position>;
|
|
96
|
+
};
|
|
97
|
+
playerSize: Writable<Size>;
|
|
98
|
+
isMobile: Readable<boolean>;
|
|
99
|
+
mobileNotReportControlHidden$: Readable<boolean>;
|
|
100
|
+
icon3DVideoVisible: Writable<boolean>;
|
|
101
|
+
scrubbingInProgress: Writable<boolean>;
|
|
102
|
+
volumeChangingInProgress: Writable<boolean>;
|
|
103
|
+
is3DVideo: Writable<boolean>;
|
|
104
|
+
currentGridType$: Readable<GridTypes>;
|
|
105
|
+
interactiveHideMobileControls: Writable<boolean>;
|
|
106
|
+
additionalButtonsDeprecated$: Readable<AdditionalButtonDeprecated[]>;
|
|
107
|
+
additionalDesktopControlPanelRightButtons$: Readable<AdditionalDesktopControlPanelButton[]>;
|
|
108
|
+
additionalSettingsMenuItems$: Readable<SettingsMenuItem[]>;
|
|
109
|
+
additionalContextMenuItems$: Readable<ContextMenuItem[]>;
|
|
110
|
+
overlayContainer$: Writable<HTMLDivElement | undefined>;
|
|
111
|
+
startedByKeyboard$: Writable<boolean>;
|
|
112
|
+
autoplayNextEnabled$: Writable<boolean>;
|
|
113
|
+
timerNextVideoRunning$: Writable<boolean>;
|
|
114
|
+
settingsMenu: {
|
|
115
|
+
visible$: Writable<boolean>;
|
|
116
|
+
ref$: Writable<HTMLElement | undefined>;
|
|
117
|
+
openedByBtnKeyboard$: Writable<boolean>;
|
|
118
|
+
};
|
|
119
|
+
settingsSubMenu: {
|
|
120
|
+
visible$: Writable<boolean>;
|
|
121
|
+
ref$: Writable<HTMLElement | undefined>;
|
|
122
|
+
name$: Writable<string | undefined>;
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Отключаем любое действие пользователя.
|
|
126
|
+
*/
|
|
127
|
+
userActionsDisabled: Writable<boolean>;
|
|
128
|
+
/**
|
|
129
|
+
* Положение заголовка названия видео.
|
|
130
|
+
*/
|
|
131
|
+
videoTitleInfo: Writable<IControlInfo | undefined>;
|
|
132
|
+
/**
|
|
133
|
+
* Ускорение видео х2.
|
|
134
|
+
*/
|
|
135
|
+
doubleForwardOn$: Writable<boolean>;
|
|
136
|
+
/**
|
|
137
|
+
* Определяет, что двойное ускорение видео доступно.
|
|
138
|
+
*/
|
|
139
|
+
doubleForwardAvailable$: Readable<boolean>;
|
|
140
|
+
previewTrackActive: Writable<boolean>;
|
|
141
|
+
previewTrackDragInProgress: Writable<boolean>;
|
|
142
|
+
previewTrackAvailable: Readable<boolean>;
|
|
143
|
+
isPreviewTrackHorizontallyAligned: Readable<boolean>;
|
|
144
|
+
}
|
|
145
|
+
export interface IWebApi {
|
|
146
|
+
pictureInPictureApi?: IPictureInPictureApi;
|
|
147
|
+
annotationsApi?: IAnnotationsApi;
|
|
148
|
+
slotsApi?: SlotsApi;
|
|
149
|
+
focusManager?: FocusManager;
|
|
150
|
+
}
|
|
151
|
+
export interface IPlayerState {
|
|
152
|
+
positionExact$: Readable<number>;
|
|
153
|
+
positionWithScrubbing$: Readable<number>;
|
|
154
|
+
duration$: Readable<number>;
|
|
155
|
+
playbackState$: Readable<PlaybackState | undefined>;
|
|
156
|
+
playbackStateRealistic$: Readable<PlaybackStateRealistic | undefined>;
|
|
157
|
+
isPlaying$: Readable<boolean>;
|
|
158
|
+
isLoaderVisible: Readable<boolean>;
|
|
159
|
+
bufferedProgress$: Readable<number>;
|
|
160
|
+
isLive$: Readable<boolean | undefined>;
|
|
161
|
+
canChangePlaybackSpeed$: Readable<boolean | undefined>;
|
|
162
|
+
isActiveLive$: Readable<boolean | undefined>;
|
|
163
|
+
isOldestAvailableLive$: Readable<boolean | undefined>;
|
|
164
|
+
isRewindableLive$: Readable<boolean>;
|
|
165
|
+
isEnded$: Readable<boolean>;
|
|
166
|
+
volume$: Readable<number>;
|
|
167
|
+
muted$: Readable<boolean>;
|
|
168
|
+
trafficSavingEnabled$: Readable<boolean>;
|
|
169
|
+
highQualityEnabled$: Readable<boolean>;
|
|
170
|
+
availableVideoStreams$: Readable<IVideoStream[]>;
|
|
171
|
+
availableAudioStreams$: Readable<IAudioStream[]>;
|
|
172
|
+
videoStream$: Readable<IVideoStream | undefined>;
|
|
173
|
+
audioStream$: Readable<IAudioStream | undefined>;
|
|
174
|
+
currentQuality$: Readable<VideoQuality | undefined>;
|
|
175
|
+
autoQualityLimitingAvailable$: Readable<boolean>;
|
|
176
|
+
isAutoQualityEnabled$: Readable<boolean | undefined>;
|
|
177
|
+
availableQualities$: Readable<VideoQualityForRender[]>;
|
|
178
|
+
currentPlaybackRate$: Readable<number>;
|
|
179
|
+
availablePlaybackRates$: Readable<VideoPlaybackRate[]>;
|
|
180
|
+
currentSubtitle$: Readable<Omit<VideoSubtitle, "selected">>;
|
|
181
|
+
availableTextTracks$: Readable<ITextTrack[]>;
|
|
182
|
+
availableSubtitlesList$: Readable<VideoSubtitle[]>;
|
|
183
|
+
currentSubtitleCaptions$: Readable<VideoSubtitleParsed["texts"]>;
|
|
184
|
+
previewThumbsData$: Writable<ITimelinePreviewThumbsData | undefined>;
|
|
185
|
+
isAutoSubtitleCaptionVisible$: Writable<boolean>;
|
|
186
|
+
chromecastState$: Readable<ChromecastState>;
|
|
187
|
+
chromecastDeviceName$: Readable<string | undefined>;
|
|
188
|
+
chromecastConnected$: Readable<boolean>;
|
|
189
|
+
currentFormat$: Readable<VideoFormat | undefined>;
|
|
190
|
+
throughputEstimation$: Readable<number | undefined>;
|
|
191
|
+
videoBitrate$: Readable<number | undefined>;
|
|
192
|
+
videoEpisodes$: Writable<IVideoEpisode[] | undefined>;
|
|
193
|
+
videoSize$: Readable<IRectangle | undefined>;
|
|
194
|
+
errorLog$: Readable<IError[]>;
|
|
195
|
+
crashed$: Readable<boolean>;
|
|
196
|
+
isAudioAvailable$: Readable<boolean>;
|
|
197
|
+
isAudioDisabled: boolean;
|
|
198
|
+
canDownload: boolean;
|
|
199
|
+
availableSources$: Readable<ISources | undefined>;
|
|
200
|
+
hasMpegSources$: Readable<boolean>;
|
|
201
|
+
isInteractive: boolean;
|
|
202
|
+
showInteractiveGraph: boolean;
|
|
203
|
+
showSeekToInteractive: boolean;
|
|
204
|
+
showPlayPrevChapter: boolean;
|
|
205
|
+
showInteractiveTimeIndicator: boolean;
|
|
206
|
+
isInteractiveTime$: Readable<boolean>;
|
|
207
|
+
interactiveEpisodes$: Readable<IVideoEpisode[]>;
|
|
208
|
+
isInteractiveExpectation$: Writable<boolean>;
|
|
209
|
+
hasInteractiveBranches?: boolean;
|
|
210
|
+
playPrevChapterDisabledTooltip: PlayPrevChapterDisabledTooltipKey;
|
|
211
|
+
looped$: Writable<boolean>;
|
|
212
|
+
loadedMetadata$: Writable<boolean>;
|
|
213
|
+
/**
|
|
214
|
+
* Определяет, можно ли в целом увидеть/выбрать Авто режим выбора качества.
|
|
215
|
+
*/
|
|
216
|
+
isAutoQualityAvailable$: Readable<boolean>;
|
|
217
|
+
}
|
|
218
|
+
export interface IStoreInternalActions {
|
|
219
|
+
preload: () => void;
|
|
220
|
+
firstStart: (showAds: boolean) => void;
|
|
221
|
+
play: () => void;
|
|
222
|
+
pause: () => void;
|
|
223
|
+
togglePlay: () => void;
|
|
224
|
+
toggleMuted: () => void;
|
|
225
|
+
openSettingsMenu: (wasOpenedByKey?: boolean, tick?: () => Promise<void>) => void;
|
|
226
|
+
closeSettingsMenu: (fromSubMenu?: boolean) => void;
|
|
227
|
+
openSettingsSubMenu: (name: string, ref: HTMLElement) => void;
|
|
228
|
+
closeSettingsSubMenu: (ref: HTMLElement, isClosing?: boolean) => void;
|
|
229
|
+
setTrafficSavingEnabled: (trafficSavingEnabled: boolean, appliesTo?: QualitySettingsAppliesTo) => void;
|
|
230
|
+
setHighQualityEnabled: (highQualityEnabled: boolean, appliesTo?: QualitySettingsAppliesTo) => void;
|
|
231
|
+
setVolume: (volume: number) => void;
|
|
232
|
+
setMuted: (muted: boolean) => void;
|
|
233
|
+
startVolumeChanging: () => void;
|
|
234
|
+
stopVolumeChanging: () => void;
|
|
235
|
+
setAudioStream: (stream: IAudioStream) => void;
|
|
236
|
+
setVideoStream: (stream: IVideoStream) => void;
|
|
237
|
+
setQuality: (quality: VideoQualityUI, info?: SetQualityInfo) => void;
|
|
238
|
+
setPlaybackRate: (playbackRate: PlaybackRate) => void;
|
|
239
|
+
incrementPlaybackRate: () => VideoPlaybackRate;
|
|
240
|
+
decrementPlaybackRate: () => VideoPlaybackRate;
|
|
241
|
+
setSubtitle: (subtitle?: VideoSubtitle) => void;
|
|
242
|
+
toggleSubtitle: () => void;
|
|
243
|
+
togglePictureInPicture: () => void;
|
|
244
|
+
startScrubbing: (progress: number) => void;
|
|
245
|
+
progressScrubbing: (progress: number) => void;
|
|
246
|
+
completeScrubbing: (progress: number, forcePrecise?: boolean, action?: ThinOneStat.ActionSeekType | SeekAction) => void;
|
|
247
|
+
toggleChromecast: () => void;
|
|
248
|
+
seekTime: (time: number, action: SeekAction, forcePrecise?: boolean) => void;
|
|
249
|
+
seekEpisodeStartTime: (time: number) => void;
|
|
250
|
+
getNextEpisode: () => IVideoEpisode | undefined;
|
|
251
|
+
seekToNextEpisode: (episode?: IVideoEpisode) => void;
|
|
252
|
+
getPrevEpisode: () => IVideoEpisode | undefined;
|
|
253
|
+
seekToPrevEpisode: (episode?: IVideoEpisode) => void;
|
|
254
|
+
seekToPercent: (percent: number, action: SeekAction) => void;
|
|
255
|
+
switchToActiveLive: () => void;
|
|
256
|
+
switchFromAdsToVideo: (callPlay?: boolean) => void;
|
|
257
|
+
switchFromVideoToAds: () => void;
|
|
258
|
+
skipAd: () => void;
|
|
259
|
+
setLiveWaitingStart: (state: boolean) => void;
|
|
260
|
+
setLiveWaitingRecover: (state: boolean) => void;
|
|
261
|
+
setLiveWaitingRecord: (state: boolean) => void;
|
|
262
|
+
clearDelayedBufferingCheckTimeout: () => void;
|
|
263
|
+
getDebugTextData: () => string;
|
|
264
|
+
getDebugPanelData: () => DebugData;
|
|
265
|
+
getVideoElement: () => HTMLVideoElement | null;
|
|
266
|
+
startLogging: () => void;
|
|
267
|
+
stopLogging: () => void;
|
|
268
|
+
videoRotate: (alphaDiff?: number) => void;
|
|
269
|
+
startCameraManualRotation(mx: number, my: number): void;
|
|
270
|
+
stopCameraManualRotation(immediate?: boolean): void;
|
|
271
|
+
moveCameraFocusPX(xpx: number, ypx: number, dt: number): void;
|
|
272
|
+
holdCamera(): void;
|
|
273
|
+
releaseCamera(): void;
|
|
274
|
+
downloadVideo: () => void;
|
|
275
|
+
addLanguage: (config: LanguageConfig) => void;
|
|
276
|
+
setLanguage: (language: InterfaceLanguage | string) => void;
|
|
277
|
+
nextMovie: (movieId: number) => void;
|
|
278
|
+
correctSeekTimeToInteractive: (time: number) => number;
|
|
279
|
+
replayInteractive?: () => void;
|
|
280
|
+
stopPlayer?: () => void;
|
|
281
|
+
setLooped: (isLooped: boolean) => void;
|
|
282
|
+
reportProblem: () => void;
|
|
283
|
+
setAutoplayNextEnabled: (autoplayNext: boolean, byUser?: boolean) => void;
|
|
284
|
+
setTimerNextVideoRunning: (timerNextVideoRunning: boolean) => void;
|
|
285
|
+
prevVideoClick: (byUserAction?: boolean) => void;
|
|
286
|
+
nextVideoClick: (byUserAction?: boolean) => void;
|
|
287
|
+
nextVideoAnnouncementShow: () => void;
|
|
288
|
+
nextVideoAnnouncementClick: () => void;
|
|
289
|
+
nextVideoAnnouncementAuto: () => void;
|
|
290
|
+
nextVideoAnnouncementCancel: () => void;
|
|
291
|
+
checkFullscreenSupport: () => boolean;
|
|
292
|
+
changeDoubleForwardOn: (enabled: boolean) => void;
|
|
293
|
+
closePreviewTrack: () => void;
|
|
294
|
+
previewTrackOpened: () => void;
|
|
295
|
+
previewTrackDragStarted: () => void;
|
|
296
|
+
previewTrackDragFinished: () => void;
|
|
297
|
+
setFullscreenHandler: (cb: (() => void) | null) => void;
|
|
298
|
+
}
|
|
299
|
+
export interface IStoreExternalActions {
|
|
300
|
+
firstStart: (showAds: boolean) => void;
|
|
301
|
+
play: () => void;
|
|
302
|
+
pause: () => void;
|
|
303
|
+
stop: () => void;
|
|
304
|
+
seekTime: (time: number) => void;
|
|
305
|
+
seekEpisodeStartTime: (time: number) => void;
|
|
306
|
+
setPlaybackRate: (playbackRate: PlaybackRate) => void;
|
|
307
|
+
setAutoQualityLimits: (limits: QualityLimits) => void;
|
|
308
|
+
setMuted: (muted: boolean) => void;
|
|
309
|
+
toggleSubtitle: () => void;
|
|
310
|
+
changeSubtitle: (enabled: boolean, id?: string) => void;
|
|
311
|
+
setVolume: (volume: number) => void;
|
|
312
|
+
returnFocusToEpisodes: () => void;
|
|
313
|
+
updateAdditionalSettingsItem: (itemId: string, fields: Partial<Omit<AdditionalSettingsMenuItem, "id" | "type">>) => void;
|
|
314
|
+
addAdditionalSettingsItem: (newItem: AdditionalSettingsMenuItem) => void;
|
|
315
|
+
removeAdditionalSettingsItem: (itemId: string) => void;
|
|
316
|
+
updateAdditionalContextItem: (itemId: string, fields: Partial<Omit<AdditionalContextMenuItem, "id">>) => void;
|
|
317
|
+
addAdditionalContextItem: (newItem: AdditionalContextMenuItem) => void;
|
|
318
|
+
removeAdditionalContextItem: (itemId: string) => void;
|
|
319
|
+
updateAdditionalButton: (itemId: string, fields: Partial<Omit<AdditionalButton, "id" | "type">>) => void;
|
|
320
|
+
addAdditionalButton: (newButton: AdditionalButton) => void;
|
|
321
|
+
removeAdditionalButton: (itemId: string) => void;
|
|
322
|
+
setLiveLowLatency: (isLowLatency: boolean) => void;
|
|
323
|
+
hideControls: () => void;
|
|
324
|
+
showControls: () => void;
|
|
325
|
+
setQuality: (quality: VideoQualityUI) => void;
|
|
326
|
+
setTrafficSavingEnabled: (trafficSavingEnabled: boolean) => void;
|
|
327
|
+
setHighQualityEnabled: (highQualityEnabled: boolean) => void;
|
|
328
|
+
changeAudioStream: (id: string) => void;
|
|
329
|
+
setMinimalView: (enabled: boolean) => void;
|
|
330
|
+
toggleFullscreen: () => void;
|
|
331
|
+
}
|
|
332
|
+
export interface IStoreInitVideoConfig extends ICoreInitVideoConfig {
|
|
333
|
+
autoplay?: boolean;
|
|
334
|
+
canDownload?: boolean;
|
|
335
|
+
previewThumbsData?: ITimelinePreviewThumbsData;
|
|
336
|
+
subtitles?: Omit<IExternalTextTrack, "type">[];
|
|
337
|
+
subtitlesForcedLanguage?: string;
|
|
338
|
+
unitedVideoId?: number;
|
|
339
|
+
videoEpisodes?: IVideoEpisode[];
|
|
340
|
+
}
|
|
341
|
+
export interface IStore {
|
|
342
|
+
initVideo: (config: IStoreInitVideoConfig) => void;
|
|
343
|
+
videoId$: Writable<number | undefined>;
|
|
344
|
+
playerPhase: IPlayerPhase;
|
|
345
|
+
interfaceLanguage$: Readable<InterfaceLanguage | string>;
|
|
346
|
+
isCyrillicRelatedInterface$: Readable<boolean>;
|
|
347
|
+
interactiveData?: IInteractiveData;
|
|
348
|
+
vsid$: Readable<string | undefined>;
|
|
349
|
+
state: IPlayerState;
|
|
350
|
+
ui: IUIState;
|
|
351
|
+
ads: IAdsState;
|
|
352
|
+
webApi: IWebApi;
|
|
353
|
+
actions: {
|
|
354
|
+
internal: IStoreInternalActions;
|
|
355
|
+
external: IStoreExternalActions;
|
|
356
|
+
};
|
|
357
|
+
callbacks?: IVKVideoPlayerCallbacks;
|
|
358
|
+
setUiCallbacks: (uiCallbacks: IVKVideoPlayerUICallbacks) => void;
|
|
359
|
+
initAdmanWrapper: VoidFunction;
|
|
360
|
+
initOnFinishedCallback: VoidFunction;
|
|
361
|
+
resetAdsState: VoidFunction;
|
|
362
|
+
updateAdmanWrapperSubscriptions: VoidFunction;
|
|
363
|
+
updateStatisticsSubscriptions: VoidFunction;
|
|
364
|
+
updateAppTracerSubscriptions: VoidFunction;
|
|
365
|
+
updateTracerSubscriptions: VoidFunction;
|
|
366
|
+
getLogger: () => ILogger;
|
|
367
|
+
getPlayer: () => IPlayer;
|
|
368
|
+
destroy(): void;
|
|
369
|
+
}
|
|
370
|
+
export type EnrichedStore = IStore & {
|
|
371
|
+
stores: ICompositionResult["stores"];
|
|
372
|
+
destroyComposedStore: () => void;
|
|
373
|
+
};
|
|
374
|
+
export interface IStoreParams {
|
|
375
|
+
interfaceLanguage: InterfaceLanguage | string;
|
|
376
|
+
isCyrillicRelatedInterface: boolean;
|
|
377
|
+
initialVideoId?: number;
|
|
378
|
+
isTouch: boolean;
|
|
379
|
+
isLiveCatchUpMode?: boolean;
|
|
380
|
+
isAudioDisabled?: boolean;
|
|
381
|
+
canDownload?: boolean;
|
|
382
|
+
statAuthToken?: string;
|
|
383
|
+
callbacks?: IVKVideoPlayerCallbacks;
|
|
384
|
+
webApi?: IWebApi;
|
|
385
|
+
videoEpisodes?: IVideoEpisode[];
|
|
386
|
+
previewThumbsData?: ITimelinePreviewThumbsData;
|
|
387
|
+
uiConfig: IUIConfig;
|
|
388
|
+
coreConfig: IOptionalTuningConfig;
|
|
389
|
+
metaConfig: ISDKConfig["meta"];
|
|
390
|
+
player?: IPlayer;
|
|
391
|
+
isInteractive: boolean;
|
|
392
|
+
interactiveRanges$?: IValueObservable<InteractiveRange[]>;
|
|
393
|
+
isInteractiveTime$?: IValueObservable<boolean>;
|
|
394
|
+
replayInteractive?: () => void;
|
|
395
|
+
stopPlayer?: () => void;
|
|
396
|
+
hasInteractiveBranches?: boolean;
|
|
397
|
+
disabledControls: ControlsKeys;
|
|
398
|
+
playPrevChapterDisabledTooltip: PlayPrevChapterDisabledTooltipKey;
|
|
399
|
+
additionalButtons: Array<AdditionalButtonDeprecated | AdditionalDesktopControlPanelButton>;
|
|
400
|
+
additionalSettingsMenuItems: AdditionalSettingsMenuItem[];
|
|
401
|
+
additionalContextMenuItems: AdditionalContextMenuItem[];
|
|
402
|
+
playPrevVideo: () => void;
|
|
403
|
+
playNextVideo: () => void;
|
|
404
|
+
/**
|
|
405
|
+
* playPrevVideo или playNextVideo могут не вызваться, если обработка следующего видео находится на стороне интегарции,
|
|
406
|
+
* поэтому используем данный колбэк.
|
|
407
|
+
*/
|
|
408
|
+
onVideoChanged: (prev: boolean) => void;
|
|
409
|
+
looped?: boolean;
|
|
410
|
+
getStatisticsService: () => IUIStatistics | undefined;
|
|
411
|
+
saveRate: boolean;
|
|
412
|
+
internalsExposure: InternalsExposure | null;
|
|
413
|
+
playerView?: VideoPlayerView;
|
|
414
|
+
playerId: string;
|
|
415
|
+
getAppTracer: () => AppTracer | undefined;
|
|
416
|
+
getAdmanWrapper: () => AdmanWrapper | undefined;
|
|
417
|
+
logger: ILogger;
|
|
418
|
+
adsEnabled: boolean;
|
|
419
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { Readable } from "svelte/store";
|
|
2
|
+
import type { IValueObservable } from "@vkontakte/videoplayer-shared";
|
|
3
|
+
import type { IPlayer, IConfig, IObservable } from "@vkontakte/videoplayer-core";
|
|
4
|
+
import type { EnrichedStore, IAdsStateValues, IStore } from "./types";
|
|
5
|
+
import { type AdditionalButtonDeprecated } from "../types";
|
|
6
|
+
import type { AdditionalDesktopControlPanelButton } from "../components/Controls/types";
|
|
7
|
+
import type { ISDKConfig } from "../config";
|
|
8
|
+
export declare const setStores: (store: EnrichedStore) => void;
|
|
9
|
+
export declare const getStore: () => EnrichedStore;
|
|
10
|
+
/**
|
|
11
|
+
* Создаёт readable store svelte'а из `IObservableValue` sdk
|
|
12
|
+
*/
|
|
13
|
+
export declare const storeFromObservable: <T>(observable$: IValueObservable<T>, onNewValueEmitted?: (value: T) => void) => Readable<T>;
|
|
14
|
+
export declare const storeFromObservableWithInitValue: <T>(observable$: IObservable<T>, initValue: T, onNewValueEmitted?: (value: T) => void) => Readable<T>;
|
|
15
|
+
export declare const constructDebugTextData: (player: IPlayer, config: IConfig | undefined, store: IStore, traceId: string, metaConfig?: ISDKConfig["meta"]) => string;
|
|
16
|
+
export type DebugData = {
|
|
17
|
+
version: string;
|
|
18
|
+
viewport: string;
|
|
19
|
+
provider?: string;
|
|
20
|
+
cdn?: string;
|
|
21
|
+
id?: number;
|
|
22
|
+
volume: number;
|
|
23
|
+
videoSize?: string;
|
|
24
|
+
buffer?: number;
|
|
25
|
+
nativeBuffer?: number;
|
|
26
|
+
position?: number;
|
|
27
|
+
speed?: number;
|
|
28
|
+
bitrate?: number;
|
|
29
|
+
liveLatency?: number;
|
|
30
|
+
currentVideoSegmentLength?: number;
|
|
31
|
+
currentAudioSegmentLength?: number;
|
|
32
|
+
vsid?: string;
|
|
33
|
+
videoCodec?: string;
|
|
34
|
+
audioCodec?: string;
|
|
35
|
+
hdr?: boolean;
|
|
36
|
+
audioLanguage?: string;
|
|
37
|
+
};
|
|
38
|
+
export declare const constructDebugPanelData: (player: IPlayer, config: IConfig, store: IStore) => DebugData;
|
|
39
|
+
export declare const fetchVideoFile: (url: string, filename: string) => void;
|
|
40
|
+
export declare const isDeprecatedAdditionalButtonGuard: (btn: AdditionalButtonDeprecated | AdditionalDesktopControlPanelButton) => btn is AdditionalButtonDeprecated;
|
|
41
|
+
export declare const isAdditionalButtonGuard: (btn: AdditionalButtonDeprecated | AdditionalDesktopControlPanelButton) => btn is AdditionalDesktopControlPanelButton;
|
|
42
|
+
export declare const createDequeCache: <T>() => {
|
|
43
|
+
add: (key: string, value: T) => void;
|
|
44
|
+
find: (key: string) => [string, T] | undefined;
|
|
45
|
+
};
|
|
46
|
+
export declare class SubtitlesDownloader {
|
|
47
|
+
private destroyController;
|
|
48
|
+
private pendingDownloads;
|
|
49
|
+
download(url: string): Promise<string | null>;
|
|
50
|
+
destroy(): void;
|
|
51
|
+
isDestroyed(): boolean;
|
|
52
|
+
}
|
|
53
|
+
export declare const getAdsDefaultStateValues: () => IAdsStateValues;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InterfaceLanguage } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import type { Key, LanguageConfig } from "./types";
|
|
3
|
+
export declare const addLanguage: ({ language, pack, fallback }: LanguageConfig) => void;
|
|
4
|
+
export declare const haveLanguage: (language: InterfaceLanguage | string) => boolean;
|
|
5
|
+
export declare const translate: (language: InterfaceLanguage | string, key: Key, params?: Record<string, string>, defaultLanguage?: InterfaceLanguage) => string;
|
|
6
|
+
export declare const t: (key: Key, params?: Record<string, string>) => string;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { IAudioStream } from "@vkontakte/videoplayer-core";
|
|
2
|
+
export declare const getAudioStreamDisplayLabel: (stream: IAudioStream | undefined, allStreams: IAudioStream[]) => string;
|
|
3
|
+
export declare const getAudioChannelFormatLabel: (channels: number | undefined) => string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { InterfaceLanguage } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
export type Key = "auto_quality_invariant" | "auto_quality" | "menu_quality" | "menu_playback_rate" | "menu_traffic_saving" | "menu_report" | "menu_pip" | "menu_pip_close" | "menu_copy_video_link" | "menu_copy_video_link_with_timestamp" | "menu_video_rotate" | "menu_video_loop_on" | "menu_video_loop_off" | "menu_chromecast" | "menu_copy_debug" | "menu_save_debug" | "menu_debug_overlay" | "menu_copy_embed_code" | "pip_dummy_title" | "submenu_traffic_saving" | "submenu_quality" | "submenu_playback_rate" | "submenu_settings" | "submenu_audio_languages" | "auto_quality_option" | "playing_ads" | "skip_ads_now" | "skip_ads_after" | "visit_advertiser" | "aria_timeline" | "aria_timeline_value" | "doubletap_seek_step" | "playback_rate_1" | "playback_rate" | "video360" | "subtitles_caption" | "subtitles_auto" | "subtitles_off" | "subtitles_auto_caption" | "subtitles_turn_on" | "subtitles_turn_off" | "traffic_saving_off" | "traffic_saving_on" | "traffic_saving_helper_text" | "tooltip_previous" | "tooltip_restart" | "tooltip_play" | "tooltip_pause" | "tooltip_next" | "tooltip_button_disabled" | "tooltip_interactive_go_back" | "tooltip_interactive_go_back_disabled" | "tooltip_interactive_go_back_disabled_first" | "tooltip_interactive_go_back_disabled_limit" | "tooltip_chapter_without_interactive" | "tooltip_interactive_of_chapter_completed" | "tooltip_interactive_seek" | "tooltip_interactive_graph_off" | "tooltip_interactive_graph_on" | "tooltip_live" | "tooltip_episodes" | "tooltip_volume" | "tooltip_volume_muted" | "tooltip_sound_unavailable" | "tooltip_settings_on" | "tooltip_subtitles_off" | "tooltip_settings_off" | "tooltip_subtitles_on" | "tooltip_fullscreen_off" | "tooltip_fullscreen_on" | "tooltip_chromecast_off" | "tooltip_chromecast_on" | "tooltip_episode_finished" | "tooltip_episode_unfinished" | "tooltip_disabled_when_interactive" | "tooltip_disabled_when_graph_on" | "tooltip_interactive_interaction_time_indicator" | "tooltip_vk_logo" | "tooltip_vk_video_logo" | "tooltip_autoplay_off" | "tooltip_autoplay_on" | "tooltip_context_menu_open" | "tooltip_context_menu_close" | "download_video_caption" | "hotkey_helper_current_volume" | "hotkey_map_modal_title" | "hotkey_map_modal_close_btn_text" | "hotkey_map_group_title_common" | "hotkey_map_group_title_playback" | "hotkey_map_group_title_subtitles" | "hotkey_map_group_title_episodes" | "hotkey_map_item_mute_description" | "hotkey_map_item_mute_value" | "hotkey_map_item_volume_down_description" | "hotkey_map_item_volume_down_value" | "hotkey_map_item_volume_up_description" | "hotkey_map_item_volume_up_value" | "hotkey_map_item_pip_description" | "hotkey_map_item_pip_value" | "hotkey_map_item_full_screen_description" | "hotkey_map_item_full_screen_value" | "hotkey_map_item_show_context_menu_description" | "hotkey_map_item_show_context_menu_value" | "hotkey_map_item_show_hotkey_map_description" | "hotkey_map_item_show_hotkey_map_value" | "hotkey_map_item_play_toggle_description" | "hotkey_map_item_play_toggle_value" | "hotkey_map_item_seek_backward_description" | "hotkey_map_item_seek_backward_value" | "hotkey_map_item_seek_forward_description" | "hotkey_map_item_seek_forward_value" | "hotkey_map_item_fast_seek_backward_description" | "hotkey_map_item_fast_seek_backward_value" | "hotkey_map_item_fast_seek_forward_description" | "hotkey_map_item_fast_seek_forward_value" | "hotkey_map_item_rate_down_description" | "hotkey_map_item_rate_down_value" | "hotkey_map_item_rate_up_description" | "hotkey_map_item_rate_up_value" | "hotkey_map_item_prev_frame_description" | "hotkey_map_item_prev_frame_value" | "hotkey_map_item_next_frame_description" | "hotkey_map_item_next_frame_value" | "hotkey_map_item_jump_seek_description" | "hotkey_map_item_jump_seek_value" | "hotkey_map_item_subtitles_toggle_description" | "hotkey_map_item_subtitles_toggle_value" | "hotkey_map_item_prev_episode_description" | "hotkey_map_item_prev_episode_pc_value" | "hotkey_map_item_prev_episode_mac_value" | "hotkey_map_item_next_episode_description" | "hotkey_map_item_next_episode_pc_value" | "hotkey_map_item_next_episode_mac_value" | "hotkey_map_item_next_video_description" | "hotkey_map_item_next_video_value" | "hotkey_map_item_prev_video_description" | "hotkey_map_item_prev_video_value" | "waiting_live_day_value" | "waiting_live_hour_value" | "waiting_live_minute_value" | "waiting_live_second_value" | "waiting_live_colon" | "waiting_live_upcoming_title" | "waiting_live_timer_title" | "waiting_live_recover_title" | "waiting_record_title" | "aria_label_submenu_traffic_saving" | "aria_label_submenu_back" | "aria_label_menu_quality" | "aria_label_menu_rate" | "aria_label_menu_subtitle" | "aria_label_menu_download" | "aria_label_new_tab_alert" | "aria_label_menu_debug_overlay" | "aria_label_menu_rotate" | "aria_label_menu_loop" | "aria_label_debug_panel" | "aria_label_context_menu" | "aria_label_video_player" | "aria_label_spherical_control" | "aria_label_menu_audio_languages" | "aria_label_settings" | "aria_label_autoplay" | "menu_audio_languages" | "audio_stream_display_language_label" | "audio_stream_display_language_label_index" | "audio_stream_display_label_index" | "audio_stream_display_language_index" | "audio_stream_display_unknown" | "audio_channels_5_1" | "audio_channels_stereo" | "end_screen_next_video" | "end_screen_recommended_video" | "other_quality" | "high_quality" | "high_quality_description" | "auto_quality_limit" | "traffic_saving_quality" | "traffic_saving_quality_description" | "quality_applience" | "quality_applience_action" | "default_quality_for_any_video" | "slow_video_notification_button" | "slow_video_notification_force_description" | "slow_video_notification_suggest_description" | "double_forward_label" | "preview_track_notification_text" | "preview_track_close_tooltip";
|
|
3
|
+
export type LanguagePack = Record<Key, string>;
|
|
4
|
+
export type LanguageConfig = {
|
|
5
|
+
language: string;
|
|
6
|
+
fallback: InterfaceLanguage;
|
|
7
|
+
pack: LanguagePack;
|
|
8
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type AdsParams = Record<string, unknown>;
|
|
2
|
+
export interface IAdmanInitParamsExternalApi {
|
|
3
|
+
videoGetAds?: (p: AdsParams) => Promise<Record<string, unknown> | null>;
|
|
4
|
+
videoTrackAdEvent?: (sectionKey: string, bannerId: string) => Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
export type AdmanInitParams = {
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
isFullscreen: boolean;
|
|
10
|
+
isAutoplay: boolean;
|
|
11
|
+
slotId: number;
|
|
12
|
+
params?: AdsParams;
|
|
13
|
+
duration: number;
|
|
14
|
+
previewParam?: number;
|
|
15
|
+
adsContainer: HTMLElement;
|
|
16
|
+
adsVideoElement: HTMLVideoElement;
|
|
17
|
+
paramsOverride?: AdsParams;
|
|
18
|
+
externalApi?: IAdmanInitParamsExternalApi;
|
|
19
|
+
json?: Record<string, unknown>;
|
|
20
|
+
};
|