@vkontakte/videoplayer 1.1.85-dev.04f0bb5f.0 → 1.1.85-dev.74465ac5.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 +40 -40
- package/es2018.cjs +36 -36
- package/es2018.esm.js +36 -36
- package/es2024.cjs +34 -34
- package/es2024.esm.js +34 -34
- package/esnext.cjs +34 -34
- package/esnext.esm.js +34 -34
- package/evergreen.esm.js +34 -34
- package/package.json +5 -5
- 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 +6 -5
- 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 +3 -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.74465ac5.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.74465ac5.0",
|
|
59
|
+
"@vkontakte/videoplayer-interactive": "1.0.60-dev.74465ac5.0",
|
|
60
|
+
"@vkontakte/videoplayer-shared": "1.0.83-dev.74465ac5.0",
|
|
61
|
+
"@vkontakte/videoplayer-statistics": "1.0.100-dev.74465ac5.0"
|
|
62
62
|
}
|
|
63
63
|
}
|
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';
|
|
@@ -244,9 +244,10 @@ export interface AdditionalButtonDeprecated {
|
|
|
244
244
|
/**
|
|
245
245
|
* Определяет внешний вид плеера и его функциональность.
|
|
246
246
|
* preview - обрезанная функциональность плеера для показать трейлеров, например;
|
|
247
|
+
* minimal - обрезанная функциональность плеера для dpip и возможно других потребностей;
|
|
247
248
|
* full - полная функциональность плеера доступна.
|
|
248
249
|
*/
|
|
249
|
-
export type VideoPlayerView = 'preview' | 'full';
|
|
250
|
+
export type VideoPlayerView = 'preview' | 'minimal' | 'full';
|
|
250
251
|
export interface IVKVideoPlayerConfig {
|
|
251
252
|
videos: IVideoData[];
|
|
252
253
|
videoIndex?: number;
|
|
@@ -452,9 +453,9 @@ export interface IPictureInPictureApiInfo {
|
|
|
452
453
|
isEnabled$: IValueObservable<boolean>;
|
|
453
454
|
type: PictureInPictureType;
|
|
454
455
|
}
|
|
455
|
-
export
|
|
456
|
-
enabled
|
|
457
|
-
}
|
|
456
|
+
export interface PictureInPictureSettings extends IDpipConfig {
|
|
457
|
+
enabled: boolean;
|
|
458
|
+
}
|
|
458
459
|
export interface Size {
|
|
459
460
|
width: number;
|
|
460
461
|
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,8 @@
|
|
|
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;
|