@vkontakte/videoplayer 1.1.85-dev.a9d5a5e1.0 → 1.1.85-dev.b2d1f4f2.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/es2018.cjs +413 -55
- package/es2018.esm.js +413 -55
- package/es2024.cjs +413 -55
- package/es2024.esm.js +413 -55
- package/esnext.cjs +413 -55
- package/esnext.esm.js +413 -55
- package/evergreen.esm.js +413 -55
- package/package.json +5 -5
- package/types/VKVideoPlayer/HTMLElement.d.ts +1 -1
- package/types/VKVideoPlayer/index.svelte.d.ts +172 -173
- package/types/components/Ads/admanWrapper.d.ts +75 -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 +256 -262
- 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 +15 -16
- package/types/services/statistics.d.ts +13 -13
- package/types/store/index.d.ts +389 -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 +519 -518
- 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 +40 -41
- package/types/utils/webAPI/pictureInPictureApi/pictureInPictureApi.d.ts +46 -46
- package/types/utils/webAPI/pictureInPictureApi/pictureInPictureApiFactory.d.ts +4 -0
- package/types/utils/webAPI/pictureInPictureApi/types.d.ts +4 -4
- package/types/utils/webAPI/pictureInPictureApi/utils.d.ts +2 -7
- package/types/utils/webAPI/slotsApi.d.ts +41 -41
- package/es2015.cjs +0 -61
- package/es2015.esm.js +0 -61
- package/types/utils/webAPI/pictureInPictureApi/factory.d.ts +0 -3
- package/types/utils/webAPI/pictureInPictureApi/index.d.ts +0 -4
package/types/types/index.d.ts
CHANGED
|
@@ -1,644 +1,645 @@
|
|
|
1
|
-
import type { VideoQuality, VideoFormat, ISources, IExternalTextTrack, IAudioStream } from
|
|
2
|
-
import type { IValueObservable, InterfaceLanguage, Subscription, IRectangle, DevNullEntry } from
|
|
3
|
-
import type { Chapter, Manifest, ManifestVideo, VideoInfo, Interactives, IInteractiveOptions } from
|
|
4
|
-
import { PlaybackState } from
|
|
5
|
-
import type { MediascopePixelTypes, SeekAction, ThinOneStat } from
|
|
6
|
-
import type { Writable, Readable } from
|
|
7
|
-
import type {
|
|
8
|
-
import type { IStore } from
|
|
9
|
-
import { Controls, GridTypes
|
|
10
|
-
import type
|
|
11
|
-
import type {
|
|
12
|
-
import type {
|
|
13
|
-
import type {
|
|
14
|
-
import type {
|
|
1
|
+
import type { VideoQuality, VideoFormat, ISources, IExternalTextTrack, IAudioStream } from "@vkontakte/videoplayer-core";
|
|
2
|
+
import type { IValueObservable, InterfaceLanguage, Subscription, IRectangle, DevNullEntry } from "@vkontakte/videoplayer-shared";
|
|
3
|
+
import type { Chapter, Manifest, ManifestVideo, VideoInfo, Interactives, IInteractiveOptions } from "@vkontakte/videoplayer-interactive";
|
|
4
|
+
import type { PlaybackState } from "@vkontakte/videoplayer-core";
|
|
5
|
+
import type { MediascopePixelTypes, SeekAction, ThinOneStat } from "@vkontakte/videoplayer-statistics";
|
|
6
|
+
import type { Writable, Readable } from "svelte/store";
|
|
7
|
+
import type { ISDKConfig, IUIConfig } from "../config";
|
|
8
|
+
import type { IStore } from "../store";
|
|
9
|
+
import type { Controls, GridTypes } from "../constans";
|
|
10
|
+
import { type SeekToInteractiveDisabledTooltipKey } from "../constans";
|
|
11
|
+
import type { Key } from "../translation/types";
|
|
12
|
+
import type { IUIStatistics } from "../services/statistics";
|
|
13
|
+
import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem } from "../components/Menus/subMenuTabs/types";
|
|
14
|
+
import type { AdditionalDesktopControlPanelButton } from "../components/Controls/types";
|
|
15
|
+
import type { AdmanInitParams } from "../components/Ads/types";
|
|
15
16
|
export declare const enum UIType {
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
DESKTOP = "desktop",
|
|
18
|
+
MOBILE = "mobile"
|
|
18
19
|
}
|
|
19
20
|
export declare const enum AdditionalVideoQuality {
|
|
20
|
-
|
|
21
|
+
AUTO = "auto"
|
|
21
22
|
}
|
|
22
23
|
export type VideoQualityUI = VideoQuality | AdditionalVideoQuality;
|
|
23
24
|
export interface IVKVideoPlayerCallbacks {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
25
|
+
onInited?: () => void;
|
|
26
|
+
onDomReady?: () => void;
|
|
27
|
+
onStarted?: () => void;
|
|
28
|
+
onEnded?: () => void;
|
|
29
|
+
onPlay?: () => void;
|
|
30
|
+
onLooped?: () => void;
|
|
31
|
+
onPause?: () => void;
|
|
32
|
+
onVolumeChange?: (volume: number) => void;
|
|
33
|
+
onFullscreenEnter?: () => void;
|
|
34
|
+
onFullscreenExit?: () => void;
|
|
35
|
+
onMute?: () => void;
|
|
36
|
+
onUnmute?: (volume: number) => void;
|
|
37
|
+
onSubtitleOff?: () => void;
|
|
38
|
+
onSubtitleOn?: (lang: string, id: string) => void;
|
|
39
|
+
onAvailableSubtitlesChanged?: (subtitles: AvailableVideoSubtitle[]) => void;
|
|
40
|
+
onAvailableAudioStreamsChanged?: (audioStreams: AvailableAudioStream[]) => void;
|
|
41
|
+
onAudioStreamChanged?: (id: string) => void;
|
|
42
|
+
onAudioDisabledHint?: () => void;
|
|
43
|
+
onAudioDoesNotExistHint?: () => void;
|
|
44
|
+
onEpisodeClicked?: (byKeyboard: boolean) => void;
|
|
45
|
+
onEpisodeChanged?: (episode: IVideoEpisode) => void;
|
|
46
|
+
onTimeupdate?: (duration: number, position: number) => void;
|
|
47
|
+
onSeek?: (from: number, to: number, type: ThinOneStat.ActionSeekType | SeekAction) => void;
|
|
48
|
+
onCrashed?: (reason?: string) => void;
|
|
49
|
+
onRecoverableError?: (reason?: string) => void;
|
|
50
|
+
onCurrentFormatChanged?: (currentFormat: VideoFormat | undefined) => void;
|
|
51
|
+
onThroughputEstimationChanged?: (throughputEstimation: number | undefined) => void;
|
|
52
|
+
onVideoBitrateChanged?: (videoBitrate: number | undefined) => void;
|
|
53
|
+
onPlayerPhaseChanged?: (value?: PlayerPhase) => void;
|
|
54
|
+
onPlaybackStateChanged?: (value?: PlaybackState) => void;
|
|
55
|
+
onIsLiveChanged?: (value?: boolean) => void;
|
|
56
|
+
onIsActiveLiveChanged?: (value?: boolean) => void;
|
|
57
|
+
onIsAudioAvailableChanged?: (value?: boolean) => void;
|
|
58
|
+
onCopyVideoLink?: (withTimestamp: boolean, currentTimestamp: number) => string;
|
|
59
|
+
onOpenHotKeyMap?: (mapData: HotKeyMapData) => void;
|
|
60
|
+
onCurrentQualityChanged?: (currentQuality: VideoQuality | undefined) => void;
|
|
61
|
+
onAvailableQualitiesChanged?: (availableQualities: VideoQuality[]) => void;
|
|
62
|
+
onAudioLanguagesAvailable?: () => void;
|
|
63
|
+
onPiPEnter?: () => void;
|
|
64
|
+
onPiPExit?: () => void;
|
|
65
|
+
onLiveTime?: (liveTime: number | undefined) => void;
|
|
66
|
+
onLiveEnded?: () => void;
|
|
67
|
+
onReplayInteractiveVideo?: () => void;
|
|
68
|
+
onInteractiveChapterChanged?: (chapter: Chapter, video: ManifestVideo) => void;
|
|
69
|
+
onInteractiveHistoryChanged?: (chapterIds: string[]) => void;
|
|
70
|
+
onDisabledInteractiveClick?: () => void;
|
|
71
|
+
onDisabledPlayPrevChapterClick?: (message: string | undefined) => void;
|
|
72
|
+
onDisabledSeekToInteractiveClick?: (message: string | undefined) => void;
|
|
73
|
+
onDisabledTimelineClick?: (position: number) => void;
|
|
74
|
+
onInteractiveTimeIndicatorClick?: () => void;
|
|
75
|
+
onInteractiveTimeIndicatorHintDeactivated?: () => void;
|
|
76
|
+
onExternalFullscreenExit?: () => void;
|
|
77
|
+
onPrevVideoClick?: () => boolean;
|
|
78
|
+
onNextVideoClick?: () => boolean;
|
|
79
|
+
onNextVideoAnnouncementShow?: () => void;
|
|
80
|
+
onNextVideoAnnouncementClick?: () => void;
|
|
81
|
+
onNextVideoAnnouncementAuto?: () => void;
|
|
82
|
+
onNextVideoAnnouncementCancel?: () => void;
|
|
83
|
+
onSetAutoplayNextEnabled?: (state: boolean) => void;
|
|
84
|
+
onTrafficSavingEnabledChanged?: (isEnabled: boolean) => void;
|
|
85
|
+
onHighQualityEnabledChanged?: (isEnabled: boolean) => void;
|
|
86
|
+
onAutoQualityEnabledChanged?: (isEnabled: boolean) => void;
|
|
87
|
+
onCurrentPlaybackRateChanged?: (rate: number) => void;
|
|
88
|
+
onStalledChanged?: (isStalled: boolean) => void;
|
|
89
|
+
onLogoClicked?: () => void;
|
|
90
|
+
onCopyEmbedCodeClicked?: () => string;
|
|
91
|
+
onVSIDChanged?: (vsid?: string) => void;
|
|
92
|
+
onAutoplaySoundProhibited?: () => void;
|
|
93
|
+
onDevNullLog?: (entry: DevNullEntry) => void;
|
|
94
|
+
onTitleClicked?: () => void;
|
|
95
|
+
onRichSeekActiveChanged?: (active: boolean) => void;
|
|
96
|
+
uiInfo?: {
|
|
97
|
+
onUpcomingLiveViewStateChanged?: (value: IUpcomingLiveViewControlInfo) => void;
|
|
98
|
+
onControlsVisibleChanged?: (value?: boolean) => void;
|
|
99
|
+
onIsMobileChanged?: (value?: boolean) => void;
|
|
100
|
+
onPrevButtonChanged?: (value?: IControlInfo) => void;
|
|
101
|
+
onPrevButtonMouseEnter?: (value?: IControlInfo) => void;
|
|
102
|
+
onPrevButtonMouseLeave?: (value?: IControlInfo) => void;
|
|
103
|
+
onPlayButtonChanged?: (value?: IControlInfo) => void;
|
|
104
|
+
onReplayButtonChanged?: (value?: IControlInfo) => void;
|
|
105
|
+
onNextButtonChanged?: (value?: IControlInfo) => void;
|
|
106
|
+
onNextButtonMouseEnter?: (value?: IControlInfo) => void;
|
|
107
|
+
onNextButtonMouseLeave?: (value?: IControlInfo) => void;
|
|
108
|
+
onPlayPrevChapterChanged?: (value?: IControlInfo) => void;
|
|
109
|
+
onSeekToInteractiveButtonChanged?: (value?: IControlInfo) => void;
|
|
110
|
+
onGraphButtonChanged?: (value?: IControlInfo) => void;
|
|
111
|
+
onLiveButtonChanged?: (value?: IControlInfo) => void;
|
|
112
|
+
onTimeUpdateChanged?: (value?: IControlInfo) => void;
|
|
113
|
+
onEpisodesChanged?: (value?: IControlInfo) => void;
|
|
114
|
+
onVolumeChanged?: (value?: IControlInfo) => void;
|
|
115
|
+
onSubtitlesChanged?: (value?: IControlInfo) => void;
|
|
116
|
+
onSettingsChanged?: (value?: IControlInfo) => void;
|
|
117
|
+
onFullscreenChanged?: (value?: IControlInfo) => void;
|
|
118
|
+
onChromecastChanged?: (value?: IControlInfo) => void;
|
|
119
|
+
onPipChanged?: (value?: IControlInfo) => void;
|
|
120
|
+
onTheaterModeChanged?: (value?: IControlInfo) => void;
|
|
121
|
+
onVkLogoChanged?: (value?: IControlInfo) => void;
|
|
122
|
+
onTimelineChanged?: (value?: IControlInfo) => void;
|
|
123
|
+
onTimelineMouseEnter?: () => void;
|
|
124
|
+
onTimelineMouseLeave?: () => void;
|
|
125
|
+
onInteractiveTimeIndicatorChanged?: (value?: IControlInfo) => void;
|
|
126
|
+
onPlayerSizeChanged?: (value?: {
|
|
127
|
+
width: number;
|
|
128
|
+
height: number;
|
|
129
|
+
}) => void;
|
|
130
|
+
onReportProblem?: () => void;
|
|
131
|
+
onSettingsMenu?: (value: {
|
|
132
|
+
name?: string;
|
|
133
|
+
visible: boolean;
|
|
134
|
+
size: IRectangle;
|
|
135
|
+
position: Position;
|
|
136
|
+
}) => void;
|
|
137
|
+
onLoopedChanged?: (looped: boolean) => void;
|
|
138
|
+
onTopLeftControlBlockChanged?: (value?: IControlInfo) => void;
|
|
139
|
+
onTopRightControlBlockChanged?: (value?: IControlInfo) => void;
|
|
140
|
+
onMiddleControlBlockChanged?: (value?: IControlInfo) => void;
|
|
141
|
+
onBottomControlBlockChanged?: (value?: IControlInfo) => void;
|
|
142
|
+
onBottomLeftControlBlockChanged?: (value?: IControlInfo) => void;
|
|
143
|
+
onBottomRightControlBlockChanged?: (value?: IControlInfo) => void;
|
|
144
|
+
onTitleChanged?: (value?: IControlInfo) => void;
|
|
145
|
+
};
|
|
146
|
+
adsInfo?: {
|
|
147
|
+
onLoadStarted?: () => void;
|
|
148
|
+
onLoadEnded?: () => void;
|
|
149
|
+
onLoadError?: () => void;
|
|
150
|
+
onInit?: () => void;
|
|
151
|
+
onReady?: () => void;
|
|
152
|
+
onStarted?: (adsSection: AdsSection) => void;
|
|
153
|
+
onPaused?: () => void;
|
|
154
|
+
onResumed?: () => void;
|
|
155
|
+
onTimeRemained?: (timeRemained: AdsTimeRemained) => void;
|
|
156
|
+
onCompleted?: (adsSection: AdsSection) => void;
|
|
157
|
+
onEmpty?: () => void;
|
|
158
|
+
onClicked?: (adsSection: AdsSection) => void;
|
|
159
|
+
onClosed?: (adsSection: AdsSection) => void;
|
|
160
|
+
onError?: (message: string) => void;
|
|
161
|
+
};
|
|
161
162
|
}
|
|
162
163
|
export interface IVKVideoPlayerUICallbacks {
|
|
163
|
-
|
|
164
|
+
onStarted?: (isMuted: boolean) => void;
|
|
164
165
|
}
|
|
165
166
|
export interface IVKVideoPlayerStatistics extends Partial<IUIStatistics> {
|
|
166
|
-
|
|
167
|
+
config: ISDKConfig["statistics"];
|
|
167
168
|
}
|
|
168
169
|
export interface IVideoEpisodesNormalizedTimeline {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
170
|
+
from: number;
|
|
171
|
+
width: number;
|
|
172
|
+
loadedWidth: number;
|
|
173
|
+
filledWidth: number;
|
|
174
|
+
interactive?: boolean;
|
|
175
|
+
completed?: boolean;
|
|
175
176
|
}
|
|
176
177
|
export interface IVideoEpisode {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
178
|
+
time: number;
|
|
179
|
+
text: string;
|
|
180
|
+
interactive?: boolean;
|
|
181
|
+
completed?: boolean;
|
|
181
182
|
}
|
|
182
183
|
export interface ITimelinePreviewThumbsData {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
}
|
|
192
|
-
export type VideoLiveStatus =
|
|
184
|
+
countPerImage: number;
|
|
185
|
+
countPerRow: number;
|
|
186
|
+
countTotal: number;
|
|
187
|
+
frameHeight: number;
|
|
188
|
+
frameWidth: number;
|
|
189
|
+
frequency: number;
|
|
190
|
+
isUV: boolean;
|
|
191
|
+
links: string[];
|
|
192
|
+
}
|
|
193
|
+
export type VideoLiveStatus = "no_video" | "deleted" | "waiting" | "started" | "finished" | "upcoming" | "failed" | "postlive";
|
|
193
194
|
export interface IVideoLive {
|
|
194
|
-
|
|
195
|
-
|
|
195
|
+
status: VideoLiveStatus;
|
|
196
|
+
startTime?: number;
|
|
196
197
|
}
|
|
197
198
|
export interface IVideoDataBase {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
199
|
+
title: string;
|
|
200
|
+
thumbUrl?: string;
|
|
201
|
+
unitedVideoId?: number;
|
|
202
|
+
/**
|
|
203
|
+
* duration используется только для инициализации адмана.
|
|
204
|
+
*/
|
|
205
|
+
duration?: AdmanInitParams["duration"];
|
|
206
|
+
adsParams?: AdmanInitParams["params"];
|
|
207
|
+
adsExternalApi?: AdmanInitParams["externalApi"];
|
|
208
|
+
adsJson?: AdmanInitParams["json"];
|
|
209
|
+
videoEpisodes?: IVideoEpisode[];
|
|
210
|
+
previewThumbsData?: ITimelinePreviewThumbsData;
|
|
211
|
+
isClip?: boolean;
|
|
212
|
+
subtitles?: Array<Omit<IExternalTextTrack, "type">>;
|
|
213
|
+
subtitlesForcedLanguage?: string;
|
|
214
|
+
sources?: ISources;
|
|
215
|
+
live?: IVideoLive;
|
|
215
216
|
}
|
|
216
217
|
export interface IVideoDataWithSources extends IVideoDataBase {
|
|
217
|
-
|
|
218
|
+
sources: ISources;
|
|
218
219
|
}
|
|
219
220
|
export interface IVideoDataWithLive extends IVideoDataBase {
|
|
220
|
-
|
|
221
|
+
live: IVideoLive;
|
|
221
222
|
}
|
|
222
223
|
export type IVideoData = IVideoDataWithSources | IVideoDataWithLive;
|
|
223
|
-
export interface IInteractiveData extends Pick<IInteractiveOptions,
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
224
|
+
export interface IInteractiveData extends Pick<IInteractiveOptions, "initChapterId" | "historyApi" | "projectInfo"> {
|
|
225
|
+
manifest: string | Manifest;
|
|
226
|
+
visitedChapters?: string[];
|
|
227
|
+
videosInfo?: VideoInfo[];
|
|
228
|
+
videoLoader?: IInteractiveOptions["vkVideoLoader"];
|
|
229
|
+
tooltipHelpHintActive?: boolean;
|
|
229
230
|
}
|
|
230
231
|
/**
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
232
|
+
* @deprecated
|
|
233
|
+
*
|
|
234
|
+
* Старый механизм добавления кнопок, будет удален в будущих релизах
|
|
235
|
+
*/
|
|
235
236
|
export interface AdditionalButtonDeprecated {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
237
|
+
iconUrl: string;
|
|
238
|
+
onClick?: (event?: MouseEvent) => void;
|
|
239
|
+
tooltip?: string;
|
|
240
|
+
ariaLabel?: string;
|
|
241
|
+
testId?: string;
|
|
242
|
+
hideOnDesktopGridTypes?: GridTypes[];
|
|
243
|
+
hideOnMobile?: boolean;
|
|
243
244
|
}
|
|
244
245
|
/**
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
export type VideoPlayerView =
|
|
246
|
+
* Определяет внешний вид плеера и его функциональность.
|
|
247
|
+
* preview - обрезанная функциональность плеера для показать трейлеров, например;
|
|
248
|
+
* full - полная функциональность плеера доступна.
|
|
249
|
+
*/
|
|
250
|
+
export type VideoPlayerView = "preview" | "full";
|
|
250
251
|
export interface IVKVideoPlayerConfig {
|
|
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
|
-
|
|
252
|
+
videos: IVideoData[];
|
|
253
|
+
videoIndex?: number;
|
|
254
|
+
interactiveData?: IInteractiveData;
|
|
255
|
+
albumId?: string;
|
|
256
|
+
statPlace?: "embed" | "direct" | string;
|
|
257
|
+
statAuthToken?: string;
|
|
258
|
+
statUserSalt?: string;
|
|
259
|
+
statTrackCode?: string;
|
|
260
|
+
statVKAppId?: string;
|
|
261
|
+
refreshStatAuthToken?: () => Promise<string | undefined>;
|
|
262
|
+
preload?: boolean;
|
|
263
|
+
autoplay?: boolean;
|
|
264
|
+
repeat?: boolean;
|
|
265
|
+
loop?: boolean;
|
|
266
|
+
volume?: number;
|
|
267
|
+
muted?: boolean;
|
|
268
|
+
fromTime?: number;
|
|
269
|
+
canRewindLive?: boolean;
|
|
270
|
+
supportLink?: string;
|
|
271
|
+
showAds?: boolean;
|
|
272
|
+
adsSlotId?: number;
|
|
273
|
+
adsParams?: AdmanInitParams["params"];
|
|
274
|
+
/** @deprecated */
|
|
275
|
+
adsPreviewParam?: number;
|
|
276
|
+
adsAutoplayParam?: boolean;
|
|
277
|
+
interfaceLanguage?: InterfaceLanguage | string;
|
|
278
|
+
isCyrillicRelatedInterface?: boolean;
|
|
279
|
+
logoClickable?: boolean;
|
|
280
|
+
logoHidden?: boolean;
|
|
281
|
+
/** @deprecated */
|
|
282
|
+
isMobile?: boolean;
|
|
283
|
+
isTouch?: boolean;
|
|
284
|
+
/** @deprecated */
|
|
285
|
+
isMediaSessionEnabled?: boolean;
|
|
286
|
+
/** @deprecated */
|
|
287
|
+
isPictureInPictureEnabled?: boolean;
|
|
288
|
+
isAudioDisabled?: boolean;
|
|
289
|
+
isLiveCatchUpMode?: boolean;
|
|
290
|
+
canDownload?: boolean;
|
|
291
|
+
fullScreenTarget?: HTMLElement;
|
|
292
|
+
failoverHosts?: string[];
|
|
293
|
+
showThumbTimer?: boolean;
|
|
294
|
+
is3DVideo?: boolean;
|
|
295
|
+
callbacks?: IVKVideoPlayerCallbacks;
|
|
296
|
+
additionalButtons?: (AdditionalButtonDeprecated | AdditionalDesktopControlPanelButton)[];
|
|
297
|
+
additionalSettingsMenuItems?: AdditionalSettingsMenuItem[];
|
|
298
|
+
additionalContextMenuItems?: AdditionalContextMenuItem[];
|
|
299
|
+
refDomain?: string;
|
|
300
|
+
volumeMultiplier?: number;
|
|
301
|
+
saveRate?: boolean;
|
|
302
|
+
deviceId?: string;
|
|
303
|
+
playerId?: string;
|
|
304
|
+
showEndScreen?: boolean;
|
|
305
|
+
showAutoplayNext?: boolean;
|
|
306
|
+
showNextPrevButtons?: boolean;
|
|
307
|
+
pipEnabled?: boolean;
|
|
308
|
+
playerView?: VideoPlayerView;
|
|
309
|
+
mediascopePixels?: MediascopePixelTypes.Pixel[];
|
|
310
|
+
getVideoDeeplink?: (timestamp: number) => string;
|
|
310
311
|
}
|
|
311
312
|
export interface IControlInfo {
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
313
|
+
left: number;
|
|
314
|
+
right: number;
|
|
315
|
+
top: number;
|
|
316
|
+
bottom: number;
|
|
317
|
+
isDisplayed: boolean;
|
|
317
318
|
}
|
|
318
319
|
/**
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
320
|
+
* Информация о upcoming live view.
|
|
321
|
+
* `default` — это view, когда показывается таймер обратного отсчёта до начала трансляции.
|
|
322
|
+
* `expired` — это view, когда таймер истёк, но трансляцию так и не начали (ожидаем поток).
|
|
323
|
+
*/
|
|
323
324
|
export interface IUpcomingLiveViewControlInfo extends IControlInfo {
|
|
324
|
-
|
|
325
|
-
|
|
325
|
+
type: "default" | "expired";
|
|
326
|
+
size: "s" | "m" | "l";
|
|
326
327
|
}
|
|
327
328
|
export interface IPlayerControlsRef {
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
329
|
+
prevButton?: HTMLButtonElement;
|
|
330
|
+
playButton?: HTMLButtonElement;
|
|
331
|
+
replayButton?: HTMLElement | HTMLButtonElement;
|
|
332
|
+
nextButton?: HTMLButtonElement;
|
|
333
|
+
playPrevChapterButton?: HTMLButtonElement;
|
|
334
|
+
seekToInteractiveButton?: HTMLButtonElement;
|
|
335
|
+
interactiveGraphButton?: HTMLButtonElement;
|
|
336
|
+
liveButton?: HTMLElement;
|
|
337
|
+
time?: HTMLElement;
|
|
338
|
+
episodes?: HTMLElement;
|
|
339
|
+
volume?: HTMLButtonElement;
|
|
340
|
+
subtitles?: HTMLButtonElement;
|
|
341
|
+
settings?: HTMLElement;
|
|
342
|
+
context?: HTMLButtonElement;
|
|
343
|
+
fullscreen?: HTMLElement;
|
|
344
|
+
chromecast?: HTMLButtonElement;
|
|
345
|
+
pip?: HTMLButtonElement;
|
|
346
|
+
"theater-mode-button"?: HTMLButtonElement;
|
|
347
|
+
vkLogo?: HTMLButtonElement;
|
|
348
|
+
interactiveTimeIndicator?: HTMLElement;
|
|
349
|
+
timeline?: HTMLElement;
|
|
350
|
+
autoplayNextToggle?: HTMLButtonElement;
|
|
350
351
|
}
|
|
351
352
|
export interface IPlayerDesktopControlsWidth {
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
353
|
+
prevButton: number;
|
|
354
|
+
playButton: number;
|
|
355
|
+
replayButton: number;
|
|
356
|
+
nextButton: number;
|
|
357
|
+
playPrevChapterButton: number;
|
|
358
|
+
seekToInteractiveButton: number;
|
|
359
|
+
interactiveGraphButton: number;
|
|
360
|
+
liveButton: number;
|
|
361
|
+
time: number;
|
|
362
|
+
episodes: number;
|
|
363
|
+
volume: number;
|
|
364
|
+
subtitles: number;
|
|
365
|
+
settings: number;
|
|
366
|
+
context: number;
|
|
367
|
+
fullscreen: number;
|
|
368
|
+
chromecast: number;
|
|
369
|
+
vkLogo: number;
|
|
370
|
+
additionalButtons: number[];
|
|
370
371
|
}
|
|
371
372
|
export type ControlBlocksRefs = {
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
373
|
+
/**
|
|
374
|
+
* Контейнер для контролов, которые отображаются в левом верхнем углу.
|
|
375
|
+
*/
|
|
376
|
+
topLeft?: HTMLElement | undefined;
|
|
377
|
+
/**
|
|
378
|
+
* Контейнер для контролов, которые отображаются в левом верхнем углу.
|
|
379
|
+
*/
|
|
380
|
+
topRight?: HTMLElement | undefined;
|
|
381
|
+
/**
|
|
382
|
+
* Контейнер для контролов, который появляется снизу.
|
|
383
|
+
*/
|
|
384
|
+
bottom?: HTMLElement | undefined;
|
|
385
|
+
/**
|
|
386
|
+
* Контейнер для контролов, который появляется в середине плеера.
|
|
387
|
+
*/
|
|
388
|
+
middle?: HTMLElement | undefined;
|
|
389
|
+
bottomLeft?: HTMLElement | undefined;
|
|
390
|
+
bottomRight?: HTMLElement | undefined;
|
|
390
391
|
};
|
|
391
392
|
export declare const enum PlayerPhase {
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
393
|
+
Thumb = "thumb",
|
|
394
|
+
Video = "video",
|
|
395
|
+
Ads = "ads",
|
|
396
|
+
Crashed = "crashed",
|
|
397
|
+
LiveWaitingStart = "LiveWaitingStart",
|
|
398
|
+
LiveWaitingRecover = "LiveWaitingRecover",
|
|
399
|
+
LiveWaitingRecord = "LiveWaitingRecord"
|
|
399
400
|
}
|
|
400
401
|
export declare const enum AdsSection {
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
402
|
+
Preroll = "preroll",
|
|
403
|
+
Midroll = "midroll",
|
|
404
|
+
Postroll = "postroll"
|
|
404
405
|
}
|
|
405
406
|
export declare const enum AdsPlaybackState {
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
407
|
+
INACTIVE = "inactive",
|
|
408
|
+
PLAYING = "playing",
|
|
409
|
+
PAUSED = "paused"
|
|
409
410
|
}
|
|
410
411
|
export type AdsTimeRemained = {
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
412
|
+
currentTime: number;
|
|
413
|
+
duration: number;
|
|
414
|
+
percent: number;
|
|
415
|
+
remained: number;
|
|
415
416
|
};
|
|
416
417
|
export type VideoQualityForRender = {
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
418
|
+
value: VideoQualityUI;
|
|
419
|
+
displayValue: string;
|
|
420
|
+
selected: boolean;
|
|
420
421
|
};
|
|
421
422
|
export type VideoPlaybackRate = {
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
423
|
+
value: number;
|
|
424
|
+
displayValue: string;
|
|
425
|
+
selected: boolean;
|
|
425
426
|
};
|
|
426
427
|
export type MediaSessionApiMetadata = {
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
428
|
+
title: string;
|
|
429
|
+
artist?: string;
|
|
430
|
+
thumbUrl?: string;
|
|
430
431
|
};
|
|
431
432
|
export type MediaSessionApiActionHandler = [MediaSessionAction, MediaSessionActionHandler | null];
|
|
432
433
|
export interface PictureInPictureResizeEvent extends Event {
|
|
433
|
-
|
|
434
|
+
target: PictureInPictureWindow;
|
|
434
435
|
}
|
|
435
436
|
export interface DocumentPictureInPictureRequestWindow {
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
437
|
+
width?: number;
|
|
438
|
+
height?: number;
|
|
439
|
+
initialAspectRatio?: number;
|
|
440
|
+
copyStyleSheets: boolean;
|
|
440
441
|
}
|
|
441
442
|
export interface DocumentPictureInPicture {
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
443
|
+
onenter?: (event: Event) => void;
|
|
444
|
+
window: Window;
|
|
445
|
+
requestWindow: (params: DocumentPictureInPictureRequestWindow) => Promise<Window>;
|
|
445
446
|
}
|
|
446
447
|
export declare enum PictureInPictureType {
|
|
447
|
-
|
|
448
|
-
|
|
448
|
+
PictureInPicture = 0,
|
|
449
|
+
DocumentPictureInPicture = 1
|
|
449
450
|
}
|
|
450
451
|
export interface IPictureInPictureApiInfo {
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
}
|
|
455
|
-
export interface PictureInPictureSettings extends IDpipConfig {
|
|
456
|
-
enabled: boolean;
|
|
452
|
+
isActive$: IValueObservable<boolean>;
|
|
453
|
+
isEnabled$: IValueObservable<boolean>;
|
|
454
|
+
type: PictureInPictureType;
|
|
457
455
|
}
|
|
456
|
+
export type PictureInPictureSettings = {
|
|
457
|
+
enabled?: boolean;
|
|
458
|
+
};
|
|
458
459
|
export interface Size {
|
|
459
|
-
|
|
460
|
-
|
|
460
|
+
width: number;
|
|
461
|
+
height: number;
|
|
461
462
|
}
|
|
462
463
|
export interface ExternalPictureInPictureEventHandlers {
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
464
|
+
enterpictureinpicture?: VoidFunction;
|
|
465
|
+
leavepictureinpicture?: VoidFunction;
|
|
466
|
+
resize?: (size: Size) => void;
|
|
466
467
|
}
|
|
467
468
|
export interface IPictureInPictureApi {
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
469
|
+
isSupported(): boolean;
|
|
470
|
+
isActive(): boolean;
|
|
471
|
+
setContext(svelteContext: Map<unknown, unknown>): void;
|
|
472
|
+
request(): Promise<void>;
|
|
473
|
+
exit(): Promise<void>;
|
|
474
|
+
info: IPictureInPictureApiInfo;
|
|
475
|
+
setEnabled(enabled: boolean): void;
|
|
476
|
+
dispose(): Promise<void>;
|
|
477
|
+
assignPlayerContainer(playerContainer: HTMLElement): void;
|
|
478
|
+
updateVideoElement(): void;
|
|
479
|
+
setExternalEventHandlers(externalEventHandlers: ExternalPictureInPictureEventHandlers): void;
|
|
479
480
|
}
|
|
480
481
|
export interface IAnnotationsApi {
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
482
|
+
/** @deprecated Больше не используется. Контейнер теперь определяется самостоятельно */
|
|
483
|
+
registryRootContainer: (container: HTMLElement) => void;
|
|
484
|
+
/** @deprecated Логики со слоями больше нет. Теперь все аннотации добавляются на единый общий слой */
|
|
485
|
+
addLayer: (layerName: string) => HTMLElement | never;
|
|
486
|
+
/** @deprecated Логики со слоями больше нет. Теперь все аннотации добавляются на единый общий слой */
|
|
487
|
+
getLayer: (layerName: string) => HTMLElement | undefined;
|
|
488
|
+
/** @deprecated Логики со слоями больше нет. Теперь все аннотации добавляются на единый общий слой */
|
|
489
|
+
removeLayer: (layerName: string) => void;
|
|
490
|
+
/** @deprecated Логики со слоями больше нет. Теперь все аннотации добавляются на единый общий слой */
|
|
491
|
+
clearLayer: (layerName: string) => void;
|
|
492
|
+
/** @deprecated Метод больше не является публичным */
|
|
493
|
+
detach: () => void;
|
|
494
|
+
/** @deprecated Больше нет необходимости переназначать контейнер для аннотаций в ходе работы плеера */
|
|
495
|
+
reattach: () => void;
|
|
496
|
+
/** @private */
|
|
497
|
+
init: (container: HTMLElement) => void;
|
|
498
|
+
add: (annotationName: string, annotation: HTMLElement) => void | never;
|
|
499
|
+
get: (annotationName: string) => HTMLElement | never;
|
|
500
|
+
remove: (annotationName: string) => void | never;
|
|
501
|
+
clear: () => void;
|
|
502
|
+
destroy: () => void;
|
|
502
503
|
}
|
|
503
504
|
export type AvailableVideoSubtitle = {
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
505
|
+
id: string;
|
|
506
|
+
language: string;
|
|
507
|
+
title: string;
|
|
507
508
|
};
|
|
508
|
-
export type AvailableAudioStream = Required<Pick<IAudioStream,
|
|
509
|
+
export type AvailableAudioStream = Required<Pick<IAudioStream, "id" | "language" | "label">>;
|
|
509
510
|
export type VideoSubtitle = {
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
511
|
+
value: string;
|
|
512
|
+
displayValue: string;
|
|
513
|
+
selected: boolean;
|
|
514
|
+
isAuto?: boolean;
|
|
515
|
+
language: string;
|
|
515
516
|
};
|
|
516
517
|
export type VideoSubtitleParsed = {
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
518
|
+
startTime: number;
|
|
519
|
+
endTime: number;
|
|
520
|
+
lang: string;
|
|
521
|
+
texts: ({
|
|
522
|
+
type: "text";
|
|
523
|
+
value: string;
|
|
524
|
+
} | {
|
|
525
|
+
type: "timestamp";
|
|
526
|
+
value: number;
|
|
527
|
+
})[];
|
|
527
528
|
};
|
|
528
529
|
export type VideoSubtitlesParsed = {
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
530
|
+
id: string;
|
|
531
|
+
lang: string;
|
|
532
|
+
isAuto: boolean;
|
|
533
|
+
subtitles: VideoSubtitleParsed[];
|
|
533
534
|
}[];
|
|
534
535
|
export type ControlsEnumType = keyof typeof Controls;
|
|
535
536
|
export type ControlsKeys = ControlsEnumType[];
|
|
536
537
|
export interface IPlayerPhase extends Readable<PlayerPhase> {
|
|
537
|
-
|
|
538
|
+
is: (playerPhase: PlayerPhase) => boolean;
|
|
538
539
|
}
|
|
539
540
|
export interface IDisabledControls extends Writable<Set<ControlsEnumType>> {
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
541
|
+
add: (addData: ControlsEnumType | ControlsKeys) => void;
|
|
542
|
+
remove: (removeData: ControlsEnumType | ControlsKeys) => void;
|
|
543
|
+
includes: (includeData: ControlsEnumType | ControlsKeys) => boolean;
|
|
543
544
|
}
|
|
544
545
|
export interface HotKeyMapItem {
|
|
545
|
-
|
|
546
|
-
|
|
546
|
+
description: string;
|
|
547
|
+
value: string;
|
|
547
548
|
}
|
|
548
549
|
export interface HotKeyMapGroup {
|
|
549
|
-
|
|
550
|
-
|
|
550
|
+
title: string;
|
|
551
|
+
items: HotKeyMapItem[];
|
|
551
552
|
}
|
|
552
553
|
export interface HotKeyMapData {
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
554
|
+
title: string;
|
|
555
|
+
groups: HotKeyMapGroup[];
|
|
556
|
+
closeBtnText: string;
|
|
556
557
|
}
|
|
557
558
|
export declare enum HotKeyHelperType {
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
559
|
+
PLAY = "PLAY",
|
|
560
|
+
PAUSE = "PAUSE",
|
|
561
|
+
REPLAY = "REPLAY",
|
|
562
|
+
BACKWARD_SEEK = "BACKWARD_SEEK",
|
|
563
|
+
FORWARD_SEEK = "FORWARD_SEEK",
|
|
564
|
+
SUBTITLES_ON = "SUBTITLES_ON",
|
|
565
|
+
SUBTITLES_OFF = "SUBTITLES_OFF",
|
|
566
|
+
RATE_UP = "RATE_UP",
|
|
567
|
+
RATE_DOWN = "RATE_DOWN",
|
|
568
|
+
EPISODE_PREV = "EPISODE_PREV",
|
|
569
|
+
EPISODE_NEXT = "EPISODE_NEXT",
|
|
570
|
+
MUTE = "MUTE",
|
|
571
|
+
VOLUME = "VOLUME"
|
|
571
572
|
}
|
|
572
573
|
export interface HotKeyHelperData {
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
574
|
+
type: HotKeyHelperType;
|
|
575
|
+
text?: string;
|
|
576
|
+
t?: {
|
|
577
|
+
key: Key;
|
|
578
|
+
value?: string;
|
|
579
|
+
};
|
|
579
580
|
}
|
|
580
581
|
export declare enum EpisodesModes {
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
582
|
+
FULL = "FULL",
|
|
583
|
+
COUNT = "COUNT",
|
|
584
|
+
SHORT = "SHORT"
|
|
584
585
|
}
|
|
585
586
|
export type IToggleable<T> = T & {
|
|
586
|
-
|
|
587
|
+
toggle: () => void;
|
|
587
588
|
};
|
|
588
589
|
type MicroStoreWritableBase<T = unknown> = Writable<T>;
|
|
589
590
|
type ToggleableMicroStore = IToggleable<MicroStoreWritableBase<boolean | null>>;
|
|
590
591
|
export type PictureInPictureMicroStore = {
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
592
|
+
isActive$: Writable<boolean>;
|
|
593
|
+
isEnabled$: Writable<boolean>;
|
|
594
|
+
type$: Writable<PictureInPictureType | undefined>;
|
|
594
595
|
};
|
|
595
596
|
export type NotificationsMicroStore = {
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
597
|
+
notificationsToShow$: Writable<Partial<Record<NotificationId, boolean>>>;
|
|
598
|
+
showNotification: (id: NotificationId) => void;
|
|
599
|
+
closeNotification: (id: NotificationId) => void;
|
|
599
600
|
};
|
|
600
601
|
export interface IMicroStores {
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
602
|
+
fakeIsPlaying$: ToggleableMicroStore;
|
|
603
|
+
interactiveControlsOpacity$: ToggleableMicroStore;
|
|
604
|
+
seekToInteractiveDisabledTooltip$: MicroStoreWritableBase<SeekToInteractiveDisabledTooltipKey>;
|
|
605
|
+
showInteractiveTimeIndicatorTooltip$: MicroStoreWritableBase<boolean> & {
|
|
606
|
+
set: (newValue: boolean, useTimeout: boolean) => void;
|
|
607
|
+
clearTimeout: () => void;
|
|
608
|
+
};
|
|
609
|
+
graphIsOpened$: ToggleableMicroStore;
|
|
610
|
+
pictureInPicture$: PictureInPictureMicroStore;
|
|
611
|
+
notifications$: NotificationsMicroStore;
|
|
611
612
|
}
|
|
612
613
|
export interface InitMicroStoreParams {
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
614
|
+
store: IStore;
|
|
615
|
+
microStores: IMicroStores;
|
|
616
|
+
config: IVKVideoPlayerConfig;
|
|
617
|
+
uiConfig: IUIConfig;
|
|
618
|
+
interactiveController?: Interactives;
|
|
618
619
|
}
|
|
619
620
|
export interface IMicroStore<StateName extends keyof IMicroStores = keyof IMicroStores> {
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
621
|
+
readonly stateName: StateName;
|
|
622
|
+
state$: IMicroStores[StateName];
|
|
623
|
+
subscription: Subscription;
|
|
624
|
+
init: (initStoreParams: InitMicroStoreParams) => Subscription;
|
|
624
625
|
}
|
|
625
626
|
export type IMicroStoresRoot = {
|
|
626
|
-
|
|
627
|
-
|
|
627
|
+
subscribers: IMicroStore[];
|
|
628
|
+
stores: IMicroStores;
|
|
628
629
|
};
|
|
629
630
|
export type Position = {
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
631
|
+
top?: number;
|
|
632
|
+
left?: number;
|
|
633
|
+
bottom?: number;
|
|
634
|
+
right?: number;
|
|
634
635
|
};
|
|
635
636
|
export interface Caption {
|
|
636
|
-
|
|
637
|
-
|
|
637
|
+
timeAppeared?: number | null;
|
|
638
|
+
value: string;
|
|
638
639
|
}
|
|
639
|
-
export type NotificationId =
|
|
640
|
+
export type NotificationId = "slow_video";
|
|
640
641
|
export declare enum PlaybackStateExtended {
|
|
641
|
-
|
|
642
|
+
BUFFERING = "buffering"
|
|
642
643
|
}
|
|
643
644
|
export type PlaybackStateRealistic = PlaybackState | PlaybackStateExtended;
|
|
644
645
|
export {};
|