@vkontakte/videoplayer 1.1.76 → 1.1.77-dev.553176ba.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.js +39 -39
- package/es2015.esm.js +39 -39
- package/es2018.cjs.js +41 -41
- package/es2018.esm.js +41 -41
- package/es2024.cjs.js +39 -39
- package/es2024.esm.js +39 -39
- package/esnext.cjs.js +39 -39
- package/esnext.esm.js +39 -39
- package/evergreen.esm.js +39 -39
- package/package.json +5 -5
- package/types/VKVideoPlayer/index.svelte.d.ts +1 -0
- package/types/components/Menus/constants/subMenuIds.d.ts +1 -1
- package/types/components/Menus/subMenuTabs/types.d.ts +21 -21
- package/types/store/index.d.ts +6 -3
- package/types/types/index.d.ts +4 -0
- package/types/utils/webAPI/focusLock.d.ts +34 -0
- package/types/utils/webAPI/focusManager.d.ts +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.77-dev.553176ba.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.
|
|
59
|
-
"@vkontakte/videoplayer-interactive": "1.0.
|
|
60
|
-
"@vkontakte/videoplayer-shared": "1.0.
|
|
61
|
-
"@vkontakte/videoplayer-statistics": "1.0.
|
|
58
|
+
"@vkontakte/videoplayer-core": "2.0.146-dev.553176ba.0",
|
|
59
|
+
"@vkontakte/videoplayer-interactive": "1.0.52-dev.553176ba.0",
|
|
60
|
+
"@vkontakte/videoplayer-shared": "1.0.74-dev.553176ba.0",
|
|
61
|
+
"@vkontakte/videoplayer-statistics": "1.0.92-dev.553176ba.0"
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare enum SubMenuIds {
|
|
2
2
|
QUALITY = "quality-sub",
|
|
3
3
|
QUALITY_DETAIL = "quality-detail-sub",
|
|
4
|
-
|
|
4
|
+
DEFAULT_QUALITY_APPLIANCE = "default_quality_applies_to_sub",
|
|
5
5
|
AUDIO_LANGUAGES = "audio-language-sub",
|
|
6
6
|
PLAYBACK_RATE = "playback-rate-sub",
|
|
7
7
|
SUBTITLES = "subtitles-sub"
|
|
@@ -3,31 +3,31 @@ import type { IAudioStream, PlaybackRate, VideoQuality } from '@vkontakte/videop
|
|
|
3
3
|
import type { QualitySettingsAppliesTo } from '../../../utils/userSettings';
|
|
4
4
|
import type { TmpComponentType } from 'packages/ui/src/types/tmp';
|
|
5
5
|
export declare enum SharedSubMenuItemId {
|
|
6
|
-
QUALITY_OTHER = "
|
|
7
|
-
QUALITY_AUTO = "
|
|
8
|
-
|
|
9
|
-
QUALITY_HIGH = "
|
|
10
|
-
QUALITY_TRAFFIC_SAVING = "
|
|
6
|
+
QUALITY_OTHER = "quality-other-settings",
|
|
7
|
+
QUALITY_AUTO = "quality-auto",
|
|
8
|
+
QUALITY_APPLIANCE = "quality-appliance-settings",
|
|
9
|
+
QUALITY_HIGH = "quality-high",
|
|
10
|
+
QUALITY_TRAFFIC_SAVING = "quality-traffic-saving"
|
|
11
11
|
}
|
|
12
12
|
export declare enum SubMenuId {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
AUDIO_LANGUAGES = "
|
|
18
|
-
SUBTITLES = "
|
|
13
|
+
PLAYBACK_RATE = "playback-rate",
|
|
14
|
+
QUALITY_SETTINGS = "quality-settings",
|
|
15
|
+
QUALITY_OTHER_SETTINGS = "quality-other-settings",
|
|
16
|
+
QUALITY_APPLIANCE = "quality-appliance",
|
|
17
|
+
AUDIO_LANGUAGES = "audio-languages",
|
|
18
|
+
SUBTITLES = "subtitles"
|
|
19
19
|
}
|
|
20
20
|
export declare enum RootMenuId {
|
|
21
|
-
QUALITY_SETTINGS = "
|
|
22
|
-
TRAFFIC_SAVING_SWITCH = "
|
|
23
|
-
AUDIO_LANGUAGES = "
|
|
24
|
-
PLAYBACK_RATE = "
|
|
25
|
-
SUBTITLES = "
|
|
26
|
-
DOWNLOAD = "
|
|
27
|
-
SHOW_SUPPORT = "
|
|
28
|
-
COPY_DATA = "
|
|
29
|
-
SAVE_TRACE_INFO = "
|
|
30
|
-
DEBUG_INFO = "
|
|
21
|
+
QUALITY_SETTINGS = "quality-settings",
|
|
22
|
+
TRAFFIC_SAVING_SWITCH = "traffic-saving-switch",
|
|
23
|
+
AUDIO_LANGUAGES = "audio-languages-settings",
|
|
24
|
+
PLAYBACK_RATE = "playback-rate-settings",
|
|
25
|
+
SUBTITLES = "subtitles-settings",
|
|
26
|
+
DOWNLOAD = "download",
|
|
27
|
+
SHOW_SUPPORT = "show-support",
|
|
28
|
+
COPY_DATA = "copy-data",
|
|
29
|
+
SAVE_TRACE_INFO = "save-trace-info",
|
|
30
|
+
DEBUG_INFO = "debug-info"
|
|
31
31
|
}
|
|
32
32
|
export type Context = {
|
|
33
33
|
closeSettingsMenu: () => void;
|
package/types/store/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type { InteractiveRange } from '@vkontakte/videoplayer-interactive';
|
|
|
7
7
|
import type { Readable, Writable } from 'svelte/store';
|
|
8
8
|
import { AdmanWrapper } from '../components/Ads/admanWrapper';
|
|
9
9
|
import type { Key, LanguageConfig } from '../translation/types';
|
|
10
|
-
import type
|
|
10
|
+
import { type AdditionalButtonDeprecated, type ControlBlocksRefs, type ControlsKeys, type HotKeyMapData, type IAnnotationsApi, type IControlInfo, type IDisabledControls, type IInteractiveData, type IPictureInPictureApi, type IPlayerControlsRef, type IPlayerPhase, type ITimelinePreviewThumbsData, type IVideoEpisode, type IVKVideoPlayerCallbacks, type IVKVideoPlayerUICallbacks, type PlaybackStateRealistic, type Position, type VideoPlaybackRate, type VideoPlayerView, type VideoQualityForRender, type VideoQualityUI, type VideoSubtitle, type VideoSubtitleParsed } from '../types';
|
|
11
11
|
import { AdsPlaybackState } from '../types';
|
|
12
12
|
import { type QualitySettingsAppliesTo } from '../utils/userSettings';
|
|
13
13
|
import type { DebugData } from './utils';
|
|
@@ -16,6 +16,7 @@ import { UIOneStat } from '../services/statistics';
|
|
|
16
16
|
import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem, ContextMenuItem, SettingsMenuItem } from '../components/Menus/subMenuTabs/types';
|
|
17
17
|
import type { AdditionalButton, AdditionalDesktopControlPanelButton } from '../components/Controls/types';
|
|
18
18
|
import type { SlotsApi } from '../utils/webAPI/slotsApi';
|
|
19
|
+
import type { FocusManager } from '../utils/webAPI/focusManager';
|
|
19
20
|
type Info = {
|
|
20
21
|
appliesTo?: QualitySettingsAppliesTo;
|
|
21
22
|
changeReason?: 'default' | 'limit-changed';
|
|
@@ -148,6 +149,7 @@ export interface IWebApi {
|
|
|
148
149
|
pictureInPictureApi?: IPictureInPictureApi;
|
|
149
150
|
annotationsApi?: IAnnotationsApi;
|
|
150
151
|
slotsApi?: SlotsApi;
|
|
152
|
+
focusManager?: FocusManager;
|
|
151
153
|
}
|
|
152
154
|
export interface IStore {
|
|
153
155
|
initVideo: (config: IConfig & {
|
|
@@ -166,6 +168,7 @@ export interface IStore {
|
|
|
166
168
|
positionWithScrubbing$: Readable<number>;
|
|
167
169
|
duration$: Readable<number>;
|
|
168
170
|
playbackState$: Readable<PlaybackState | undefined>;
|
|
171
|
+
playbackStateRealistic$: Readable<PlaybackStateRealistic | undefined>;
|
|
169
172
|
isPlaying$: Readable<boolean>;
|
|
170
173
|
isLoaderVisible: Readable<boolean>;
|
|
171
174
|
bufferedProgress$: Readable<number>;
|
|
@@ -250,8 +253,8 @@ export interface IStore {
|
|
|
250
253
|
setVideoStream: (stream: IVideoStream) => void;
|
|
251
254
|
setQuality: (quality: VideoQualityUI, info?: Info) => void;
|
|
252
255
|
setPlaybackRate: (playbackRate: PlaybackRate) => void;
|
|
253
|
-
incrementPlaybackRate: () =>
|
|
254
|
-
decrementPlaybackRate: () =>
|
|
256
|
+
incrementPlaybackRate: () => VideoPlaybackRate;
|
|
257
|
+
decrementPlaybackRate: () => VideoPlaybackRate;
|
|
255
258
|
setSubtitle: (subtitle?: VideoSubtitle) => void;
|
|
256
259
|
toggleSubtitle: () => void;
|
|
257
260
|
togglePictureInPicture: () => void;
|
package/types/types/index.d.ts
CHANGED
|
@@ -623,4 +623,8 @@ export interface Caption {
|
|
|
623
623
|
value: string;
|
|
624
624
|
}
|
|
625
625
|
export type NotificationId = 'slow_video';
|
|
626
|
+
export declare enum PlaybackStateExtended {
|
|
627
|
+
BUFFERING = "buffering"
|
|
628
|
+
}
|
|
629
|
+
export type PlaybackStateRealistic = PlaybackState | PlaybackStateExtended;
|
|
626
630
|
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface FocusableElement extends HTMLElement {
|
|
2
|
+
disabled?: boolean;
|
|
3
|
+
href?: string;
|
|
4
|
+
tabIndex: number;
|
|
5
|
+
}
|
|
6
|
+
export declare class FocusLock {
|
|
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
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare class FocusManager {
|
|
2
2
|
private shadowRoot;
|
|
3
3
|
private lastFocusedNode;
|
|
4
|
+
private focusLock;
|
|
4
5
|
constructor(shadowRoot: ShadowRoot);
|
|
5
6
|
private init;
|
|
6
7
|
private handleFocusChange;
|
|
@@ -9,4 +10,8 @@ export declare class FocusManager {
|
|
|
9
10
|
*/
|
|
10
11
|
restoreFocus: () => void;
|
|
11
12
|
destroy(): void;
|
|
13
|
+
getLastFocusedNode(): HTMLElement | null;
|
|
14
|
+
activateLock(): void;
|
|
15
|
+
deactivateLock(): void;
|
|
16
|
+
setContainerForFocusLock(container: HTMLElement): void;
|
|
12
17
|
}
|