@vkontakte/videoplayer 1.1.109 → 1.1.110-dev.4cee6bcff.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 +12 -12
- package/es2015.esm.js +16 -16
- package/esnext.cjs +16 -16
- package/esnext.esm.js +10 -10
- package/evergreen.esm.js +10 -10
- package/package.json +5 -5
- package/types/components/Menus/externalSettingsMenu.d.ts +3 -0
- package/types/components/Menus/utils/getCurrentQualityDisplayValue.d.ts +2 -1
- package/types/index.d.ts +1 -0
- package/types/translation/types.d.ts +1 -1
- package/types/types/externalSettingsMenu.d.ts +56 -0
- package/types/types/index.d.ts +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.110-dev.4cee6bcff.0",
|
|
4
4
|
"author": "vk.ru",
|
|
5
5
|
"description": "Videoplayer based on the vk.ru platform",
|
|
6
6
|
"homepage": "https://vk.ru",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@adtech/rbadman": "2.2.57",
|
|
46
|
-
"@vkontakte/videoplayer-core": "2.0.
|
|
47
|
-
"@vkontakte/videoplayer-interactive": "1.0.
|
|
48
|
-
"@vkontakte/videoplayer-shared": "1.0.
|
|
49
|
-
"@vkontakte/videoplayer-statistics": "1.0.
|
|
46
|
+
"@vkontakte/videoplayer-core": "2.0.179-dev.4cee6bcff.0",
|
|
47
|
+
"@vkontakte/videoplayer-interactive": "1.0.85-dev.4cee6bcff.0",
|
|
48
|
+
"@vkontakte/videoplayer-shared": "1.0.108-dev.4cee6bcff.0",
|
|
49
|
+
"@vkontakte/videoplayer-statistics": "1.0.125-dev.4cee6bcff.0"
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -9,8 +9,9 @@ type CurrentQualityParams = {
|
|
|
9
9
|
isAutoQualityEnabled: boolean | undefined;
|
|
10
10
|
quality: VideoQuality | undefined;
|
|
11
11
|
availableQualities: VideoQualityForRender[];
|
|
12
|
+
autoQualityVariant?: "short" | "long";
|
|
12
13
|
};
|
|
13
|
-
export declare const getCurrentQualityDisplayValue: ({ quality, availableQualities, isAutoQualityEnabled }: CurrentQualityParams) => string;
|
|
14
|
+
export declare const getCurrentQualityDisplayValue: ({ quality, availableQualities, isAutoQualityEnabled, autoQualityVariant }: CurrentQualityParams) => string;
|
|
14
15
|
type QualityWithPrefixParams = {
|
|
15
16
|
quality: VideoQuality | undefined;
|
|
16
17
|
availableQualities: VideoQualityForRender[];
|
package/types/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export { VERSION } from "./env";
|
|
|
8
8
|
export declare const registerPlayerWebComponent: () => void;
|
|
9
9
|
export { type AdditionalSettingsMenuItem, MenuItemType, type AdditionalClickSettingsMenuItem, type AdditionalSwitchSettingsMenuItem, type AdditionalContextMenuItem, RootMenuId, SubMenuId, SETTINGS_MENU_ID } from "./components/Menus/subMenuTabs/types";
|
|
10
10
|
export { type AdditionalButton, ControlButtonType } from "./components/Controls/types";
|
|
11
|
+
export type { ExternalSettingsMenuController, ExternalSettingsOpenSubmenuItem, ExternalSettingsActionItem, ExternalSettingsTextItem, ExternalSettingsMenuItem, ExternalSettingsMenuParams, ExternalSettingsSubMenu } from "./types/externalSettingsMenu";
|
|
11
12
|
export type { VKVideoPlayer, IVKVideoPlayerConfig, IUpdatableVKVideoPlayerConfig, IControlInfo, ITimelinePreviewThumbsData, IUpcomingLiveViewControlInfo, IVKVideoPlayerCallbacks, IVideoData, AdsParams, HotKeyMapData, HotKeyMapItem, HotKeyMapGroup, ISources, IDashSource, URLSource, RawSource, URLSourceWithSeek, LanguagePack, LanguageConfig, Milliseconds, IVideoLive, IInteractiveData, AdditionalButtonDeprecated, QualityLimits, IAdsConfig, IVideoEpisode, IDpipConfig, IQoeConfig, IQoeButtonOnlyConfig, IQoePoll, IQoeResult, IQoeQuestion, IQoeCallbacks, QoePollTranslations, ISDKConfig, VideoPlayerView, IAdmanInitParamsExternalApi, VKLogoType };
|
|
12
13
|
export { GridTypes } from "./constans";
|
|
13
14
|
export { PlayerPhase } from "./types";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { 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_pip_close" | "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" | "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_settings" | "aria_label_autoplay" | "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" | "audio_channels_5_1" | "audio_channels_stereo" | "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" | "double_forward_label" | "preview_track_notification_text" | "preview_track_close_tooltip";
|
|
2
|
+
export type Key = "auto_quality_invariant" | "auto_quality" | "auto_quality_invariant_long" | "auto_quality_long" | "menu_quality" | "menu_playback_rate" | "menu_traffic_saving" | "menu_report" | "menu_pip" | "menu_pip_close" | "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" | "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_off_long" | "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_settings" | "aria_label_autoplay" | "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" | "audio_channels_5_1" | "audio_channels_stereo" | "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" | "double_forward_label" | "preview_track_notification_text" | "preview_track_close_tooltip";
|
|
3
3
|
export type LanguagePack = Record<Key, string>;
|
|
4
4
|
export type LanguageConfig = {
|
|
5
5
|
language: string;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { PlaybackRate } from "@vkontakte/videoplayer-core";
|
|
2
|
+
import type { VideoQualityUI } from "./index";
|
|
3
|
+
import type { SubMenuId } from "../components/Menus/subMenuTabs/types";
|
|
4
|
+
export interface ExternalSettingsMenuController {
|
|
5
|
+
setQuality: (quality: VideoQualityUI) => void;
|
|
6
|
+
setTrafficSavingEnabled: VoidFunction;
|
|
7
|
+
setHighQualityEnabled: VoidFunction;
|
|
8
|
+
setAudioStream: (id: string) => void;
|
|
9
|
+
setPlaybackRate: (rate: PlaybackRate) => void;
|
|
10
|
+
setSubtitle: (value: string) => void;
|
|
11
|
+
downloadVideo: VoidFunction;
|
|
12
|
+
reportProblem: VoidFunction;
|
|
13
|
+
copyDebugData: VoidFunction;
|
|
14
|
+
close: VoidFunction;
|
|
15
|
+
}
|
|
16
|
+
export interface ExternalSettingsOpenSubmenuItem {
|
|
17
|
+
label: string;
|
|
18
|
+
selected?: boolean;
|
|
19
|
+
submenuId: SubMenuId;
|
|
20
|
+
description?: string;
|
|
21
|
+
}
|
|
22
|
+
type NoArgsKeys = { [K in keyof ExternalSettingsMenuController]: Parameters<ExternalSettingsMenuController[K]> extends [] ? K : never }[keyof ExternalSettingsMenuController];
|
|
23
|
+
type WithArgsKeys = Exclude<keyof ExternalSettingsMenuController, NoArgsKeys>;
|
|
24
|
+
type Base = {
|
|
25
|
+
description?: string;
|
|
26
|
+
label: string;
|
|
27
|
+
selected?: boolean;
|
|
28
|
+
};
|
|
29
|
+
export type ExternalSettingsActionItem = { [K in NoArgsKeys]: Base & {
|
|
30
|
+
method: K;
|
|
31
|
+
args?: never;
|
|
32
|
+
} }[NoArgsKeys] | { [K in WithArgsKeys]: Base & {
|
|
33
|
+
method: K;
|
|
34
|
+
args: Parameters<ExternalSettingsMenuController[K]>;
|
|
35
|
+
} }[WithArgsKeys];
|
|
36
|
+
export interface ExternalSettingsTextItem {
|
|
37
|
+
text: string;
|
|
38
|
+
interpolate?: {
|
|
39
|
+
key: string;
|
|
40
|
+
action: ExternalSettingsOpenSubmenuItem | ExternalSettingsActionItem;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export type ExternalSettingsMenuItem = ExternalSettingsOpenSubmenuItem | ExternalSettingsActionItem | ExternalSettingsTextItem;
|
|
44
|
+
export type ExternalSettingsSubMenu = {
|
|
45
|
+
id: string;
|
|
46
|
+
title: string;
|
|
47
|
+
items: ExternalSettingsMenuItem[];
|
|
48
|
+
parentId?: SubMenuId;
|
|
49
|
+
};
|
|
50
|
+
export interface ExternalSettingsMenuParams {
|
|
51
|
+
items: ExternalSettingsMenuItem[];
|
|
52
|
+
submenus: ExternalSettingsSubMenu[];
|
|
53
|
+
supportLink: string;
|
|
54
|
+
controller: ExternalSettingsMenuController;
|
|
55
|
+
}
|
|
56
|
+
export {};
|
package/types/types/index.d.ts
CHANGED
|
@@ -12,8 +12,10 @@ import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem } from "../c
|
|
|
12
12
|
import type { AdditionalDesktopControlPanelButton } from "../components/Controls/types";
|
|
13
13
|
import type { AdmanInitParams } from "./ads";
|
|
14
14
|
import type { IQoeButtonOnlyConfig, IQoeCallbacks, IQoeConfig } from "./qoe";
|
|
15
|
+
import type { ExternalSettingsMenuParams } from "./externalSettingsMenu";
|
|
15
16
|
export type { AdmanInitParams, AdsParams, IAdmanInitParamsExternalApi } from "./ads";
|
|
16
17
|
export * from "./qoe";
|
|
18
|
+
export * from "./externalSettingsMenu";
|
|
17
19
|
export declare const enum UIType {
|
|
18
20
|
DESKTOP = "desktop",
|
|
19
21
|
MOBILE = "mobile"
|
|
@@ -107,6 +109,7 @@ export interface IVKVideoPlayerCallbacks {
|
|
|
107
109
|
onDevNullLog?: (entry: DevNullEntry) => void;
|
|
108
110
|
onTitleClicked?: () => void;
|
|
109
111
|
onRichSeekActiveChanged?: (active: boolean) => void;
|
|
112
|
+
onSettingsMenuClosed?: () => void;
|
|
110
113
|
uiInfo?: {
|
|
111
114
|
onUpcomingLiveViewStateChanged?: (value: IUpcomingLiveViewControlInfo) => void;
|
|
112
115
|
onControlsVisibleChanged?: (value?: boolean) => void;
|
|
@@ -336,6 +339,11 @@ export interface IVKVideoPlayerConfig {
|
|
|
336
339
|
getVideoDeeplink?: (timestamp: number) => string;
|
|
337
340
|
apptracerUserId?: string | number;
|
|
338
341
|
qoe?: IQoeConfig | IQoeButtonOnlyConfig;
|
|
342
|
+
/**
|
|
343
|
+
* Рендерит меню настроек плеера во внешнем приложении вместо встроенного.
|
|
344
|
+
* Вызывается при открытии меню настроек; состав меню и субменю совпадает со встроенным.
|
|
345
|
+
*/
|
|
346
|
+
renderExternalMenu?: (params: ExternalSettingsMenuParams) => void;
|
|
339
347
|
}
|
|
340
348
|
/**
|
|
341
349
|
* Поля, которые можно обновить, сохранив итстанс плеера
|