@vkontakte/videoplayer 1.1.86 → 1.1.87-dev.04ce2cd1.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 +423 -56
- package/es2015.esm.js +423 -56
- package/es2018.cjs +423 -56
- package/es2018.esm.js +423 -56
- package/es2024.cjs +423 -56
- package/es2024.esm.js +423 -56
- package/esnext.cjs +423 -56
- package/esnext.esm.js +423 -56
- package/evergreen.esm.js +423 -56
- package/package.json +5 -5
- package/types/VKVideoPlayer/HTMLElement.d.ts +1 -1
- package/types/VKVideoPlayer/index.svelte.d.ts +173 -173
- package/types/components/Ads/admanWrapper.d.ts +79 -75
- package/types/components/Ads/types.d.ts +27 -27
- package/types/components/Controls/contants/desktopButtonsLeftIds.d.ts +8 -8
- package/types/components/Controls/contants/desktopButtonsLeftWeights.d.ts +2 -4
- package/types/components/Controls/contants/desktopButtonsRightIds.d.ts +8 -8
- package/types/components/Controls/contants/desktopButtonsRightWeights.d.ts +2 -4
- package/types/components/Controls/types.d.ts +27 -27
- package/types/components/Controls/utils/isInnerButtonGuard.d.ts +1 -1
- package/types/components/Icons/constants.d.ts +5 -5
- package/types/components/Icons/utils.d.ts +1 -1
- package/types/components/Menus/constants/contextMenuItemIds.d.ts +10 -10
- package/types/components/Menus/constants/contextMenuItemWeights.d.ts +2 -4
- package/types/components/Menus/constants/index.d.ts +4 -4
- package/types/components/Menus/constants/openSubMenuItemsIds.d.ts +1 -1
- package/types/components/Menus/constants/settingsMenuItemIds.d.ts +10 -10
- package/types/components/Menus/constants/settingsMenuItemWeights.d.ts +2 -4
- package/types/components/Menus/constants/subMenuIds.d.ts +6 -6
- package/types/components/Menus/subMenuTabs/rootMenuItems.d.ts +26 -26
- package/types/components/Menus/subMenuTabs/sharedMenuItems.d.ts +7 -7
- package/types/components/Menus/subMenuTabs/subMenuItems.d.ts +4 -10
- package/types/components/Menus/subMenuTabs/types.d.ts +108 -108
- package/types/components/Menus/subMenuTabs/utils.d.ts +2 -2
- package/types/components/Menus/types.d.ts +64 -61
- package/types/components/Menus/utils/getCurrentQualityDisplayValue.d.ts +12 -12
- package/types/components/Menus/utils/getQualityIcon.d.ts +2 -2
- package/types/components/Menus/utils/getSubMenusStack.svelte.d.ts +7 -7
- package/types/components/Menus/utils/menuNavigation.d.ts +5 -5
- package/types/components/Root/types.d.ts +79 -79
- package/types/components/Root/utils.d.ts +2 -2
- package/types/components/Timeline/PreviewTrack/useTransitionToPreviewTrack.svelte.d.ts +15 -15
- package/types/components/Timeline/consts.d.ts +2 -2
- package/types/components/shared/interpolateUtils.d.ts +2 -2
- package/types/config.d.ts +270 -260
- package/types/constans/controls.d.ts +21 -21
- package/types/constans/grid.d.ts +9 -9
- package/types/constans/index.d.ts +8 -8
- package/types/constans/interactives.d.ts +4 -4
- package/types/constans/keyboard.d.ts +43 -48
- package/types/index.d.ts +16 -16
- package/types/services/statistics.d.ts +13 -13
- package/types/store/index.d.ts +391 -391
- package/types/store/micro/base.d.ts +6 -6
- package/types/store/micro/fakeIsPlaying.d.ts +8 -10
- package/types/store/micro/graphIsOpened.d.ts +11 -13
- package/types/store/micro/index.d.ts +1 -1
- package/types/store/micro/interactiveControlsOpacity.d.ts +8 -10
- package/types/store/micro/notifications.d.ts +7 -10
- package/types/store/micro/pictureInPicture.d.ts +6 -9
- package/types/store/micro/seekToInteractiveDisabledTooltip.d.ts +8 -7
- package/types/store/micro/showInteractiveTimeIndicatorTooltip.d.ts +13 -12
- package/types/store/utils.d.ts +36 -36
- package/types/translation/index.d.ts +2 -2
- package/types/translation/labels.d.ts +1 -1
- package/types/translation/packs/en.d.ts +1 -1
- package/types/translation/packs/ru.d.ts +1 -1
- package/types/translation/types.d.ts +5 -5
- package/types/types/index.d.ts +534 -516
- package/types/types/svg.d.d.ts +5 -0
- package/types/utils/CaptionsPrepared.d.ts +15 -15
- package/types/utils/WebVttParser.d.ts +11 -11
- package/types/utils/attachments/defferedDisableByCondition.d.ts +3 -3
- package/types/utils/changeVolume.d.ts +6 -6
- package/types/utils/elementHelpers.d.ts +2 -2
- package/types/utils/findCurrentSubtltlePhrase.d.ts +1 -1
- package/types/utils/fullscreen.d.ts +14 -14
- package/types/utils/getActualEpisode.d.ts +7 -7
- package/types/utils/getControlInfo.d.ts +5 -7
- package/types/utils/getHotKeyMapData.d.ts +1 -1
- package/types/utils/grid.d.ts +1 -1
- package/types/utils/hooks/useIosSafariFullscreen.d.ts +2 -2
- package/types/utils/hooks/useIosSafariFullscreenSubtitles.d.ts +3 -3
- package/types/utils/keyboardHandleCases.d.ts +1 -1
- package/types/utils/notificationShowManager.d.ts +7 -6
- package/types/utils/roundFps.d.ts +1 -1
- package/types/utils/sanitizeHtml.d.ts +3 -3
- package/types/utils/sorts.d.ts +2 -2
- package/types/utils/stack/index.d.ts +7 -7
- package/types/utils/stack/node.d.ts +3 -3
- package/types/utils/subtitles.d.ts +8 -8
- package/types/utils/timeout.d.ts +2 -2
- package/types/utils/updatePlayerControlBlocks.d.ts +2 -2
- package/types/utils/updatePlayerControlsInfo.d.ts +2 -2
- package/types/utils/userSettings.d.ts +26 -21
- package/types/utils/videoConfig.d.ts +6 -2
- package/types/utils/volumeChange.d.ts +1 -1
- package/types/utils/webAPI/annotationsApi/annotationsApi.d.ts +31 -31
- package/types/utils/webAPI/annotationsApi/errors.d.ts +1 -1
- package/types/utils/webAPI/focusLock.d.ts +30 -30
- package/types/utils/webAPI/focusManager.d.ts +15 -15
- package/types/utils/webAPI/language.d.ts +1 -1
- package/types/utils/webAPI/mediaSessionApi.d.ts +14 -14
- package/types/utils/webAPI/pictureInPictureApi/documentPictureInPictureApi.svelte.d.ts +41 -41
- package/types/utils/webAPI/pictureInPictureApi/factory.d.ts +2 -2
- package/types/utils/webAPI/pictureInPictureApi/index.d.ts +4 -4
- package/types/utils/webAPI/pictureInPictureApi/pictureInPictureApi.d.ts +46 -46
- package/types/utils/webAPI/pictureInPictureApi/types.d.ts +4 -4
- package/types/utils/webAPI/pictureInPictureApi/utils.d.ts +3 -3
- package/types/utils/webAPI/slotsApi.d.ts +41 -41
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { type IValueSubject } from
|
|
2
|
-
import type { Caption, VideoSubtitleParsed } from
|
|
1
|
+
import { type IValueSubject } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import type { Caption, VideoSubtitleParsed } from "../types";
|
|
3
3
|
export declare class CaptionsPrepared {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
4
|
+
private readonly flickeringTimeout;
|
|
5
|
+
private readonly subscriptions;
|
|
6
|
+
private isAuto;
|
|
7
|
+
private isLive;
|
|
8
|
+
private readonly captions$;
|
|
9
|
+
readonly captionsPrepared$: IValueSubject<Caption[][]>;
|
|
10
|
+
subscribe(): this;
|
|
11
|
+
setIsAuto(value: boolean): void;
|
|
12
|
+
setIsLive(value: boolean): void;
|
|
13
|
+
setCaptions(value: VideoSubtitleParsed["texts"]): void;
|
|
14
|
+
destroy(): void;
|
|
15
|
+
private isEnabled;
|
|
16
|
+
private processCaptions;
|
|
17
17
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
type ITextCueWebVttParser = ({
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type: "text";
|
|
3
|
+
value: string;
|
|
4
4
|
} | {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
type: "timestamp";
|
|
6
|
+
value: number;
|
|
7
7
|
})[];
|
|
8
8
|
interface ICueWebVttParser {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
startTime: number;
|
|
10
|
+
endTime: number;
|
|
11
|
+
lang: string;
|
|
12
|
+
texts: ITextCueWebVttParser;
|
|
13
13
|
}
|
|
14
14
|
declare class WebVttParser {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
private readonly oneLineRegExp;
|
|
16
|
+
private readonly twoLinesRegExp;
|
|
17
|
+
parse(vtt: string, lang: string): ICueWebVttParser[];
|
|
18
18
|
}
|
|
19
19
|
export default WebVttParser;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Attachment } from
|
|
2
|
-
import type { Writable } from
|
|
3
|
-
import type { Milliseconds } from
|
|
1
|
+
import type { Attachment } from "svelte/attachments";
|
|
2
|
+
import type { Writable } from "svelte/store";
|
|
3
|
+
import type { Milliseconds } from "@vkontakte/videoplayer-shared";
|
|
4
4
|
export declare const deferredDisableByCondition: (condition: boolean, disable: Writable<boolean>, disableTimeout: Milliseconds) => Attachment;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
type Params = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
isAudioDisabled: boolean;
|
|
3
|
+
isAudioAvailable: boolean;
|
|
4
|
+
isAds: boolean;
|
|
5
|
+
audioDisabledHintCallback?: () => void;
|
|
6
|
+
audioIsNotExistHintCallback?: () => void;
|
|
7
7
|
};
|
|
8
|
-
export declare const isAvailableVolumeChange: ({ isAudioDisabled, isAudioAvailable, isAds, audioDisabledHintCallback, audioIsNotExistHintCallback
|
|
8
|
+
export declare const isAvailableVolumeChange: ({ isAudioDisabled, isAudioAvailable, isAds, audioDisabledHintCallback, audioIsNotExistHintCallback }: Params) => boolean;
|
|
9
9
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IRectangle } from
|
|
2
|
-
import type { Position } from
|
|
1
|
+
import type { IRectangle } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import type { Position } from "../types";
|
|
3
3
|
export declare const calcPosition: (childElement?: HTMLElement, parentElement?: HTMLElement) => Required<Position>;
|
|
4
4
|
export declare const getSize: (element?: HTMLElement) => IRectangle;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { VideoSubtitle, VideoSubtitleParsed, VideoSubtitlesParsed } from
|
|
1
|
+
import type { VideoSubtitle, VideoSubtitleParsed, VideoSubtitlesParsed } from "../types";
|
|
2
2
|
export declare const findCurrentSubtitlePhrase: (position: number, currentSubtitle: Omit<VideoSubtitle, "selected">, availableSubtitlesParsed: VideoSubtitlesParsed, isLive?: boolean) => VideoSubtitleParsed | undefined;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
interface DocumentWithFullscreen extends HTMLDocument {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
msFullscreenElement?: Element;
|
|
3
|
+
msFullscreenEnabled?: boolean;
|
|
4
|
+
msExitFullscreen?: () => Promise<void>;
|
|
5
|
+
mozFullScreenElement?: Element;
|
|
6
|
+
mozFullscreenEnabled?: boolean;
|
|
7
|
+
mozCancelFullScreen?: () => Promise<void>;
|
|
8
|
+
webkitFullscreenElement?: Element;
|
|
9
|
+
webkitFullscreenEnabled?: boolean;
|
|
10
|
+
webkitExitFullscreen?: () => Promise<void>;
|
|
11
11
|
}
|
|
12
12
|
interface DocumentElementWithFullscreen extends HTMLElement {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
msRequestFullscreen?: () => Promise<void>;
|
|
14
|
+
mozRequestFullScreen?: () => Promise<void>;
|
|
15
|
+
webkitRequestFullscreen?: () => Promise<void>;
|
|
16
16
|
}
|
|
17
17
|
export declare const requestFullscreen: (element: DocumentElementWithFullscreen) => Promise<void>;
|
|
18
18
|
export declare const exitFullscreen: (doc: DocumentWithFullscreen) => Promise<void>;
|
|
@@ -23,7 +23,7 @@ export declare const checkIsFullscreen: () => boolean;
|
|
|
23
23
|
export declare const registerFullscreenChangeEvent: (callback: () => void) => void;
|
|
24
24
|
export declare const removeFullscreenChangeEvent: (callback: () => void) => void;
|
|
25
25
|
export declare const requestLockScreenOrientation: (videoSize?: {
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
28
|
}) => Promise<void>;
|
|
29
29
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { IVideoEpisode } from
|
|
1
|
+
import type { IVideoEpisode } from "../types";
|
|
2
2
|
/**
|
|
3
|
-
|
|
3
|
+
* Функция для получения актуального (текущего) воспроизводимого эпизода
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
* @param progress - вещественное число от 0 до 1. Отображает процент прогрессии видео
|
|
6
|
+
* @param duration - общая продолжительность видеоролика
|
|
7
|
+
* @param videoEpisodes - массив размеченных эпизодов с временными метками
|
|
8
|
+
* @return {IVideoEpisode|undefined} - актуальный эпизод, если он есть, или undefined
|
|
9
|
+
*/
|
|
10
10
|
export declare const getActualEpisode: (progress: number, duration: number, videoEpisodes: IVideoEpisode[]) => IVideoEpisode | undefined;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
isDisplayed: boolean;
|
|
7
|
-
};
|
|
1
|
+
import type { IControlInfo } from "../types";
|
|
2
|
+
export declare function getControlInfo<
|
|
3
|
+
TRefKey extends string,
|
|
4
|
+
Refs extends Record<TRefKey, HTMLElement | undefined>
|
|
5
|
+
>(parentElement: HTMLElement | null, refs: Refs, key: TRefKey, show: boolean): IControlInfo;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { HotKeyMapData } from
|
|
1
|
+
import type { HotKeyMapData } from "../types";
|
|
2
2
|
export declare const getHotKeyMapData: () => HotKeyMapData;
|
package/types/utils/grid.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GridTypes } from
|
|
1
|
+
import { GridTypes } from "../constans";
|
|
2
2
|
export declare const isHigher: (a: GridTypes, b: GridTypes) => boolean;
|
|
3
3
|
export declare const isHigherOrEqual: (a: GridTypes, b: GridTypes) => boolean;
|
|
4
4
|
export declare const isLower: (a: GridTypes, b: GridTypes) => boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
interface Params {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
getFullscreenTarget: () => HTMLElement;
|
|
3
|
+
fullScreenChangeHandler: (forced?: boolean) => void;
|
|
4
4
|
}
|
|
5
5
|
export declare const useIosSafariFullscreen: ({ getFullscreenTarget, fullScreenChangeHandler }: Params) => void;
|
|
6
6
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { IStore } from
|
|
1
|
+
import type { IStore } from "../../store";
|
|
2
2
|
interface Params {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
store: IStore;
|
|
4
|
+
getFullscreenTarget: () => HTMLElement;
|
|
5
5
|
}
|
|
6
6
|
export declare const useIosSafariFullscreenSubtitles: ({ store, getFullscreenTarget }: Params) => void;
|
|
7
7
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Writable } from
|
|
1
|
+
import type { Writable } from "svelte/store";
|
|
2
2
|
export declare const handleStartedByKeyboard: (startedByKeyboard$: Writable<boolean>, startedByKeyboard: boolean, btnRef: HTMLElement | undefined) => Promise<void>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
type Check = {
|
|
2
|
+
notificationShowed: (notificationId: string) => void;
|
|
3
|
+
canShowNotification: (notificationId: string) => boolean;
|
|
4
4
|
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
type Settings = {
|
|
6
|
+
timeout: number;
|
|
7
|
+
maxShowCount: number;
|
|
8
8
|
};
|
|
9
|
+
export declare const getNotificationManager: ({ maxShowCount, timeout }: Settings) => Check;
|
|
9
10
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const roundFps: (fps: number) =>
|
|
1
|
+
export declare const roundFps: (fps: number) => number | "";
|
package/types/utils/sorts.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare class StackFixedSize {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
private top;
|
|
3
|
+
private bottom;
|
|
4
|
+
private size;
|
|
5
|
+
private readonly maxSize;
|
|
6
|
+
constructor(maxSize: number);
|
|
7
|
+
push(value: number): void;
|
|
8
|
+
getValuesFromBottom(): number[];
|
|
9
9
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { ITextTrack } from
|
|
1
|
+
import type { ITextTrack } from "@vkontakte/videoplayer-core";
|
|
2
2
|
export declare class NativeSubtitles {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
private readonly video;
|
|
4
|
+
constructor(video: HTMLVideoElement);
|
|
5
|
+
private getTracksArray;
|
|
6
|
+
attach(track: ITextTrack, showing?: boolean): void;
|
|
7
|
+
detachAll(): void;
|
|
8
|
+
updateSrc(track: ITextTrack): void;
|
|
9
|
+
getCurrentShowingId(): string | null;
|
|
10
10
|
}
|
package/types/utils/timeout.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { ControlBlocksRefs } from
|
|
2
|
-
import { type IUIState } from
|
|
1
|
+
import type { ControlBlocksRefs } from "../types";
|
|
2
|
+
import { type IUIState } from "../store";
|
|
3
3
|
export declare const updateControlBlocks: (videoElement: HTMLVideoElement | null, controlBlocks: IUIState["controlBlocks"], controlBlocskRef: ControlBlocksRefs, showControlBlock: boolean) => void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { IPlayerControlsRef } from
|
|
2
|
-
import { type IUIState } from
|
|
1
|
+
import type { IPlayerControlsRef } from "../types";
|
|
2
|
+
import { type IUIState } from "../store";
|
|
3
3
|
export declare const updatePlayerControlsInfo: (videoElement: HTMLVideoElement | null, controls: IUIState["controls"], controlsRef: IPlayerControlsRef, showControls: boolean) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { VideoQuality } from
|
|
2
|
-
import { type PlaybackRate } from
|
|
1
|
+
import type { VideoQuality } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import { type PlaybackRate } from "@vkontakte/videoplayer-core";
|
|
3
3
|
export declare const savePreferredVolume: (volume: number) => void;
|
|
4
4
|
export declare const getPreferredVolume: () => number | undefined;
|
|
5
5
|
export declare const savePreferredQuality: (videoId: number | undefined, value: VideoQuality) => void;
|
|
@@ -9,45 +9,50 @@ export declare const savePreferMute: (preferMute: boolean) => void;
|
|
|
9
9
|
export declare const getPreferMute: () => boolean;
|
|
10
10
|
export declare const savePreferTrafficSavingEnabled: (trafficSavingEnabled: boolean) => void;
|
|
11
11
|
export declare const getPreferTrafficSavingEnabled: () => boolean;
|
|
12
|
-
export declare const getPreferredStreamLanguage: () => string |
|
|
12
|
+
export declare const getPreferredStreamLanguage: () => string | null;
|
|
13
13
|
export declare const savePreferredStreamLanguage: (language: string) => void;
|
|
14
|
-
export declare const getPreferredSubtitlesLanguage: () => string |
|
|
14
|
+
export declare const getPreferredSubtitlesLanguage: () => string | null;
|
|
15
15
|
export declare const savePreferredSubtitlesLanguage: (language?: string) => void;
|
|
16
16
|
export declare const savePreferredRate: (rate: PlaybackRate) => void;
|
|
17
17
|
export declare const getPreferredRate: () => PlaybackRate | undefined;
|
|
18
18
|
export declare const savePreferredAutoplayNext: (autoplayNext: boolean) => void;
|
|
19
19
|
export declare const getPreferredAutoplayNext: () => boolean;
|
|
20
|
-
export type PreferredQualitySettingsType =
|
|
20
|
+
export type PreferredQualitySettingsType = "traffic_saving" | "high_quality" | "auto_quality" | "exact_video";
|
|
21
21
|
export type PreferredQualitySettingsValue = {
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
type: Exclude<PreferredQualitySettingsType, "exact_video">;
|
|
23
|
+
videoId?: number;
|
|
24
24
|
} | {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
type: "exact_quality";
|
|
26
|
+
quality: VideoQuality;
|
|
27
|
+
videoId?: number;
|
|
28
28
|
};
|
|
29
|
-
type DefaultPreferredQualitySettingsValue = Exclude<PreferredQualitySettingsValue, {
|
|
30
|
-
|
|
29
|
+
export type DefaultPreferredQualitySettingsValue = Exclude<PreferredQualitySettingsValue, {
|
|
30
|
+
type: "exact_quality";
|
|
31
31
|
}>;
|
|
32
|
-
export type QualitySettingsAppliesTo =
|
|
32
|
+
export type QualitySettingsAppliesTo = "as-default" | "to-video";
|
|
33
33
|
export declare const getPreferredQualitySettings: (videoId: number | undefined) => (PreferredQualitySettingsValue & {
|
|
34
|
-
|
|
35
|
-
}) | null
|
|
34
|
+
appliesTo: QualitySettingsAppliesTo;
|
|
35
|
+
}) | null;
|
|
36
|
+
export declare const migrateSettingsToLegacyWay: (videoId?: number) => void;
|
|
37
|
+
export declare const savePreferredQualitySettings: (value: PreferredQualitySettingsValue, appliesTo?: QualitySettingsAppliesTo) => void;
|
|
38
|
+
export declare const savePreferredDefaultQualitySettings: (value: DefaultPreferredQualitySettingsValue) => void;
|
|
39
|
+
export declare const removePreferredQualitySettingsByVideo: () => void;
|
|
40
|
+
export declare const getPreferredDefaultQualitySettings: () => DefaultPreferredQualitySettingsValue | null;
|
|
36
41
|
type IUserSalt = string & {};
|
|
37
42
|
type IVideoId = string & {};
|
|
38
43
|
export interface IVideoPrefs {
|
|
39
|
-
|
|
44
|
+
[userSalt: IUserSalt]: IVideoPrefsUser;
|
|
40
45
|
}
|
|
41
46
|
export interface IVideoPrefsUser {
|
|
42
|
-
|
|
47
|
+
[videoId: IVideoId]: IVideoPrefsUserVideo;
|
|
43
48
|
}
|
|
44
49
|
export interface IVideoPrefsUserVideo {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
50
|
+
updatedTs: number;
|
|
51
|
+
subtitleTrackId?: string;
|
|
52
|
+
audioTrackId?: string;
|
|
48
53
|
}
|
|
49
54
|
export declare const getUserVideoPrefs: (userSalt: IUserSalt, videoId: IVideoId) => IVideoPrefsUserVideo | null;
|
|
50
55
|
export declare const saveUserVideoPrefs: (userSalt: IUserSalt, videoId: IVideoId, settings: Omit<IVideoPrefsUserVideo, "updatedTs">) => void;
|
|
51
56
|
export declare function markPreviewTrackCloseTooltipAsShown(): void;
|
|
52
|
-
export declare function previewTrackCloseTooltipShown():
|
|
57
|
+
export declare function previewTrackCloseTooltipShown(): boolean;
|
|
53
58
|
export {};
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import type { IVKVideoPlayerConfig } from
|
|
2
|
-
export declare function overrideVideoConfig<
|
|
1
|
+
import type { IVKVideoPlayerConfig } from "../types";
|
|
2
|
+
export declare function overrideVideoConfig<
|
|
3
|
+
Base extends Partial<IVKVideoPlayerConfig>,
|
|
4
|
+
Override extends Partial<IVKVideoPlayerConfig>,
|
|
5
|
+
Key extends keyof Partial<IVKVideoPlayerConfig>
|
|
6
|
+
>(base: Base, override: Override): Base & Override;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IStore } from
|
|
1
|
+
import type { IStore } from "../store";
|
|
2
2
|
export declare const getNextVolumeUp: (currentVolume: number, step: number) => number;
|
|
3
3
|
export declare const getNextVolumeDown: (currentVolume: number, step: number) => number;
|
|
4
4
|
export declare const volumeDiscreteChangeUp: (store: IStore, currentVolume: number, step: number) => void;
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import type { IAnnotationsApi } from
|
|
1
|
+
import type { IAnnotationsApi } from "../../../types";
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
* @deprecated Использовать slotsApi.
|
|
4
|
+
*/
|
|
5
5
|
export declare class AnnotationsApi implements IAnnotationsApi {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
6
|
+
private annotationsInside;
|
|
7
|
+
private rootAnnotationsContainer;
|
|
8
|
+
private annotations;
|
|
9
|
+
private subscriptions;
|
|
10
|
+
private mutationObserver;
|
|
11
|
+
private playerSize;
|
|
12
|
+
constructor(annotationsInside: boolean);
|
|
13
|
+
init(container: HTMLElement): void;
|
|
14
|
+
add(annotationName: string, annotation: HTMLElement): void | never;
|
|
15
|
+
get(annotationName: string): HTMLElement | never;
|
|
16
|
+
remove(annotationName: string): void | never;
|
|
17
|
+
clear(): void;
|
|
18
|
+
destroy(): void;
|
|
19
|
+
private isElementExceedsBoundaries;
|
|
20
|
+
/** @deprecated Больше не используется. Контейнер теперь определяется самостоятельно */
|
|
21
|
+
registryRootContainer(container: HTMLElement): void;
|
|
22
|
+
/** @deprecated Логики со слоями больше нет. Теперь все аннотации добавляются на единый общий слой */
|
|
23
|
+
addLayer(layerName: string): HTMLElement | never;
|
|
24
|
+
/** @deprecated Логики со слоями больше нет. Теперь все аннотации добавляются на единый общий слой */
|
|
25
|
+
getLayer(layerName: string): HTMLElement | undefined;
|
|
26
|
+
/** @deprecated Логики со слоями больше нет. Теперь все аннотации добавляются на единый общий слой */
|
|
27
|
+
removeLayer(layerName: string): void;
|
|
28
|
+
/** @deprecated Логики со слоями больше нет. Теперь все аннотации добавляются на единый общий слой */
|
|
29
|
+
clearLayer(layerName: string): void;
|
|
30
|
+
/** @deprecated Метод больше не является публичным */
|
|
31
|
+
detach(): void;
|
|
32
|
+
/** @deprecated Больше нет необходимости переназначать контейнер для аннотаций в ходе работы плеера */
|
|
33
|
+
reattach(): void;
|
|
34
34
|
}
|
|
@@ -3,5 +3,5 @@ export declare const ANNOTATION_ALREADY_EXIST_ERROR = "Annotation with such name
|
|
|
3
3
|
export declare const ANNOTATION_DOESNT_EXIST_ERROR = "Annotation with such name does not exist";
|
|
4
4
|
export declare const ANNOTATION_EXCEED_PLAYER_LIMITS_ERROR = "Annotation exceed player boundaries";
|
|
5
5
|
export declare class AnnotationsError extends Error {
|
|
6
|
-
|
|
6
|
+
constructor(message: string);
|
|
7
7
|
}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
export interface FocusableElement extends HTMLElement {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
disabled?: boolean;
|
|
3
|
+
href?: string;
|
|
4
|
+
tabIndex: number;
|
|
5
5
|
}
|
|
6
6
|
export declare class FocusLock {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
7
|
+
private getActiveElement;
|
|
8
|
+
private focusableElements;
|
|
9
|
+
private isActive;
|
|
10
|
+
private container;
|
|
11
|
+
constructor(getActiveElement: () => HTMLElement | null);
|
|
12
|
+
/**
|
|
13
|
+
* Активирует захват фокуса
|
|
14
|
+
*/
|
|
15
|
+
activate(): void;
|
|
16
|
+
/**
|
|
17
|
+
* Деактивирует захват фокуса
|
|
18
|
+
*/
|
|
19
|
+
deactivate(): void;
|
|
20
|
+
/**
|
|
21
|
+
* Обновляет список фокусируемых элементов
|
|
22
|
+
*/
|
|
23
|
+
updateFocusableElements(): void;
|
|
24
|
+
/**
|
|
25
|
+
* Получает все фокусируемые элементы внутри контейнера
|
|
26
|
+
*/
|
|
27
|
+
private getFocusableElements;
|
|
28
|
+
/**
|
|
29
|
+
* Обработчик клавиши Tab
|
|
30
|
+
*/
|
|
31
|
+
private handleTabKey;
|
|
32
|
+
destroy(): void;
|
|
33
|
+
setContainer(container: HTMLElement): void;
|
|
34
34
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export declare class FocusManager {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
private shadowRoot;
|
|
3
|
+
private lastFocusedNode;
|
|
4
|
+
private focusLock;
|
|
5
|
+
constructor(shadowRoot: ShadowRoot);
|
|
6
|
+
private init;
|
|
7
|
+
private handleFocusChange;
|
|
8
|
+
/**
|
|
9
|
+
* Восстанавливает фокус на последнем сфокусированном элементе в плеере.
|
|
10
|
+
*/
|
|
11
|
+
restoreFocus: () => void;
|
|
12
|
+
destroy(): void;
|
|
13
|
+
getLastFocusedNode(): HTMLElement | null;
|
|
14
|
+
activateLock(): void;
|
|
15
|
+
deactivateLock(): void;
|
|
16
|
+
setContainerForFocusLock(container: HTMLElement): void;
|
|
17
17
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { InterfaceLanguage } from
|
|
1
|
+
import type { InterfaceLanguage } from "@vkontakte/videoplayer-shared";
|
|
2
2
|
export declare const selectNavigatorLanguage: (available: InterfaceLanguage[]) => InterfaceLanguage | undefined;
|