@vkontakte/videoplayer 1.1.92-dev.eddfe39b7.0 → 1.1.93-dev.cd80d9e13.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 +35 -39
- package/es2015.esm.js +35 -39
- package/esnext.cjs +35 -39
- package/esnext.esm.js +34 -38
- package/evergreen.esm.js +34 -38
- package/package.json +5 -5
- package/types/VKVideoPlayer/index.svelte.d.ts +2 -2
- package/types/components/Ads/admanWrapper.d.ts +0 -1
- package/types/components/Ads/types.d.ts +0 -1
- package/types/components/Menus/constants/contextMenuItemIds.d.ts +0 -1
- package/types/components/Menus/constants/settingsMenuItemIds.d.ts +0 -1
- package/types/components/Menus/subMenuTabs/rootMenuItems.d.ts +0 -1
- package/types/components/Menus/subMenuTabs/types.d.ts +1 -1
- package/types/components/Root/types.d.ts +3 -4
- package/types/config.d.ts +11 -8
- package/types/constans/keyboard.d.ts +2 -0
- package/types/store/composition.d.ts +31 -0
- package/types/store/index.d.ts +1 -1
- package/types/store/modules/fakeIsPlayingStore/fakeIsPlayingStore.module.d.ts +3 -0
- package/types/store/modules/fakeIsPlayingStore/fakeIsPlayingStore.store.d.ts +26 -0
- package/types/store/modules/fakeIsPlayingStore/fakeIsPlayingStore.token.d.ts +3 -0
- package/types/store/modules/fakeIsPlayingStore/index.d.ts +3 -0
- package/types/store/modules/graphIsOpenedStore/graphIsOpenedStore.module.d.ts +3 -0
- package/types/store/modules/graphIsOpenedStore/graphIsOpenedStore.store.d.ts +50 -0
- package/types/store/modules/graphIsOpenedStore/graphIsOpenedStore.token.d.ts +3 -0
- package/types/store/modules/graphIsOpenedStore/index.d.ts +3 -0
- package/types/store/modules/index.d.ts +18 -0
- package/types/store/modules/infrastructure/index.d.ts +3 -0
- package/types/store/modules/infrastructure/infrastructure.module.d.ts +21 -0
- package/types/store/modules/infrastructure/infrastructure.token.d.ts +26 -0
- package/types/store/modules/interactiveControlsOpacityStore/index.d.ts +3 -0
- package/types/store/modules/interactiveControlsOpacityStore/interactiveControlsOpacityStore.module.d.ts +3 -0
- package/types/store/modules/interactiveControlsOpacityStore/interactiveControlsOpacityStore.store.d.ts +34 -0
- package/types/store/modules/interactiveControlsOpacityStore/interactiveControlsOpacityStore.token.d.ts +3 -0
- package/types/store/modules/notificationsStore/index.d.ts +3 -0
- package/types/store/modules/notificationsStore/notificationsStore.module.d.ts +3 -0
- package/types/store/modules/notificationsStore/notificationsStore.store.d.ts +34 -0
- package/types/store/modules/notificationsStore/notificationsStore.token.d.ts +3 -0
- package/types/store/modules/pictureInPictureStore/index.d.ts +3 -0
- package/types/store/modules/pictureInPictureStore/pictureInPictureStore.module.d.ts +3 -0
- package/types/store/modules/pictureInPictureStore/pictureInPictureStore.store.d.ts +42 -0
- package/types/store/modules/pictureInPictureStore/pictureInPictureStore.token.d.ts +3 -0
- package/types/store/modules/seekToInteractiveDisabledTooltipStore/index.d.ts +3 -0
- package/types/store/modules/seekToInteractiveDisabledTooltipStore/seekToInteractiveDisabledTooltipStore.module.d.ts +3 -0
- package/types/store/modules/seekToInteractiveDisabledTooltipStore/seekToInteractiveDisabledTooltipStore.store.d.ts +26 -0
- package/types/store/modules/seekToInteractiveDisabledTooltipStore/seekToInteractiveDisabledTooltipStore.token.d.ts +3 -0
- package/types/store/modules/showInteractiveTimeIndicatorTooltipStore/index.d.ts +3 -0
- package/types/store/modules/showInteractiveTimeIndicatorTooltipStore/showInteractiveTimeIndicatorTooltipStore.module.d.ts +3 -0
- package/types/store/modules/showInteractiveTimeIndicatorTooltipStore/showInteractiveTimeIndicatorTooltipStore.store.d.ts +44 -0
- package/types/store/modules/showInteractiveTimeIndicatorTooltipStore/showInteractiveTimeIndicatorTooltipStore.token.d.ts +3 -0
- package/types/store/modules/utils.d.ts +6 -0
- package/types/store/types.d.ts +14 -8
- package/types/store/utils.d.ts +5 -5
- package/types/translation/labels.d.ts +1 -0
- package/types/translation/types.d.ts +1 -1
- package/types/types/index.d.ts +13 -54
- package/types/utils/webAPI/pictureInPictureApi/documentPictureInPictureApi.svelte.d.ts +5 -2
- package/types/store/micro/base.d.ts +0 -8
- package/types/store/micro/fakeIsPlaying.d.ts +0 -10
- package/types/store/micro/graphIsOpened.d.ts +0 -13
- package/types/store/micro/index.d.ts +0 -2
- package/types/store/micro/interactiveControlsOpacity.d.ts +0 -10
- package/types/store/micro/notifications.d.ts +0 -9
- package/types/store/micro/pictureInPicture.d.ts +0 -8
- package/types/store/micro/seekToInteractiveDisabledTooltip.d.ts +0 -10
- package/types/store/micro/showInteractiveTimeIndicatorTooltip.d.ts +0 -15
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ShowInteractiveTimeIndicatorTooltip Store Module
|
|
3
|
+
*
|
|
4
|
+
* Управляет отображением тултипа для индикатора интерактивного времени.
|
|
5
|
+
*/
|
|
6
|
+
import type { Readable, Writable } from "svelte/store";
|
|
7
|
+
import type { Subscription } from "@vkontakte/videoplayer-shared";
|
|
8
|
+
import type { IControlInfo, IVKVideoPlayerConfig } from "../../../types";
|
|
9
|
+
type ShowInteractiveTimeIndicatorTooltipState = Writable<boolean> & {
|
|
10
|
+
set: (newValue: boolean, useTimeout?: boolean) => void;
|
|
11
|
+
clearTimeout: () => void;
|
|
12
|
+
};
|
|
13
|
+
export interface Deps {
|
|
14
|
+
/** Общий subscription для всех подписок */
|
|
15
|
+
subscription: Subscription;
|
|
16
|
+
/** Флаг воспроизведения */
|
|
17
|
+
isPlaying$: Readable<boolean>;
|
|
18
|
+
/** Флаг интерактивного времени */
|
|
19
|
+
isInteractiveTime$: Readable<boolean>;
|
|
20
|
+
/** Информация об индикаторе интерактивного времени */
|
|
21
|
+
interactiveTimeIndicator$: Readable<IControlInfo | undefined>;
|
|
22
|
+
/** Флаг видимости контролов (touched) */
|
|
23
|
+
controlsVisible$: Readable<boolean>;
|
|
24
|
+
/** Конфигурация интерактивных данных */
|
|
25
|
+
interactiveDataConfig?: IVKVideoPlayerConfig["interactiveData"];
|
|
26
|
+
/** Колбэк при деактивации подсказки */
|
|
27
|
+
onInteractiveTimeIndicatorHintDeactivated?: () => void;
|
|
28
|
+
}
|
|
29
|
+
export interface ShowInteractiveTimeIndicatorTooltipStoreState {
|
|
30
|
+
/** Показывать ли тултип */
|
|
31
|
+
showInteractiveTimeIndicatorTooltip$: ShowInteractiveTimeIndicatorTooltipState;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Экшены модуля showInteractiveTimeIndicatorTooltip
|
|
35
|
+
*/
|
|
36
|
+
export interface ShowInteractiveTimeIndicatorTooltipStoreActions {
|
|
37
|
+
clearTimeout(): void;
|
|
38
|
+
}
|
|
39
|
+
export interface ShowInteractiveTimeIndicatorTooltipStore {
|
|
40
|
+
state: ShowInteractiveTimeIndicatorTooltipStoreState;
|
|
41
|
+
actions: ShowInteractiveTimeIndicatorTooltipStoreActions;
|
|
42
|
+
}
|
|
43
|
+
export declare const createShowInteractiveTimeIndicatorTooltipStore: (deps: Deps) => ShowInteractiveTimeIndicatorTooltipStore;
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { InjectionToken } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import type { ShowInteractiveTimeIndicatorTooltipStore } from "./showInteractiveTimeIndicatorTooltipStore.store";
|
|
3
|
+
export declare const SHOW_INTERACTIVE_TIME_INDICATOR_TOOLTIP_STORE_TOKEN: InjectionToken<ShowInteractiveTimeIndicatorTooltipStore>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IDIContainer, InjectionToken } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
export type Module<T> = {
|
|
3
|
+
token: InjectionToken<T>;
|
|
4
|
+
factory: (container: IDIContainer) => T;
|
|
5
|
+
};
|
|
6
|
+
export declare const registerModules: <T extends any[]>(container: IDIContainer, modules: { [K in keyof T] : Module<T[K]> }) => void;
|
package/types/store/types.d.ts
CHANGED
|
@@ -15,19 +15,21 @@ import type { FocusManager } from "../utils/webAPI/focusManager";
|
|
|
15
15
|
import type { ISDKConfig, IUIConfig } from "../config";
|
|
16
16
|
import type { IUIStatistics } from "../services/statistics";
|
|
17
17
|
import type { DebugData } from "./utils";
|
|
18
|
+
import type { ICompositionResult } from "./composition";
|
|
18
19
|
export interface SetQualityInfo {
|
|
19
20
|
appliesTo?: QualitySettingsAppliesTo;
|
|
20
21
|
changeReason?: "default" | "limit-changed";
|
|
21
22
|
byUser?: boolean;
|
|
22
23
|
}
|
|
23
|
-
export interface
|
|
24
|
-
position:
|
|
25
|
-
duration:
|
|
26
|
-
playbackState:
|
|
27
|
-
canSkip:
|
|
28
|
-
secondsToWatchBeforeSkip:
|
|
29
|
-
postrollPassed:
|
|
24
|
+
export interface IAdsStateValues {
|
|
25
|
+
position: number;
|
|
26
|
+
duration: number;
|
|
27
|
+
playbackState: AdsPlaybackState;
|
|
28
|
+
canSkip: boolean;
|
|
29
|
+
secondsToWatchBeforeSkip: number;
|
|
30
|
+
postrollPassed: boolean;
|
|
30
31
|
}
|
|
32
|
+
export type IAdsState = { [K in keyof IAdsStateValues] : Writable<IAdsStateValues[K]> };
|
|
31
33
|
export interface IUIState {
|
|
32
34
|
t: (key: Key, params?: Record<string, string>) => string;
|
|
33
35
|
isMinimalView$: Writable<boolean>;
|
|
@@ -259,7 +261,6 @@ export interface IStoreInternalActions {
|
|
|
259
261
|
setLiveWaitingRecord: (state: boolean) => void;
|
|
260
262
|
clearDelayedBufferingCheckTimeout: () => void;
|
|
261
263
|
getDebugTextData: () => string;
|
|
262
|
-
getTraceTextData: () => string;
|
|
263
264
|
getDebugPanelData: () => DebugData;
|
|
264
265
|
getVideoElement: () => HTMLVideoElement | null;
|
|
265
266
|
startLogging: () => void;
|
|
@@ -356,6 +357,7 @@ export interface IStore {
|
|
|
356
357
|
callbacks?: IVKVideoPlayerCallbacks;
|
|
357
358
|
setUiCallbacks: (uiCallbacks: IVKVideoPlayerUICallbacks) => void;
|
|
358
359
|
initAdmanWrapper: VoidFunction;
|
|
360
|
+
resetAdsState: VoidFunction;
|
|
359
361
|
updateAdmanWrapperSubscriptions: VoidFunction;
|
|
360
362
|
updateStatisticsSubscriptions: VoidFunction;
|
|
361
363
|
updateAppTracerSubscriptions: VoidFunction;
|
|
@@ -363,6 +365,10 @@ export interface IStore {
|
|
|
363
365
|
getPlayer: () => IPlayer;
|
|
364
366
|
destroy(): void;
|
|
365
367
|
}
|
|
368
|
+
export type EnrichedStore = IStore & {
|
|
369
|
+
stores: ICompositionResult["stores"];
|
|
370
|
+
destroyComposedStore: () => void;
|
|
371
|
+
};
|
|
366
372
|
export interface IStoreParams {
|
|
367
373
|
interfaceLanguage: InterfaceLanguage | string;
|
|
368
374
|
isCyrillicRelatedInterface: boolean;
|
package/types/store/utils.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { Readable } from "svelte/store";
|
|
2
2
|
import type { IValueObservable } from "@vkontakte/videoplayer-shared";
|
|
3
3
|
import type { IPlayer, IConfig, IObservable } from "@vkontakte/videoplayer-core";
|
|
4
|
-
import type { IStore } from "./types";
|
|
5
|
-
import type
|
|
4
|
+
import type { EnrichedStore, IAdsStateValues, IStore } from "./types";
|
|
5
|
+
import { type AdditionalButtonDeprecated } from "../types";
|
|
6
6
|
import type { AdditionalDesktopControlPanelButton } from "../components/Controls/types";
|
|
7
7
|
import type { ISDKConfig } from "../config";
|
|
8
|
-
export declare const setStores: (store:
|
|
9
|
-
export declare const getStore: () =>
|
|
10
|
-
export declare const getMicroStores: () => IMicroStores;
|
|
8
|
+
export declare const setStores: (store: EnrichedStore) => void;
|
|
9
|
+
export declare const getStore: () => EnrichedStore;
|
|
11
10
|
/**
|
|
12
11
|
* Создаёт readable store svelte'а из `IObservableValue` sdk
|
|
13
12
|
*/
|
|
@@ -51,3 +50,4 @@ export declare class SubtitlesDownloader {
|
|
|
51
50
|
destroy(): void;
|
|
52
51
|
isDestroyed(): boolean;
|
|
53
52
|
}
|
|
53
|
+
export declare const getAdsDefaultStateValues: () => IAdsStateValues;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import type { IAudioStream } from "@vkontakte/videoplayer-core";
|
|
2
2
|
export declare const getAudioStreamDisplayLabel: (stream: IAudioStream | undefined, allStreams: IAudioStream[]) => string;
|
|
3
|
+
export declare const getAudioChannelFormatLabel: (channels: number | undefined) => string;
|
|
@@ -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" | "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_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";
|
|
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,13 +1,11 @@
|
|
|
1
1
|
import type { VideoQuality, VideoFormat, ISources, IExternalTextTrack, IAudioStream } from "@vkontakte/videoplayer-core";
|
|
2
|
-
import type { IValueObservable, InterfaceLanguage,
|
|
3
|
-
import type { Chapter, Manifest, ManifestVideo, VideoInfo,
|
|
2
|
+
import type { IValueObservable, InterfaceLanguage, IRectangle, DevNullEntry } from "@vkontakte/videoplayer-shared";
|
|
3
|
+
import type { Chapter, Manifest, ManifestVideo, VideoInfo, IInteractiveOptions } from "@vkontakte/videoplayer-interactive";
|
|
4
4
|
import type { PlaybackState } from "@vkontakte/videoplayer-core";
|
|
5
5
|
import type { MediascopePixelTypes, SeekAction, ThinOneStat } from "@vkontakte/videoplayer-statistics";
|
|
6
6
|
import type { Writable, Readable } from "svelte/store";
|
|
7
|
-
import type { IDpipConfig, ISDKConfig
|
|
8
|
-
import type { IStore } from "../store";
|
|
7
|
+
import type { IDpipConfig, ISDKConfig } from "../config";
|
|
9
8
|
import type { Controls, GridTypes } from "../constans";
|
|
10
|
-
import { type SeekToInteractiveDisabledTooltipKey } from "../constans";
|
|
11
9
|
import type { Key } from "../translation/types";
|
|
12
10
|
import type { IUIStatistics } from "../services/statistics";
|
|
13
11
|
import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem } from "../components/Menus/subMenuTabs/types";
|
|
@@ -157,6 +155,12 @@ export interface IVKVideoPlayerCallbacks {
|
|
|
157
155
|
onTitleChanged?: (value?: IControlInfo) => void;
|
|
158
156
|
onControlWillChange?: (params: ControlWillChangeParams) => void;
|
|
159
157
|
onPreviewTimelineActiveChanged?: (active: boolean) => void;
|
|
158
|
+
onSubtitlesInfo?: (value: {
|
|
159
|
+
subtitlesLineCount?: number;
|
|
160
|
+
bottomOffest: number;
|
|
161
|
+
height: number;
|
|
162
|
+
visible: boolean;
|
|
163
|
+
}) => void;
|
|
160
164
|
};
|
|
161
165
|
adsInfo?: {
|
|
162
166
|
onLoadStarted?: () => void;
|
|
@@ -274,6 +278,8 @@ export interface IVKVideoPlayerConfig {
|
|
|
274
278
|
statTrackCode?: string;
|
|
275
279
|
statVKAppId?: string;
|
|
276
280
|
refreshStatAuthToken?: () => Promise<string | undefined>;
|
|
281
|
+
statUserId?: number;
|
|
282
|
+
getUvRestStatAuthToken?: () => Promise<string | undefined>;
|
|
277
283
|
preload?: boolean;
|
|
278
284
|
autoplay?: boolean;
|
|
279
285
|
repeat?: boolean;
|
|
@@ -488,12 +494,13 @@ export interface ExternalPictureInPictureEventHandlers {
|
|
|
488
494
|
resize?: (size: Size) => void;
|
|
489
495
|
}
|
|
490
496
|
export interface IPictureInPictureApi {
|
|
497
|
+
info: IPictureInPictureApiInfo;
|
|
498
|
+
dpipConfig?: IDpipConfig;
|
|
491
499
|
isSupported(): boolean;
|
|
492
500
|
isActive(): boolean;
|
|
493
501
|
setContext(svelteContext: Map<unknown, unknown>): void;
|
|
494
502
|
request(): Promise<void>;
|
|
495
503
|
exit(): Promise<void>;
|
|
496
|
-
info: IPictureInPictureApiInfo;
|
|
497
504
|
setEnabled(enabled: boolean): void;
|
|
498
505
|
dispose(): Promise<void>;
|
|
499
506
|
assignPlayerContainer(playerContainer: HTMLElement): void;
|
|
@@ -605,54 +612,6 @@ export declare enum EpisodesModes {
|
|
|
605
612
|
COUNT = "COUNT",
|
|
606
613
|
SHORT = "SHORT"
|
|
607
614
|
}
|
|
608
|
-
export type IToggleable<T> = T & {
|
|
609
|
-
toggle: () => void;
|
|
610
|
-
};
|
|
611
|
-
type MicroStoreWritableBase<T = unknown> = Writable<T>;
|
|
612
|
-
type ToggleableMicroStore = IToggleable<MicroStoreWritableBase<boolean | null>>;
|
|
613
|
-
export type PictureInPictureMicroStore = {
|
|
614
|
-
isActive$: Writable<boolean>;
|
|
615
|
-
isEnabled$: Writable<boolean>;
|
|
616
|
-
type$: Writable<PictureInPictureType | undefined>;
|
|
617
|
-
};
|
|
618
|
-
export type NotificationsMicroStore = {
|
|
619
|
-
notificationsToShow$: Writable<Partial<Record<NotificationId, boolean>>>;
|
|
620
|
-
showNotification: (id: NotificationId) => void;
|
|
621
|
-
closeNotification: (id: NotificationId) => void;
|
|
622
|
-
};
|
|
623
|
-
export type PreviewPlayerMicroStore = {
|
|
624
|
-
timelineActive$: Writable<boolean>;
|
|
625
|
-
};
|
|
626
|
-
export interface IMicroStores {
|
|
627
|
-
fakeIsPlaying$: ToggleableMicroStore;
|
|
628
|
-
interactiveControlsOpacity$: ToggleableMicroStore;
|
|
629
|
-
seekToInteractiveDisabledTooltip$: MicroStoreWritableBase<SeekToInteractiveDisabledTooltipKey>;
|
|
630
|
-
showInteractiveTimeIndicatorTooltip$: MicroStoreWritableBase<boolean> & {
|
|
631
|
-
set: (newValue: boolean, useTimeout: boolean) => void;
|
|
632
|
-
clearTimeout: () => void;
|
|
633
|
-
};
|
|
634
|
-
graphIsOpened$: ToggleableMicroStore;
|
|
635
|
-
pictureInPicture$: PictureInPictureMicroStore;
|
|
636
|
-
notifications$: NotificationsMicroStore;
|
|
637
|
-
previewPlayer$: PreviewPlayerMicroStore;
|
|
638
|
-
}
|
|
639
|
-
export interface InitMicroStoreParams {
|
|
640
|
-
store: IStore;
|
|
641
|
-
microStores: IMicroStores;
|
|
642
|
-
uiConfig: IUIConfig;
|
|
643
|
-
interactiveController?: Interactives;
|
|
644
|
-
interactiveData?: IInteractiveData;
|
|
645
|
-
}
|
|
646
|
-
export interface IMicroStore<StateName extends keyof IMicroStores = keyof IMicroStores> {
|
|
647
|
-
readonly stateName: StateName;
|
|
648
|
-
state$: IMicroStores[StateName];
|
|
649
|
-
subscription: Subscription;
|
|
650
|
-
init: (initStoreParams: InitMicroStoreParams) => Subscription;
|
|
651
|
-
}
|
|
652
|
-
export type IMicroStoresRoot = {
|
|
653
|
-
subscribers: IMicroStore[];
|
|
654
|
-
stores: IMicroStores;
|
|
655
|
-
};
|
|
656
615
|
export type Position = {
|
|
657
616
|
top?: number;
|
|
658
617
|
left?: number;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ValueSubject } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import type { IDpipConfig } from "../../../config";
|
|
2
3
|
import type { ExternalPictureInPictureEventHandlers, IPictureInPictureApi, PictureInPictureSettings } from "../../../types";
|
|
3
4
|
import { PictureInPictureType } from "../../../types";
|
|
4
5
|
export declare class DocumentPictureInPictureApiSvelte implements IPictureInPictureApi {
|
|
5
|
-
|
|
6
|
+
readonly settings: PictureInPictureSettings;
|
|
6
7
|
private playerDomElement;
|
|
7
8
|
private playerParentShadowRoot;
|
|
8
9
|
private playerDummyElement;
|
|
@@ -18,7 +19,8 @@ export declare class DocumentPictureInPictureApiSvelte implements IPictureInPict
|
|
|
18
19
|
*/
|
|
19
20
|
private pipActive;
|
|
20
21
|
private readonly pipApi;
|
|
21
|
-
constructor(
|
|
22
|
+
constructor(settings: PictureInPictureSettings);
|
|
23
|
+
get dpipConfig(): IDpipConfig;
|
|
22
24
|
/**
|
|
23
25
|
* Флаг показывает, есть ли в целом возможность использовать dpip в данном браузере, поддерживается ли это.
|
|
24
26
|
*/
|
|
@@ -39,6 +41,7 @@ export declare class DocumentPictureInPictureApiSvelte implements IPictureInPict
|
|
|
39
41
|
assignPlayerContainer(playerContainer: HTMLElement): void;
|
|
40
42
|
updateVideoElement(): void;
|
|
41
43
|
setExternalEventHandlers(externalEventHandlers: ExternalPictureInPictureEventHandlers): void;
|
|
44
|
+
private get initialSize();
|
|
42
45
|
private createStretchedContainer;
|
|
43
46
|
}
|
|
44
47
|
export declare function isInstanceOfDocumentPictureInPictureApi(pictureInPictureApi?: IPictureInPictureApi): pictureInPictureApi is DocumentPictureInPictureApiSvelte;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Subscription } from "@vkontakte/videoplayer-shared";
|
|
2
|
-
import type { IMicroStore, IMicroStores, InitMicroStoreParams } from "../../types";
|
|
3
|
-
export declare class BaseMicroStore<StateName extends keyof IMicroStores = keyof IMicroStores> implements IMicroStore {
|
|
4
|
-
readonly stateName: StateName;
|
|
5
|
-
state$: IMicroStores[StateName];
|
|
6
|
-
subscription: Subscription;
|
|
7
|
-
init({ store, microStores, interactiveController, interactiveData }: InitMicroStoreParams): Subscription;
|
|
8
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type Writable } from "svelte/store";
|
|
2
|
-
import { BaseMicroStore } from "./base";
|
|
3
|
-
import type { InitMicroStoreParams, IToggleable } from "../../types";
|
|
4
|
-
import type { Subscription } from "@vkontakte/videoplayer-shared";
|
|
5
|
-
type ToggleableMicroStore = IToggleable<Writable<boolean | null>>;
|
|
6
|
-
export default class FakeIsPlaying extends BaseMicroStore {
|
|
7
|
-
readonly stateName = "fakeIsPlaying$";
|
|
8
|
-
state$: ToggleableMicroStore;
|
|
9
|
-
init(initStoreParams: InitMicroStoreParams): Subscription;
|
|
10
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type Writable } from "svelte/store";
|
|
2
|
-
import type { Subscription } from "@vkontakte/videoplayer-shared";
|
|
3
|
-
import { BaseMicroStore } from "./base";
|
|
4
|
-
import type { InitMicroStoreParams, IToggleable } from "../../types";
|
|
5
|
-
import { GridTypes } from "../../constans";
|
|
6
|
-
type ToggleableMicroStore = IToggleable<Writable<boolean | null>>;
|
|
7
|
-
export default class GraphIsOpened extends BaseMicroStore {
|
|
8
|
-
readonly stateName = "graphIsOpened$";
|
|
9
|
-
private graphMadePause;
|
|
10
|
-
state$: ToggleableMicroStore;
|
|
11
|
-
checkIfShouldHide: (currentGridType: GridTypes) => boolean;
|
|
12
|
-
init(initStoreParams: InitMicroStoreParams): Subscription;
|
|
13
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type Writable } from "svelte/store";
|
|
2
|
-
import { BaseMicroStore } from "./base";
|
|
3
|
-
import type { InitMicroStoreParams, IToggleable } from "../../types";
|
|
4
|
-
import type { Subscription } from "@vkontakte/videoplayer-shared";
|
|
5
|
-
type ToggleableMicroStore = IToggleable<Writable<boolean | null>>;
|
|
6
|
-
export default class InteractiveControlsOpacity extends BaseMicroStore {
|
|
7
|
-
readonly stateName = "interactiveControlsOpacity$";
|
|
8
|
-
state$: ToggleableMicroStore;
|
|
9
|
-
init(initStoreParams: InitMicroStoreParams): Subscription;
|
|
10
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BaseMicroStore } from "./base";
|
|
2
|
-
import { type InitMicroStoreParams, type NotificationsMicroStore } from "../../types";
|
|
3
|
-
import type { Subscription } from "@vkontakte/videoplayer-shared";
|
|
4
|
-
export default class Notifications extends BaseMicroStore {
|
|
5
|
-
readonly stateName = "notifications$";
|
|
6
|
-
private notificationManager;
|
|
7
|
-
state$: NotificationsMicroStore;
|
|
8
|
-
init(initStoreParams: InitMicroStoreParams): Subscription;
|
|
9
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { BaseMicroStore } from "./base";
|
|
2
|
-
import type { InitMicroStoreParams, PictureInPictureMicroStore } from "../../types";
|
|
3
|
-
import type { Subscription } from "@vkontakte/videoplayer-shared";
|
|
4
|
-
export default class PictureInPicture extends BaseMicroStore {
|
|
5
|
-
readonly stateName = "pictureInPicture$";
|
|
6
|
-
state$: PictureInPictureMicroStore;
|
|
7
|
-
init(initStoreParams: InitMicroStoreParams): Subscription;
|
|
8
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BaseMicroStore } from "./base";
|
|
2
|
-
import { type Writable } from "svelte/store";
|
|
3
|
-
import type { SeekToInteractiveDisabledTooltipKey } from "../../constans";
|
|
4
|
-
import type { InitMicroStoreParams } from "../../types";
|
|
5
|
-
import type { Subscription } from "@vkontakte/videoplayer-shared";
|
|
6
|
-
export default class SeekToInteractiveDisabledTooltip extends BaseMicroStore {
|
|
7
|
-
readonly stateName = "seekToInteractiveDisabledTooltip$";
|
|
8
|
-
state$: Writable<SeekToInteractiveDisabledTooltipKey>;
|
|
9
|
-
init(initStoreParams: InitMicroStoreParams): Subscription;
|
|
10
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type Writable } from "svelte/store";
|
|
2
|
-
import { BaseMicroStore } from "./base";
|
|
3
|
-
import type { InitMicroStoreParams } from "../../types";
|
|
4
|
-
import type { Subscription } from "@vkontakte/videoplayer-shared";
|
|
5
|
-
type ShowInteractiveTimeIndicatorTooltipState = Writable<boolean> & {
|
|
6
|
-
set: (newValue: boolean, useTimeout?: boolean) => void;
|
|
7
|
-
clearTimeout: () => void;
|
|
8
|
-
};
|
|
9
|
-
export default class ShowInteractiveTimeIndicatorTooltip extends BaseMicroStore {
|
|
10
|
-
readonly stateName = "showInteractiveTimeIndicatorTooltip$";
|
|
11
|
-
private timeout;
|
|
12
|
-
state$: ShowInteractiveTimeIndicatorTooltipState;
|
|
13
|
-
init(initStoreParams: InitMicroStoreParams): Subscription;
|
|
14
|
-
clearTimeout(): void;
|
|
15
|
-
}
|