@vkontakte/videoplayer 1.1.44-dev.c283bc82.0 → 1.1.44-dev.c65c6bd4.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 +17 -17
- package/es2015.esm.js +17 -17
- package/es2018.cjs.js +17 -17
- package/es2018.esm.js +17 -17
- package/esnext.cjs.js +17 -17
- package/esnext.esm.js +17 -17
- package/evergreen.esm.js +17 -17
- package/package.json +5 -5
- package/types/VKVideoPlayer/index.d.ts +0 -7
- package/types/config.d.ts +0 -2
- package/types/index.d.ts +0 -1
- package/types/store/index.d.ts +6 -15
- package/types/translation/types.d.ts +1 -1
- package/types/types/index.d.ts +3 -14
- package/types/utils/getQualityLabel.d.ts +2 -0
- package/types/{components/Menus/utils → utils}/menuNavigation.d.ts +3 -7
- package/types/components/Menus/constants/contextMenuItemIds.d.ts +0 -12
- package/types/components/Menus/constants/contextMenuItemWeights.d.ts +0 -4
- package/types/components/Menus/constants/defaultSubMenuMinWidth.d.ts +0 -1
- package/types/components/Menus/constants/index.d.ts +0 -4
- package/types/components/Menus/constants/settingsMenuItemIds.d.ts +0 -12
- package/types/components/Menus/constants/settingsMenuItemWeights.d.ts +0 -4
- package/types/components/Menus/constants/topOffset.d.ts +0 -1
- package/types/components/Menus/types.d.ts +0 -72
- package/types/components/Menus/utils/getCurrentQualityDisplayValue.d.ts +0 -3
- package/types/components/Menus/utils/getQualityIcon.d.ts +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer",
|
|
3
|
-
"version": "1.1.44-dev.
|
|
3
|
+
"version": "1.1.44-dev.c65c6bd4.0",
|
|
4
4
|
"author": "vk.com",
|
|
5
5
|
"description": "Videoplayer based on the vk.com platform",
|
|
6
6
|
"homepage": "https://vk.com",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"**/*.d.ts"
|
|
50
50
|
],
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@vkontakte/videoplayer-core": "2.0.
|
|
53
|
-
"@vkontakte/videoplayer-interactive": "1.0.19-dev.
|
|
54
|
-
"@vkontakte/videoplayer-shared": "1.0.
|
|
55
|
-
"@vkontakte/videoplayer-statistics": "1.0.
|
|
52
|
+
"@vkontakte/videoplayer-core": "^2.0.110",
|
|
53
|
+
"@vkontakte/videoplayer-interactive": "1.0.19-dev.50f6494b.0",
|
|
54
|
+
"@vkontakte/videoplayer-shared": "^1.0.42",
|
|
55
|
+
"@vkontakte/videoplayer-statistics": "^1.0.57"
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -5,7 +5,6 @@ import { InterfaceLanguage, type QualityLimits } from '@vkontakte/videoplayer-sh
|
|
|
5
5
|
import { type PlaybackRate } from '@vkontakte/videoplayer-core';
|
|
6
6
|
import type { IStatContext } from '@vkontakte/videoplayer-statistics';
|
|
7
7
|
import { AnnotationsApi } from '../utils/webAPI/annotationsApi/annotationsApi';
|
|
8
|
-
import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem } from '../components/Menus/types';
|
|
9
8
|
export declare class VKVideoPlayer extends HTMLElement {
|
|
10
9
|
private svelteStubComponent?;
|
|
11
10
|
private svelteRootComponent?;
|
|
@@ -87,11 +86,5 @@ export declare class VKVideoPlayer extends HTMLElement {
|
|
|
87
86
|
replayInteractiveChapter(callback?: () => void): Promise<void>;
|
|
88
87
|
showInteractiveIndicatorTooltip(newValue: boolean, useTimeout?: boolean): void;
|
|
89
88
|
switchToActiveLive(): void;
|
|
90
|
-
updateAdditionalSettingsItem(itemId: string, fields: Partial<Omit<AdditionalSettingsMenuItem, 'id' | 'type'>>): void;
|
|
91
|
-
addAdditionalSettingsItem(newItem: AdditionalSettingsMenuItem): void;
|
|
92
|
-
removeAdditionalSettingsItem(itemId: string): void;
|
|
93
|
-
updateAdditionalContextItem(itemId: string, fields: Partial<Omit<AdditionalContextMenuItem, 'id'>>): void;
|
|
94
|
-
addAdditionalContextItem(newItem: AdditionalContextMenuItem): void;
|
|
95
|
-
removeAdditionalContextItem(itemId: string): void;
|
|
96
89
|
updateStatContext(statContext: Partial<IStatContext>): void;
|
|
97
90
|
}
|
package/types/config.d.ts
CHANGED
|
@@ -101,8 +101,6 @@ export interface IUIConfig {
|
|
|
101
101
|
saveDebugInfoToFile: boolean;
|
|
102
102
|
saveTraceInfoToFile: boolean;
|
|
103
103
|
additionalButtons: boolean;
|
|
104
|
-
additionalSettingsMenuItems: boolean;
|
|
105
|
-
additionalContextMenuItems: boolean;
|
|
106
104
|
contextMenuButton: boolean;
|
|
107
105
|
audioLanguages: boolean;
|
|
108
106
|
saveRate: boolean;
|
package/types/index.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import type { ISources, IDashSource, URLSource, RawSource, URLSourceWithSeek } f
|
|
|
6
6
|
import type { Milliseconds, QualityLimits } from '@vkontakte/videoplayer-shared';
|
|
7
7
|
export { VERSION } from './env';
|
|
8
8
|
export declare const registerPlayerWebComponent: () => void;
|
|
9
|
-
export { type AdditionalSettingsMenuItem, MenuItemType, type AdditionalClickSettingsMenuItem, type AdditionalSwitchSettingsMenuItem, type AdditionalContextMenuItem, } from './components/Menus/types';
|
|
10
9
|
export type { VKVideoPlayer, IVKVideoPlayerConfig, IControlInfo, IVKVideoPlayerCallbacks, IVideoData, AdsParams, HotKeyMapData, HotKeyMapItem, HotKeyMapGroup, ISources, IDashSource, URLSource, RawSource, URLSourceWithSeek, LanguagePack, LanguageConfig, Milliseconds, IVideoLive, IInteractiveData, AdditionalButton, QualityLimits, };
|
|
11
10
|
export { GridTypes, };
|
|
12
11
|
export { InterfaceLanguage, VKNumericLanguage, loadVKLangPack, } from '@vkontakte/videoplayer-shared';
|
package/types/store/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IConfig, IExternalTextTrack, IOptionalTuningConfig, IPlayer, ISources, PlaybackRate, IAudioStream, IVideoStream } from '@vkontakte/videoplayer-core';
|
|
2
2
|
import { ChromecastState, PlaybackState, VideoFormat } from '@vkontakte/videoplayer-core';
|
|
3
|
-
import { type IError, type ILogger,
|
|
3
|
+
import { type IError, type ILogger, type IRectangle, type IValueObservable, type QualityLimits } from '@vkontakte/videoplayer-shared';
|
|
4
|
+
import { InterfaceLanguage, VideoQuality } from '@vkontakte/videoplayer-shared';
|
|
4
5
|
import type { IUIConfig } from '../config';
|
|
5
6
|
import { SeekAction } from '@vkontakte/videoplayer-statistics';
|
|
6
7
|
import { type InteractiveRange } from '@vkontakte/videoplayer-interactive';
|
|
@@ -10,9 +11,9 @@ import type { LanguageConfig } from '../translation/types';
|
|
|
10
11
|
import type { AdditionalButton, ControlsKeys, HotKeyMapData, IAnnotationsApi, IControlInfo, IDisabledControls, IInteractiveData, IPictureInPictureApi, IPlayerPhase, ITimelinePreviewThumbsData, IVideoEpisode, IVKVideoPlayerCallbacks, IVKVideoPlayerUICallbacks, Position, VideoPlaybackRate, VideoQualityForRender, VideoQualityUI, VideoSubtitle, VideoSubtitleParsed } from '../types';
|
|
11
12
|
import { AdsPlaybackState, PictureInPictureType } from '../types';
|
|
12
13
|
import type { DebugData } from './utils';
|
|
13
|
-
import {
|
|
14
|
+
import { type PlayPrevChapterDisabledTooltipKey } from '../constans';
|
|
15
|
+
import { GridTypes } from '../constans';
|
|
14
16
|
import { UIOneStat } from '../services/statistics';
|
|
15
|
-
import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem, ContextMenuItem, SettingsMenuItem } from '../components/Menus/types';
|
|
16
17
|
export interface IAdsState {
|
|
17
18
|
position: Writable<number>;
|
|
18
19
|
duration: Writable<number>;
|
|
@@ -89,8 +90,6 @@ export interface IUIState {
|
|
|
89
90
|
currentGridType$: Readable<GridTypes>;
|
|
90
91
|
interactiveHideMobileControls: Writable<boolean>;
|
|
91
92
|
additionalButtons$: Readable<AdditionalButton[]>;
|
|
92
|
-
additionalSettingsMenuItems$: Readable<SettingsMenuItem[]>;
|
|
93
|
-
additionalContextMenuItems$: Readable<ContextMenuItem[]>;
|
|
94
93
|
overlayContainer$: Writable<HTMLDivElement | undefined>;
|
|
95
94
|
startedByKeyboard$: Writable<boolean>;
|
|
96
95
|
}
|
|
@@ -245,12 +244,6 @@ export interface IStore {
|
|
|
245
244
|
setMuted: (muted: boolean) => void;
|
|
246
245
|
setVolume: (volume: number) => void;
|
|
247
246
|
returnFocusToEpisodes: () => void;
|
|
248
|
-
updateAdditionalSettingsItem: (itemId: string, fields: Partial<Omit<AdditionalSettingsMenuItem, 'id' | 'type'>>) => void;
|
|
249
|
-
addAdditionalSettingsItem: (newItem: AdditionalSettingsMenuItem) => void;
|
|
250
|
-
removeAdditionalSettingsItem: (itemId: string) => void;
|
|
251
|
-
updateAdditionalContextItem: (itemId: string, fields: Partial<Omit<AdditionalContextMenuItem, 'id'>>) => void;
|
|
252
|
-
addAdditionalContextItem: (newItem: AdditionalContextMenuItem) => void;
|
|
253
|
-
removeAdditionalContextItem: (itemId: string) => void;
|
|
254
247
|
};
|
|
255
248
|
};
|
|
256
249
|
callbacks?: IVKVideoPlayerCallbacks;
|
|
@@ -283,8 +276,6 @@ interface IStoreParams {
|
|
|
283
276
|
disabledControls: ControlsKeys;
|
|
284
277
|
playPrevChapterDisabledTooltip: PlayPrevChapterDisabledTooltipKey;
|
|
285
278
|
additionalButtons: AdditionalButton[];
|
|
286
|
-
additionalSettingsMenuItems: AdditionalSettingsMenuItem[];
|
|
287
|
-
additionalContextMenuItems: AdditionalContextMenuItem[];
|
|
288
279
|
looped?: boolean;
|
|
289
280
|
statistics?: UIOneStat;
|
|
290
281
|
saveRate: boolean;
|
|
@@ -293,5 +284,5 @@ interface IStoreParams {
|
|
|
293
284
|
* Store приложения.
|
|
294
285
|
* Если будет слишком большим - можно разделить его на модули
|
|
295
286
|
*/
|
|
296
|
-
export declare const createStore: ({ interfaceLanguage, isCyrillicRelatedInterface, videoId, isClip, isLiveCatchUpMode, statAuthToken, isAudioDisabled, canDownload, callbacks, webApi, videoEpisodes, previewThumbsData, uiConfig, coreConfig, player: playerInstance, disabledControls, isInteractive, interactiveRanges$, isInteractiveTime$, replayInteractive, hasInteractiveBranches, playPrevChapterDisabledTooltip, additionalButtons,
|
|
287
|
+
export declare const createStore: ({ interfaceLanguage, isCyrillicRelatedInterface, videoId, isClip, isLiveCatchUpMode, statAuthToken, isAudioDisabled, canDownload, callbacks, webApi, videoEpisodes, previewThumbsData, uiConfig, coreConfig, player: playerInstance, disabledControls, isInteractive, interactiveRanges$, isInteractiveTime$, replayInteractive, hasInteractiveBranches, playPrevChapterDisabledTooltip, additionalButtons, looped, statistics: uiStatistics, saveRate, }: IStoreParams) => IStore;
|
|
297
288
|
export {};
|
|
@@ -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';
|
|
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_menu_traffic_saving' | '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';
|
|
3
3
|
export type LanguagePack = Record<Key, string>;
|
|
4
4
|
export type LanguageConfig = {
|
|
5
5
|
language: string;
|
package/types/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { VideoQuality, VideoFormat, ISources, IExternalTextTrack } from '@vkontakte/videoplayer-core';
|
|
2
2
|
import type { IValueObservable, InterfaceLanguage, Subscription } from '@vkontakte/videoplayer-shared';
|
|
3
|
-
import type { Manifest, VideoInfo } from '@vkontakte/videoplayer-interactive';
|
|
3
|
+
import type { Manifest, VideoInfo, InteractiveProjectInfo } from '@vkontakte/videoplayer-interactive';
|
|
4
4
|
import { PlaybackState } from '@vkontakte/videoplayer-core';
|
|
5
5
|
import type { Writable, Readable } from 'svelte/store';
|
|
6
6
|
import type { ISDKConfig } from '../config';
|
|
@@ -9,11 +9,6 @@ import { Controls, GridTypes, type SeekToInteractiveDisabledTooltipKey } from '.
|
|
|
9
9
|
import type { Key } from '../translation/types';
|
|
10
10
|
import type { IUIStatistics } from '../services/statistics';
|
|
11
11
|
import { UISentry } from '../services/sentry';
|
|
12
|
-
import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem } from '../components/Menus/types';
|
|
13
|
-
export declare const enum UIType {
|
|
14
|
-
DESKTOP = "desktop",
|
|
15
|
-
MOBILE = "mobile"
|
|
16
|
-
}
|
|
17
12
|
export declare const enum AdditionalVideoQuality {
|
|
18
13
|
AUTO = "auto"
|
|
19
14
|
}
|
|
@@ -170,12 +165,7 @@ export interface IInteractiveData {
|
|
|
170
165
|
get: (videoId: string) => Promise<number[]>;
|
|
171
166
|
save: (videoId: string, videoIds: number[]) => Promise<void>;
|
|
172
167
|
};
|
|
173
|
-
projectInfo?:
|
|
174
|
-
pid: string;
|
|
175
|
-
title: string;
|
|
176
|
-
videoId: string;
|
|
177
|
-
variantPayloadType: string;
|
|
178
|
-
};
|
|
168
|
+
projectInfo?: InteractiveProjectInfo;
|
|
179
169
|
tooltipHelpHintActive?: boolean;
|
|
180
170
|
}
|
|
181
171
|
export interface AdditionalButton {
|
|
@@ -226,12 +216,11 @@ export interface IVKVideoPlayerConfig {
|
|
|
226
216
|
is3DVideo?: boolean;
|
|
227
217
|
callbacks?: IVKVideoPlayerCallbacks;
|
|
228
218
|
additionalButtons?: AdditionalButton[];
|
|
229
|
-
additionalSettingsMenuItems?: AdditionalSettingsMenuItem[];
|
|
230
|
-
additionalContextMenuItems?: AdditionalContextMenuItem[];
|
|
231
219
|
refDomain?: string;
|
|
232
220
|
volumeMultiplier?: number;
|
|
233
221
|
saveRate?: boolean;
|
|
234
222
|
deviceId?: string;
|
|
223
|
+
showEndScreen?: boolean;
|
|
235
224
|
}
|
|
236
225
|
export interface IControlInfo {
|
|
237
226
|
/** @deprecated Используйте новое поле left */
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
import { type Writable } from 'svelte/store';
|
|
2
|
-
import type { Position } from '
|
|
2
|
+
import type { Position } from '../types';
|
|
3
3
|
export declare const isKeyboardHandleCase: (event?: MouseEvent) => boolean;
|
|
4
4
|
export declare const handleFocusReturnToBtn: (ref: HTMLButtonElement, menuVisible: boolean, openedByKeyboard$: Writable<boolean>) => Promise<void>;
|
|
5
5
|
export declare const handleFocusReturnToElem: (ref: HTMLButtonElement, menuVisible: boolean, openedByKeyboard$: Writable<boolean>) => Promise<void>;
|
|
6
6
|
export declare const handleFocusOnMenu: (ref: HTMLUListElement, menuVisible: boolean, isOpenedByKeyboard: boolean) => Promise<void>;
|
|
7
|
-
export declare const returnFocusToMenuItem: (ref: HTMLLIElement) => Promise<void>;
|
|
7
|
+
export declare const returnFocusToMenuItem: (ref: HTMLLIElement, returnCase: Writable<boolean>, isReturnCase: boolean) => Promise<void>;
|
|
8
8
|
export declare const handleKeyDownMainMenu: (event: KeyboardEvent, closeCallback: () => void) => void;
|
|
9
9
|
export declare const handleKeyDownOpenSubMenuItem: (event: KeyboardEvent, openSubmenuFn: () => void, getSubItemFn: () => HTMLLIElement) => Promise<void>;
|
|
10
|
-
export declare const handleKeyDownSubMenu: (event: KeyboardEvent, backToMainSettingsFn: () => void,
|
|
11
|
-
itemIdReturnCase: Writable<string | undefined>;
|
|
12
|
-
id: string;
|
|
13
|
-
}, closeSettingsMenuFn: () => void) => Promise<void>;
|
|
10
|
+
export declare const handleKeyDownSubMenu: (event: KeyboardEvent, backToMainSettingsFn: () => void, mainMenuReturnCase: Writable<boolean>, closeSettingsMenuFn: () => void) => Promise<void>;
|
|
14
11
|
export declare const handleChoseMenuItem: (event: KeyboardEvent, selectFn: () => void) => void;
|
|
15
|
-
export declare const handleSwitchMenuItem: (event: KeyboardEvent, enabled: boolean, selectFn: (value: boolean) => void) => void;
|
|
16
12
|
export declare const getContextMenuPositionByButton: (btnRef: HTMLButtonElement) => Position;
|
|
17
13
|
export declare const getContextMenuPositionByHotKey: (overlayRef: HTMLDivElement | undefined) => Position;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare enum ContextMenuItemIds {
|
|
2
|
-
COPY_LINK = "copy-link",
|
|
3
|
-
COPY_LINK_TIMESTAMP = "copy-link-timestamp",
|
|
4
|
-
COPY_EMBED_CODE = "copy-embed-code",
|
|
5
|
-
PIP = "pip",
|
|
6
|
-
VIDEO_LOOP = "video-loop",
|
|
7
|
-
ROTATE = "rotate",
|
|
8
|
-
REPORT = "report",
|
|
9
|
-
SAVE_DEBUG = "save-debug",
|
|
10
|
-
SAVE_TRACE = "save-trace",
|
|
11
|
-
DEBUG_INFO = "debug-info"
|
|
12
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const defaultSubMenuMinWidth = 137;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare enum SettingsMenuItemIds {
|
|
2
|
-
QUALITY = "quality-settings",
|
|
3
|
-
AUDIO_LANGUAGES = "audio-language-settings",
|
|
4
|
-
PLAYBACK_RATE = "playback-rate-settings",
|
|
5
|
-
SUBTITLES = "subtitles-settings",
|
|
6
|
-
TRAFFIC_SAVING = "traffic-saving-settings",
|
|
7
|
-
DOWNLOAD = "download",
|
|
8
|
-
REPORT = "report",
|
|
9
|
-
COPY_DATA = "copy-data",
|
|
10
|
-
SAVE_TRACE_INFO = "save-trace-info",
|
|
11
|
-
DEBUG_INFO = "debug-info"
|
|
12
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const topOffset: number;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import type { ComponentType } from 'svelte';
|
|
2
|
-
import type { Writable } from 'svelte/store';
|
|
3
|
-
import { UIType } from '../../types';
|
|
4
|
-
interface BaseMenuItem {
|
|
5
|
-
id: string;
|
|
6
|
-
weight: number;
|
|
7
|
-
ariaLabel?: string;
|
|
8
|
-
label: string;
|
|
9
|
-
}
|
|
10
|
-
interface BaseSettingsMenuItem extends BaseMenuItem {
|
|
11
|
-
icon: ComponentType | string;
|
|
12
|
-
isHiddenFor?: UIType[];
|
|
13
|
-
}
|
|
14
|
-
export declare enum MenuItemType {
|
|
15
|
-
OPEN_SUB_MENU = "OPEN_SUB_MENU",
|
|
16
|
-
CLICK = "CLICK",
|
|
17
|
-
SWITCH = "SWITCH"
|
|
18
|
-
}
|
|
19
|
-
export interface OpenSubMenuSettingsMenuItem extends BaseSettingsMenuItem {
|
|
20
|
-
type: MenuItemType.OPEN_SUB_MENU;
|
|
21
|
-
value: string;
|
|
22
|
-
valueComponent?: ComponentType;
|
|
23
|
-
getSubItemForFocus: () => HTMLLIElement;
|
|
24
|
-
subMenu: {
|
|
25
|
-
show: boolean;
|
|
26
|
-
items: SubMenuItem[];
|
|
27
|
-
returnFromSubMenu?: () => void;
|
|
28
|
-
ariaLabelReturnFromSubMenu?: string;
|
|
29
|
-
title: string;
|
|
30
|
-
closeSettingsMenu: () => void;
|
|
31
|
-
backToMainSettings: () => void;
|
|
32
|
-
itemIdReturnCase: Writable<string | undefined>;
|
|
33
|
-
selectItem: (value: SubMenuItem['value']) => void;
|
|
34
|
-
minWidth?: number;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
export interface ClickSettingsMenuItem extends BaseSettingsMenuItem {
|
|
38
|
-
type: MenuItemType.CLICK;
|
|
39
|
-
onClick: () => void;
|
|
40
|
-
}
|
|
41
|
-
export interface SwitchSettingsMenuItem extends BaseSettingsMenuItem {
|
|
42
|
-
type: MenuItemType.SWITCH;
|
|
43
|
-
onClick: (enabled: boolean) => void;
|
|
44
|
-
enabled: boolean;
|
|
45
|
-
tooltipText?: string;
|
|
46
|
-
maxTooltipWidth?: number;
|
|
47
|
-
}
|
|
48
|
-
export type AdditionalSwitchSettingsMenuItem = Omit<SwitchSettingsMenuItem, 'icon' | 'onClick'> & {
|
|
49
|
-
icon: string;
|
|
50
|
-
onChangeEnabled: (enabled: boolean) => void;
|
|
51
|
-
};
|
|
52
|
-
export type AdditionalClickSettingsMenuItem = Omit<SwitchSettingsMenuItem, 'icon'> & {
|
|
53
|
-
icon: string;
|
|
54
|
-
};
|
|
55
|
-
export type SettingsMenuItem = OpenSubMenuSettingsMenuItem | ClickSettingsMenuItem | SwitchSettingsMenuItem;
|
|
56
|
-
export type AdditionalSettingsMenuItem = AdditionalSwitchSettingsMenuItem | AdditionalClickSettingsMenuItem;
|
|
57
|
-
export interface SubMenuItem<T = any, U = any> {
|
|
58
|
-
value: T;
|
|
59
|
-
dataValue?: T | keyof T;
|
|
60
|
-
valueComponent?: ComponentType;
|
|
61
|
-
valueComponentParams?: {
|
|
62
|
-
[key: string]: U;
|
|
63
|
-
};
|
|
64
|
-
ariaLabel?: string;
|
|
65
|
-
label?: string;
|
|
66
|
-
selected?: boolean;
|
|
67
|
-
}
|
|
68
|
-
export interface ContextMenuItem extends BaseMenuItem {
|
|
69
|
-
onClick: () => void;
|
|
70
|
-
}
|
|
71
|
-
export type AdditionalContextMenuItem = ContextMenuItem;
|
|
72
|
-
export {};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { VideoQuality } from '@vkontakte/videoplayer-core';
|
|
2
|
-
import type { VideoQualityForRender } from '../../../types';
|
|
3
|
-
export declare const getCurrentQualityDisplayValue: (currentQuality: VideoQuality | undefined, availableQualities: VideoQualityForRender[], isAutoQualityEnabled: boolean | undefined) => string;
|