@vkontakte/videoplayer 1.1.65-dev.b4cd3784.0 → 1.1.65-dev.d779f3ab.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.65-dev.b4cd3784.0",
3
+ "version": "1.1.65-dev.d779f3ab.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.135-dev.efff7df5.0",
59
- "@vkontakte/videoplayer-interactive": "1.0.40-dev.6603af99.0",
60
- "@vkontakte/videoplayer-shared": "1.0.63-dev.d8d79e23.0",
61
- "@vkontakte/videoplayer-statistics": "1.0.81-dev.5446d207.0"
58
+ "@vkontakte/videoplayer-core": "2.0.135-dev.116880cb.0",
59
+ "@vkontakte/videoplayer-interactive": "1.0.40-dev.9759b53e.0",
60
+ "@vkontakte/videoplayer-shared": "1.0.63-dev.a36bf0cc.0",
61
+ "@vkontakte/videoplayer-statistics": "1.0.81-dev.02d282a1.0"
62
62
  }
63
63
  }
@@ -5,6 +5,7 @@ import { type QualityLimits } from '@vkontakte/videoplayer-shared';
5
5
  import { InterfaceLanguage } from '@vkontakte/videoplayer-shared';
6
6
  import { type PlaybackRate } from '@vkontakte/videoplayer-core';
7
7
  import type { IStatContext } from '@vkontakte/videoplayer-statistics';
8
+ import { ThinOneStat } from '@vkontakte/videoplayer-statistics';
8
9
  import { AnnotationsApi } from '../utils/webAPI/annotationsApi/annotationsApi';
9
10
  import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem } from '../components/Menus/subMenuTabs/types';
10
11
  import type { AdditionalButton } from '../components/Controls/types';
