@vkontakte/videoplayer 1.1.91-dev.ff8ccb48.0 → 1.1.92-beta.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 +35 -39
- package/es2015.esm.js +35 -39
- package/esnext.cjs +35 -39
- package/esnext.esm.js +34 -38
- package/evergreen.esm.js +34 -38
- package/package.json +5 -5
- package/types/VKVideoPlayer/index.svelte.d.ts +1 -1
- package/types/components/Menus/constants/contextMenuItemIds.d.ts +0 -1
- package/types/components/Menus/constants/settingsMenuItemIds.d.ts +0 -1
- package/types/components/Menus/subMenuTabs/rootMenuItems.d.ts +0 -1
- package/types/components/Menus/subMenuTabs/types.d.ts +0 -1
- package/types/components/Root/types.d.ts +3 -4
- package/types/config.d.ts +14 -5
- package/types/constans/keyboard.d.ts +2 -0
- package/types/store/composition.d.ts +31 -0
- package/types/store/index.d.ts +1 -1
- package/types/store/modules/fakeIsPlayingStore/fakeIsPlayingStore.module.d.ts +3 -0
- package/types/store/modules/fakeIsPlayingStore/fakeIsPlayingStore.store.d.ts +26 -0
- package/types/store/modules/fakeIsPlayingStore/fakeIsPlayingStore.token.d.ts +3 -0
- package/types/store/modules/fakeIsPlayingStore/index.d.ts +3 -0
- package/types/store/modules/graphIsOpenedStore/graphIsOpenedStore.module.d.ts +3 -0
- package/types/store/modules/graphIsOpenedStore/graphIsOpenedStore.store.d.ts +50 -0
- package/types/store/modules/graphIsOpenedStore/graphIsOpenedStore.token.d.ts +3 -0
- package/types/store/modules/graphIsOpenedStore/index.d.ts +3 -0
- package/types/store/modules/index.d.ts +18 -0
- package/types/store/modules/infrastructure/index.d.ts +3 -0
- package/types/store/modules/infrastructure/infrastructure.module.d.ts +21 -0
- package/types/store/modules/infrastructure/infrastructure.token.d.ts +26 -0
- package/types/store/modules/interactiveControlsOpacityStore/index.d.ts +3 -0
- package/types/store/modules/interactiveControlsOpacityStore/interactiveControlsOpacityStore.module.d.ts +3 -0
- package/types/store/modules/interactiveControlsOpacityStore/interactiveControlsOpacityStore.store.d.ts +34 -0
- package/types/store/modules/interactiveControlsOpacityStore/interactiveControlsOpacityStore.token.d.ts +3 -0
- package/types/store/modules/notificationsStore/index.d.ts +3 -0
- package/types/store/modules/notificationsStore/notificationsStore.module.d.ts +3 -0
- package/types/store/modules/notificationsStore/notificationsStore.store.d.ts +34 -0
- package/types/store/modules/notificationsStore/notificationsStore.token.d.ts +3 -0
- package/types/store/modules/pictureInPictureStore/index.d.ts +3 -0
- package/types/store/modules/pictureInPictureStore/pictureInPictureStore.module.d.ts +3 -0
- package/types/store/modules/pictureInPictureStore/pictureInPictureStore.store.d.ts +42 -0
- package/types/store/modules/pictureInPictureStore/pictureInPictureStore.token.d.ts +3 -0
- package/types/store/modules/seekToInteractiveDisabledTooltipStore/index.d.ts +3 -0
- package/types/store/modules/seekToInteractiveDisabledTooltipStore/seekToInteractiveDisabledTooltipStore.module.d.ts +3 -0
- package/types/store/modules/seekToInteractiveDisabledTooltipStore/seekToInteractiveDisabledTooltipStore.store.d.ts +26 -0
- package/types/store/modules/seekToInteractiveDisabledTooltipStore/seekToInteractiveDisabledTooltipStore.token.d.ts +3 -0
- package/types/store/modules/showInteractiveTimeIndicatorTooltipStore/index.d.ts +3 -0
- package/types/store/modules/showInteractiveTimeIndicatorTooltipStore/showInteractiveTimeIndicatorTooltipStore.module.d.ts +3 -0
- package/types/store/modules/showInteractiveTimeIndicatorTooltipStore/showInteractiveTimeIndicatorTooltipStore.store.d.ts +44 -0
- package/types/store/modules/showInteractiveTimeIndicatorTooltipStore/showInteractiveTimeIndicatorTooltipStore.token.d.ts +3 -0
- package/types/store/modules/utils.d.ts +6 -0
- package/types/store/types.d.ts +16 -8
- package/types/store/utils.d.ts +5 -5
- package/types/types/index.d.ts +16 -55
- package/types/utils/webAPI/pictureInPictureApi/documentPictureInPictureApi.svelte.d.ts +5 -2
- package/types/store/micro/base.d.ts +0 -8
- package/types/store/micro/fakeIsPlaying.d.ts +0 -10
- package/types/store/micro/graphIsOpened.d.ts +0 -13
- package/types/store/micro/index.d.ts +0 -2
- package/types/store/micro/interactiveControlsOpacity.d.ts +0 -10
- package/types/store/micro/notifications.d.ts +0 -9
- package/types/store/micro/pictureInPicture.d.ts +0 -8
- package/types/store/micro/seekToInteractiveDisabledTooltip.d.ts +0 -10
- package/types/store/micro/showInteractiveTimeIndicatorTooltip.d.ts +0 -15
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ShowInteractiveTimeIndicatorTooltip Store Module
|
|
3
|
+
*
|
|
4
|
+
* Управляет отображением тултипа для индикатора интерактивного времени.
|
|
5
|
+
*/
|
|
6
|
+
import type { Readable, Writable } from "svelte/store";
|
|
7
|
+
import type { Subscription } from "@vkontakte/videoplayer-shared";
|
|
8
|
+
import type { IControlInfo, IVKVideoPlayerConfig } from "../../../types";
|
|
9
|
+
type ShowInteractiveTimeIndicatorTooltipState = Writable<boolean> & {
|
|
10
|
+
set: (newValue: boolean, useTimeout?: boolean) => void;
|
|
11
|
+
clearTimeout: () => void;
|
|
12
|
+
};
|
|
13
|
+
export interface Deps {
|
|
14
|
+
/** Общий subscription для всех подписок */
|
|
15
|
+
subscription: Subscription;
|
|
16
|
+
/** Флаг воспроизведения */
|
|
17
|
+
isPlaying$: Readable<boolean>;
|
|
18
|
+
/** Флаг интерактивного времени */
|
|
19
|
+
isInteractiveTime$: Readable<boolean>;
|
|
20
|
+
/** Информация об индикаторе интерактивного времени */
|
|
21
|
+
interactiveTimeIndicator$: Readable<IControlInfo | undefined>;
|
|
22
|
+
/** Флаг видимости контролов (touched) */
|
|
23
|
+
controlsVisible$: Readable<boolean>;
|
|
24
|
+
/** Конфигурация интерактивных данных */
|
|
25
|
+
interactiveDataConfig?: IVKVideoPlayerConfig["interactiveData"];
|
|
26
|
+
/** Колбэк при деактивации подсказки */
|
|
27
|
+
onInteractiveTimeIndicatorHintDeactivated?: () => void;
|
|
28
|
+
}
|
|
29
|
+
export interface ShowInteractiveTimeIndicatorTooltipStoreState {
|
|
30
|
+
/** Показывать ли тултип */
|
|
31
|
+
showInteractiveTimeIndicatorTooltip$: ShowInteractiveTimeIndicatorTooltipState;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Экшены модуля showInteractiveTimeIndicatorTooltip
|
|
35
|
+
*/
|
|
36
|
+
export interface ShowInteractiveTimeIndicatorTooltipStoreActions {
|
|
37
|
+
clearTimeout(): void;
|
|
38
|
+
}
|
|
39
|
+
export interface ShowInteractiveTimeIndicatorTooltipStore {
|
|
40
|
+
state: ShowInteractiveTimeIndicatorTooltipStoreState;
|
|
41
|
+
actions: ShowInteractiveTimeIndicatorTooltipStoreActions;
|
|
42
|
+
}
|
|
43
|
+
export declare const createShowInteractiveTimeIndicatorTooltipStore: (deps: Deps) => ShowInteractiveTimeIndicatorTooltipStore;
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { InjectionToken } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import type { ShowInteractiveTimeIndicatorTooltipStore } from "./showInteractiveTimeIndicatorTooltipStore.store";
|
|
3
|
+
export declare const SHOW_INTERACTIVE_TIME_INDICATOR_TOOLTIP_STORE_TOKEN: InjectionToken<ShowInteractiveTimeIndicatorTooltipStore>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IDIContainer, InjectionToken } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
export type Module<T> = {
|
|
3
|
+
token: InjectionToken<T>;
|
|
4
|
+
factory: (container: IDIContainer) => T;
|
|
5
|
+
};
|
|
6
|
+
export declare const registerModules: <T extends any[]>(container: IDIContainer, modules: { [K in keyof T] : Module<T[K]> }) => void;
|
package/types/store/types.d.ts
CHANGED
|
@@ -15,19 +15,21 @@ import type { FocusManager } from "../utils/webAPI/focusManager";
|
|
|
15
15
|
import type { ISDKConfig, IUIConfig } from "../config";
|
|
16
16
|
import type { IUIStatistics } from "../services/statistics";
|
|
17
17
|
import type { DebugData } from "./utils";
|
|
18
|
+
import type { ICompositionResult } from "./composition";
|
|
18
19
|
export interface SetQualityInfo {
|
|
19
20
|
appliesTo?: QualitySettingsAppliesTo;
|
|
20
21
|
changeReason?: "default" | "limit-changed";
|
|
21
22
|
byUser?: boolean;
|
|
22
23
|
}
|
|
23
|
-
export interface
|
|
24
|
-
position:
|
|
25
|
-
duration:
|
|
26
|
-
playbackState:
|
|
27
|
-
canSkip:
|
|
28
|
-
secondsToWatchBeforeSkip:
|
|
29
|
-
postrollPassed:
|
|
24
|
+
export interface IAdsStateValues {
|
|
25
|
+
position: number;
|
|
26
|
+
duration: number;
|
|
27
|
+
playbackState: AdsPlaybackState;
|
|
28
|
+
canSkip: boolean;
|
|
29
|
+
secondsToWatchBeforeSkip: number;
|
|
30
|
+
postrollPassed: boolean;
|
|
30
31
|
}
|
|
32
|
+
export type IAdsState = { [K in keyof IAdsStateValues] : Writable<IAdsStateValues[K]> };
|
|
31
33
|
export interface IUIState {
|
|
32
34
|
t: (key: Key, params?: Record<string, string>) => string;
|
|
33
35
|
isMinimalView$: Writable<boolean>;
|
|
@@ -259,7 +261,6 @@ export interface IStoreInternalActions {
|
|
|
259
261
|
setLiveWaitingRecord: (state: boolean) => void;
|
|
260
262
|
clearDelayedBufferingCheckTimeout: () => void;
|
|
261
263
|
getDebugTextData: () => string;
|
|
262
|
-
getTraceTextData: () => string;
|
|
263
264
|
getDebugPanelData: () => DebugData;
|
|
264
265
|
getVideoElement: () => HTMLVideoElement | null;
|
|
265
266
|
startLogging: () => void;
|
|
@@ -293,6 +294,7 @@ export interface IStoreInternalActions {
|
|
|
293
294
|
previewTrackOpened: () => void;
|
|
294
295
|
previewTrackDragStarted: () => void;
|
|
295
296
|
previewTrackDragFinished: () => void;
|
|
297
|
+
setFullscreenHandler: (cb: (() => void) | null) => void;
|
|
296
298
|
}
|
|
297
299
|
export interface IStoreExternalActions {
|
|
298
300
|
firstStart: (showAds: boolean) => void;
|
|
@@ -325,6 +327,7 @@ export interface IStoreExternalActions {
|
|
|
325
327
|
setHighQualityEnabled: (highQualityEnabled: boolean) => void;
|
|
326
328
|
changeAudioStream: (id: string) => void;
|
|
327
329
|
setMinimalView: (enabled: boolean) => void;
|
|
330
|
+
toggleFullscreen: () => void;
|
|
328
331
|
}
|
|
329
332
|
export interface IStoreInitVideoConfig extends ICoreInitVideoConfig {
|
|
330
333
|
autoplay?: boolean;
|
|
@@ -354,6 +357,7 @@ export interface IStore {
|
|
|
354
357
|
callbacks?: IVKVideoPlayerCallbacks;
|
|
355
358
|
setUiCallbacks: (uiCallbacks: IVKVideoPlayerUICallbacks) => void;
|
|
356
359
|
initAdmanWrapper: VoidFunction;
|
|
360
|
+
resetAdsState: VoidFunction;
|
|
357
361
|
updateAdmanWrapperSubscriptions: VoidFunction;
|
|
358
362
|
updateStatisticsSubscriptions: VoidFunction;
|
|
359
363
|
updateAppTracerSubscriptions: VoidFunction;
|
|
@@ -361,6 +365,10 @@ export interface IStore {
|
|
|
361
365
|
getPlayer: () => IPlayer;
|
|
362
366
|
destroy(): void;
|
|
363
367
|
}
|
|
368
|
+
export type EnrichedStore = IStore & {
|
|
369
|
+
stores: ICompositionResult["stores"];
|
|
370
|
+
destroyComposedStore: () => void;
|
|
371
|
+
};
|
|
364
372
|
export interface IStoreParams {
|
|
365
373
|
interfaceLanguage: InterfaceLanguage | string;
|
|
366
374
|
isCyrillicRelatedInterface: boolean;
|
package/types/store/utils.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { Readable } from "svelte/store";
|
|
2
2
|
import type { IValueObservable } from "@vkontakte/videoplayer-shared";
|
|
3
3
|
import type { IPlayer, IConfig, IObservable } from "@vkontakte/videoplayer-core";
|
|
4
|
-
import type { IStore } from "./types";
|
|
5
|
-
import type
|
|
4
|
+
import type { EnrichedStore, IAdsStateValues, IStore } from "./types";
|
|
5
|
+
import { type AdditionalButtonDeprecated } from "../types";
|
|
6
6
|
import type { AdditionalDesktopControlPanelButton } from "../components/Controls/types";
|
|
7
7
|
import type { ISDKConfig } from "../config";
|
|
8
|
-
export declare const setStores: (store:
|
|
9
|
-
export declare const getStore: () =>
|
|
10
|
-
export declare const getMicroStores: () => IMicroStores;
|
|
8
|
+
export declare const setStores: (store: EnrichedStore) => void;
|
|
9
|
+
export declare const getStore: () => EnrichedStore;
|
|
11
10
|
/**
|
|
12
11
|
* Создаёт readable store svelte'а из `IObservableValue` sdk
|
|
13
12
|
*/
|
|
@@ -51,3 +50,4 @@ export declare class SubtitlesDownloader {
|
|
|
51
50
|
destroy(): void;
|
|
52
51
|
isDestroyed(): boolean;
|
|
53
52
|
}
|
|
53
|
+
export declare const getAdsDefaultStateValues: () => IAdsStateValues;
|
package/types/types/index.d.ts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import type { VideoQuality, VideoFormat, ISources, IExternalTextTrack, IAudioStream } from "@vkontakte/videoplayer-core";
|
|
2
|
-
import type { IValueObservable, InterfaceLanguage,
|
|
3
|
-
import type { Chapter, Manifest, ManifestVideo, VideoInfo,
|
|
2
|
+
import type { IValueObservable, InterfaceLanguage, IRectangle, DevNullEntry } from "@vkontakte/videoplayer-shared";
|
|
3
|
+
import type { Chapter, Manifest, ManifestVideo, VideoInfo, IInteractiveOptions } from "@vkontakte/videoplayer-interactive";
|
|
4
4
|
import type { 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 { IDpipConfig, ISDKConfig
|
|
8
|
-
import type { IStore } from "../store";
|
|
7
|
+
import type { IDpipConfig, ISDKConfig } from "../config";
|
|
9
8
|
import type { Controls, GridTypes } from "../constans";
|
|
10
|
-
import { type SeekToInteractiveDisabledTooltipKey } from "../constans";
|
|
11
9
|
import type { Key } from "../translation/types";
|
|
12
10
|
import type { IUIStatistics } from "../services/statistics";
|
|
13
11
|
import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem } from "../components/Menus/subMenuTabs/types";
|
|
@@ -41,6 +39,7 @@ export interface IVKVideoPlayerCallbacks {
|
|
|
41
39
|
onPlay?: () => void;
|
|
42
40
|
onLooped?: () => void;
|
|
43
41
|
onPause?: () => void;
|
|
42
|
+
onFinished?: () => void;
|
|
44
43
|
onVolumeChange?: (volume: number) => void;
|
|
45
44
|
onFullscreenEnter?: () => void;
|
|
46
45
|
onFullscreenExit?: () => void;
|
|
@@ -157,6 +156,12 @@ export interface IVKVideoPlayerCallbacks {
|
|
|
157
156
|
onTitleChanged?: (value?: IControlInfo) => void;
|
|
158
157
|
onControlWillChange?: (params: ControlWillChangeParams) => void;
|
|
159
158
|
onPreviewTimelineActiveChanged?: (active: boolean) => void;
|
|
159
|
+
onSubtitlesInfo?: (value: {
|
|
160
|
+
subtitlesLineCount?: number;
|
|
161
|
+
bottomOffest: number;
|
|
162
|
+
height: number;
|
|
163
|
+
visible: boolean;
|
|
164
|
+
}) => void;
|
|
160
165
|
};
|
|
161
166
|
adsInfo?: {
|
|
162
167
|
onLoadStarted?: () => void;
|
|
@@ -323,11 +328,14 @@ export interface IVKVideoPlayerConfig {
|
|
|
323
328
|
playerView?: VideoPlayerView;
|
|
324
329
|
mediascopePixels?: MediascopePixelTypes.Pixel[];
|
|
325
330
|
getVideoDeeplink?: (timestamp: number) => string;
|
|
331
|
+
apptracerUserId?: string | number;
|
|
326
332
|
}
|
|
327
333
|
/**
|
|
328
334
|
* Поля, которые можно обновить, сохранив итстанс плеера
|
|
329
335
|
*/
|
|
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" | "
|
|
336
|
+
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"> & {
|
|
337
|
+
videos?: IVideoData[];
|
|
338
|
+
};
|
|
331
339
|
export interface IControlInfo {
|
|
332
340
|
left: number;
|
|
333
341
|
right: number;
|
|
@@ -485,12 +493,13 @@ export interface ExternalPictureInPictureEventHandlers {
|
|
|
485
493
|
resize?: (size: Size) => void;
|
|
486
494
|
}
|
|
487
495
|
export interface IPictureInPictureApi {
|
|
496
|
+
info: IPictureInPictureApiInfo;
|
|
497
|
+
dpipConfig?: IDpipConfig;
|
|
488
498
|
isSupported(): boolean;
|
|
489
499
|
isActive(): boolean;
|
|
490
500
|
setContext(svelteContext: Map<unknown, unknown>): void;
|
|
491
501
|
request(): Promise<void>;
|
|
492
502
|
exit(): Promise<void>;
|
|
493
|
-
info: IPictureInPictureApiInfo;
|
|
494
503
|
setEnabled(enabled: boolean): void;
|
|
495
504
|
dispose(): Promise<void>;
|
|
496
505
|
assignPlayerContainer(playerContainer: HTMLElement): void;
|
|
@@ -602,54 +611,6 @@ export declare enum EpisodesModes {
|
|
|
602
611
|
COUNT = "COUNT",
|
|
603
612
|
SHORT = "SHORT"
|
|
604
613
|
}
|
|
605
|
-
export type IToggleable<T> = T & {
|
|
606
|
-
toggle: () => void;
|
|
607
|
-
};
|
|
608
|
-
type MicroStoreWritableBase<T = unknown> = Writable<T>;
|
|
609
|
-
type ToggleableMicroStore = IToggleable<MicroStoreWritableBase<boolean | null>>;
|
|
610
|
-
export type PictureInPictureMicroStore = {
|
|
611
|
-
isActive$: Writable<boolean>;
|
|
612
|
-
isEnabled$: Writable<boolean>;
|
|
613
|
-
type$: Writable<PictureInPictureType | undefined>;
|
|
614
|
-
};
|
|
615
|
-
export type NotificationsMicroStore = {
|
|
616
|
-
notificationsToShow$: Writable<Partial<Record<NotificationId, boolean>>>;
|
|
617
|
-
showNotification: (id: NotificationId) => void;
|
|
618
|
-
closeNotification: (id: NotificationId) => void;
|
|
619
|
-
};
|
|
620
|
-
export type PreviewPlayerMicroStore = {
|
|
621
|
-
timelineActive$: Writable<boolean>;
|
|
622
|
-
};
|
|
623
|
-
export interface IMicroStores {
|
|
624
|
-
fakeIsPlaying$: ToggleableMicroStore;
|
|
625
|
-
interactiveControlsOpacity$: ToggleableMicroStore;
|
|
626
|
-
seekToInteractiveDisabledTooltip$: MicroStoreWritableBase<SeekToInteractiveDisabledTooltipKey>;
|
|
627
|
-
showInteractiveTimeIndicatorTooltip$: MicroStoreWritableBase<boolean> & {
|
|
628
|
-
set: (newValue: boolean, useTimeout: boolean) => void;
|
|
629
|
-
clearTimeout: () => void;
|
|
630
|
-
};
|
|
631
|
-
graphIsOpened$: ToggleableMicroStore;
|
|
632
|
-
pictureInPicture$: PictureInPictureMicroStore;
|
|
633
|
-
notifications$: NotificationsMicroStore;
|
|
634
|
-
previewPlayer$: PreviewPlayerMicroStore;
|
|
635
|
-
}
|
|
636
|
-
export interface InitMicroStoreParams {
|
|
637
|
-
store: IStore;
|
|
638
|
-
microStores: IMicroStores;
|
|
639
|
-
uiConfig: IUIConfig;
|
|
640
|
-
interactiveController?: Interactives;
|
|
641
|
-
interactiveData?: IInteractiveData;
|
|
642
|
-
}
|
|
643
|
-
export interface IMicroStore<StateName extends keyof IMicroStores = keyof IMicroStores> {
|
|
644
|
-
readonly stateName: StateName;
|
|
645
|
-
state$: IMicroStores[StateName];
|
|
646
|
-
subscription: Subscription;
|
|
647
|
-
init: (initStoreParams: InitMicroStoreParams) => Subscription;
|
|
648
|
-
}
|
|
649
|
-
export type IMicroStoresRoot = {
|
|
650
|
-
subscribers: IMicroStore[];
|
|
651
|
-
stores: IMicroStores;
|
|
652
|
-
};
|
|
653
614
|
export type Position = {
|
|
654
615
|
top?: number;
|
|
655
616
|
left?: number;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ValueSubject } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import type { IDpipConfig } from "../../../config";
|
|
2
3
|
import type { ExternalPictureInPictureEventHandlers, IPictureInPictureApi, PictureInPictureSettings } from "../../../types";
|
|
3
4
|
import { PictureInPictureType } from "../../../types";
|
|
4
5
|
export declare class DocumentPictureInPictureApiSvelte implements IPictureInPictureApi {
|
|
5
|
-
|
|
6
|
+
readonly settings: PictureInPictureSettings;
|
|
6
7
|
private playerDomElement;
|
|
7
8
|
private playerParentShadowRoot;
|
|
8
9
|
private playerDummyElement;
|
|
@@ -18,7 +19,8 @@ export declare class DocumentPictureInPictureApiSvelte implements IPictureInPict
|
|
|
18
19
|
*/
|
|
19
20
|
private pipActive;
|
|
20
21
|
private readonly pipApi;
|
|
21
|
-
constructor(
|
|
22
|
+
constructor(settings: PictureInPictureSettings);
|
|
23
|
+
get dpipConfig(): IDpipConfig;
|
|
22
24
|
/**
|
|
23
25
|
* Флаг показывает, есть ли в целом возможность использовать dpip в данном браузере, поддерживается ли это.
|
|
24
26
|
*/
|
|
@@ -39,6 +41,7 @@ export declare class DocumentPictureInPictureApiSvelte implements IPictureInPict
|
|
|
39
41
|
assignPlayerContainer(playerContainer: HTMLElement): void;
|
|
40
42
|
updateVideoElement(): void;
|
|
41
43
|
setExternalEventHandlers(externalEventHandlers: ExternalPictureInPictureEventHandlers): void;
|
|
44
|
+
private get initialSize();
|
|
42
45
|
private createStretchedContainer;
|
|
43
46
|
}
|
|
44
47
|
export declare function isInstanceOfDocumentPictureInPictureApi(pictureInPictureApi?: IPictureInPictureApi): pictureInPictureApi is DocumentPictureInPictureApiSvelte;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Subscription } from "@vkontakte/videoplayer-shared";
|
|
2
|
-
import type { IMicroStore, IMicroStores, InitMicroStoreParams } from "../../types";
|
|
3
|
-
export declare class BaseMicroStore<StateName extends keyof IMicroStores = keyof IMicroStores> implements IMicroStore {
|
|
4
|
-
readonly stateName: StateName;
|
|
5
|
-
state$: IMicroStores[StateName];
|
|
6
|
-
subscription: Subscription;
|
|
7
|
-
init({ store, microStores, interactiveController, interactiveData }: InitMicroStoreParams): Subscription;
|
|
8
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type Writable } from "svelte/store";
|
|
2
|
-
import { BaseMicroStore } from "./base";
|
|
3
|
-
import type { InitMicroStoreParams, IToggleable } from "../../types";
|
|
4
|
-
import type { Subscription } from "@vkontakte/videoplayer-shared";
|
|
5
|
-
type ToggleableMicroStore = IToggleable<Writable<boolean | null>>;
|
|
6
|
-
export default class FakeIsPlaying extends BaseMicroStore {
|
|
7
|
-
readonly stateName = "fakeIsPlaying$";
|
|
8
|
-
state$: ToggleableMicroStore;
|
|
9
|
-
init(initStoreParams: InitMicroStoreParams): Subscription;
|
|
10
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type Writable } from "svelte/store";
|
|
2
|
-
import type { Subscription } from "@vkontakte/videoplayer-shared";
|
|
3
|
-
import { BaseMicroStore } from "./base";
|
|
4
|
-
import type { InitMicroStoreParams, IToggleable } from "../../types";
|
|
5
|
-
import { GridTypes } from "../../constans";
|
|
6
|
-
type ToggleableMicroStore = IToggleable<Writable<boolean | null>>;
|
|
7
|
-
export default class GraphIsOpened extends BaseMicroStore {
|
|
8
|
-
readonly stateName = "graphIsOpened$";
|
|
9
|
-
private graphMadePause;
|
|
10
|
-
state$: ToggleableMicroStore;
|
|
11
|
-
checkIfShouldHide: (currentGridType: GridTypes) => boolean;
|
|
12
|
-
init(initStoreParams: InitMicroStoreParams): Subscription;
|
|
13
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type Writable } from "svelte/store";
|
|
2
|
-
import { BaseMicroStore } from "./base";
|
|
3
|
-
import type { InitMicroStoreParams, IToggleable } from "../../types";
|
|
4
|
-
import type { Subscription } from "@vkontakte/videoplayer-shared";
|
|
5
|
-
type ToggleableMicroStore = IToggleable<Writable<boolean | null>>;
|
|
6
|
-
export default class InteractiveControlsOpacity extends BaseMicroStore {
|
|
7
|
-
readonly stateName = "interactiveControlsOpacity$";
|
|
8
|
-
state$: ToggleableMicroStore;
|
|
9
|
-
init(initStoreParams: InitMicroStoreParams): Subscription;
|
|
10
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BaseMicroStore } from "./base";
|
|
2
|
-
import { type InitMicroStoreParams, type NotificationsMicroStore } from "../../types";
|
|
3
|
-
import type { Subscription } from "@vkontakte/videoplayer-shared";
|
|
4
|
-
export default class Notifications extends BaseMicroStore {
|
|
5
|
-
readonly stateName = "notifications$";
|
|
6
|
-
private notificationManager;
|
|
7
|
-
state$: NotificationsMicroStore;
|
|
8
|
-
init(initStoreParams: InitMicroStoreParams): Subscription;
|
|
9
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { BaseMicroStore } from "./base";
|
|
2
|
-
import type { InitMicroStoreParams, PictureInPictureMicroStore } from "../../types";
|
|
3
|
-
import type { Subscription } from "@vkontakte/videoplayer-shared";
|
|
4
|
-
export default class PictureInPicture extends BaseMicroStore {
|
|
5
|
-
readonly stateName = "pictureInPicture$";
|
|
6
|
-
state$: PictureInPictureMicroStore;
|
|
7
|
-
init(initStoreParams: InitMicroStoreParams): Subscription;
|
|
8
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BaseMicroStore } from "./base";
|
|
2
|
-
import { type Writable } from "svelte/store";
|
|
3
|
-
import type { SeekToInteractiveDisabledTooltipKey } from "../../constans";
|
|
4
|
-
import type { InitMicroStoreParams } from "../../types";
|
|
5
|
-
import type { Subscription } from "@vkontakte/videoplayer-shared";
|
|
6
|
-
export default class SeekToInteractiveDisabledTooltip extends BaseMicroStore {
|
|
7
|
-
readonly stateName = "seekToInteractiveDisabledTooltip$";
|
|
8
|
-
state$: Writable<SeekToInteractiveDisabledTooltipKey>;
|
|
9
|
-
init(initStoreParams: InitMicroStoreParams): Subscription;
|
|
10
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type Writable } from "svelte/store";
|
|
2
|
-
import { BaseMicroStore } from "./base";
|
|
3
|
-
import type { InitMicroStoreParams } from "../../types";
|
|
4
|
-
import type { Subscription } from "@vkontakte/videoplayer-shared";
|
|
5
|
-
type ShowInteractiveTimeIndicatorTooltipState = Writable<boolean> & {
|
|
6
|
-
set: (newValue: boolean, useTimeout?: boolean) => void;
|
|
7
|
-
clearTimeout: () => void;
|
|
8
|
-
};
|
|
9
|
-
export default class ShowInteractiveTimeIndicatorTooltip extends BaseMicroStore {
|
|
10
|
-
readonly stateName = "showInteractiveTimeIndicatorTooltip$";
|
|
11
|
-
private timeout;
|
|
12
|
-
state$: ShowInteractiveTimeIndicatorTooltipState;
|
|
13
|
-
init(initStoreParams: InitMicroStoreParams): Subscription;
|
|
14
|
-
clearTimeout(): void;
|
|
15
|
-
}
|