@vkontakte/videoplayer 1.1.91-dev.ff8ccb48.0 → 1.1.92-dev.04f50366b.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 +18 -18
- package/es2015.esm.js +36 -36
- package/esnext.cjs +36 -36
- package/esnext.esm.js +36 -36
- package/evergreen.esm.js +36 -36
- package/package.json +5 -5
- package/types/VKVideoPlayer/index.svelte.d.ts +1 -0
- package/types/config.d.ts +10 -4
- package/types/store/micro/pictureInPicture.d.ts +1 -1
- package/types/store/types.d.ts +2 -0
- package/types/types/index.d.ts +16 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.92-dev.04f50366b.0",
|
|
4
4
|
"author": "vk.com",
|
|
5
5
|
"description": "Videoplayer based on the vk.com platform",
|
|
6
6
|
"homepage": "https://vk.com",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@adtech/rbadman": "2.2.57",
|
|
46
|
-
"@vkontakte/videoplayer-core": "2.0.
|
|
47
|
-
"@vkontakte/videoplayer-interactive": "1.0.
|
|
48
|
-
"@vkontakte/videoplayer-shared": "1.0.
|
|
49
|
-
"@vkontakte/videoplayer-statistics": "1.0.
|
|
46
|
+
"@vkontakte/videoplayer-core": "2.0.161-dev.04f50366b.0",
|
|
47
|
+
"@vkontakte/videoplayer-interactive": "1.0.67-dev.04f50366b.0",
|
|
48
|
+
"@vkontakte/videoplayer-shared": "1.0.90-dev.04f50366b.0",
|
|
49
|
+
"@vkontakte/videoplayer-statistics": "1.0.107-dev.04f50366b.0"
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -84,6 +84,7 @@ export declare class VKVideoPlayer extends HTMLElement {
|
|
|
84
84
|
private addPlayerInfoSubscriptions;
|
|
85
85
|
playNextVideo(): void;
|
|
86
86
|
playPrevVideo(): void;
|
|
87
|
+
toggleFullscreen(): void;
|
|
87
88
|
/**
|
|
88
89
|
* !!! Сейчас нее будет полноценно работать,
|
|
89
90
|
* потому что часть полей которые реально относятся к видео передаются в videoConfig
|
package/types/config.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExactVideoQuality, Seconds,
|
|
1
|
+
import type { ExactVideoQuality, Seconds, IAppTracerConfig } from "@vkontakte/videoplayer-shared";
|
|
2
2
|
import type { IOptionalTuningConfig as ICoreConfig } from "@vkontakte/videoplayer-core";
|
|
3
3
|
import { InterfaceLanguage } from "@vkontakte/videoplayer-shared";
|
|
4
4
|
import type { RecursivePartial } from "@vkontakte/videoplayer-shared";
|
|
@@ -20,10 +20,12 @@ export declare enum LogoType {
|
|
|
20
20
|
* never - не показывать
|
|
21
21
|
* always - показыватьв всегда
|
|
22
22
|
*/
|
|
23
|
-
export type TitleShowBehaviour = "fullscreen" | "with-controls" | "never" | "always";
|
|
23
|
+
export type TitleShowBehaviour = "fullscreen" | "fullscreen-and-dpip" | "with-controls" | "never" | "always";
|
|
24
24
|
export interface IDpipConfig {
|
|
25
|
-
minimalView?: boolean;
|
|
26
25
|
initialSize?: Size;
|
|
26
|
+
minimalView?: boolean;
|
|
27
|
+
showPrevNextButtons?: boolean;
|
|
28
|
+
showAutoplayToggle?: boolean;
|
|
27
29
|
}
|
|
28
30
|
export interface IAdsConfig {
|
|
29
31
|
enable: ForceOrRelay;
|
|
@@ -133,7 +135,7 @@ export interface IUIConfig {
|
|
|
133
135
|
copyVideoLink: boolean;
|
|
134
136
|
videoRotate: boolean;
|
|
135
137
|
tracer: boolean;
|
|
136
|
-
apptracer:
|
|
138
|
+
apptracer: IAppTracerConfig;
|
|
137
139
|
interactiveGraph: boolean;
|
|
138
140
|
interactiveResponsiveUi?: boolean;
|
|
139
141
|
seekToInteractive: boolean;
|
|
@@ -222,6 +224,10 @@ export interface IUIConfig {
|
|
|
222
224
|
usePreviewTimelineWithHovering: boolean;
|
|
223
225
|
/** добавляет перехват кликов (`event.stopPropagation()`) на уровне Root компонента плеера */
|
|
224
226
|
rootStopPropagation: boolean;
|
|
227
|
+
/** расширяет высоту под-меню настроек в мобильной версии */
|
|
228
|
+
mobileSubMenuStretchHeight: boolean;
|
|
229
|
+
/** перенос кнопки с логотипом вк из верхнего-левого угла в контролы около кнопки звука */
|
|
230
|
+
mobileVkLogoViewOnBottomControls: boolean;
|
|
225
231
|
};
|
|
226
232
|
/**
|
|
227
233
|
* Отключает вызов колбэка uiInfo.onPlayerSizeChanged при ресайзе обычного pip
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseMicroStore } from "./base";
|
|
2
|
-
import type
|
|
2
|
+
import { type InitMicroStoreParams, type PictureInPictureMicroStore } from "../../types";
|
|
3
3
|
import type { Subscription } from "@vkontakte/videoplayer-shared";
|
|
4
4
|
export default class PictureInPicture extends BaseMicroStore {
|
|
5
5
|
readonly stateName = "pictureInPicture$";
|
package/types/store/types.d.ts
CHANGED
|
@@ -293,6 +293,7 @@ export interface IStoreInternalActions {
|
|
|
293
293
|
previewTrackOpened: () => void;
|
|
294
294
|
previewTrackDragStarted: () => void;
|
|
295
295
|
previewTrackDragFinished: () => void;
|
|
296
|
+
setFullscreenHandler: (cb: (() => void) | null) => void;
|
|
296
297
|
}
|
|
297
298
|
export interface IStoreExternalActions {
|
|
298
299
|
firstStart: (showAds: boolean) => void;
|
|
@@ -325,6 +326,7 @@ export interface IStoreExternalActions {
|
|
|
325
326
|
setHighQualityEnabled: (highQualityEnabled: boolean) => void;
|
|
326
327
|
changeAudioStream: (id: string) => void;
|
|
327
328
|
setMinimalView: (enabled: boolean) => void;
|
|
329
|
+
toggleFullscreen: () => void;
|
|
328
330
|
}
|
|
329
331
|
export interface IStoreInitVideoConfig extends ICoreInitVideoConfig {
|
|
330
332
|
autoplay?: boolean;
|
package/types/types/index.d.ts
CHANGED
|
@@ -323,11 +323,14 @@ export interface IVKVideoPlayerConfig {
|
|
|
323
323
|
playerView?: VideoPlayerView;
|
|
324
324
|
mediascopePixels?: MediascopePixelTypes.Pixel[];
|
|
325
325
|
getVideoDeeplink?: (timestamp: number) => string;
|
|
326
|
+
apptracerUserId?: string | number;
|
|
326
327
|
}
|
|
327
328
|
/**
|
|
328
329
|
* Поля, которые можно обновить, сохранив итстанс плеера
|
|
329
330
|
*/
|
|
330
|
-
export type IUpdatableVKVideoPlayerConfig = Pick<Omit<IVKVideoPlayerConfig, "callbacks" | "interactiveData">, "adsSlotId" | "adsParams" | "albumId" | "canDownload" | "canRewindLive" | "failoverHosts" | "fromTime" | "isAudioDisabled" | "mediascopePixels" | "loop" | "muted" | "repeat" | "preload" | "showAutoplayNext" | "showNextPrevButtons" | "statTrackCode" | "
|
|
331
|
+
export type IUpdatableVKVideoPlayerConfig = Pick<Omit<IVKVideoPlayerConfig, "callbacks" | "interactiveData">, "adsSlotId" | "adsParams" | "albumId" | "canDownload" | "canRewindLive" | "failoverHosts" | "fromTime" | "isAudioDisabled" | "mediascopePixels" | "loop" | "muted" | "repeat" | "preload" | "showAutoplayNext" | "showNextPrevButtons" | "statTrackCode" | "videoIndex" | "volumeMultiplier"> & {
|
|
332
|
+
videos?: IVideoData[];
|
|
333
|
+
};
|
|
331
334
|
export interface IControlInfo {
|
|
332
335
|
left: number;
|
|
333
336
|
right: number;
|
|
@@ -607,19 +610,25 @@ export type IToggleable<T> = T & {
|
|
|
607
610
|
};
|
|
608
611
|
type MicroStoreWritableBase<T = unknown> = Writable<T>;
|
|
609
612
|
type ToggleableMicroStore = IToggleable<MicroStoreWritableBase<boolean | null>>;
|
|
610
|
-
export
|
|
613
|
+
export interface DpipHiddenFeatures {
|
|
614
|
+
autoplayToggle?: boolean;
|
|
615
|
+
nextPrev?: boolean;
|
|
616
|
+
}
|
|
617
|
+
export interface PictureInPictureMicroStore {
|
|
618
|
+
hiddenFeatures$: Writable<DpipHiddenFeatures | undefined>;
|
|
611
619
|
isActive$: Writable<boolean>;
|
|
620
|
+
isDpipActive$: Writable<boolean>;
|
|
612
621
|
isEnabled$: Writable<boolean>;
|
|
613
622
|
type$: Writable<PictureInPictureType | undefined>;
|
|
614
|
-
}
|
|
615
|
-
export
|
|
623
|
+
}
|
|
624
|
+
export interface NotificationsMicroStore {
|
|
616
625
|
notificationsToShow$: Writable<Partial<Record<NotificationId, boolean>>>;
|
|
617
626
|
showNotification: (id: NotificationId) => void;
|
|
618
627
|
closeNotification: (id: NotificationId) => void;
|
|
619
|
-
}
|
|
620
|
-
export
|
|
628
|
+
}
|
|
629
|
+
export interface PreviewPlayerMicroStore {
|
|
621
630
|
timelineActive$: Writable<boolean>;
|
|
622
|
-
}
|
|
631
|
+
}
|
|
623
632
|
export interface IMicroStores {
|
|
624
633
|
fakeIsPlaying$: ToggleableMicroStore;
|
|
625
634
|
interactiveControlsOpacity$: ToggleableMicroStore;
|