@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/videoplayer",
3
- "version": "1.1.76",
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.145",
59
- "@vkontakte/videoplayer-interactive": "1.0.51",
60
- "@vkontakte/videoplayer-shared": "1.0.73",
61
- "@vkontakte/videoplayer-statistics": "1.0.91"
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
  }
@@ -25,6 +25,7 @@ export declare class VKVideoPlayer extends HTMLElement {
25
25
  private _shadowRoot;
26
26
  private playerContainer;
27
27
  private rootContainer;
28
+ private stateContainer;
28
29
  private shadowRootContainer;
29
30
  private playerId;
30
31
  private uiConfig;
@@ -1,7 +1,7 @@
1
1
  export declare enum SubMenuIds {
2
2
  QUALITY = "quality-sub",
3
3
  QUALITY_DETAIL = "quality-detail-sub",
4
- DEFAULT_QUALITY_APPLIENCE = "default_quality_applies_to_sub",
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 = "QUALITY_OTHER",
7
- QUALITY_AUTO = "QUALITY_AUTO",
8
- QUALITY_APPLIENCE = "QUALITY_APPLIENCE",
9
- QUALITY_HIGH = "QUALITY_HIGH",
10
- QUALITY_TRAFFIC_SAVING = "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
- PLAYBACK_RATE_SUB_MENU = "PLAYBACK_RATE_SUB_MENU",
14
- QUALITY_DETAILS = "QUALITY_DETAILS",
15
- QUALITY = "QUALITY",
16
- QUALITY_APPLIENCE = "QUALITY_APPLIENCE",
17
- AUDIO_LANGUAGES = "AUDIO_LANGUAGES",
18
- SUBTITLES = "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 = "QUALITY_SETTINGS",
22
- TRAFFIC_SAVING_SWITCH = "TRAFFIC_SAVING_SWITCH",
23
- AUDIO_LANGUAGES = "AUDIO_LANGUAGES",
24
- PLAYBACK_RATE = "PLAYBACK_RATE",
25
- SUBTITLES = "SUBTITLES",
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"
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;
@@ -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 { AdditionalButtonDeprecated, ControlBlocksRefs, ControlsKeys, HotKeyMapData, IAnnotationsApi, IControlInfo, IDisabledControls, IInteractiveData, IPictureInPictureApi, IPlayerControlsRef, IPlayerPhase, ITimelinePreviewThumbsData, IVideoEpisode, IVKVideoPlayerCallbacks, IVKVideoPlayerUICallbacks, Position, VideoPlaybackRate, VideoPlayerView, VideoQualityForRender, VideoQualityUI, VideoSubtitle, VideoSubtitleParsed } from '../types';
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: () => void;
254
- decrementPlaybackRate: () => void;
256
+ incrementPlaybackRate: () => VideoPlaybackRate;
257
+ decrementPlaybackRate: () => VideoPlaybackRate;
255
258
  setSubtitle: (subtitle?: VideoSubtitle) => void;
256
259
  toggleSubtitle: () => void;
257
260
  togglePictureInPicture: () => void;
@@ -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
  }