@vkontakte/videoplayer 1.1.68-dev.a67b8dbc.0 → 1.1.68-dev.b76b5013.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.js +64 -64
- package/es2015.esm.js +64 -64
- package/es2018.cjs.js +65 -65
- package/es2018.esm.js +65 -65
- package/es2024.cjs.js +67 -67
- package/es2024.esm.js +67 -67
- package/esnext.cjs.js +67 -67
- package/esnext.esm.js +67 -67
- package/evergreen.esm.js +67 -67
- package/package.json +5 -5
- package/types/VKVideoPlayer/index.svelte.d.ts +2 -0
- package/types/components/Ads/admanWrapper.d.ts +1 -3
- package/types/components/Controls/types.d.ts +1 -0
- package/types/components/Root/types.d.ts +3 -4
- package/types/config.d.ts +10 -0
- package/types/index.d.ts +2 -2
- package/types/store/index.d.ts +0 -2
- package/types/types/index.d.ts +2 -5
- package/types/utils/getControlInfo.d.ts +1 -1
- package/types/utils/userSettings.d.ts +2 -0
- package/types/utils/webAPI/pictureInPictureApi/documentPictureInPictureApi.svelte.d.ts +1 -1
- package/types/utils/webAPI/pictureInPictureApi/pictureInPictureApi.d.ts +4 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer",
|
|
3
|
-
"version": "1.1.68-dev.
|
|
3
|
+
"version": "1.1.68-dev.b76b5013.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.137-dev.026b8997.0",
|
|
59
|
+
"@vkontakte/videoplayer-interactive": "1.0.43-dev.fd366bc9.0",
|
|
60
|
+
"@vkontakte/videoplayer-shared": "1.0.65-dev.78e7631d.0",
|
|
61
|
+
"@vkontakte/videoplayer-statistics": "1.0.83-dev.d8e2b7a3.0"
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -13,6 +13,7 @@ import { SlotsApi } from '../utils/webAPI/slotsApi';
|
|
|
13
13
|
export declare class VKVideoPlayer extends HTMLElement {
|
|
14
14
|
private svelteStubComponent?;
|
|
15
15
|
private svelteRootComponent?;
|
|
16
|
+
private svelteErrorComponent?;
|
|
16
17
|
private store?;
|
|
17
18
|
private microStoresRoot?;
|
|
18
19
|
private statistics?;
|
|
@@ -44,6 +45,7 @@ export declare class VKVideoPlayer extends HTMLElement {
|
|
|
44
45
|
private isInited;
|
|
45
46
|
private internalsExposure;
|
|
46
47
|
private shadowDOMCallbacksDisabled;
|
|
48
|
+
private readonly fatalError$;
|
|
47
49
|
constructor();
|
|
48
50
|
private connectedCallback;
|
|
49
51
|
private disconnectedCallback;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Readable } from 'svelte/store';
|
|
2
2
|
import type { AdsTimeRemained } from '../../types';
|
|
3
3
|
import { AdsSection } from '../../types';
|
|
4
4
|
import type { AdsParams } from '../../types';
|
|
@@ -23,8 +23,6 @@ export type AdmanInitParams = {
|
|
|
23
23
|
adsVideoElement: HTMLVideoElement;
|
|
24
24
|
};
|
|
25
25
|
type IPlayerState = {
|
|
26
|
-
isMobile: Readable<boolean>;
|
|
27
|
-
mobileUnmuteButtonVisible: Writable<boolean>;
|
|
28
26
|
vsid: Readable<string | undefined>;
|
|
29
27
|
};
|
|
30
28
|
interface IConfig {
|
|
@@ -35,6 +35,7 @@ export interface AdditionalDesktopControlPanelButton extends BaseAdditionalButto
|
|
|
35
35
|
tooltipText?: string;
|
|
36
36
|
disabledTooltipContent?: string;
|
|
37
37
|
hideOnDesktopGridTypes?: GridTypes[];
|
|
38
|
+
disableMouseupTooltipShow?: boolean;
|
|
38
39
|
}
|
|
39
40
|
export type AdditionalButton = AdditionalDesktopControlPanelButton;
|
|
40
41
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IExternalTextTrack,
|
|
1
|
+
import type { IExternalTextTrack, ISources, PlaybackRate } from '@vkontakte/videoplayer-core';
|
|
2
2
|
import type { IStore } from '../../store';
|
|
3
3
|
import type { AdsParams, IMicroStoresRoot, IVideoLive, IVKVideoPlayerConfig } from '../../types';
|
|
4
4
|
import type { IUIConfig } from '../../config';
|
|
@@ -11,7 +11,6 @@ export interface RootProps {
|
|
|
11
11
|
microStoresRoot: IMicroStoresRoot;
|
|
12
12
|
videoConfig: IVKVideoPlayerConfig;
|
|
13
13
|
uiConfig: IUIConfig;
|
|
14
|
-
coreConfig: IOptionalTuningConfig;
|
|
15
14
|
title: string;
|
|
16
15
|
thumbUrl: string | undefined;
|
|
17
16
|
interactiveContainer: HTMLElement | undefined;
|
|
@@ -40,8 +39,8 @@ export interface RootProps {
|
|
|
40
39
|
endScreenVideoThumb?: string | undefined;
|
|
41
40
|
isOneVideoPlaylist?: boolean;
|
|
42
41
|
supportLink: string;
|
|
43
|
-
shadowRootContainer
|
|
44
|
-
outerContainerRef
|
|
42
|
+
shadowRootContainer: HTMLElement;
|
|
43
|
+
outerContainerRef: HTMLElement;
|
|
45
44
|
fullScreenTarget?: HTMLElement | undefined;
|
|
46
45
|
failoverHosts?: string[] | undefined;
|
|
47
46
|
showMiniTimer?: boolean;
|
package/types/config.d.ts
CHANGED
|
@@ -125,6 +125,7 @@ export interface IUIConfig {
|
|
|
125
125
|
interactiveControlsTapPlace: boolean;
|
|
126
126
|
interactiveControlsFillAnimation: boolean;
|
|
127
127
|
interactiveControlsHideAnimation: boolean;
|
|
128
|
+
interactiveHistoryEndChapterFix: boolean;
|
|
128
129
|
thumbTimer: boolean;
|
|
129
130
|
hotKeyMapModal: boolean;
|
|
130
131
|
hotKeyHelpers: boolean;
|
|
@@ -166,6 +167,15 @@ export interface IUIConfig {
|
|
|
166
167
|
* Продолжительность анимации для переключения видео.
|
|
167
168
|
*/
|
|
168
169
|
playbackStatusNextVideoAnimationDuration: number;
|
|
170
|
+
/**
|
|
171
|
+
* Включает ранее выбранный язык субтитров при запуске видео
|
|
172
|
+
*/
|
|
173
|
+
initSubtitles: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* При запуске предыдущего/следующего видео из MediaSession
|
|
176
|
+
* вместо переключения на видео из конфига будут вызываться соответствубщие колбэки
|
|
177
|
+
*/
|
|
178
|
+
useCallbackForMediaSessionNextPrevClick: boolean;
|
|
169
179
|
};
|
|
170
180
|
interactive: {
|
|
171
181
|
historyMaxLength: number;
|
package/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VKVideoPlayer } from './VKVideoPlayer/index.svelte';
|
|
2
|
-
import type { IVKVideoPlayerConfig, IControlInfo,
|
|
2
|
+
import type { IVKVideoPlayerConfig, IControlInfo, IVKVideoPlayerCallbacks, IVideoData, AdsParams, HotKeyMapData, HotKeyMapItem, HotKeyMapGroup, IVideoLive, IInteractiveData, AdditionalButtonDeprecated, IVideoEpisode, VideoPlayerView } from './types';
|
|
3
3
|
import type { LanguagePack, LanguageConfig } from './translation/types';
|
|
4
4
|
import type { ISDKConfig } from './config';
|
|
5
5
|
import type { ISources, IDashSource, URLSource, RawSource, URLSourceWithSeek } from '@vkontakte/videoplayer-core';
|
|
@@ -8,7 +8,7 @@ export { VERSION } from './env';
|
|
|
8
8
|
export declare const registerPlayerWebComponent: () => void;
|
|
9
9
|
export { type AdditionalSettingsMenuItem, MenuItemType, type AdditionalClickSettingsMenuItem, type AdditionalSwitchSettingsMenuItem, type AdditionalContextMenuItem, } from './components/Menus/subMenuTabs/types';
|
|
10
10
|
export { type AdditionalButton, ControlButtonType, } from './components/Controls/types';
|
|
11
|
-
export type { VKVideoPlayer, IVKVideoPlayerConfig, IControlInfo,
|
|
11
|
+
export type { VKVideoPlayer, IVKVideoPlayerConfig, IControlInfo, IVKVideoPlayerCallbacks, IVideoData, AdsParams, HotKeyMapData, HotKeyMapItem, HotKeyMapGroup, ISources, IDashSource, URLSource, RawSource, URLSourceWithSeek, LanguagePack, LanguageConfig, Milliseconds, IVideoLive, IInteractiveData, AdditionalButtonDeprecated, QualityLimits, IVideoEpisode, ISDKConfig, VideoPlayerView, };
|
|
12
12
|
export { GridTypes, } from './constans';
|
|
13
13
|
export { PlayerPhase, } from './types';
|
|
14
14
|
export { InterfaceLanguage, VKNumericLanguage, loadVKLangPack, } from '@vkontakte/videoplayer-shared';
|
package/types/store/index.d.ts
CHANGED
|
@@ -98,8 +98,6 @@ export interface IUIState {
|
|
|
98
98
|
}>;
|
|
99
99
|
isMobile: Writable<boolean>;
|
|
100
100
|
mobileNotReportControlHidden$: Readable<boolean>;
|
|
101
|
-
mobileUnmuteButtonExpanded: Writable<boolean>;
|
|
102
|
-
mobileUnmuteButtonVisible: Writable<boolean>;
|
|
103
101
|
icon3DVideoVisible: Writable<boolean>;
|
|
104
102
|
scrubbingInProgress: Writable<boolean>;
|
|
105
103
|
volumeChangingInProgress: Writable<boolean>;
|
package/types/types/index.d.ts
CHANGED
|
@@ -86,7 +86,6 @@ export interface IVKVideoPlayerCallbacks {
|
|
|
86
86
|
onAutoplaySoundProhibited?: () => void;
|
|
87
87
|
onDevNullLog?: (entry: DevNullEntry) => void;
|
|
88
88
|
uiInfo?: {
|
|
89
|
-
onUpcomingLiveViewStateChanged?: (value: IUpcomingLiveViewControlInfo) => void;
|
|
90
89
|
onControlsVisibleChanged?: (value?: boolean) => void;
|
|
91
90
|
onIsMobileChanged?: (value?: boolean) => void;
|
|
92
91
|
onPrevButtonChanged?: (value?: IControlInfo) => void;
|
|
@@ -304,9 +303,6 @@ export interface IControlInfo {
|
|
|
304
303
|
bottom: number;
|
|
305
304
|
isDisplayed: boolean;
|
|
306
305
|
}
|
|
307
|
-
export interface IUpcomingLiveViewControlInfo extends IControlInfo {
|
|
308
|
-
view: 'default' | 'expired';
|
|
309
|
-
}
|
|
310
306
|
export interface IPlayerControlsRef {
|
|
311
307
|
prevButton?: HTMLButtonElement;
|
|
312
308
|
playButton?: HTMLButtonElement;
|
|
@@ -442,7 +438,7 @@ export interface IPictureInPictureApi {
|
|
|
442
438
|
isActive: () => boolean;
|
|
443
439
|
setContext: (svelteContext: Map<unknown, unknown>) => void;
|
|
444
440
|
request: () => Promise<void>;
|
|
445
|
-
|
|
441
|
+
exit: () => Promise<void>;
|
|
446
442
|
info: IPictureInPictureApiInfo;
|
|
447
443
|
setEnabled: (enabled: boolean) => void;
|
|
448
444
|
dispose: () => Promise<void>;
|
|
@@ -475,6 +471,7 @@ export type VideoSubtitle = {
|
|
|
475
471
|
displayValue: string;
|
|
476
472
|
selected: boolean;
|
|
477
473
|
isAuto?: boolean;
|
|
474
|
+
language: string;
|
|
478
475
|
};
|
|
479
476
|
export type VideoSubtitleParsed = {
|
|
480
477
|
startTime: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function getControlInfo<TRefKey extends string, Refs extends Record<TRefKey, HTMLElement | undefined>>(
|
|
1
|
+
export declare function getControlInfo<TRefKey extends string, Refs extends Record<TRefKey, HTMLElement | undefined>>(videoElement: HTMLVideoElement | null, refs: Refs, key: TRefKey, show: boolean): {
|
|
2
2
|
left: number;
|
|
3
3
|
right: number;
|
|
4
4
|
top: number;
|
|
@@ -11,6 +11,8 @@ export declare const savePreferTrafficSavingEnabled: (trafficSavingEnabled: bool
|
|
|
11
11
|
export declare const getPreferTrafficSavingEnabled: () => boolean;
|
|
12
12
|
export declare const getPreferredStreamLanguage: () => string | undefined;
|
|
13
13
|
export declare const savePreferredStreamLanguage: (language: string) => void;
|
|
14
|
+
export declare const getPreferredSubtitlesLanguage: () => string | undefined;
|
|
15
|
+
export declare const savePreferredSubtitlesLanguage: (language?: string) => void;
|
|
14
16
|
export declare const savePreferredRate: (rate: PlaybackRate) => void;
|
|
15
17
|
export declare const getPreferredRate: () => PlaybackRate | undefined;
|
|
16
18
|
export declare const savePreferredAutoplayNext: (autoplayNext: boolean) => void;
|
|
@@ -24,7 +24,7 @@ export declare class DocumentPictureInPictureApiSvelte implements IPictureInPict
|
|
|
24
24
|
setPlayerDomElement(playerDomElement: HTMLElement, playerParentShadowRoot: ShadowRoot): void;
|
|
25
25
|
setContext(svelteContext: Map<unknown, unknown>): void;
|
|
26
26
|
request(): Promise<void>;
|
|
27
|
-
|
|
27
|
+
exit(): Promise<void>;
|
|
28
28
|
dispose(): Promise<void>;
|
|
29
29
|
/**
|
|
30
30
|
* Флаг определяет может ли пользователь переходить в dpip на уровне бизнес логике.
|
|
@@ -10,7 +10,6 @@ export declare class PictureInPictureApi implements IPictureInPictureApi {
|
|
|
10
10
|
private isRequested;
|
|
11
11
|
private videoElement;
|
|
12
12
|
private playerContainer;
|
|
13
|
-
private playerDummyElement;
|
|
14
13
|
private svelteContext;
|
|
15
14
|
private externalEventHandlers;
|
|
16
15
|
private readonly eventHandlers;
|
|
@@ -31,12 +30,12 @@ export declare class PictureInPictureApi implements IPictureInPictureApi {
|
|
|
31
30
|
setContext(svelteContext: Map<unknown, unknown>): void;
|
|
32
31
|
revealPictureInPicture(): Promise<void>;
|
|
33
32
|
request(): Promise<void>;
|
|
34
|
-
|
|
33
|
+
exit(): Promise<void>;
|
|
35
34
|
assignPlayerContainer(playerContainer: HTMLElement): void;
|
|
36
35
|
updateVideoElement(): void;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
private addEventHandlers;
|
|
37
|
+
setExternalEventHandlers(externalEventHandlers: Partial<PictureInPictureEventHandlers>): void;
|
|
38
|
+
private removeEventHandlers;
|
|
40
39
|
dispose(): Promise<void>;
|
|
41
40
|
private onEnterPictureInPicture;
|
|
42
41
|
private onLeavePictureInPicture;
|