@vkontakte/videoplayer 1.1.86 → 1.1.87-dev.04ce2cd1.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 +423 -56
- package/es2015.esm.js +423 -56
- package/es2018.cjs +423 -56
- package/es2018.esm.js +423 -56
- package/es2024.cjs +423 -56
- package/es2024.esm.js +423 -56
- package/esnext.cjs +423 -56
- package/esnext.esm.js +423 -56
- package/evergreen.esm.js +423 -56
- package/package.json +5 -5
- package/types/VKVideoPlayer/HTMLElement.d.ts +1 -1
- package/types/VKVideoPlayer/index.svelte.d.ts +173 -173
- package/types/components/Ads/admanWrapper.d.ts +79 -75
- package/types/components/Ads/types.d.ts +27 -27
- package/types/components/Controls/contants/desktopButtonsLeftIds.d.ts +8 -8
- package/types/components/Controls/contants/desktopButtonsLeftWeights.d.ts +2 -4
- package/types/components/Controls/contants/desktopButtonsRightIds.d.ts +8 -8
- package/types/components/Controls/contants/desktopButtonsRightWeights.d.ts +2 -4
- package/types/components/Controls/types.d.ts +27 -27
- package/types/components/Controls/utils/isInnerButtonGuard.d.ts +1 -1
- package/types/components/Icons/constants.d.ts +5 -5
- package/types/components/Icons/utils.d.ts +1 -1
- package/types/components/Menus/constants/contextMenuItemIds.d.ts +10 -10
- package/types/components/Menus/constants/contextMenuItemWeights.d.ts +2 -4
- package/types/components/Menus/constants/index.d.ts +4 -4
- package/types/components/Menus/constants/openSubMenuItemsIds.d.ts +1 -1
- package/types/components/Menus/constants/settingsMenuItemIds.d.ts +10 -10
- package/types/components/Menus/constants/settingsMenuItemWeights.d.ts +2 -4
- package/types/components/Menus/constants/subMenuIds.d.ts +6 -6
- package/types/components/Menus/subMenuTabs/rootMenuItems.d.ts +26 -26
- package/types/components/Menus/subMenuTabs/sharedMenuItems.d.ts +7 -7
- package/types/components/Menus/subMenuTabs/subMenuItems.d.ts +4 -10
- package/types/components/Menus/subMenuTabs/types.d.ts +108 -108
- package/types/components/Menus/subMenuTabs/utils.d.ts +2 -2
- package/types/components/Menus/types.d.ts +64 -61
- package/types/components/Menus/utils/getCurrentQualityDisplayValue.d.ts +12 -12
- package/types/components/Menus/utils/getQualityIcon.d.ts +2 -2
- package/types/components/Menus/utils/getSubMenusStack.svelte.d.ts +7 -7
- package/types/components/Menus/utils/menuNavigation.d.ts +5 -5
- package/types/components/Root/types.d.ts +79 -79
- package/types/components/Root/utils.d.ts +2 -2
- package/types/components/Timeline/PreviewTrack/useTransitionToPreviewTrack.svelte.d.ts +15 -15
- package/types/components/Timeline/consts.d.ts +2 -2
- package/types/components/shared/interpolateUtils.d.ts +2 -2
- package/types/config.d.ts +270 -260
- package/types/constans/controls.d.ts +21 -21
- package/types/constans/grid.d.ts +9 -9
- package/types/constans/index.d.ts +8 -8
- package/types/constans/interactives.d.ts +4 -4
- package/types/constans/keyboard.d.ts +43 -48
- package/types/index.d.ts +16 -16
- package/types/services/statistics.d.ts +13 -13
- package/types/store/index.d.ts +391 -391
- package/types/store/micro/base.d.ts +6 -6
- package/types/store/micro/fakeIsPlaying.d.ts +8 -10
- package/types/store/micro/graphIsOpened.d.ts +11 -13
- package/types/store/micro/index.d.ts +1 -1
- package/types/store/micro/interactiveControlsOpacity.d.ts +8 -10
- package/types/store/micro/notifications.d.ts +7 -10
- package/types/store/micro/pictureInPicture.d.ts +6 -9
- package/types/store/micro/seekToInteractiveDisabledTooltip.d.ts +8 -7
- package/types/store/micro/showInteractiveTimeIndicatorTooltip.d.ts +13 -12
- package/types/store/utils.d.ts +36 -36
- package/types/translation/index.d.ts +2 -2
- package/types/translation/labels.d.ts +1 -1
- package/types/translation/packs/en.d.ts +1 -1
- package/types/translation/packs/ru.d.ts +1 -1
- package/types/translation/types.d.ts +5 -5
- package/types/types/index.d.ts +534 -516
- package/types/types/svg.d.d.ts +5 -0
- package/types/utils/CaptionsPrepared.d.ts +15 -15
- package/types/utils/WebVttParser.d.ts +11 -11
- package/types/utils/attachments/defferedDisableByCondition.d.ts +3 -3
- package/types/utils/changeVolume.d.ts +6 -6
- package/types/utils/elementHelpers.d.ts +2 -2
- package/types/utils/findCurrentSubtltlePhrase.d.ts +1 -1
- package/types/utils/fullscreen.d.ts +14 -14
- package/types/utils/getActualEpisode.d.ts +7 -7
- package/types/utils/getControlInfo.d.ts +5 -7
- package/types/utils/getHotKeyMapData.d.ts +1 -1
- package/types/utils/grid.d.ts +1 -1
- package/types/utils/hooks/useIosSafariFullscreen.d.ts +2 -2
- package/types/utils/hooks/useIosSafariFullscreenSubtitles.d.ts +3 -3
- package/types/utils/keyboardHandleCases.d.ts +1 -1
- package/types/utils/notificationShowManager.d.ts +7 -6
- package/types/utils/roundFps.d.ts +1 -1
- package/types/utils/sanitizeHtml.d.ts +3 -3
- package/types/utils/sorts.d.ts +2 -2
- package/types/utils/stack/index.d.ts +7 -7
- package/types/utils/stack/node.d.ts +3 -3
- package/types/utils/subtitles.d.ts +8 -8
- package/types/utils/timeout.d.ts +2 -2
- package/types/utils/updatePlayerControlBlocks.d.ts +2 -2
- package/types/utils/updatePlayerControlsInfo.d.ts +2 -2
- package/types/utils/userSettings.d.ts +26 -21
- package/types/utils/videoConfig.d.ts +6 -2
- package/types/utils/volumeChange.d.ts +1 -1
- package/types/utils/webAPI/annotationsApi/annotationsApi.d.ts +31 -31
- package/types/utils/webAPI/annotationsApi/errors.d.ts +1 -1
- package/types/utils/webAPI/focusLock.d.ts +30 -30
- package/types/utils/webAPI/focusManager.d.ts +15 -15
- package/types/utils/webAPI/language.d.ts +1 -1
- package/types/utils/webAPI/mediaSessionApi.d.ts +14 -14
- package/types/utils/webAPI/pictureInPictureApi/documentPictureInPictureApi.svelte.d.ts +41 -41
- package/types/utils/webAPI/pictureInPictureApi/factory.d.ts +2 -2
- package/types/utils/webAPI/pictureInPictureApi/index.d.ts +4 -4
- package/types/utils/webAPI/pictureInPictureApi/pictureInPictureApi.d.ts +46 -46
- package/types/utils/webAPI/pictureInPictureApi/types.d.ts +4 -4
- package/types/utils/webAPI/pictureInPictureApi/utils.d.ts +3 -3
- package/types/utils/webAPI/slotsApi.d.ts +41 -41
package/types/store/index.d.ts
CHANGED
|
@@ -1,405 +1,405 @@
|
|
|
1
|
-
import type { IAudioStream, IConfig, IExternalTextTrack, IOptionalTuningConfig, IPlayer, ISources, ITextTrack, IVideoStream, PlaybackRate } from
|
|
2
|
-
import { ChromecastState, PlaybackState, VideoFormat } from
|
|
3
|
-
import
|
|
4
|
-
import type
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import type {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import type
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import type {
|
|
18
|
-
import type {
|
|
19
|
-
import type {
|
|
1
|
+
import type { IAudioStream, IConfig, IExternalTextTrack, IOptionalTuningConfig, IPlayer, ISources, ITextTrack, IVideoStream, PlaybackRate } from "@vkontakte/videoplayer-core";
|
|
2
|
+
import { ChromecastState, PlaybackState, VideoFormat } from "@vkontakte/videoplayer-core";
|
|
3
|
+
import type { AppTracer } from "@vkontakte/videoplayer-shared";
|
|
4
|
+
import { type IError, type ILogger, InterfaceLanguage, type IRectangle, type IValueObservable, type QualityLimits, VideoQuality, type InternalsExposure } from "@vkontakte/videoplayer-shared";
|
|
5
|
+
import type { ISDKConfig, IUIConfig } from "../config";
|
|
6
|
+
import { SeekAction, ThinOneStat } from "@vkontakte/videoplayer-statistics";
|
|
7
|
+
import type { InteractiveRange } from "@vkontakte/videoplayer-interactive";
|
|
8
|
+
import type { Readable, Writable } from "svelte/store";
|
|
9
|
+
import { AdmanWrapper } from "../components/Ads/admanWrapper";
|
|
10
|
+
import type { Key, LanguageConfig } from "../translation/types";
|
|
11
|
+
import { type AdditionalButtonDeprecated, type ControlBlocksRefs, type ControlsKeys, type HotKeyMapData, type IAnnotationsApi, type IControlInfo, type IDisabledControls, type IInteractiveData, type IPictureInPictureApi, type IPlayerControlsRef, type IPlayerPhase, type ITimelinePreviewThumbsData, type IVideoEpisode, type IVKVideoPlayerCallbacks, type IVKVideoPlayerUICallbacks, type PlaybackStateRealistic, type Position, type Size, type VideoPlaybackRate, type VideoPlayerView, type VideoQualityForRender, type VideoQualityUI, type VideoSubtitle, type VideoSubtitleParsed } from "../types";
|
|
12
|
+
import { AdsPlaybackState } from "../types";
|
|
13
|
+
import { type QualitySettingsAppliesTo } from "../utils/userSettings";
|
|
14
|
+
import type { DebugData } from "./utils";
|
|
15
|
+
import type { GridTypes } from "../constans";
|
|
16
|
+
import { type PlayPrevChapterDisabledTooltipKey } from "../constans";
|
|
17
|
+
import type { UIOneStat } from "../services/statistics";
|
|
18
|
+
import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem, ContextMenuItem, SettingsMenuItem } from "../components/Menus/subMenuTabs/types";
|
|
19
|
+
import type { AdditionalButton, AdditionalDesktopControlPanelButton } from "../components/Controls/types";
|
|
20
|
+
import type { SlotsApi } from "../utils/webAPI/slotsApi";
|
|
21
|
+
import type { FocusManager } from "../utils/webAPI/focusManager";
|
|
20
22
|
type SetQualityInfo = {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
appliesTo?: QualitySettingsAppliesTo;
|
|
24
|
+
changeReason?: "default" | "limit-changed";
|
|
25
|
+
byUser?: boolean;
|
|
24
26
|
};
|
|
25
27
|
export interface IAdsState {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
position: Writable<number>;
|
|
29
|
+
duration: Writable<number>;
|
|
30
|
+
playbackState: Writable<AdsPlaybackState>;
|
|
31
|
+
canSkip: Writable<boolean>;
|
|
32
|
+
secondsToWatchBeforeSkip: Writable<number>;
|
|
33
|
+
postrollPassed: Writable<boolean>;
|
|
32
34
|
}
|
|
33
35
|
export interface IUIState {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
previewTrackAvailable: Readable<boolean>;
|
|
145
|
-
isPreviewTrackHorizontallyAligned: Readable<boolean>;
|
|
36
|
+
t: (key: Key, params?: Record<string, string>) => string;
|
|
37
|
+
isMinimalView$: Writable<boolean>;
|
|
38
|
+
controlsVisible: Writable<boolean>;
|
|
39
|
+
/**
|
|
40
|
+
* Точечно скрываем контролы.
|
|
41
|
+
*/
|
|
42
|
+
hiddenControls: Partial<Record<keyof IPlayerControlsRef, Writable<boolean>>>;
|
|
43
|
+
/**
|
|
44
|
+
* Определяет, могут ли вообще контролы быть показаны.
|
|
45
|
+
*/
|
|
46
|
+
isControlsAvailable: Writable<boolean>;
|
|
47
|
+
controlBlocks: { [key in keyof Required<ControlBlocksRefs>] : Writable<IControlInfo | undefined> };
|
|
48
|
+
touched: Writable<boolean>;
|
|
49
|
+
controls: {
|
|
50
|
+
prevButton: Writable<IControlInfo | undefined>;
|
|
51
|
+
playButton: Writable<IControlInfo | undefined>;
|
|
52
|
+
replayButton: Writable<IControlInfo | undefined>;
|
|
53
|
+
nextButton: Writable<IControlInfo | undefined>;
|
|
54
|
+
playPrevChapterButton: Writable<IControlInfo | undefined>;
|
|
55
|
+
seekToInteractiveButton: Writable<IControlInfo | undefined>;
|
|
56
|
+
interactiveGraphButton: Writable<IControlInfo | undefined>;
|
|
57
|
+
liveButton: Writable<IControlInfo | undefined>;
|
|
58
|
+
time: Writable<IControlInfo | undefined>;
|
|
59
|
+
episodes: Writable<IControlInfo | undefined>;
|
|
60
|
+
volume: Writable<IControlInfo | undefined>;
|
|
61
|
+
subtitles: Writable<IControlInfo | undefined>;
|
|
62
|
+
settings: Writable<IControlInfo | undefined>;
|
|
63
|
+
context: Writable<IControlInfo | undefined>;
|
|
64
|
+
fullscreen: Writable<IControlInfo | undefined>;
|
|
65
|
+
chromecast: Writable<IControlInfo | undefined>;
|
|
66
|
+
pip: Writable<IControlInfo | undefined>;
|
|
67
|
+
"theater-mode-button": Writable<IControlInfo | undefined>;
|
|
68
|
+
vkLogo: Writable<IControlInfo | undefined>;
|
|
69
|
+
interactiveTimeIndicator: Writable<IControlInfo | undefined>;
|
|
70
|
+
timeline: Writable<IControlInfo | undefined>;
|
|
71
|
+
autoplayNextToggle: Writable<IControlInfo | undefined>;
|
|
72
|
+
disabledControls$: IDisabledControls;
|
|
73
|
+
additionalButtons: Writable<IControlInfo | undefined>[];
|
|
74
|
+
};
|
|
75
|
+
modals: {
|
|
76
|
+
hotKeyMap: {
|
|
77
|
+
show: Writable<boolean>;
|
|
78
|
+
data: Writable<HotKeyMapData>;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
isFullscreen: Writable<boolean>;
|
|
82
|
+
isFullscreenOpenedByKeyboard: Writable<boolean>;
|
|
83
|
+
rotateAlpha: Writable<number>;
|
|
84
|
+
isAutoplay: Writable<boolean>;
|
|
85
|
+
debugPanelVisible: Writable<boolean>;
|
|
86
|
+
episodes: {
|
|
87
|
+
panelOpened$: Writable<boolean>;
|
|
88
|
+
openedByKeyboard$: Writable<boolean>;
|
|
89
|
+
};
|
|
90
|
+
contextMenu: {
|
|
91
|
+
visible$: Writable<boolean>;
|
|
92
|
+
btnRef$: Writable<HTMLButtonElement | undefined>;
|
|
93
|
+
openedByBtnKeyboard$: Writable<boolean>;
|
|
94
|
+
openedByHotKey$: Writable<boolean>;
|
|
95
|
+
lastActiveElem$: Writable<HTMLButtonElement | undefined>;
|
|
96
|
+
showContextMenuBtn$: Writable<boolean>;
|
|
97
|
+
position$: Writable<Position>;
|
|
98
|
+
};
|
|
99
|
+
playerSize: Writable<Size>;
|
|
100
|
+
isMobile: Writable<boolean>;
|
|
101
|
+
mobileNotReportControlHidden$: Readable<boolean>;
|
|
102
|
+
icon3DVideoVisible: Writable<boolean>;
|
|
103
|
+
scrubbingInProgress: Writable<boolean>;
|
|
104
|
+
volumeChangingInProgress: Writable<boolean>;
|
|
105
|
+
is3DVideo: Writable<boolean>;
|
|
106
|
+
currentGridType$: Readable<GridTypes>;
|
|
107
|
+
interactiveHideMobileControls: Writable<boolean>;
|
|
108
|
+
additionalButtonsDeprecated$: Readable<AdditionalButtonDeprecated[]>;
|
|
109
|
+
additionalDesktopControlPanelRightButtons$: Readable<AdditionalDesktopControlPanelButton[]>;
|
|
110
|
+
additionalSettingsMenuItems$: Readable<SettingsMenuItem[]>;
|
|
111
|
+
additionalContextMenuItems$: Readable<ContextMenuItem[]>;
|
|
112
|
+
overlayContainer$: Writable<HTMLDivElement | undefined>;
|
|
113
|
+
startedByKeyboard$: Writable<boolean>;
|
|
114
|
+
autoplayNextEnabled$: Writable<boolean>;
|
|
115
|
+
timerNextVideoRunning$: Writable<boolean>;
|
|
116
|
+
settingsMenu: {
|
|
117
|
+
visible$: Writable<boolean>;
|
|
118
|
+
ref$: Writable<HTMLElement | undefined>;
|
|
119
|
+
openedByBtnKeyboard$: Writable<boolean>;
|
|
120
|
+
};
|
|
121
|
+
settingsSubMenu: {
|
|
122
|
+
visible$: Writable<boolean>;
|
|
123
|
+
ref$: Writable<HTMLElement | undefined>;
|
|
124
|
+
name$: Writable<string | undefined>;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Отключаем любое действие пользователя.
|
|
128
|
+
*/
|
|
129
|
+
userActionsDisabled: Writable<boolean>;
|
|
130
|
+
/**
|
|
131
|
+
* Положение заголовка названия видео.
|
|
132
|
+
*/
|
|
133
|
+
videoTitleInfo: Writable<IControlInfo | undefined>;
|
|
134
|
+
/**
|
|
135
|
+
* Ускорение видео х2.
|
|
136
|
+
*/
|
|
137
|
+
doubleForwardOn$: Writable<boolean>;
|
|
138
|
+
/**
|
|
139
|
+
* Определяет, что двойное ускорение видео доступно.
|
|
140
|
+
*/
|
|
141
|
+
doubleForwardAvailable$: Readable<false>;
|
|
142
|
+
previewTrackActive: Writable<boolean>;
|
|
143
|
+
previewTrackDragInProgress: Writable<boolean>;
|
|
144
|
+
previewTrackAvailable: Readable<boolean>;
|
|
145
|
+
isPreviewTrackHorizontallyAligned: Readable<boolean>;
|
|
146
146
|
}
|
|
147
147
|
export interface IWebApi {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
148
|
+
pictureInPictureApi?: IPictureInPictureApi;
|
|
149
|
+
annotationsApi?: IAnnotationsApi;
|
|
150
|
+
slotsApi?: SlotsApi;
|
|
151
|
+
focusManager?: FocusManager;
|
|
152
152
|
}
|
|
153
153
|
export interface IStore {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
154
|
+
initVideo: (config: IConfig & {
|
|
155
|
+
subtitles?: Omit<IExternalTextTrack, "type">[];
|
|
156
|
+
subtitlesForcedLanguage?: string;
|
|
157
|
+
}) => void;
|
|
158
|
+
videoId?: number;
|
|
159
|
+
isClip: boolean;
|
|
160
|
+
playerPhase: IPlayerPhase;
|
|
161
|
+
interfaceLanguage$: Readable<InterfaceLanguage | string>;
|
|
162
|
+
isCyrillicRelatedInterface$: Readable<boolean>;
|
|
163
|
+
interactiveData?: IInteractiveData;
|
|
164
|
+
vsid: Readable<string | undefined>;
|
|
165
|
+
state: {
|
|
166
|
+
positionExact$: Readable<number>;
|
|
167
|
+
positionWithScrubbing$: Readable<number>;
|
|
168
|
+
duration$: Readable<number>;
|
|
169
|
+
playbackState$: Readable<PlaybackState | undefined>;
|
|
170
|
+
playbackStateRealistic$: Readable<PlaybackStateRealistic | undefined>;
|
|
171
|
+
isPlaying$: Readable<boolean>;
|
|
172
|
+
isLoaderVisible: Readable<boolean>;
|
|
173
|
+
bufferedProgress$: Readable<number>;
|
|
174
|
+
isLive$: Readable<boolean | undefined>;
|
|
175
|
+
canChangePlaybackSpeed$: Readable<boolean | undefined>;
|
|
176
|
+
isActiveLive$: Readable<boolean | undefined>;
|
|
177
|
+
isOldestAvailableLive$: Readable<boolean | undefined>;
|
|
178
|
+
isRewindableLive$: Readable<boolean>;
|
|
179
|
+
isEnded$: Readable<boolean>;
|
|
180
|
+
volume$: Readable<number>;
|
|
181
|
+
muted$: Readable<boolean>;
|
|
182
|
+
trafficSavingEnabled$: Readable<boolean>;
|
|
183
|
+
highQualityEnabled$: Readable<boolean>;
|
|
184
|
+
availableVideoStreams$: Readable<IVideoStream[]>;
|
|
185
|
+
availableAudioStreams$: Readable<IAudioStream[]>;
|
|
186
|
+
videoStream$: Readable<IVideoStream | undefined>;
|
|
187
|
+
audioStream$: Readable<IAudioStream | undefined>;
|
|
188
|
+
currentQuality$: Readable<VideoQuality | undefined>;
|
|
189
|
+
autoQualityLimitingAvailable$: Readable<boolean>;
|
|
190
|
+
isAutoQualityEnabled$: Readable<boolean | undefined>;
|
|
191
|
+
availableQualities$: Readable<VideoQualityForRender[]>;
|
|
192
|
+
currentPlaybackRate$: Readable<number>;
|
|
193
|
+
availablePlaybackRates$: Readable<VideoPlaybackRate[]>;
|
|
194
|
+
currentSubtitle$: Readable<Omit<VideoSubtitle, "selected">>;
|
|
195
|
+
availableTextTracks$: Readable<ITextTrack[]>;
|
|
196
|
+
availableSubtitlesList$: Readable<VideoSubtitle[]>;
|
|
197
|
+
currentSubtitleCaptions$: Readable<VideoSubtitleParsed["texts"]>;
|
|
198
|
+
isAutoSubtitleCaptionVisible$: Writable<boolean>;
|
|
199
|
+
chromecastState$: Readable<ChromecastState>;
|
|
200
|
+
chromecastDeviceName$: Readable<string | undefined>;
|
|
201
|
+
chromecastConnected$: Readable<boolean>;
|
|
202
|
+
currentFormat$: Readable<VideoFormat | undefined>;
|
|
203
|
+
throughputEstimation$: Readable<number | undefined>;
|
|
204
|
+
videoBitrate$: Readable<number | undefined>;
|
|
205
|
+
videoSize$: Readable<IRectangle | undefined>;
|
|
206
|
+
errorLog$: Readable<IError[]>;
|
|
207
|
+
crashed$: Readable<boolean>;
|
|
208
|
+
isAudioAvailable$: Readable<boolean>;
|
|
209
|
+
isAudioDisabled: boolean;
|
|
210
|
+
canDownload: boolean;
|
|
211
|
+
availableSources$: Readable<ISources | undefined>;
|
|
212
|
+
hasMpegSources$: Readable<boolean>;
|
|
213
|
+
isInteractive: boolean;
|
|
214
|
+
showInteractiveGraph: boolean;
|
|
215
|
+
showSeekToInteractive: boolean;
|
|
216
|
+
showPlayPrevChapter: boolean;
|
|
217
|
+
showInteractiveTimeIndicator: boolean;
|
|
218
|
+
isInteractiveTime$: Readable<boolean>;
|
|
219
|
+
interactiveEpisodes$: Readable<IVideoEpisode[]>;
|
|
220
|
+
isInteractiveExpectation$: Writable<boolean>;
|
|
221
|
+
hasInteractiveBranches?: boolean;
|
|
222
|
+
playPrevChapterDisabledTooltip: PlayPrevChapterDisabledTooltipKey;
|
|
223
|
+
looped$: Writable<boolean>;
|
|
224
|
+
loadedMetadata$: Writable<boolean>;
|
|
225
|
+
/**
|
|
226
|
+
* Определяет, можно ли в целом увидеть/выбрать Авто режим выбора качества.
|
|
227
|
+
*/
|
|
228
|
+
isAutoQualityAvailable$: Readable<boolean>;
|
|
229
|
+
};
|
|
230
|
+
ui: IUIState;
|
|
231
|
+
ads: IAdsState;
|
|
232
|
+
webApi: IWebApi;
|
|
233
|
+
actions: {
|
|
234
|
+
internal: {
|
|
235
|
+
preload: () => void;
|
|
236
|
+
firstStart: (showAds: boolean) => void;
|
|
237
|
+
play: () => void;
|
|
238
|
+
pause: () => void;
|
|
239
|
+
togglePlay: () => void;
|
|
240
|
+
toggleMuted: () => void;
|
|
241
|
+
openSettingsMenu: (wasOpenedByKey?: boolean, tick?: () => Promise<void>) => void;
|
|
242
|
+
closeSettingsMenu: (fromSubMenu?: boolean) => void;
|
|
243
|
+
openSettingsSubMenu: (name: string, ref: HTMLElement) => void;
|
|
244
|
+
closeSettingsSubMenu: (ref: HTMLElement, isClosing?: boolean) => void;
|
|
245
|
+
setTrafficSavingEnabled: (trafficSavingEnabled: boolean, appliesTo?: QualitySettingsAppliesTo) => void;
|
|
246
|
+
setHighQualityEnabled: (highQualityEnabled: boolean, appliesTo?: QualitySettingsAppliesTo) => void;
|
|
247
|
+
setVolume: (volume: number) => void;
|
|
248
|
+
setMuted: (muted: boolean) => void;
|
|
249
|
+
startVolumeChanging: () => void;
|
|
250
|
+
stopVolumeChanging: () => void;
|
|
251
|
+
setAudioStream: (stream: IAudioStream) => void;
|
|
252
|
+
setVideoStream: (stream: IVideoStream) => void;
|
|
253
|
+
setQuality: (quality: VideoQualityUI, info?: SetQualityInfo) => void;
|
|
254
|
+
setPlaybackRate: (playbackRate: PlaybackRate) => void;
|
|
255
|
+
incrementPlaybackRate: () => VideoPlaybackRate;
|
|
256
|
+
decrementPlaybackRate: () => VideoPlaybackRate;
|
|
257
|
+
setSubtitle: (subtitle?: VideoSubtitle) => void;
|
|
258
|
+
toggleSubtitle: () => void;
|
|
259
|
+
togglePictureInPicture: () => void;
|
|
260
|
+
startScrubbing: (progress: number) => void;
|
|
261
|
+
progressScrubbing: (progress: number) => void;
|
|
262
|
+
completeScrubbing: (progress: number, forcePrecise?: boolean, action?: ThinOneStat.ActionSeekType | SeekAction) => void;
|
|
263
|
+
toggleChromecast: () => void;
|
|
264
|
+
seekTime: (time: number, action: SeekAction, forcePrecise?: boolean) => void;
|
|
265
|
+
seekEpisodeStartTime: (time: number) => void;
|
|
266
|
+
getNextEpisode: () => IVideoEpisode | undefined;
|
|
267
|
+
seekToNextEpisode: (episode?: IVideoEpisode) => void;
|
|
268
|
+
getPrevEpisode: () => IVideoEpisode | undefined;
|
|
269
|
+
seekToPrevEpisode: (episode?: IVideoEpisode) => void;
|
|
270
|
+
seekToPercent: (percent: number, action: SeekAction) => void;
|
|
271
|
+
switchToActiveLive: () => void;
|
|
272
|
+
switchFromAdsToVideo: (callPlay?: boolean) => void;
|
|
273
|
+
switchFromVideoToAds: () => void;
|
|
274
|
+
skipAd: () => void;
|
|
275
|
+
setLiveWaitingStart: (state: boolean) => void;
|
|
276
|
+
setLiveWaitingRecover: (state: boolean) => void;
|
|
277
|
+
setLiveWaitingRecord: (state: boolean) => void;
|
|
278
|
+
clearDelayedBufferingCheckTimeout: () => void;
|
|
279
|
+
getDebugTextData: () => string;
|
|
280
|
+
getTraceTextData: () => string;
|
|
281
|
+
getDebugPanelData: () => DebugData;
|
|
282
|
+
getVideoElement: () => HTMLVideoElement | null;
|
|
283
|
+
startLogging: () => void;
|
|
284
|
+
stopLogging: () => void;
|
|
285
|
+
videoRotate: (alphaDiff?: number) => void;
|
|
286
|
+
startCameraManualRotation(mx: number, my: number): void;
|
|
287
|
+
stopCameraManualRotation(immediate?: boolean): void;
|
|
288
|
+
moveCameraFocusPX(xpx: number, ypx: number, dt: number): void;
|
|
289
|
+
holdCamera(): void;
|
|
290
|
+
releaseCamera(): void;
|
|
291
|
+
getVideoEpisodes: () => IVideoEpisode[] | undefined;
|
|
292
|
+
getPreviewThumbsData: () => ITimelinePreviewThumbsData | undefined;
|
|
293
|
+
downloadVideo: () => void;
|
|
294
|
+
addLanguage: (config: LanguageConfig) => void;
|
|
295
|
+
setLanguage: (language: InterfaceLanguage | string) => void;
|
|
296
|
+
nextMovie: (movieId: number) => void;
|
|
297
|
+
correctSeekTimeToInteractive: (time: number) => number;
|
|
298
|
+
replayInteractive?: () => void;
|
|
299
|
+
stopPlayer?: () => void;
|
|
300
|
+
setLooped: (isLooped: boolean) => void;
|
|
301
|
+
reportProblem: () => void;
|
|
302
|
+
setAutoplayNextEnabled: (autoplayNext: boolean, byUser?: boolean) => void;
|
|
303
|
+
setTimerNextVideoRunning: (timerNextVideoRunning: boolean) => void;
|
|
304
|
+
prevVideoClick: (byUserAction?: boolean) => void;
|
|
305
|
+
nextVideoClick: (byUserAction?: boolean) => void;
|
|
306
|
+
nextVideoAnnouncementShow: () => void;
|
|
307
|
+
nextVideoAnnouncementClick: () => void;
|
|
308
|
+
nextVideoAnnouncementAuto: () => void;
|
|
309
|
+
nextVideoAnnouncementCancel: () => void;
|
|
310
|
+
checkFullscreenSupport: () => boolean;
|
|
311
|
+
changeDoubleForwardOn: (enabled: boolean) => void;
|
|
312
|
+
closePreviewTrack: () => void;
|
|
313
|
+
previewTrackOpened: () => void;
|
|
314
|
+
previewTrackDragStarted: () => void;
|
|
315
|
+
previewTrackDragFinished: () => void;
|
|
316
|
+
};
|
|
317
|
+
external: {
|
|
318
|
+
firstStart: (showAds: boolean) => void;
|
|
319
|
+
play: () => void;
|
|
320
|
+
pause: () => void;
|
|
321
|
+
stop: () => void;
|
|
322
|
+
seekTime: (time: number) => void;
|
|
323
|
+
seekEpisodeStartTime: (time: number) => void;
|
|
324
|
+
setPlaybackRate: (playbackRate: PlaybackRate) => void;
|
|
325
|
+
setAutoQualityLimits: (limits: QualityLimits) => void;
|
|
326
|
+
setMuted: (muted: boolean) => void;
|
|
327
|
+
toggleSubtitle: () => void;
|
|
328
|
+
changeSubtitle: (enabled: boolean, id?: string) => void;
|
|
329
|
+
setVolume: (volume: number) => void;
|
|
330
|
+
returnFocusToEpisodes: () => void;
|
|
331
|
+
updateAdditionalSettingsItem: (itemId: string, fields: Partial<Omit<AdditionalSettingsMenuItem, "id" | "type">>) => void;
|
|
332
|
+
addAdditionalSettingsItem: (newItem: AdditionalSettingsMenuItem) => void;
|
|
333
|
+
removeAdditionalSettingsItem: (itemId: string) => void;
|
|
334
|
+
updateAdditionalContextItem: (itemId: string, fields: Partial<Omit<AdditionalContextMenuItem, "id">>) => void;
|
|
335
|
+
addAdditionalContextItem: (newItem: AdditionalContextMenuItem) => void;
|
|
336
|
+
removeAdditionalContextItem: (itemId: string) => void;
|
|
337
|
+
updateAdditionalButton: (itemId: string, fields: Partial<Omit<AdditionalButton, "id" | "type">>) => void;
|
|
338
|
+
addAdditionalButton: (newButton: AdditionalButton) => void;
|
|
339
|
+
removeAdditionalButton: (itemId: string) => void;
|
|
340
|
+
setLiveLowLatency: (isLowLatency: boolean) => void;
|
|
341
|
+
hideControls: () => void;
|
|
342
|
+
showControls: () => void;
|
|
343
|
+
setQuality: (quality: VideoQualityUI) => void;
|
|
344
|
+
setTrafficSavingEnabled: (trafficSavingEnabled: boolean) => void;
|
|
345
|
+
setHighQualityEnabled: (highQualityEnabled: boolean) => void;
|
|
346
|
+
changeAudioStream: (id: string) => void;
|
|
347
|
+
setMinimalView: (enabled: boolean) => void;
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
callbacks?: IVKVideoPlayerCallbacks;
|
|
351
|
+
setUiCallbacks: (uiCallbacks: IVKVideoPlayerUICallbacks) => void;
|
|
352
|
+
getAdmanWrapper: () => AdmanWrapper;
|
|
353
|
+
getLogger: () => ILogger;
|
|
354
|
+
getPlayer: () => IPlayer;
|
|
355
|
+
destroy(): void;
|
|
356
356
|
}
|
|
357
357
|
interface IStoreParams {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
358
|
+
interfaceLanguage: InterfaceLanguage | string;
|
|
359
|
+
isCyrillicRelatedInterface: boolean;
|
|
360
|
+
videoId?: number;
|
|
361
|
+
isClip: boolean;
|
|
362
|
+
isLiveCatchUpMode?: boolean;
|
|
363
|
+
isAudioDisabled?: boolean;
|
|
364
|
+
canDownload?: boolean;
|
|
365
|
+
statAuthToken?: string;
|
|
366
|
+
callbacks?: IVKVideoPlayerCallbacks;
|
|
367
|
+
webApi?: IWebApi;
|
|
368
|
+
videoEpisodes?: IVideoEpisode[];
|
|
369
|
+
previewThumbsData?: ITimelinePreviewThumbsData;
|
|
370
|
+
uiConfig: IUIConfig;
|
|
371
|
+
coreConfig: IOptionalTuningConfig;
|
|
372
|
+
metaConfig: ISDKConfig["meta"];
|
|
373
|
+
player?: IPlayer;
|
|
374
|
+
isInteractive: boolean;
|
|
375
|
+
interactiveRanges$?: IValueObservable<InteractiveRange[]>;
|
|
376
|
+
isInteractiveTime$?: IValueObservable<boolean>;
|
|
377
|
+
replayInteractive?: () => void;
|
|
378
|
+
stopPlayer?: () => void;
|
|
379
|
+
hasInteractiveBranches?: boolean;
|
|
380
|
+
disabledControls: ControlsKeys;
|
|
381
|
+
playPrevChapterDisabledTooltip: PlayPrevChapterDisabledTooltipKey;
|
|
382
|
+
additionalButtons: Array<AdditionalButtonDeprecated | AdditionalDesktopControlPanelButton>;
|
|
383
|
+
additionalSettingsMenuItems: AdditionalSettingsMenuItem[];
|
|
384
|
+
additionalContextMenuItems: AdditionalContextMenuItem[];
|
|
385
|
+
playPrevVideo: () => void;
|
|
386
|
+
playNextVideo: () => void;
|
|
387
|
+
/**
|
|
388
|
+
* playPrevVideo или playNextVideo могут не вызваться, если обработка следующего видео находится на стороне интегарции,
|
|
389
|
+
* поэтому используем данный колбэк.
|
|
390
|
+
*/
|
|
391
|
+
onVideoChanged: (prev: boolean) => void;
|
|
392
|
+
looped?: boolean;
|
|
393
|
+
statistics?: UIOneStat;
|
|
394
|
+
saveRate: boolean;
|
|
395
|
+
internalsExposure: InternalsExposure | null;
|
|
396
|
+
playerView?: VideoPlayerView;
|
|
397
|
+
playerId: string;
|
|
398
|
+
appTracer?: AppTracer;
|
|
399
399
|
}
|
|
400
400
|
/**
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
export declare const createStore: ({ interfaceLanguage, isCyrillicRelatedInterface, videoId, isClip, isLiveCatchUpMode, statAuthToken, isAudioDisabled, canDownload, callbacks, webApi, videoEpisodes, previewThumbsData, uiConfig, coreConfig, player: playerInstance, disabledControls, isInteractive, interactiveRanges$, isInteractiveTime$, replayInteractive, stopPlayer, hasInteractiveBranches, playPrevChapterDisabledTooltip, additionalButtons, additionalSettingsMenuItems, additionalContextMenuItems, playPrevVideo, playNextVideo, onVideoChanged, looped, statistics: uiStatistics, saveRate, internalsExposure, playerView, playerId, metaConfig, appTracer
|
|
401
|
+
* Store приложения.
|
|
402
|
+
* Если будет слишком большим - можно разделить его на модули
|
|
403
|
+
*/
|
|
404
|
+
export declare const createStore: ({ interfaceLanguage, isCyrillicRelatedInterface, videoId, isClip, isLiveCatchUpMode, statAuthToken, isAudioDisabled, canDownload, callbacks, webApi, videoEpisodes, previewThumbsData, uiConfig, coreConfig, player: playerInstance, disabledControls, isInteractive, interactiveRanges$, isInteractiveTime$, replayInteractive, stopPlayer, hasInteractiveBranches, playPrevChapterDisabledTooltip, additionalButtons, additionalSettingsMenuItems, additionalContextMenuItems, playPrevVideo, playNextVideo, onVideoChanged, looped, statistics: uiStatistics, saveRate, internalsExposure, playerView, playerId, metaConfig, appTracer }: IStoreParams) => IStore;
|
|
405
405
|
export {};
|