@vkontakte/videoplayer 1.1.55-dev.d911b27c.0 → 1.1.55-dev.de4bdf7e.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.55-dev.d911b27c.0",
3
+ "version": "1.1.55-dev.de4bdf7e.0",
4
4
  "author": "vk.com",
5
5
  "description": "Videoplayer based on the vk.com platform",
6
6
  "homepage": "https://vk.com",
@@ -50,9 +50,9 @@
50
50
  ],
51
51
  "dependencies": {
52
52
  "@adtech/rbadman": "^2.2.57",
53
- "@vkontakte/videoplayer-core": "2.0.124-dev.da742f3e.0",
54
- "@vkontakte/videoplayer-interactive": "1.0.30-dev.f81e05e2.0",
55
- "@vkontakte/videoplayer-shared": "1.0.53-dev.ac5dd604.0",
56
- "@vkontakte/videoplayer-statistics": "1.0.70-dev.f3729079.0"
53
+ "@vkontakte/videoplayer-core": "2.0.124-dev.945b4e2b.0",
54
+ "@vkontakte/videoplayer-interactive": "1.0.30-dev.38c5a44a.0",
55
+ "@vkontakte/videoplayer-shared": "1.0.53-dev.5cb716c0.0",
56
+ "@vkontakte/videoplayer-statistics": "1.0.70-dev.af36007c.0"
57
57
  }
58
58
  }
