@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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.87-dev.04ce2cd1.0",
|
|
4
4
|
"author": "vk.com",
|
|
5
5
|
"description": "Videoplayer based on the vk.com platform",
|
|
6
6
|
"homepage": "https://vk.com",
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
],
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@adtech/rbadman": "2.2.57",
|
|
58
|
-
"@vkontakte/videoplayer-core": "2.0.
|
|
59
|
-
"@vkontakte/videoplayer-interactive": "1.0.
|
|
60
|
-
"@vkontakte/videoplayer-shared": "1.0.
|
|
61
|
-
"@vkontakte/videoplayer-statistics": "1.0.
|
|
58
|
+
"@vkontakte/videoplayer-core": "2.0.156-dev.04ce2cd1.0",
|
|
59
|
+
"@vkontakte/videoplayer-interactive": "1.0.62-dev.04ce2cd1.0",
|
|
60
|
+
"@vkontakte/videoplayer-shared": "1.0.85-dev.04ce2cd1.0",
|
|
61
|
+
"@vkontakte/videoplayer-statistics": "1.0.102-dev.04ce2cd1.0"
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { type Constructor } from
|
|
1
|
+
import { type Constructor } from "@vkontakte/videoplayer-shared";
|
|
2
2
|
export declare const HTMLElement: Constructor<HTMLElement>;
|
|
@@ -1,175 +1,175 @@
|
|
|
1
|
-
import type { ISDKConfig } from
|
|
2
|
-
import type { LanguageConfig } from
|
|
3
|
-
import type { IVideoData, IVKVideoPlayerConfig } from
|
|
4
|
-
import { type QualityLimits, type Seconds } from
|
|
5
|
-
import { InterfaceLanguage } from
|
|
6
|
-
import { type PlaybackRate } from
|
|
7
|
-
import type { IStatContext } from
|
|
8
|
-
import { ThinOneStat } from
|
|
9
|
-
import { AnnotationsApi } from
|
|
10
|
-
import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem } from
|
|
11
|
-
import type { AdditionalButton } from
|
|
12
|
-
import { SlotsApi } from
|
|
13
|
-
import { HTMLElement } from
|
|
1
|
+
import type { ISDKConfig } from "../config";
|
|
2
|
+
import type { LanguageConfig } from "../translation/types";
|
|
3
|
+
import type { IVideoData, IVKVideoPlayerConfig } from "../types";
|
|
4
|
+
import { type QualityLimits, type Seconds } from "@vkontakte/videoplayer-shared";
|
|
5
|
+
import { InterfaceLanguage } from "@vkontakte/videoplayer-shared";
|
|
6
|
+
import { type PlaybackRate } from "@vkontakte/videoplayer-core";
|
|
7
|
+
import type { IStatContext } from "@vkontakte/videoplayer-statistics";
|
|
8
|
+
import { ThinOneStat } from "@vkontakte/videoplayer-statistics";
|
|
9
|
+
import { AnnotationsApi } from "../utils/webAPI/annotationsApi/annotationsApi";
|
|
10
|
+
import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem } from "../components/Menus/subMenuTabs/types";
|
|
11
|
+
import type { AdditionalButton } from "../components/Controls/types";
|
|
12
|
+
import { SlotsApi } from "../utils/webAPI/slotsApi";
|
|
13
|
+
import { HTMLElement } from "./HTMLElement";
|
|
14
14
|
export declare class VKVideoPlayer extends HTMLElement {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
15
|
+
private svelteStubComponent?;
|
|
16
|
+
private svelteRootComponent?;
|
|
17
|
+
/**
|
|
18
|
+
* Слой, который живет на протяжении жизни плеера, не уничтожается между переключениями видео.
|
|
19
|
+
*/
|
|
20
|
+
private sveltePersistentLayerComponent?;
|
|
21
|
+
private svelteErrorComponent?;
|
|
22
|
+
private store?;
|
|
23
|
+
private microStoresRoot?;
|
|
24
|
+
private statistics?;
|
|
25
|
+
private _shadowRoot;
|
|
26
|
+
private playerContainer;
|
|
27
|
+
private rootContainer;
|
|
28
|
+
private stateContainer;
|
|
29
|
+
private shadowRootContainer;
|
|
30
|
+
private playerId;
|
|
31
|
+
private uiConfig;
|
|
32
|
+
private coreConfig;
|
|
33
|
+
private statisticsConfig;
|
|
34
|
+
private metaConfig;
|
|
35
|
+
private interactiveController;
|
|
36
|
+
private interactiveContainer;
|
|
37
|
+
private graphMadePause;
|
|
38
|
+
private currentPlayingVideoIndex;
|
|
39
|
+
private needToRepeatPlaylist;
|
|
40
|
+
private videoConfig;
|
|
41
|
+
private pictureInPictureApi;
|
|
42
|
+
private mediaSessionApi;
|
|
43
|
+
private unsubscribePlayerPhaseSubscription;
|
|
44
|
+
private readonly logger;
|
|
45
|
+
private readonly log;
|
|
46
|
+
private readonly subscription;
|
|
47
|
+
private readonly interactiveSubscription;
|
|
48
|
+
annotationsApi: AnnotationsApi | undefined;
|
|
49
|
+
slotsApi: SlotsApi | undefined;
|
|
50
|
+
private focusManager;
|
|
51
|
+
private prevIsid;
|
|
52
|
+
private isInited;
|
|
53
|
+
private postponedInitParams;
|
|
54
|
+
private internalsExposure;
|
|
55
|
+
private shadowDOMCallbacksDisabled;
|
|
56
|
+
private readonly fatalError$;
|
|
57
|
+
constructor();
|
|
58
|
+
private connectedCallback;
|
|
59
|
+
private updatePersistentLayerProps;
|
|
60
|
+
private disconnectedCallback;
|
|
61
|
+
private initPlayerRootContainers;
|
|
62
|
+
private needToShowNextPrevButtons;
|
|
63
|
+
private isNextButtonActive;
|
|
64
|
+
private isPrevButtonActive;
|
|
65
|
+
private isControlDisabled;
|
|
66
|
+
private getNextVideoInfo;
|
|
67
|
+
private createOneStat;
|
|
68
|
+
private createThinOneStat;
|
|
69
|
+
private createPlayer;
|
|
70
|
+
private get useMinimalViewForDpip();
|
|
71
|
+
private addPlayerInfoSubscriptions;
|
|
72
|
+
playNextVideo(): void;
|
|
73
|
+
playPrevVideo(): void;
|
|
74
|
+
private createPlayerWithCurrentVideo;
|
|
75
|
+
private playPrevChapter;
|
|
76
|
+
private seekToInteractive;
|
|
77
|
+
private initInteractives;
|
|
78
|
+
initPlayer(videoConfig: IVKVideoPlayerConfig, sdkConfig?: Partial<ISDKConfig>): void;
|
|
79
|
+
private isOneVideoPlaylist;
|
|
80
|
+
private updateVideos;
|
|
81
|
+
/**
|
|
82
|
+
* Обновление плейлиста. Будут перезаписаны все видео до текущего
|
|
83
|
+
*/
|
|
84
|
+
updatePrevVideos(videos: IVideoData[]): void;
|
|
85
|
+
/**
|
|
86
|
+
* Обновление плейлиста. Будут перезаписаны все видео после текущего
|
|
87
|
+
*/
|
|
88
|
+
updateNextVideos(videos: IVideoData[]): void;
|
|
89
|
+
private initMediaSession;
|
|
90
|
+
private setupMediaSessionForVideo;
|
|
91
|
+
private setupMediaSessionForAds;
|
|
92
|
+
moveTo(container: HTMLElement): void;
|
|
93
|
+
play(): void;
|
|
94
|
+
pause(): void;
|
|
95
|
+
stop(): void;
|
|
96
|
+
setMuted(muted: boolean): void;
|
|
97
|
+
toggleSubtitle(): void;
|
|
98
|
+
changeSubtitle(enabled: boolean, id?: string): void;
|
|
99
|
+
hideControls(): void;
|
|
100
|
+
showControls(): void;
|
|
101
|
+
setPiPEnabled(enabled: boolean): void;
|
|
102
|
+
setVolume(volume: number): void;
|
|
103
|
+
setRepeat(repeat: boolean): void;
|
|
104
|
+
seekTime(time: number): void;
|
|
105
|
+
seekEpisodeStartTime(time: number): void;
|
|
106
|
+
returnFocusToEpisodes(): void;
|
|
107
|
+
setPlaybackRate(playbackRate: PlaybackRate): void;
|
|
108
|
+
setAutoQualityLimits(limits: QualityLimits): void;
|
|
109
|
+
/** включение режима автоматического качества (это не тоггл!) */
|
|
110
|
+
setAutoQuality(): void;
|
|
111
|
+
/**
|
|
112
|
+
* __тоггл режима экономии трафика__
|
|
113
|
+
*
|
|
114
|
+
* - при включении так же будет включен режим автоматического качества
|
|
115
|
+
* (если был выключен, например, ручным выбором качества пользователем)
|
|
116
|
+
*/
|
|
117
|
+
toggleTrafficSaving(value: boolean): void;
|
|
118
|
+
/**
|
|
119
|
+
* __тоггл режима высокого качества__
|
|
120
|
+
*
|
|
121
|
+
* - при включении так же будет включен режим автоматического качества
|
|
122
|
+
* (если был выключен, например, ручным выбором качества пользователем)
|
|
123
|
+
*/
|
|
124
|
+
toggleHighQuality(value: boolean): void;
|
|
125
|
+
changeAudioStream(id: string): void;
|
|
126
|
+
addLanguage(config: LanguageConfig): void;
|
|
127
|
+
setLanguage(language: InterfaceLanguage | string): Promise<void>;
|
|
128
|
+
setLiveStart(videoData: IVideoData): void;
|
|
129
|
+
setLiveWaitingStart(): void;
|
|
130
|
+
/**
|
|
131
|
+
* Идёт доигрывание трансляции
|
|
132
|
+
*/
|
|
133
|
+
private isLiveTailPlaying;
|
|
134
|
+
/**
|
|
135
|
+
* @param forceImmediate Позволяет немедленно показать состояние ожидания, не дожидаясь окончания доигрывания буффера и попыток получить поток
|
|
136
|
+
*/
|
|
137
|
+
setLiveWaitingRecover(forceImmediate?: boolean): void;
|
|
138
|
+
setLiveWaitingRecord(): void;
|
|
139
|
+
setLiveEnd(videoData: IVideoData): void;
|
|
140
|
+
setLiveLowLatency(isLowLatency: boolean): void;
|
|
141
|
+
setLooped(looped: boolean): void;
|
|
142
|
+
getDebugData(): string;
|
|
143
|
+
getDeviceId(): string | undefined;
|
|
144
|
+
replayInteractiveVideo(): void;
|
|
145
|
+
replayInteractiveChapter(callback?: () => void): Promise<void>;
|
|
146
|
+
showInteractiveIndicatorTooltip(newValue: boolean, useTimeout?: boolean): void;
|
|
147
|
+
switchToActiveLive(): void;
|
|
148
|
+
updateAdditionalSettingsItem(itemId: string, fields: Partial<Omit<AdditionalSettingsMenuItem, "id" | "type">>): void;
|
|
149
|
+
addAdditionalSettingsItem(newItem: AdditionalSettingsMenuItem): void;
|
|
150
|
+
removeAdditionalSettingsItem(itemId: string): void;
|
|
151
|
+
updateAdditionalContextItem(itemId: string, fields: Partial<Omit<AdditionalContextMenuItem, "id">>): void;
|
|
152
|
+
addAdditionalContextItem(newItem: AdditionalContextMenuItem): void;
|
|
153
|
+
removeAdditionalContextItem(itemId: string): void;
|
|
154
|
+
updateAdditionalButton(itemId: string, fields: Partial<Omit<AdditionalButton, "id" | "type">>): void;
|
|
155
|
+
addAdditionalButton(newButton: AdditionalButton): void;
|
|
156
|
+
removeAdditionalButton(itemId: string): void;
|
|
157
|
+
updateStatContext(statContext: Partial<IStatContext | ThinOneStat.IStatContext>): void;
|
|
158
|
+
handleTimerNextVideo(state: boolean): void;
|
|
159
|
+
togglePictureInPicture(): void;
|
|
160
|
+
focus(): void;
|
|
161
|
+
/**
|
|
162
|
+
* Восстанавливает фокус на последнем сфокусированном элементе в плеере.
|
|
163
|
+
*/
|
|
164
|
+
restoreFocus(): void;
|
|
165
|
+
/**
|
|
166
|
+
* Обработка внешнего события клавиатуры.
|
|
167
|
+
* Метод preventDefault не будет вызван при обработке внешего события.
|
|
168
|
+
* @param {KeyboardEvent} event Событие из внешнего обработчика
|
|
169
|
+
* @returns {boolean} Было ли событие обработано внутри плеера
|
|
170
|
+
*/
|
|
171
|
+
handleExternalKeyboardEvent(event: KeyboardEvent): boolean;
|
|
172
|
+
setAutoplayNext(autoplayNext: boolean): void;
|
|
173
|
+
getTotalViewTime(): Seconds | undefined;
|
|
174
|
+
private unmountComponent;
|
|
175
175
|
}
|
|
@@ -1,77 +1,81 @@
|
|
|
1
|
-
import type { AdsTimeRemained } from
|
|
2
|
-
import { AdsSection } from
|
|
3
|
-
import { type ILogger } from
|
|
4
|
-
import { Subject } from
|
|
5
|
-
import type { IAdsState } from
|
|
6
|
-
import type { AdmanInitParams, ExternalActions, IConfig, IPlayerState } from
|
|
1
|
+
import type { AdsTimeRemained } from "../../types";
|
|
2
|
+
import { AdsSection } from "../../types";
|
|
3
|
+
import { type ILogger } from "@vkontakte/videoplayer-shared";
|
|
4
|
+
import { Subject } from "@vkontakte/videoplayer-shared";
|
|
5
|
+
import type { IAdsState } from "../../store";
|
|
6
|
+
import type { AdmanInitParams, ExternalActions, IConfig, IPlayerState } from "./types";
|
|
7
7
|
export declare class AdmanWrapper {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
8
|
+
private adman;
|
|
9
|
+
private initialVolume;
|
|
10
|
+
private readonly volumeMultiplier;
|
|
11
|
+
private videoElement;
|
|
12
|
+
private currentAdSection;
|
|
13
|
+
private actions;
|
|
14
|
+
private adsState;
|
|
15
|
+
private playerState;
|
|
16
|
+
private ordIds;
|
|
17
|
+
private isDestroyed;
|
|
18
|
+
private readonly log;
|
|
19
|
+
private loadTimeout;
|
|
20
|
+
private initTimeout;
|
|
21
|
+
private runtimeTimeout;
|
|
22
|
+
private useAdmanFromNPM;
|
|
23
|
+
private isVsidOriginal;
|
|
24
|
+
private watchDogTimeout;
|
|
25
|
+
private externalApi?;
|
|
26
|
+
events: {
|
|
27
|
+
init$: Subject<number>;
|
|
28
|
+
loadStarted$: Subject<void>;
|
|
29
|
+
loadEnded$: Subject<void>;
|
|
30
|
+
loadError$: Subject<void>;
|
|
31
|
+
ready$: Subject<void>;
|
|
32
|
+
slotRequested$: Subject<string | void>;
|
|
33
|
+
started$: Subject<AdsSection>;
|
|
34
|
+
timeRemained$: Subject<AdsTimeRemained>;
|
|
35
|
+
paused$: Subject<void>;
|
|
36
|
+
resumed$: Subject<void>;
|
|
37
|
+
ended$: Subject<{
|
|
38
|
+
section: AdsSection;
|
|
39
|
+
ordIds: string[];
|
|
40
|
+
}>;
|
|
41
|
+
empty$: Subject<void>;
|
|
42
|
+
skipped$: Subject<void>;
|
|
43
|
+
clicked$: Subject<AdsSection>;
|
|
44
|
+
closed$: Subject<AdsSection>;
|
|
45
|
+
error$: Subject<string>;
|
|
46
|
+
};
|
|
47
|
+
constructor(logger: ILogger, config: IConfig);
|
|
48
|
+
init(actions: ExternalActions, adsState: IAdsState, playerState: IPlayerState): void;
|
|
49
|
+
loadAdman: (abortSignal: AbortSignal) => Promise<void>;
|
|
50
|
+
loadAdmanMailRu: (abortSignal: AbortSignal) => Promise<void>;
|
|
51
|
+
private loadAdmanNPM;
|
|
52
|
+
onAdmanLoadingError(): void;
|
|
53
|
+
initAdman(initParams: AdmanInitParams): Promise<void>;
|
|
54
|
+
private switchToVideo;
|
|
55
|
+
private setPostrollPassed;
|
|
56
|
+
togglePlay(): void;
|
|
57
|
+
setInitialVolume(volume: number): void;
|
|
58
|
+
setVolume(volume: number): void;
|
|
59
|
+
setFullscreen(isFullscreen: boolean): void;
|
|
60
|
+
startPreroll(): void;
|
|
61
|
+
startPostroll(): void;
|
|
62
|
+
private onAdsReady;
|
|
63
|
+
private onAdStarted;
|
|
64
|
+
private onAdTimeRemained;
|
|
65
|
+
private onAdPaused;
|
|
66
|
+
private onAdPlayed;
|
|
67
|
+
private onAdMidrollPoint;
|
|
68
|
+
private onAdSkipped;
|
|
69
|
+
private onAdClosed;
|
|
70
|
+
private onAdCompleted;
|
|
71
|
+
private onAdClicked;
|
|
72
|
+
private onAdError;
|
|
73
|
+
private startWatchDog;
|
|
74
|
+
private stopWatchDog;
|
|
75
|
+
play(): void;
|
|
76
|
+
pause(): void;
|
|
77
|
+
skip(): void;
|
|
78
|
+
setPosition(position: number, duration: number): void;
|
|
79
|
+
destroy(): void;
|
|
80
|
+
private safeExternalCall;
|
|
77
81
|
}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import type { Milliseconds } from
|
|
2
|
-
import type { Readable } from
|
|
1
|
+
import type { Milliseconds } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import type { Readable } from "svelte/store";
|
|
3
3
|
export type ExternalActions = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
switchFromAdsToVideo: (callPlay?: boolean) => void;
|
|
5
|
+
switchFromVideoToAds: () => void;
|
|
6
|
+
setMuted: (muted: boolean) => void;
|
|
7
7
|
};
|
|
8
8
|
export type AdsParams = Record<string, unknown>;
|
|
9
9
|
export interface IAdmanInitParamsExternalApi {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
videoGetAds?: (p: AdsParams) => Promise<Record<string, unknown> | null>;
|
|
11
|
+
videoTrackAdEvent?: (sectionKey: string, bannerId: string) => Promise<void>;
|
|
12
12
|
}
|
|
13
13
|
export type AdmanInitParams = {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
isFullscreen: boolean;
|
|
17
|
+
isAutoplay: boolean;
|
|
18
|
+
slotId: number;
|
|
19
|
+
params?: AdsParams;
|
|
20
|
+
duration: number;
|
|
21
|
+
previewParam?: number;
|
|
22
|
+
adsContainer: HTMLElement;
|
|
23
|
+
adsVideoElement: HTMLVideoElement;
|
|
24
|
+
paramsOverride?: AdsParams;
|
|
25
|
+
externalApi?: IAdmanInitParamsExternalApi;
|
|
26
|
+
json?: Record<string, unknown>;
|
|
27
27
|
};
|
|
28
28
|
export type IPlayerState = {
|
|
29
|
-
|
|
29
|
+
vsid: Readable<string | undefined>;
|
|
30
30
|
};
|
|
31
31
|
export interface IConfig {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
loadTimeout: Milliseconds;
|
|
33
|
+
initTimeout: Milliseconds;
|
|
34
|
+
runtimeTimeout: Milliseconds;
|
|
35
|
+
useAdmanFromNPM: boolean;
|
|
36
|
+
volumeMultiplier: number;
|
|
37
|
+
isVsidOriginal: boolean;
|
|
38
38
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export declare enum DesktopButtonsLeftIds {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
PREV = "prevButton",
|
|
3
|
+
PLAY = "playButton",
|
|
4
|
+
REPLAY = "replayButton",
|
|
5
|
+
NEXT = "nextButton",
|
|
6
|
+
INTERACTIVE_PREV = "playPrevChapterButton",
|
|
7
|
+
INTERACTIVE_SEEK = "seekToInteractiveButton",
|
|
8
|
+
INTERACTIVE_GRAPH = "interactiveGraphButton",
|
|
9
|
+
LIVE = "liveButton"
|
|
10
10
|
}
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import { DesktopButtonsLeftIds } from
|
|
2
|
-
export declare const desktopButtonsLeftWeights: {
|
|
3
|
-
[key in DesktopButtonsLeftIds]: number;
|
|
4
|
-
};
|
|
1
|
+
import { DesktopButtonsLeftIds } from "./desktopButtonsLeftIds";
|
|
2
|
+
export declare const desktopButtonsLeftWeights: { [key in DesktopButtonsLeftIds] : number };
|