@@ -52,6 +53,7 @@ export declare class VKVideoPlayer extends HTMLElement {
52
53
  private isControlDisabled;
53
54
  private getNextVideoInfo;
54
55
  private createOneStat;
56
+ private createThinOneStat;
55
57
  private createPlayer;
56
58
  private addPlayerInfoSubscriptions;
57
59
  playNextVideo(): void;
@@ -94,7 +96,11 @@ export declare class VKVideoPlayer extends HTMLElement {
94
96
  setLanguage(language: InterfaceLanguage | string): Promise<void>;
95
97
  setLiveStart(videoData: IVideoData): void;
96
98
  setLiveWaitingStart(): void;
97
- setLiveWaitingRecover(): void;
99
+ /**
100
+ * Идёт доигрывание трансляции
101
+ */
102
+ private isLiveTailPlaying;
103
+ setLiveWaitingRecover(forceImmediate?: boolean): void;
98
104
  setLiveWaitingRecord(): void;
99
105
  setLiveEnd(videoData: IVideoData): void;
100
106
  setLiveLowLatency(isLowLatency: boolean): void;
@@ -114,7 +120,7 @@ export declare class VKVideoPlayer extends HTMLElement {
114
120
  updateAdditionalButton(itemId: string, fields: Partial<Omit<AdditionalButton, 'id' | 'type'>>): void;
115
121
  addAdditionalButton(newButton: AdditionalButton): void;
116
122
  removeAdditionalButton(itemId: string): void;
117
- updateStatContext(statContext: Partial<IStatContext>): void;
123
+ updateStatContext(statContext: Partial<IStatContext | ThinOneStat.IStatContext>): void;
118
124
  handleTimerNextVideo(state: boolean): void;
119
125
  togglePictureInPicture(): void;
120
126
  focus(): void;
@@ -125,5 +131,6 @@ export declare class VKVideoPlayer extends HTMLElement {
125
131
  * @returns {boolean} Было ли событие обработано внутри плеера
126
132
  */
127
133
  handleExternalKeyboardEvent(event: KeyboardEvent): boolean;
134
+ setAutoplayNext(autoplayNext: boolean): void;
128
135
  private unmountComponent;
129
136
  }
@@ -34,7 +34,6 @@ interface IConfig {
34
34
  useAdmanFromNPM: boolean;
35
35
  volumeMultiplier: number;
36
36
  isVsidOriginal: boolean;
37
- usePuid: boolean;
38
37
  }
39
38
  export declare class AdmanWrapper {
40
39
  private adman;
@@ -52,7 +51,6 @@ export declare class AdmanWrapper {
52
51
  private runtimeTimeout;
53
52
  private useAdmanFromNPM;
54
53
  private isVsidOriginal;
55
- private usePuid;
56
54
  private watchDogTimeout;
57
55
  events: {
58
56
  init$: Subject<void>;
package/types/config.d.ts CHANGED
@@ -37,7 +37,6 @@ export interface IUIConfig {
37
37
  useAdmanFromNPM: boolean;
38
38
  volumeMultiplier: number;
39
39
  isVsidOriginal: boolean;
40
- usePuid: boolean;
41
40
  };
42
41
  /**
43
42
  * Если нет ранее сохранённого значения громкости будет использовано это
@@ -85,6 +84,7 @@ export interface IUIConfig {
85
84
  features: {
86
85
  autoplay: boolean;
87
86
  statistics: boolean;
87
+ thinStatistics: boolean;
88
88
  sentry: boolean;
89
89
  preload: boolean;
90
90
  subtitles: boolean;
@@ -1,13 +1,15 @@
1
1
  import { type ISubscription } from '@vkontakte/videoplayer-shared';
2
- import { type IOneStat } from '@vkontakte/videoplayer-statistics';
2
+ import { type IOneStat, type ThinOneStat } from '@vkontakte/videoplayer-statistics';
3
3
  export interface IUIStatistics {
4
4
  statSubscription: ISubscription;
5
- oneStat: IOneStat;
5
+ oneStat?: IOneStat;
6
+ thinOneStat?: ThinOneStat.IThinOneStat;
6
7
  destroy: () => void;
7
8
  }
8
9
  export declare class UIOneStat implements IUIStatistics {
9
- oneStat: IOneStat;
10
+ oneStat?: IOneStat | undefined;
11
+ thinOneStat?: ThinOneStat.IThinOneStat | undefined;
10
12
  statSubscription: ISubscription;
11
- constructor(oneStat: IOneStat, statSubscription?: ISubscription);
13
+ constructor(oneStat?: IOneStat | undefined, thinOneStat?: ThinOneStat.IThinOneStat | undefined, statSubscription?: ISubscription);
12
14
  destroy(): void;
13
15
  }
@@ -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, 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, ControlBlocksRefs, ControlsKeys, HotKeyMapData, IAnnotationsApi, IControlInfo, IDisabledControls, IInteractiveData, IPictureInPictureApi, IPlayerControlsRef, IPlayerPhase, ITimelinePreviewThumbsData, IVideoEpisode, IVKVideoPlayerCallbacks, IVKVideoPlayerUICallbacks, Position, VideoPlaybackRate, VideoPlayerView, VideoQualityForRender, VideoQualityUI, VideoSubtitle, VideoSubtitleParsed } from '../types';
11
11
  import { AdsPlaybackState } from '../types';
12
12
  import { type QualitySettingsAppliesTo } from '../utils/userSettings';
13
13
  import type { DebugData } from './utils';
@@ -39,6 +39,9 @@ export interface IUIState {
39
39
  * Определяет, могут ли вообще контролы быть показаны.
40
40
  */
41
41
  isControlsAvailable: Writable<boolean>;
42
+ controlBlocks: {
43
+ [key in keyof Required<ControlBlocksRefs>]: Writable<IControlInfo | undefined>;
44
+ };
42
45
  touched: Writable<boolean>;
43
46
  controls: {
44
47
  prevButton: Writable<IControlInfo | undefined>;
@@ -126,6 +129,10 @@ export interface IUIState {
126
129
  * Отключаем любое действие пользователя.
127
130
  */
128
131
  userActionsDisabled: Writable<boolean>;
132
+ /**
133
+ * Положение заголовка названия видео.
134
+ */
135
+ videoTitleInfo: Writable<IControlInfo | undefined>;
129
136
  }
130
137
  export interface IWebApi {
131
138
  pictureInPictureApi?: IPictureInPictureApi;
@@ -22,6 +22,7 @@ export type DebugData = {
22
22
  volume: number;
23
23
  videoSize?: string;
24
24
  buffer?: number;
25
+ position?: number;
25
26
  speed?: number;
26
27
  bitrate?: number;
27
28
  liveLatency?: number;
@@ -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_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_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_on' | 'tooltip_volume_muted' | 'tooltip_sound_unavailable' | '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' | 'tooltip_autoplay_off' | 'tooltip_autoplay_on' | 'tooltip_context_menu_open' | 'tooltip_context_menu_close' | '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' | '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' | 'aria_label_menu_rotate' | 'aria_label_menu_loop' | 'aria_label_debug_panel' | 'aria_label_context_menu' | 'aria_label_video_player' | 'aria_label_spherical_control' | 'aria_label_menu_audio_languages' | 'aria_label_volume' | 'aria_label_settings' | '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' | 'other_quality' | 'high_quality' | 'high_quality_description' | 'auto_quality_limit' | 'traffic_saving_quality' | 'traffic_saving_quality_description' | 'quality_applience' | 'quality_applience_action' | 'default_quality_for_any_video' | 'slow_video_notification_button' | 'slow_video_notification_force_description' | 'slow_video_notification_suggest_description';
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_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_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_sound_unavailable' | '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' | 'tooltip_autoplay_off' | 'tooltip_autoplay_on' | 'tooltip_context_menu_open' | 'tooltip_context_menu_close' | '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' | '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' | 'aria_label_menu_rotate' | 'aria_label_menu_loop' | 'aria_label_debug_panel' | 'aria_label_context_menu' | 'aria_label_video_player' | 'aria_label_spherical_control' | 'aria_label_menu_audio_languages' | 'aria_label_volume' | 'aria_label_settings' | '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' | 'other_quality' | 'high_quality' | 'high_quality_description' | 'auto_quality_limit' | 'traffic_saving_quality' | 'traffic_saving_quality_description' | 'quality_applience' | 'quality_applience_action' | 'default_quality_for_any_video' | 'slow_video_notification_button' | 'slow_video_notification_force_description' | 'slow_video_notification_suggest_description';
3
3
  export type LanguagePack = Record<Key, string>;
4
4
  export type LanguageConfig = {
5
5
  language: string;
@@ -123,6 +123,13 @@ export interface IVKVideoPlayerCallbacks {
123
123
  position: Position;
124
124
  }) => void;
125
125
  onLoopedChanged?: (looped: boolean) => void;
126
+ onTopLeftControlBlockChanged?: (value?: IControlInfo) => void;
127
+ onTopRightControlBlockChanged?: (value?: IControlInfo) => void;
128
+ onMiddleControlBlockChanged?: (value?: IControlInfo) => void;
129
+ onBottomControlBlockChanged?: (value?: IControlInfo) => void;
130
+ onBottomLeftControlBlockChanged?: (value?: IControlInfo) => void;
131
+ onBottomRightControlBlockChanged?: (value?: IControlInfo) => void;
132
+ onTitleChanged?: (value?: IControlInfo) => void;
126
133
  };
127
134
  adsInfo?: {
128
135
  onLoadStarted?: () => void;
@@ -175,8 +182,9 @@ export interface ITimelinePreviewThumbsData {
175
182
  isUV: boolean;
176
183
  links: string[];
177
184
  }
185
+ export type VideoLiveStatus = 'started' | 'upcoming' | 'waiting' | 'finished' | 'postlive' | 'failed';
178
186
  export interface IVideoLive {
179
- status: 'started' | 'upcoming' | 'waiting' | 'finished' | 'postlive' | 'failed';
187
+ status: VideoLiveStatus;
180
188
  startTime?: number;
181
189
  }
182
190
  export interface IVideoDataBase {
@@ -192,14 +200,14 @@ export interface IVideoDataBase {
192
200
  previewThumbsData?: ITimelinePreviewThumbsData;
193
201
  isClip?: boolean;
194
202
  subtitles?: Array<Omit<IExternalTextTrack, 'type'>>;
203
+ sources?: ISources;
204
+ live?: IVideoLive;
195
205
  }
196
206
  export interface IVideoDataWithSources extends IVideoDataBase {
197
207
  sources: ISources;
198
- live?: never;
199
208
  }
200
- export interface IVideoDataWithLive extends IVideoDataBase {
209
+ export interface IVideoDataWithLive extends IVideoDataWithSources {
201
210
  live: IVideoLive;
202
- sources?: never;
203
211
  }
204
212
  export type IVideoData = IVideoDataWithSources | IVideoDataWithLive;
205
213
  export interface IInteractiveData extends Pick<IInteractiveOptions, 'initChapterId' | 'historyApi' | 'projectInfo'> {
@@ -335,6 +343,26 @@ export interface IPlayerDesktopControlsWidth {
335
343
  vkLogo: number;
336
344
  additionalButtons: number[];
337
345
  }
346
+ export type ControlBlocksRefs = {
347
+ /**
348
+ * Контейнер для контролов, которые отображаются в левом верхнем углу.
349
+ */
350
+ topLeft?: HTMLElement | undefined;
351
+ /**
352
+ * Контейнер для контролов, которые отображаются в левом верхнем углу.
353
+ */
354
+ topRight?: HTMLElement | undefined;
355
+ /**
356
+ * Контейнер для контролов, который появляется снизу.
357
+ */
358
+ bottom?: HTMLElement | undefined;
359
+ /**
360
+ * Контейнер для контролов, который появляется в середине плеера.
361
+ */
362
+ middle?: HTMLElement | undefined;
363
+ bottomLeft?: HTMLElement | undefined;
364
+ bottomRight?: HTMLElement | undefined;
365
+ };
338
366
  export declare const enum PlayerPhase {
339
367
  Thumb = "thumb",
340
368
  Video = "video",
@@ -0,0 +1,7 @@
1
+ export declare function getControlInfo<TRefKey extends string, Refs extends Record<TRefKey, HTMLElement | undefined>>(videoElement: HTMLVideoElement | null, refs: Refs, key: TRefKey, show: boolean): {
2
+ left: number;
3
+ right: number;
4
+ top: number;
5
+ bottom: number;
6
+ isDisplayed: boolean;
7
+ };
@@ -0,0 +1,3 @@
1
+ import type { ControlBlocksRefs } from '../types';
2
+ import { type IUIState } from '../store';
3
+ export declare const updateControlBlocks: (videoElement: HTMLVideoElement | null, controlBlocks: IUIState["controlBlocks"], controlBlocskRef: ControlBlocksRefs, showControlBlock: boolean) => void;
@@ -1,14 +0,0 @@
1
- import { type IUIState } from '../store';
2
- import { type IControlInfo, type IPlayerControlsRef } from '../types';
3
- import { type Writable } from 'svelte/store';
4
- declare const _excludedProps: readonly ["tooltipPointerOffsetX", "disabledControls$", "additionalButtons"];
5
- export type TKey = Exclude<keyof IUIState['controls'], typeof _excludedProps[number]>;
6
- export type TControl = Writable<IControlInfo | undefined>;
7
- export declare function getButtonControlInfo(videoElement: HTMLVideoElement | null, controlsRef: IPlayerControlsRef, key: TKey, showControls: boolean): {
8
- left: number;
9
- right: number;
10
- top: number;
11
- bottom: number;
12
- isDisplayed: boolean;
13
- };
14
- export {};