@vkontakte/videoplayer 1.1.111 → 1.1.112-beta.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 +16 -16
- package/es2015.esm.js +16 -16
- package/esnext.cjs +16 -16
- package/esnext.esm.js +16 -16
- package/evergreen.esm.js +16 -16
- package/package.json +5 -5
- package/types/components/Menus/externalSettingsMenu.d.ts +3 -0
- package/types/components/Menus/utils/getCurrentQualityDisplayValue.d.ts +4 -3
- package/types/config.d.ts +1 -0
- package/types/index.d.ts +1 -0
- package/types/store/modules/subtitlesStore/subtitlesStore.store.d.ts +0 -10
- package/types/translation/types.d.ts +1 -1
- package/types/types/externalSettingsMenu.d.ts +57 -0
- package/types/types/index.d.ts +11 -0
- package/types/utils/getAmbientGlowLayout.d.ts +12 -0
- package/types/utils/getRotationScale.d.ts +2 -0
- package/types/utils/getTimelineThumbData.d.ts +1 -0
- package/types/utils/hooks/useIosSafariFullscreenSubtitles.d.ts +2 -1
- package/types/utils/screenRotation.d.ts +26 -0
- package/types/utils/subtitles.d.ts +7 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.112-beta.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.181-beta.0",
|
|
47
|
+
"@vkontakte/videoplayer-interactive": "1.0.87-beta.0",
|
|
48
|
+
"@vkontakte/videoplayer-shared": "1.0.110-beta.0",
|
|
49
|
+
"@vkontakte/videoplayer-statistics": "1.0.127-beta.0"
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -11,11 +11,12 @@ type CurrentQualityParams = {
|
|
|
11
11
|
availableQualities: VideoQualityForRender[];
|
|
12
12
|
};
|
|
13
13
|
export declare const getCurrentQualityDisplayValue: ({ quality, availableQualities, isAutoQualityEnabled }: CurrentQualityParams) => string;
|
|
14
|
-
type
|
|
14
|
+
type QualityItemLabelParams = {
|
|
15
15
|
quality: VideoQuality | undefined;
|
|
16
16
|
availableQualities: VideoQualityForRender[];
|
|
17
17
|
prefix: string;
|
|
18
|
-
|
|
18
|
+
selected: boolean;
|
|
19
|
+
delimiter?: string;
|
|
19
20
|
};
|
|
20
|
-
export declare const
|
|
21
|
+
export declare const getQualityItemLabel: ({ quality, availableQualities, prefix, selected, delimiter }: QualityItemLabelParams) => string;
|
|
21
22
|
export {};
|
package/types/config.d.ts
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ 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
11
|
export type { MobileFullscreenReplacement, MobileFullscreenReplacementFields } from "./services/mobileFullscreenReplacement";
|
|
12
|
+
export type { ExternalSettingsMenuController, ExternalSettingsOpenSubmenuItem, ExternalSettingsActionItem, ExternalSettingsMenuHeader, ExternalSettingsMenuItem, ExternalSettingsMenuParams, ExternalSettingsSubMenu } from "./types/externalSettingsMenu";
|
|
12
13
|
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 };
|
|
13
14
|
export { GridTypes } from "./constans";
|
|
14
15
|
export { PlayerPhase } from "./types";
|
|
@@ -7,7 +7,6 @@ import type { Readable, Writable } from "svelte/store";
|
|
|
7
7
|
import type { IPlayer, ITextTrack } from "@vkontakte/videoplayer-core";
|
|
8
8
|
import type { ISubscription, ITracer } from "@vkontakte/videoplayer-shared";
|
|
9
9
|
import type { AppTracer } from "@vkontakte/videoplayer-shared";
|
|
10
|
-
import { Subject } from "@vkontakte/videoplayer-shared";
|
|
11
10
|
import type { VideoSubtitle, VideoSubtitleParsed, AvailableVideoSubtitle } from "../../../types";
|
|
12
11
|
import type { IUIConfig } from "../../../config";
|
|
13
12
|
import type { TSignature } from "../../../translation/types";
|
|
@@ -112,15 +111,6 @@ export interface SubtitlesStore {
|
|
|
112
111
|
actions: SubtitlesStoreInternalActions;
|
|
113
112
|
/** Экшены для внешнего использования */
|
|
114
113
|
externalActions: SubtitlesStoreExternalActions;
|
|
115
|
-
/** События для статистики */
|
|
116
|
-
events: {
|
|
117
|
-
actionSetSubtitle$: Subject<string>;
|
|
118
|
-
actionSubtitlesSwitched$: Subject<{
|
|
119
|
-
enabled: boolean;
|
|
120
|
-
lang: string;
|
|
121
|
-
auto: boolean;
|
|
122
|
-
}>;
|
|
123
|
-
};
|
|
124
114
|
/** Очистка ресурсов */
|
|
125
115
|
destroy(): void;
|
|
126
116
|
}
|
|
@@ -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" | "menu_quality" | "menu_playback_rate" | "menu_playback_rate_long" | "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,57 @@
|
|
|
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, asDefault?: boolean) => void;
|
|
6
|
+
setTrafficSavingEnabled: (asDefault?: boolean) => void;
|
|
7
|
+
setHighQualityEnabled: (asDefault?: boolean) => void;
|
|
8
|
+
setAudioStream: (id: string) => void;
|
|
9
|
+
setPlaybackRate: (rate: PlaybackRate) => void;
|
|
10
|
+
setSubtitle: (value: string) => void;
|
|
11
|
+
reportProblem: VoidFunction;
|
|
12
|
+
copyDebugData: VoidFunction;
|
|
13
|
+
showDebugInfo: 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 ExternalSettingsMenuHeader {
|
|
37
|
+
text: string;
|
|
38
|
+
interpolate?: {
|
|
39
|
+
key: string;
|
|
40
|
+
action: ExternalSettingsOpenSubmenuItem | ExternalSettingsActionItem;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export type ExternalSettingsMenuItem = ExternalSettingsOpenSubmenuItem | ExternalSettingsActionItem;
|
|
44
|
+
export type ExternalSettingsSubMenu = {
|
|
45
|
+
id: SubMenuId;
|
|
46
|
+
header?: ExternalSettingsMenuHeader;
|
|
47
|
+
items: ExternalSettingsMenuItem[];
|
|
48
|
+
parentId?: SubMenuId;
|
|
49
|
+
};
|
|
50
|
+
export interface ExternalSettingsMenuParams {
|
|
51
|
+
controller: ExternalSettingsMenuController;
|
|
52
|
+
items: ExternalSettingsMenuItem[];
|
|
53
|
+
isFullscreen: boolean;
|
|
54
|
+
submenus: ExternalSettingsSubMenu[];
|
|
55
|
+
supportLink: string;
|
|
56
|
+
}
|
|
57
|
+
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,14 @@ export interface IVKVideoPlayerConfig {
|
|
|
336
339
|
getVideoDeeplink?: (timestamp: number) => string;
|
|
337
340
|
apptracerUserId?: string | number;
|
|
338
341
|
qoe?: IQoeConfig | IQoeButtonOnlyConfig;
|
|
342
|
+
/**
|
|
343
|
+
* Рендерит меню настроек плеера во внешнем приложении вместо встроенного.
|
|
344
|
+
* Только для мобильной версии плеера.
|
|
345
|
+
* Вызывается при открытии меню настроек; состав меню и субменю может отличаться от встроенного.
|
|
346
|
+
* Меню получает "снимок" состояния при открытии, обновление не предусмотрено.
|
|
347
|
+
* При закрытии из слоя интеграции обязателен вызов params.controller.close().
|
|
348
|
+
*/
|
|
349
|
+
renderExternalMenu?: (params: ExternalSettingsMenuParams) => void;
|
|
339
350
|
}
|
|
340
351
|
/**
|
|
341
352
|
* Поля, которые можно обновить, сохранив итстанс плеера
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IRectangle } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
export interface IAmbientGlowLayout {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
scaleX: number;
|
|
6
|
+
scaleY: number;
|
|
7
|
+
rotationScale: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const getAmbientGlowLayout: (playerSize: IRectangle, videoSize: IRectangle, rotateAlpha: number, tileShare: {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
}) => IAmbientGlowLayout | undefined;
|
|
@@ -6,6 +6,7 @@ export interface ITimelineThumbData {
|
|
|
6
6
|
imgOffsetX: number;
|
|
7
7
|
imgOffsetY: number;
|
|
8
8
|
}
|
|
9
|
+
export declare const getThumbIntervalSec: (previewThumbsData: ITimelinePreviewThumbsData, duration: number) => number;
|
|
9
10
|
/**
|
|
10
11
|
* Вычисляет данные спрайта для показа кадра превью по прогрессу.
|
|
11
12
|
* frameWidth/frameHeight — желаемый размер кадра на экране, от него считается размер и сдвиг всего спрайта.
|
|
@@ -3,5 +3,6 @@ interface Params {
|
|
|
3
3
|
store: EnrichedStore;
|
|
4
4
|
getFullscreenTarget: () => HTMLElement;
|
|
5
5
|
}
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const syncIosSafariFullscreenSubtitles: ({ store, getFullscreenTarget }: Params) => VoidFunction;
|
|
7
|
+
export declare const useIosSafariFullscreenSubtitles: (params: Params) => void;
|
|
7
8
|
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type ScreenRotation = 0 | 90 | 180 | 270;
|
|
2
|
+
type Corner = Pick<DOMRectReadOnly, "left" | "top">;
|
|
3
|
+
type Box = Pick<DOMRectReadOnly, "left" | "top" | "right" | "bottom">;
|
|
4
|
+
export interface LocalPoint {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
}
|
|
10
|
+
export interface PointerProgress {
|
|
11
|
+
/** Доля от начала элемента, от 0 до 1 */
|
|
12
|
+
progress: number;
|
|
13
|
+
/** Расстояние от начала элемента в пикселях */
|
|
14
|
+
offset: number;
|
|
15
|
+
/** Длина элемента вдоль его оси в пикселях */
|
|
16
|
+
width: number;
|
|
17
|
+
}
|
|
18
|
+
/** Поворот по часовой стрелке, определённый по тому, к какому углу рамки на экране ушёл левый верхний угол элемента */
|
|
19
|
+
export declare const rotationFromCorner: (corner: Corner, box: Box) => ScreenRotation;
|
|
20
|
+
/** Узнаёт, на сколько градусов повёрнут элемент: ставит метку в его левый верхний угол и смотрит, куда она попала на экране. Элементу нужен position: relative */
|
|
21
|
+
export declare const getScreenRotation: (element: HTMLElement) => ScreenRotation;
|
|
22
|
+
/** Переводит точку экрана в координаты элемента, как если бы он не был повёрнут */
|
|
23
|
+
export declare const toLocalPoint: (clientX: number, clientY: number, box: Box, rotation: ScreenRotation) => LocalPoint;
|
|
24
|
+
/** Где палец вдоль элемента, если считать от его начала по его же оси, а не по экрану */
|
|
25
|
+
export declare const getPointerProgress: (clientX: number, clientY: number, box: Box, rotation: ScreenRotation) => PointerProgress;
|
|
26
|
+
export {};
|
|
@@ -3,8 +3,12 @@ export declare class NativeSubtitles {
|
|
|
3
3
|
private readonly video;
|
|
4
4
|
constructor(video: HTMLVideoElement);
|
|
5
5
|
private getTracksArray;
|
|
6
|
-
|
|
6
|
+
private static syncAttribute;
|
|
7
|
+
private attach;
|
|
8
|
+
setTracks(tracks: ITextTrack[]): void;
|
|
9
|
+
private getBrowserTracks;
|
|
10
|
+
select(id: string | null): void;
|
|
11
|
+
getBrowserShowingLanguage(): string | undefined;
|
|
7
12
|
detachAll(): void;
|
|
8
|
-
|
|
9
|
-
getCurrentShowingId(): string | null;
|
|
13
|
+
getShowingIds(): string[];
|
|
10
14
|
}
|