@vkontakte/videoplayer 1.1.85-dev.84183efb.0 → 1.1.85-dev.a9d5a5e1.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 +36 -36
- package/es2015.esm.js +36 -36
- package/es2018.cjs +36 -36
- package/es2018.esm.js +36 -36
- package/es2024.cjs +37 -37
- package/es2024.esm.js +37 -37
- package/esnext.cjs +37 -37
- package/esnext.esm.js +37 -37
- package/evergreen.esm.js +37 -37
- package/package.json +5 -5
- package/types/VKVideoPlayer/index.svelte.d.ts +1 -0
- package/types/config.d.ts +7 -1
- package/types/index.d.ts +3 -2
- package/types/store/index.d.ts +2 -0
- package/types/types/index.d.ts +4 -4
- package/types/utils/webAPI/pictureInPictureApi/documentPictureInPictureApi.svelte.d.ts +2 -1
- package/types/utils/webAPI/pictureInPictureApi/factory.d.ts +3 -0
- package/types/utils/webAPI/pictureInPictureApi/index.d.ts +4 -0
- package/types/utils/webAPI/pictureInPictureApi/pictureInPictureApi.d.ts +1 -1
- package/types/utils/webAPI/pictureInPictureApi/utils.d.ts +5 -0
- package/types/utils/webAPI/pictureInPictureApi/pictureInPictureApiFactory.d.ts +0 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer",
|
|
3
|
-
"version": "1.1.85-dev.
|
|
3
|
+
"version": "1.1.85-dev.a9d5a5e1.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.154-dev.
|
|
59
|
-
"@vkontakte/videoplayer-interactive": "1.0.60-dev.
|
|
60
|
-
"@vkontakte/videoplayer-shared": "1.0.83-dev.
|
|
61
|
-
"@vkontakte/videoplayer-statistics": "1.0.100-dev.
|
|
58
|
+
"@vkontakte/videoplayer-core": "2.0.154-dev.a9d5a5e1.0",
|
|
59
|
+
"@vkontakte/videoplayer-interactive": "1.0.60-dev.a9d5a5e1.0",
|
|
60
|
+
"@vkontakte/videoplayer-shared": "1.0.83-dev.a9d5a5e1.0",
|
|
61
|
+
"@vkontakte/videoplayer-statistics": "1.0.100-dev.a9d5a5e1.0"
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -67,6 +67,7 @@ export declare class VKVideoPlayer extends HTMLElement {
|
|
|
67
67
|
private createOneStat;
|
|
68
68
|
private createThinOneStat;
|
|
69
69
|
private createPlayer;
|
|
70
|
+
private get useMinimalViewForDpip();
|
|
70
71
|
private addPlayerInfoSubscriptions;
|
|
71
72
|
playNextVideo(): void;
|
|
72
73
|
playPrevVideo(): void;
|
package/types/config.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { InterfaceLanguage } from '@vkontakte/videoplayer-shared';
|
|
|
4
4
|
import type { RecursivePartial } from '@vkontakte/videoplayer-shared';
|
|
5
5
|
import type { IOptionalConfig as IStatisticsConfig } from '@vkontakte/videoplayer-statistics';
|
|
6
6
|
import type { Milliseconds } from '@vkontakte/videoplayer-shared';
|
|
7
|
+
import type { Size } from './types';
|
|
7
8
|
type ForceOrRelay = boolean | undefined;
|
|
8
9
|
export declare enum LogoType {
|
|
9
10
|
VK = "vk",
|
|
@@ -20,6 +21,10 @@ export declare enum LogoType {
|
|
|
20
21
|
* always - показыватьв всегда
|
|
21
22
|
*/
|
|
22
23
|
export type TitleShowBehaviour = 'fullscreen' | 'with-controls' | 'never' | 'always';
|
|
24
|
+
export interface IDpipConfig {
|
|
25
|
+
minimalView?: boolean;
|
|
26
|
+
initialSize?: Size;
|
|
27
|
+
}
|
|
23
28
|
export interface IUIConfig {
|
|
24
29
|
isMobile: ForceOrRelay;
|
|
25
30
|
disableInvisibleComponentsTimeout: Milliseconds;
|
|
@@ -107,7 +112,7 @@ export interface IUIConfig {
|
|
|
107
112
|
slots: boolean;
|
|
108
113
|
download: boolean;
|
|
109
114
|
pip: boolean;
|
|
110
|
-
dpip: boolean;
|
|
115
|
+
dpip: boolean | IDpipConfig;
|
|
111
116
|
liveRewind: boolean;
|
|
112
117
|
playbackRate: boolean;
|
|
113
118
|
trafficSaving: boolean;
|
|
@@ -225,6 +230,7 @@ export interface IUIConfig {
|
|
|
225
230
|
focusedOutlineWidth: string | null;
|
|
226
231
|
focusedOutlineRadius: string | null;
|
|
227
232
|
controlsDesktopPaddingHorizontal: string | null;
|
|
233
|
+
controlsDesktopPaddingHorizontalMinimalView: string | null;
|
|
228
234
|
timelinePaddingHorizontal: string | null;
|
|
229
235
|
settingsBackgroundColor: string | null;
|
|
230
236
|
controlsGradientHeight: string | null;
|
package/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VKVideoPlayer } from './VKVideoPlayer/index.svelte';
|
|
2
2
|
import type { IVKVideoPlayerConfig, IControlInfo, ITimelinePreviewThumbsData, IUpcomingLiveViewControlInfo, IVKVideoPlayerCallbacks, IVideoData, HotKeyMapData, HotKeyMapItem, HotKeyMapGroup, IVideoLive, IInteractiveData, AdditionalButtonDeprecated, IVideoEpisode, VideoPlayerView } from './types';
|
|
3
3
|
import type { LanguagePack, LanguageConfig } from './translation/types';
|
|
4
|
-
import type { LogoType as VKLogoType, ISDKConfig } from './config';
|
|
4
|
+
import type { LogoType as VKLogoType, ISDKConfig, IDpipConfig } from './config';
|
|
5
5
|
import type { AdsParams, IAdmanInitParamsExternalApi } from './components/Ads/types';
|
|
6
6
|
import type { ISources, IDashSource, URLSource, RawSource, URLSourceWithSeek } from '@vkontakte/videoplayer-core';
|
|
7
7
|
import type { Milliseconds, QualityLimits } from '@vkontakte/videoplayer-shared';
|
|
@@ -9,8 +9,9 @@ export { VERSION } from './env';
|
|
|
9
9
|
export declare const registerPlayerWebComponent: () => void;
|
|
10
10
|
export { type AdditionalSettingsMenuItem, MenuItemType, type AdditionalClickSettingsMenuItem, type AdditionalSwitchSettingsMenuItem, type AdditionalContextMenuItem, } from './components/Menus/subMenuTabs/types';
|
|
11
11
|
export { type AdditionalButton, ControlButtonType, } from './components/Controls/types';
|
|
12
|
-
export type { VKVideoPlayer, IVKVideoPlayerConfig, IControlInfo, ITimelinePreviewThumbsData, IUpcomingLiveViewControlInfo, IVKVideoPlayerCallbacks, IVideoData, AdsParams, HotKeyMapData, HotKeyMapItem, HotKeyMapGroup, ISources, IDashSource, URLSource, RawSource, URLSourceWithSeek, LanguagePack, LanguageConfig, Milliseconds, IVideoLive, IInteractiveData, AdditionalButtonDeprecated, QualityLimits, IVideoEpisode, ISDKConfig, VideoPlayerView, IAdmanInitParamsExternalApi, VKLogoType, };
|
|
12
|
+
export type { VKVideoPlayer, IVKVideoPlayerConfig, IControlInfo, ITimelinePreviewThumbsData, IUpcomingLiveViewControlInfo, IVKVideoPlayerCallbacks, IVideoData, AdsParams, HotKeyMapData, HotKeyMapItem, HotKeyMapGroup, ISources, IDashSource, URLSource, RawSource, URLSourceWithSeek, LanguagePack, LanguageConfig, Milliseconds, IVideoLive, IInteractiveData, AdditionalButtonDeprecated, QualityLimits, IVideoEpisode, IDpipConfig, ISDKConfig, VideoPlayerView, IAdmanInitParamsExternalApi, VKLogoType, };
|
|
13
13
|
export { GridTypes, } from './constans';
|
|
14
14
|
export { PlayerPhase, } from './types';
|
|
15
|
+
export { isPiPSupported, isDpipSupported } from './utils/webAPI/pictureInPictureApi';
|
|
15
16
|
export { InterfaceLanguage, VKNumericLanguage, loadVKLangPack, } from '@vkontakte/videoplayer-shared';
|
|
16
17
|
export { VideoQuality, VideoFormat, } from '@vkontakte/videoplayer-core';
|
package/types/store/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export interface IAdsState {
|
|
|
32
32
|
}
|
|
33
33
|
export interface IUIState {
|
|
34
34
|
t: (key: Key, params?: Record<string, string>) => string;
|
|
35
|
+
isMinimalView$: Writable<boolean>;
|
|
35
36
|
controlsVisible: Writable<boolean>;
|
|
36
37
|
/**
|
|
37
38
|
* Точечно скрываем контролы.
|
|
@@ -343,6 +344,7 @@ export interface IStore {
|
|
|
343
344
|
setTrafficSavingEnabled: (trafficSavingEnabled: boolean) => void;
|
|
344
345
|
setHighQualityEnabled: (highQualityEnabled: boolean) => void;
|
|
345
346
|
changeAudioStream: (id: string) => void;
|
|
347
|
+
setMinimalView: (enabled: boolean) => void;
|
|
346
348
|
};
|
|
347
349
|
};
|
|
348
350
|
callbacks?: IVKVideoPlayerCallbacks;
|
package/types/types/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { Chapter, Manifest, ManifestVideo, VideoInfo, Interactives, IIntera
|
|
|
4
4
|
import { PlaybackState } from '@vkontakte/videoplayer-core';
|
|
5
5
|
import type { MediascopePixelTypes, SeekAction, ThinOneStat } from '@vkontakte/videoplayer-statistics';
|
|
6
6
|
import type { Writable, Readable } from 'svelte/store';
|
|
7
|
-
import type { ISDKConfig, IUIConfig } from '../config';
|
|
7
|
+
import type { IDpipConfig, ISDKConfig, IUIConfig } from '../config';
|
|
8
8
|
import type { IStore } from '../store';
|
|
9
9
|
import { Controls, GridTypes, type SeekToInteractiveDisabledTooltipKey } from '../constans';
|
|
10
10
|
import type { Key } from '../translation/types';
|
|
@@ -452,9 +452,9 @@ export interface IPictureInPictureApiInfo {
|
|
|
452
452
|
isEnabled$: IValueObservable<boolean>;
|
|
453
453
|
type: PictureInPictureType;
|
|
454
454
|
}
|
|
455
|
-
export
|
|
456
|
-
enabled
|
|
457
|
-
}
|
|
455
|
+
export interface PictureInPictureSettings extends IDpipConfig {
|
|
456
|
+
enabled: boolean;
|
|
457
|
+
}
|
|
458
458
|
export interface Size {
|
|
459
459
|
width: number;
|
|
460
460
|
height: number;
|
|
@@ -2,6 +2,7 @@ import { ValueSubject } from '@vkontakte/videoplayer-shared';
|
|
|
2
2
|
import type { ExternalPictureInPictureEventHandlers, IPictureInPictureApi, PictureInPictureSettings } from '../../../types';
|
|
3
3
|
import { PictureInPictureType } from '../../../types';
|
|
4
4
|
export declare class DocumentPictureInPictureApiSvelte implements IPictureInPictureApi {
|
|
5
|
+
private readonly initialSize;
|
|
5
6
|
private playerDomElement;
|
|
6
7
|
private playerParentShadowRoot;
|
|
7
8
|
private playerDummyElement;
|
|
@@ -17,7 +18,7 @@ export declare class DocumentPictureInPictureApiSvelte implements IPictureInPict
|
|
|
17
18
|
*/
|
|
18
19
|
private pipActive;
|
|
19
20
|
private readonly pipApi;
|
|
20
|
-
constructor({ enabled }
|
|
21
|
+
constructor({ enabled, initialSize }: PictureInPictureSettings);
|
|
21
22
|
/**
|
|
22
23
|
* Флаг показывает, есть ли в целом возможность использовать dpip в данном браузере, поддерживается ли это.
|
|
23
24
|
*/
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { isInstanceOfDocumentPictureInPictureApi } from './documentPictureInPictureApi.svelte';
|
|
2
|
+
export { isInstanceOfPictureInPictureApi } from './pictureInPictureApi';
|
|
3
|
+
export { createPiPApi } from './factory';
|
|
4
|
+
export { isPiPSupported, isDpipSupported } from './utils';
|
|
@@ -13,7 +13,7 @@ export declare class PictureInPictureApi implements IPictureInPictureApi {
|
|
|
13
13
|
isEnabled$: ValueSubject<boolean>;
|
|
14
14
|
type: PictureInPictureType;
|
|
15
15
|
};
|
|
16
|
-
constructor({ enabled }
|
|
16
|
+
constructor({ enabled }: PictureInPictureSettings);
|
|
17
17
|
/**
|
|
18
18
|
* Флаг показывает, есть ли в целом возможность использовать pip в данном браузере, поддерживается ли это.
|
|
19
19
|
*/
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { type SafeAny } from '@vkontakte/videoplayer-shared';
|
|
2
2
|
import type { PictureInPictureResizeEvent } from '../../../types';
|
|
3
|
+
import type { IDpipConfig } from '../../../config';
|
|
3
4
|
export declare const isPiPSupported: () => boolean;
|
|
5
|
+
export declare const isDpipSupported: () => boolean;
|
|
4
6
|
export declare const isPiPEvent: (e: SafeAny) => e is PictureInPictureEvent;
|
|
5
7
|
export declare const isPiPResizeEvent: (e: Event) => e is PictureInPictureResizeEvent;
|
|
8
|
+
export declare const isDpipEnabledByConfig: (value?: IDpipConfig | boolean) => boolean;
|
|
9
|
+
export declare const styleSheetToString: (styleSheet: CSSStyleSheet) => string;
|
|
10
|
+
export declare const createStyleNode: (textContent: string, id: string) => Node;
|