@@ -71,6 +71,7 @@ export declare class VKVideoPlayer extends HTMLElement {
71
71
  pause(): void;
72
72
  stop(): void;
73
73
  setMuted(muted: boolean): void;
74
+ setPiPEnabled(enabled: boolean): void;
74
75
  setVolume(volume: number): void;
75
76
  setRepeat(repeat: boolean): void;
76
77
  seekTime(time: number): void;
@@ -1,5 +1,6 @@
1
1
  export declare enum DesktopButtonsRightIds {
2
2
  LOGO = "vkLogo",
3
+ AUTOPLAY_NEXT = "autoplayNext",
3
4
  VOLUME = "volume",
4
5
  SUBTITLES = "subtitles",
5
6
  SETTINGS = "settings",
@@ -1,5 +1,5 @@
1
- import type { ComponentType } from 'svelte';
2
1
  import { GridTypes } from '../../constans';
2
+ import type { TmpComponentType } from '../../types/tmp';
3
3
  export declare enum ControlButtonType {
4
4
  DESKTOP_CONTROL_PANEL_LEFT = "desktop-control-panel-left",
5
5
  DESKTOP_CONTROL_PANEL_RIGHT = "desktop-control-panel-right"
@@ -10,7 +10,7 @@ interface BaseButton {
10
10
  disabled?: boolean;
11
11
  }
12
12
  interface BaseInnerButton extends BaseButton {
13
- buttonComponent: ComponentType;
13
+ buttonComponent: TmpComponentType;
14
14
  buttonComponentProps?: Record<string, unknown>;
15
15
  ariaKeyShortCut?: string;
16
16
  ariaExpanded?: boolean;
@@ -1,6 +1,6 @@
1
- import type { ComponentType } from 'svelte';
2
1
  import { UIType } from '../../types';
3
2
  import { SubMenuIds } from './constants/subMenuIds';
3
+ import type { TmpComponentType } from '../../types/tmp';
4
4
  interface BaseMenuItem {
5
5
  id: string;
6
6
  weight: number;
@@ -8,7 +8,7 @@ interface BaseMenuItem {
8
8
  label: string;
9
9
  }
10
10
  interface BaseSettingsMenuItem extends BaseMenuItem {
11
- icon: ComponentType | string;
11
+ icon: TmpComponentType | string;
12
12
  isHiddenFor?: UIType[];
13
13
  }
14
14
  export declare enum MenuItemType {
@@ -24,7 +24,7 @@ export interface OpenSubMenuSettingsMenuItem extends BaseSettingsMenuItem {
24
24
  type: MenuItemType.OPEN_SUB_MENU;
25
25
  subMenuId: SubMenuIds;
26
26
  value: string;
27
- valueComponent?: ComponentType;
27
+ valueComponent?: any;
28
28
  getSubItemForFocus: () => HTMLLIElement;
29
29
  }
30
30
  export interface ClickSettingsMenuItem extends BaseSettingsMenuItem {
@@ -51,7 +51,7 @@ export interface SelectValueSubMenuItem<T = any, U = any> {
51
51
  type: SubMenuItemType.SELECT_VALUE;
52
52
  value: T;
53
53
  dataValue?: T | keyof T;
54
- valueComponent?: ComponentType;
54
+ valueComponent?: any;
55
55
  valueComponentParams?: {
56
56
  [key: string]: U;
57
57
  };
@@ -1,3 +1,3 @@
1
1
  import type { VideoQualityUI } from '../../../types';
2
- import type { ComponentType } from 'svelte';
3
- export declare const getQualityIcon: (quality?: VideoQualityUI) => ComponentType | undefined;
2
+ import type { TmpComponentType } from '../../../types/tmp';
3
+ export declare const getQualityIcon: (quality?: VideoQualityUI) => TmpComponentType | undefined;
package/types/config.d.ts CHANGED
@@ -98,6 +98,7 @@ export interface IUIConfig {
98
98
  interactiveHideTime: boolean;
99
99
  interactivePlayPrevChapter: boolean;
100
100
  interactiveTimeIndicator: boolean;
101
+ interactiveTimeOpenUri: boolean;
101
102
  thumbTimer: boolean;
102
103
  hotKeyMapModal: boolean;
103
104
  hotKeyHelpers: boolean;
@@ -116,6 +117,8 @@ export interface IUIConfig {
116
117
  nextPrevButtons: boolean;
117
118
  previewNoEmptySpace: boolean;
118
119
  exposeInternalsToGlobal: boolean;
120
+ skipInitialPlaybackStateValue: boolean;
121
+ skipInitialPlaybackRateValue: boolean;
119
122
  };
120
123
  interactive: {
121
124
  historyMaxLength: number;
@@ -6,13 +6,15 @@ export declare const enum ProcessedKeysCodes {
6
6
  Comma = "Comma",
7
7
  Period = "Period",
8
8
  Space = "Space",
9
- KeyM = "KeyM",
9
+ KeyC = "KeyC",
10
10
  KeyF = "KeyF",
11
+ KeyI = "KeyI",
12
+ KeyJ = "KeyJ",
11
13
  KeyK = "KeyK",
12
14
  KeyL = "KeyL",
13
- KeyJ = "KeyJ",
14
- KeyC = "KeyC",
15
- KeyI = "KeyI",
15
+ KeyM = "KeyM",
16
+ KeyN = "KeyN",
17
+ KeyP = "KeyP",
16
18
  Digit1 = "Digit1",
17
19
  Digit2 = "Digit2",
18
20
  Digit3 = "Digit3",
@@ -3,12 +3,12 @@ import { ChromecastState, PlaybackState, VideoFormat } from '@vkontakte/videopla
3
3
  import { type IError, type ILogger, InterfaceLanguage, type IRectangle, type IValueObservable, type QualityLimits, VideoQuality, type InternalsExposure } from '@vkontakte/videoplayer-shared';
4
4
  import type { IUIConfig } from '../config';
5
5
  import { SeekAction } from '@vkontakte/videoplayer-statistics';
6
- import { type InteractiveRange } from '@vkontakte/videoplayer-interactive';
6
+ 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
- import type { LanguageConfig } from '../translation/types';
9
+ import type { Key, LanguageConfig } from '../translation/types';
10
10
  import type { AdditionalButtonDeprecated, ControlsKeys, HotKeyMapData, IAnnotationsApi, IControlInfo, IDisabledControls, IInteractiveData, IPictureInPictureApi, IPlayerPhase, ITimelinePreviewThumbsData, IVideoEpisode, IVKVideoPlayerCallbacks, IVKVideoPlayerUICallbacks, Position, VideoPlaybackRate, VideoQualityForRender, VideoQualityUI, VideoSubtitle, VideoSubtitleParsed } from '../types';
11
- import { AdsPlaybackState, PictureInPictureType } from '../types';
11
+ import { AdsPlaybackState } from '../types';
12
12
  import type { DebugData } from './utils';
13
13
  import { GridTypes, type PlayPrevChapterDisabledTooltipKey } from '../constans';
14
14
  import { UIOneStat } from '../services/statistics';
@@ -23,6 +23,7 @@ export interface IAdsState {
23
23
  postrollPassed: Writable<boolean>;
24
24
  }
25
25
  export interface IUIState {
26
+ t: (key: Key, params?: Record<string, string>) => string;
26
27
  controlsVisible: Writable<boolean>;
27
28
  touched: Writable<boolean>;
28
29
  controls: {
@@ -84,8 +85,6 @@ export interface IUIState {
84
85
  icon3DVideoVisible: Writable<boolean>;
85
86
  scrubbingInProgress: Writable<boolean>;
86
87
  is3DVideo: Writable<boolean>;
87
- isPictureInPictureActive$: Readable<boolean>;
88
- pictureInPictureType$: Readable<PictureInPictureType>;
89
88
  currentGridType$: Readable<GridTypes>;
90
89
  interactiveHideMobileControls: Writable<boolean>;
91
90
  additionalButtonsDeprecated$: Readable<AdditionalButtonDeprecated[]>;
@@ -252,8 +251,9 @@ export interface IStore {
252
251
  reportProblem: () => void;
253
252
  setAutoplayNextEnabled: (autoplayNext: boolean, byUser?: boolean) => void;
254
253
  setTimerNextVideoRunning: (timerNextVideoRunning: boolean) => void;
255
- prevVideoClick: (byClick?: boolean) => void;
256
- nextVideoClick: (byClick?: boolean) => void;
254
+ prevVideoClick: (byUserAction?: boolean) => void;
255
+ nextVideoClick: (byUserAction?: boolean) => void;
256
+ nextVideoAnnouncementShow: () => void;
257
257
  nextVideoAnnouncementClick: () => void;
258
258
  nextVideoAnnouncementAuto: () => void;
259
259
  nextVideoAnnouncementCancel: () => void;
@@ -6,7 +6,7 @@ export default class FakeIsPlaying extends BaseMicroStore {
6
6
  toggle: () => void;
7
7
  set(this: void, value: boolean | null): void;
8
8
  update(this: void, updater: import("svelte/store").Updater<boolean | null>): void;
9
- subscribe(this: void, run: import("svelte/store").Subscriber<boolean | null>, invalidate?: import("svelte/store").Invalidator<boolean | null> | undefined): import("svelte/store").Unsubscriber;
9
+ subscribe(this: void, run: import("svelte/store").Subscriber<boolean | null>, invalidate?: () => void): import("svelte/store").Unsubscriber;
10
10
  };
11
11
  init(initStoreParams: InitMicroStoreParams): import("@vkontakte/videoplayer-shared").Subscription;
12
12
  }
@@ -8,7 +8,7 @@ export default class GraphIsOpened extends BaseMicroStore {
8
8
  toggle: () => void;
9
9
  set(this: void, value: boolean | null): void;
10
10
  update(this: void, updater: import("svelte/store").Updater<boolean | null>): void;
11
- subscribe(this: void, run: import("svelte/store").Subscriber<boolean | null>, invalidate?: import("svelte/store").Invalidator<boolean | null> | undefined): import("svelte/store").Unsubscriber;
11
+ subscribe(this: void, run: import("svelte/store").Subscriber<boolean | null>, invalidate?: () => void): import("svelte/store").Unsubscriber;
12
12
  };
13
13
  checkIfShouldHide: (currentGridType: GridTypes) => boolean;
14
14
  init(initStoreParams: InitMicroStoreParams): import("@vkontakte/videoplayer-shared").Subscription;
@@ -6,7 +6,7 @@ export default class InteractiveControlsOpacity extends BaseMicroStore {
6
6
  toggle: () => void;
7
7
  set(this: void, value: boolean | null): void;
8
8
  update(this: void, updater: import("svelte/store").Updater<boolean | null>): void;
9
- subscribe(this: void, run: import("svelte/store").Subscriber<boolean | null>, invalidate?: import("svelte/store").Invalidator<boolean | null> | undefined): import("svelte/store").Unsubscriber;
9
+ subscribe(this: void, run: import("svelte/store").Subscriber<boolean | null>, invalidate?: () => void): import("svelte/store").Unsubscriber;
10
10
  };
11
11
  init(initStoreParams: InitMicroStoreParams): import("@vkontakte/videoplayer-shared").Subscription;
12
12
  }
@@ -0,0 +1,11 @@
1
+ import { BaseMicroStore } from './base';
2
+ import type { InitMicroStoreParams, PictureInPictureType } from '../../types';
3
+ export default class PictureInPicture extends BaseMicroStore {
4
+ readonly stateName = "pictureInPicture$";
5
+ state$: {
6
+ isActive$: import("svelte/store").Writable<boolean>;
7
+ isEnabled$: import("svelte/store").Writable<boolean>;
8
+ type$: import("svelte/store").Writable<PictureInPictureType | undefined>;
9
+ };
10
+ init(initStoreParams: InitMicroStoreParams): import("@vkontakte/videoplayer-shared").Subscription;
11
+ }
@@ -7,7 +7,7 @@ export default class ShowInteractiveTimeIndicatorTooltip extends BaseMicroStore
7
7
  set: (value: boolean, useTimeout?: boolean) => void;
8
8
  clearTimeout: () => void;
9
9
  update(this: void, updater: import("svelte/store").Updater<boolean>): void;
10
- subscribe(this: void, run: import("svelte/store").Subscriber<boolean>, invalidate?: import("svelte/store").Invalidator<boolean> | undefined): import("svelte/store").Unsubscriber;
10
+ subscribe(this: void, run: import("svelte/store").Subscriber<boolean>, invalidate?: () => void): import("svelte/store").Unsubscriber;
11
11
  };
12
12
  init(initStoreParams: InitMicroStoreParams): import("@vkontakte/videoplayer-shared").Subscription;
13
13
  clearTimeout(): void;
@@ -1,5 +1,5 @@
1
1
  import { InterfaceLanguage } from '@vkontakte/videoplayer-shared';
2
- export type Key = 'auto_quality_invariant' | 'auto_quality' | 'menu_quality' | 'menu_playback_rate' | 'menu_traffic_saving' | 'menu_report' | 'menu_pip' | 'menu_copy_video_link' | 'menu_copy_video_link_with_timestamp' | 'menu_video_rotate' | 'menu_video_loop_on' | 'menu_video_loop_off' | 'menu_chromecast' | 'menu_copy_debug' | 'menu_save_debug' | 'menu_debug_overlay' | 'menu_copy_embed_code' | 'pip_dummy_title' | 'submenu_traffic_saving' | 'submenu_quality' | 'submenu_playback_rate' | 'submenu_settings' | 'submenu_audio_languages' | 'auto_quality_option' | 'mobile_unmute' | 'playing_ads' | 'skip_ads_now' | 'skip_ads_after' | 'visit_advertiser' | 'aria_timeline' | 'aria_open_settings' | 'aria_timeline_value' | 'doubletap_seek_step' | 'playback_rate_1' | 'playback_rate' | 'video360' | 'subtitles_caption' | 'subtitles_auto' | 'subtitles_off' | 'subtitles_auto_caption' | 'subtitles_turn_on' | 'subtitles_turn_off' | 'traffic_saving_off' | 'traffic_saving_on' | 'traffic_saving_disable' | 'traffic_saving_enable' | 'traffic_saving_helper_text' | 'tooltip_previous' | 'tooltip_restart' | 'tooltip_play' | 'tooltip_pause' | 'tooltip_next' | 'tooltip_button_disabled' | 'tooltip_interactive_go_back' | 'tooltip_interactive_go_back_disabled' | 'tooltip_interactive_go_back_disabled_first' | 'tooltip_interactive_go_back_disabled_limit' | 'tooltip_chapter_without_interactive' | 'tooltip_interactive_of_chapter_completed' | 'tooltip_interactive_seek' | 'tooltip_interactive_graph_off' | 'tooltip_interactive_graph_on' | 'tooltip_live' | 'tooltip_episodes' | 'tooltip_volume' | 'tooltip_volume_muted' | 'tooltip_settings_on' | 'tooltip_subtitles_off' | 'tooltip_settings_off' | 'tooltip_subtitles_on' | 'tooltip_fullscreen_off' | 'tooltip_fullscreen_on' | 'tooltip_chromecast_off' | 'tooltip_chromecast_on' | 'tooltip_episode_finished' | 'tooltip_episode_unfinished' | 'tooltip_disabled_when_interactive' | 'tooltip_disabled_when_graph_on' | 'tooltip_interactive_interaction_time_indicator' | 'tooltip_vk_logo' | 'tooltip_vk_video_logo' | 'download_video_caption' | 'hotkey_helper_current_volume' | 'hotkey_map_modal_title' | 'hotkey_map_modal_close_btn_text' | 'hotkey_map_group_title_common' | 'hotkey_map_group_title_playback' | 'hotkey_map_group_title_subtitles' | 'hotkey_map_group_title_episodes' | 'hotkey_map_item_mute_description' | 'hotkey_map_item_mute_value' | 'hotkey_map_item_volume_down_description' | 'hotkey_map_item_volume_down_value' | 'hotkey_map_item_volume_up_description' | 'hotkey_map_item_volume_up_value' | 'hotkey_map_item_pip_description' | 'hotkey_map_item_pip_value' | 'hotkey_map_item_full_screen_description' | 'hotkey_map_item_full_screen_value' | 'hotkey_map_item_show_context_menu_description' | 'hotkey_map_item_show_context_menu_value' | 'hotkey_map_item_show_hotkey_map_description' | 'hotkey_map_item_show_hotkey_map_value' | 'hotkey_map_item_play_toggle_description' | 'hotkey_map_item_play_toggle_value' | 'hotkey_map_item_seek_backward_description' | 'hotkey_map_item_seek_backward_value' | 'hotkey_map_item_seek_forward_description' | 'hotkey_map_item_seek_forward_value' | 'hotkey_map_item_fast_seek_backward_description' | 'hotkey_map_item_fast_seek_backward_value' | 'hotkey_map_item_fast_seek_forward_description' | 'hotkey_map_item_fast_seek_forward_value' | 'hotkey_map_item_rate_down_description' | 'hotkey_map_item_rate_down_value' | 'hotkey_map_item_rate_up_description' | 'hotkey_map_item_rate_up_value' | 'hotkey_map_item_prev_frame_description' | 'hotkey_map_item_prev_frame_value' | 'hotkey_map_item_next_frame_description' | 'hotkey_map_item_next_frame_value' | 'hotkey_map_item_jump_seek_description' | 'hotkey_map_item_jump_seek_value' | 'hotkey_map_item_subtitles_toggle_description' | 'hotkey_map_item_subtitles_toggle_value' | 'hotkey_map_item_prev_episode_description' | 'hotkey_map_item_prev_episode_pc_value' | 'hotkey_map_item_prev_episode_mac_value' | 'hotkey_map_item_next_episode_description' | 'hotkey_map_item_next_episode_pc_value' | 'hotkey_map_item_next_episode_mac_value' | 'waiting_live_day_value' | 'waiting_live_hour_value' | 'waiting_live_minute_value' | 'waiting_live_second_value' | 'waiting_live_colon' | 'waiting_live_upcoming_title' | 'waiting_live_timer_title' | 'waiting_live_recover_title' | 'waiting_record_title' | 'aria_label_submenu_traffic_saving_off' | 'aria_label_submenu_traffic_saving_on' | 'aria_label_submenu_back' | 'aria_label_menu_quality' | 'aria_label_menu_rate' | 'aria_label_menu_subtitle' | 'aria_label_menu_download' | 'aria_label_new_tab_alert' | 'aria_label_menu_debug_overlay_enable' | 'aria_label_menu_debug_overlay_disable' | 'aria_label_menu_rotate' | 'aria_label_menu_loop' | 'aria_label_debug_panel' | 'aria_label_context_menu_open' | 'aria_label_context_menu_close' | 'aria_label_video_player' | 'aria_label_spherical_control' | 'aria_label_menu_audio_languages' | 'menu_audio_languages' | 'audio_stream_display_language_label' | 'audio_stream_display_language_label_index' | 'audio_stream_display_label_index' | 'audio_stream_display_language_index' | 'audio_stream_display_unknown' | 'end_screen_next_video' | 'end_screen_recommended_video';
2
+ export type Key = 'auto_quality_invariant' | 'auto_quality' | 'menu_quality' | 'menu_playback_rate' | 'menu_traffic_saving' | 'menu_report' | 'menu_pip' | 'menu_copy_video_link' | 'menu_copy_video_link_with_timestamp' | 'menu_video_rotate' | 'menu_video_loop_on' | 'menu_video_loop_off' | 'menu_chromecast' | 'menu_copy_debug' | 'menu_save_debug' | 'menu_debug_overlay' | 'menu_copy_embed_code' | 'pip_dummy_title' | 'submenu_traffic_saving' | 'submenu_quality' | 'submenu_playback_rate' | 'submenu_settings' | 'submenu_audio_languages' | 'auto_quality_option' | 'mobile_unmute' | 'playing_ads' | 'skip_ads_now' | 'skip_ads_after' | 'visit_advertiser' | 'aria_timeline' | 'aria_open_settings' | 'aria_timeline_value' | 'doubletap_seek_step' | 'playback_rate_1' | 'playback_rate' | 'video360' | 'subtitles_caption' | 'subtitles_auto' | 'subtitles_off' | 'subtitles_auto_caption' | 'subtitles_turn_on' | 'subtitles_turn_off' | 'traffic_saving_off' | 'traffic_saving_on' | 'traffic_saving_disable' | 'traffic_saving_enable' | 'traffic_saving_helper_text' | 'tooltip_previous' | 'tooltip_restart' | 'tooltip_play' | 'tooltip_pause' | 'tooltip_next' | 'tooltip_button_disabled' | 'tooltip_interactive_go_back' | 'tooltip_interactive_go_back_disabled' | 'tooltip_interactive_go_back_disabled_first' | 'tooltip_interactive_go_back_disabled_limit' | 'tooltip_chapter_without_interactive' | 'tooltip_interactive_of_chapter_completed' | 'tooltip_interactive_seek' | 'tooltip_interactive_graph_off' | 'tooltip_interactive_graph_on' | 'tooltip_live' | 'tooltip_episodes' | 'tooltip_volume' | 'tooltip_volume_muted' | 'tooltip_settings_on' | 'tooltip_subtitles_off' | 'tooltip_settings_off' | 'tooltip_subtitles_on' | 'tooltip_fullscreen_off' | 'tooltip_fullscreen_on' | 'tooltip_chromecast_off' | 'tooltip_chromecast_on' | 'tooltip_episode_finished' | 'tooltip_episode_unfinished' | 'tooltip_disabled_when_interactive' | 'tooltip_disabled_when_graph_on' | 'tooltip_interactive_interaction_time_indicator' | 'tooltip_vk_logo' | 'tooltip_vk_video_logo' | 'download_video_caption' | 'hotkey_helper_current_volume' | 'hotkey_map_modal_title' | 'hotkey_map_modal_close_btn_text' | 'hotkey_map_group_title_common' | 'hotkey_map_group_title_playback' | 'hotkey_map_group_title_subtitles' | 'hotkey_map_group_title_episodes' | 'hotkey_map_item_mute_description' | 'hotkey_map_item_mute_value' | 'hotkey_map_item_volume_down_description' | 'hotkey_map_item_volume_down_value' | 'hotkey_map_item_volume_up_description' | 'hotkey_map_item_volume_up_value' | 'hotkey_map_item_pip_description' | 'hotkey_map_item_pip_value' | 'hotkey_map_item_full_screen_description' | 'hotkey_map_item_full_screen_value' | 'hotkey_map_item_show_context_menu_description' | 'hotkey_map_item_show_context_menu_value' | 'hotkey_map_item_show_hotkey_map_description' | 'hotkey_map_item_show_hotkey_map_value' | 'hotkey_map_item_play_toggle_description' | 'hotkey_map_item_play_toggle_value' | 'hotkey_map_item_seek_backward_description' | 'hotkey_map_item_seek_backward_value' | 'hotkey_map_item_seek_forward_description' | 'hotkey_map_item_seek_forward_value' | 'hotkey_map_item_fast_seek_backward_description' | 'hotkey_map_item_fast_seek_backward_value' | 'hotkey_map_item_fast_seek_forward_description' | 'hotkey_map_item_fast_seek_forward_value' | 'hotkey_map_item_rate_down_description' | 'hotkey_map_item_rate_down_value' | 'hotkey_map_item_rate_up_description' | 'hotkey_map_item_rate_up_value' | 'hotkey_map_item_prev_frame_description' | 'hotkey_map_item_prev_frame_value' | 'hotkey_map_item_next_frame_description' | 'hotkey_map_item_next_frame_value' | 'hotkey_map_item_jump_seek_description' | 'hotkey_map_item_jump_seek_value' | 'hotkey_map_item_subtitles_toggle_description' | 'hotkey_map_item_subtitles_toggle_value' | 'hotkey_map_item_prev_episode_description' | 'hotkey_map_item_prev_episode_pc_value' | 'hotkey_map_item_prev_episode_mac_value' | 'hotkey_map_item_next_episode_description' | 'hotkey_map_item_next_episode_pc_value' | 'hotkey_map_item_next_episode_mac_value' | 'hotkey_map_item_next_video_description' | 'hotkey_map_item_next_video_value' | 'hotkey_map_item_prev_video_description' | 'hotkey_map_item_prev_video_value' | 'waiting_live_day_value' | 'waiting_live_hour_value' | 'waiting_live_minute_value' | 'waiting_live_second_value' | 'waiting_live_colon' | 'waiting_live_upcoming_title' | 'waiting_live_timer_title' | 'waiting_live_recover_title' | 'waiting_record_title' | 'aria_label_submenu_traffic_saving_off' | 'aria_label_submenu_traffic_saving_on' | 'aria_label_submenu_back' | 'aria_label_menu_quality' | 'aria_label_menu_rate' | 'aria_label_menu_subtitle' | 'aria_label_menu_download' | 'aria_label_new_tab_alert' | 'aria_label_menu_debug_overlay_enable' | 'aria_label_menu_debug_overlay_disable' | 'aria_label_menu_rotate' | 'aria_label_menu_loop' | 'aria_label_debug_panel' | 'aria_label_context_menu_open' | 'aria_label_context_menu_close' | 'aria_label_video_player' | 'aria_label_spherical_control' | 'aria_label_menu_audio_languages' | 'menu_audio_languages' | 'audio_stream_display_language_label' | 'audio_stream_display_language_label_index' | 'audio_stream_display_label_index' | 'audio_stream_display_language_index' | 'audio_stream_display_unknown' | 'end_screen_next_video' | 'end_screen_recommended_video';
3
3
  export type LanguagePack = Record<Key, string>;
4
4
  export type LanguageConfig = {
5
5
  language: string;
@@ -64,6 +64,7 @@ export interface IVKVideoPlayerCallbacks {
64
64
  onExternalFullscreenExit?: () => void;
65
65
  onPrevVideoClick?: () => boolean;
66
66
  onNextVideoClick?: () => boolean;
67
+ onNextVideoAnnouncementShow?: () => void;
67
68
  onNextVideoAnnouncementClick?: () => void;
68
69
  onNextVideoAnnouncementAuto?: () => void;
69
70
  onNextVideoAnnouncementCancel?: () => void;
@@ -260,6 +261,7 @@ export interface IVKVideoPlayerConfig {
260
261
  showEndScreen?: boolean;
261
262
  showAutoplayNext?: boolean;
262
263
  showNextPrevButtons?: boolean;
264
+ pipEnabled?: boolean;
263
265
  }
264
266
  export interface IControlInfo {
265
267
  /** @deprecated Используйте новое поле left */
@@ -273,27 +275,27 @@ export interface IControlInfo {
273
275
  isDisplayed: boolean;
274
276
  }
275
277
  export interface IPlayerControlsRef {
276
- prevButton?: HTMLElement;
277
- playButton?: HTMLElement;
278
- replayButton?: HTMLElement;
279
- nextButton?: HTMLElement;
280
- playPrevChapterButton?: HTMLElement;
281
- seekToInteractiveButton?: HTMLElement;
282
- interactiveGraphButton?: HTMLElement;
278
+ prevButton?: HTMLButtonElement;
279
+ playButton?: HTMLButtonElement;
280
+ replayButton?: HTMLElement | HTMLButtonElement;
281
+ nextButton?: HTMLButtonElement;
282
+ playPrevChapterButton?: HTMLButtonElement;
283
+ seekToInteractiveButton?: HTMLButtonElement;
284
+ interactiveGraphButton?: HTMLButtonElement;
283
285
  liveButton?: HTMLElement;
284
286
  time?: HTMLElement;
285
287
  episodes?: HTMLElement;
286
- volume?: HTMLElement;
287
- subtitles?: HTMLElement;
288
+ volume?: HTMLButtonElement;
289
+ subtitles?: HTMLButtonElement;
288
290
  settings?: HTMLElement;
289
- context?: HTMLElement;
291
+ context?: HTMLButtonElement;
290
292
  fullscreen?: HTMLElement;
291
- chromecast?: HTMLElement;
292
- pip?: HTMLElement;
293
- vkLogo?: HTMLElement;
293
+ chromecast?: HTMLButtonElement;
294
+ pip?: HTMLButtonElement;
295
+ vkLogo?: HTMLButtonElement;
294
296
  interactiveTimeIndicator?: HTMLElement;
295
297
  timeline?: HTMLElement;
296
- autoplayNextToggle?: HTMLElement;
298
+ autoplayNextToggle?: HTMLButtonElement;
297
299
  }
298
300
  export interface IPlayerDesktopControlsWidth {
299
301
  prevButton: number;
@@ -376,8 +378,12 @@ export declare enum PictureInPictureType {
376
378
  }
377
379
  export interface IPictureInPictureApiInfo {
378
380
  isActive$: IValueObservable<boolean>;
381
+ isEnabled$: IValueObservable<boolean>;
379
382
  type: PictureInPictureType;
380
383
  }
384
+ export type PictureInPictureSettings = {
385
+ enabled?: boolean;
386
+ };
381
387
  export interface IPictureInPictureApi {
382
388
  isSupported: () => boolean;
383
389
  isActive: () => boolean;
@@ -385,6 +391,7 @@ export interface IPictureInPictureApi {
385
391
  request: () => Promise<void>;
386
392
  remove: () => Promise<void>;
387
393
  info: IPictureInPictureApiInfo;
394
+ setEnabled: (enabled: boolean) => void;
388
395
  dispose: () => Promise<void>;
389
396
  }
390
397
  export interface IAnnotationsApi {
@@ -490,6 +497,11 @@ export type IToggleable<T> = T & {
490
497
  };
491
498
  type MicroStoreWritableBase<T = unknown> = Writable<T>;
492
499
  type ToggleableMicroStore = IToggleable<MicroStoreWritableBase<boolean | null>>;
500
+ export type PictureInPictureMicroStore = {
501
+ isActive$: Writable<boolean>;
502
+ isEnabled$: Writable<boolean>;
503
+ type$: Writable<PictureInPictureType | undefined>;
504
+ };
493
505
  export interface IMicroStores {
494
506
  fakeIsPlaying$: ToggleableMicroStore;
495
507
  interactiveControlsOpacity$: ToggleableMicroStore;
@@ -499,6 +511,7 @@ export interface IMicroStores {
499
511
  clearTimeout: () => void;
500
512
  };
501
513
  graphIsOpened$: ToggleableMicroStore;
514
+ pictureInPicture$: PictureInPictureMicroStore;
502
515
  }
503
516
  export interface InitMicroStoreParams {
504
517
  store: IStore;
@@ -0,0 +1 @@
1
+ export type TmpComponentType = any;
@@ -1,4 +1,4 @@
1
- import type { IPictureInPictureApi } from '../../../types';
1
+ import type { IPictureInPictureApi, PictureInPictureSettings } from '../../../types';
2
2
  import { ValueSubject } from '@vkontakte/videoplayer-shared';
3
3
  import { PictureInPictureType } from '../../../types';
4
4
  export declare class DocumentPictureInPictureApi implements IPictureInPictureApi {
@@ -9,15 +9,27 @@ export declare class DocumentPictureInPictureApi implements IPictureInPictureApi
9
9
  private pipWindow;
10
10
  info: {
11
11
  isActive$: ValueSubject<boolean>;
12
+ isEnabled$: ValueSubject<boolean>;
12
13
  type: PictureInPictureType;
13
14
  };
15
+ constructor({ enabled }?: PictureInPictureSettings);
16
+ /**
17
+ * Флаг показывает, есть ли в целом возможность использовать dpip в данном браузере, поддерживается ли это.
18
+ */
14
19
  isSupported(): boolean;
20
+ /**
21
+ * Флаг показывает, находится ли пользователь в режиме dpip.
22
+ */
15
23
  isActive(): boolean;
16
24
  setPlayerDomElement(playerDomElement: HTMLElement, playerParentShadowRoot: ShadowRoot): void;
17
25
  setContext(svelteContext: Map<unknown, unknown>): void;
18
26
  request(): Promise<void>;
19
27
  remove(): Promise<void>;
20
28
  dispose(): Promise<void>;
29
+ /**
30
+ * Флаг определяет может ли пользователь переходить в dpip на уровне бизнес логике.
31
+ */
32
+ setEnabled(enabled: boolean): void;
21
33
  private createStretchedContainer;
22
34
  }
23
35
  export declare function isInstanceOfDocumentPictureInPictureApi(pictureInPictureApi?: IPictureInPictureApi): pictureInPictureApi is DocumentPictureInPictureApi;
@@ -1,4 +1,4 @@
1
- import type { IPictureInPictureApi } from '../../../types';
1
+ import type { IPictureInPictureApi, PictureInPictureSettings } from '../../../types';
2
2
  import { PictureInPictureType } from '../../../types';
3
3
  import { ValueSubject } from '@vkontakte/videoplayer-shared';
4
4
  declare const PICTURE_IN_PICTURE_EVENTS: readonly ["enterpictureinpicture", "leavepictureinpicture", "resize"];
@@ -16,9 +16,17 @@ export declare class PictureInPictureApi implements IPictureInPictureApi {
16
16
  private readonly eventHandlers;
17
17
  info: {
18
18
  isActive$: ValueSubject<boolean>;
19
+ isEnabled$: ValueSubject<boolean>;
19
20
  type: PictureInPictureType;
20
21
  };
22
+ constructor({ enabled }?: PictureInPictureSettings);
23
+ /**
24
+ * Флаг показывает, есть ли в целом возможность использовать pip в данном браузере, поддерживается ли это.
25
+ */
21
26
  isSupported(): boolean;
27
+ /**
28
+ * Флаг показывает, находится ли пользователь в режиме pip.
29
+ */
22
30
  isActive(): boolean;
23
31
  setContext(svelteContext: Map<unknown, unknown>): void;
24
32
  revealPictureInPicture(): Promise<void>;
@@ -33,6 +41,10 @@ export declare class PictureInPictureApi implements IPictureInPictureApi {
33
41
  private onEnterPictureInPicture;
34
42
  private onLeavePictureInPicture;
35
43
  private onResize;
44
+ /**
45
+ * Флаг определяет может ли пользователь переходить в pip на уровне бизнес логике.
46
+ */
47
+ setEnabled(enabled: boolean): void;
36
48
  }
37
49
  export declare function isInstanceOfPictureInPictureApi(pictureInPictureApi?: IPictureInPictureApi): pictureInPictureApi is PictureInPictureApi;
38
50
  export {};
@@ -1,4 +1,4 @@
1
- import type { IPictureInPictureApi } from '../../../types';
1
+ import type { IPictureInPictureApi, PictureInPictureSettings } from '../../../types';
2
2
  export declare class PictureInPictureApiFactory {
3
- static getLatestSupportedVersion(): IPictureInPictureApi | undefined;
3
+ static getLatestSupportedVersion(settings: PictureInPictureSettings): IPictureInPictureApi | undefined;
4
4
  }