@vkontakte/videoplayer 1.1.64-dev.dae0b8a8.0 → 1.1.64-dev.dc6a30a0.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 +70 -71
- package/es2015.esm.js +70 -71
- package/es2018.cjs.js +70 -71
- package/es2018.esm.js +70 -71
- package/es2024.cjs.js +70 -71
- package/es2024.esm.js +70 -71
- package/esnext.cjs.js +70 -71
- package/esnext.esm.js +70 -71
- package/evergreen.esm.js +70 -71
- package/package.json +5 -5
- package/types/VKVideoPlayer/index.svelte.d.ts +10 -3
- package/types/components/Menus/subMenuTabs/rootMenuItems.d.ts +0 -1
- package/types/components/Menus/subMenuTabs/types.d.ts +1 -0
- package/types/components/Root/types.d.ts +5 -2
- package/types/config.d.ts +8 -0
- package/types/constans/subtitles.d.ts +1 -0
- package/types/services/statistics.d.ts +6 -6
- package/types/store/index.d.ts +8 -0
- package/types/store/utils.d.ts +1 -1
- package/types/translation/types.d.ts +1 -1
- package/types/types/index.d.ts +3 -0
- package/types/utils/changeVolume.d.ts +6 -3
- package/types/utils/webAPI/slotsApi.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer",
|
|
3
|
-
"version": "1.1.64-dev.
|
|
3
|
+
"version": "1.1.64-dev.dc6a30a0.0",
|
|
4
4
|
"author": "vk.com",
|
|
5
5
|
"description": "Videoplayer based on the vk.com platform",
|
|
6
6
|
"homepage": "https://vk.com",
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
],
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@adtech/rbadman": "2.2.57",
|
|
58
|
-
"@vkontakte/videoplayer-core": "2.0.134-dev.
|
|
59
|
-
"@vkontakte/videoplayer-interactive": "1.0.39-dev.
|
|
60
|
-
"@vkontakte/videoplayer-shared": "1.0.62-dev.
|
|
61
|
-
"@vkontakte/videoplayer-statistics": "1.0.80-dev.
|
|
58
|
+
"@vkontakte/videoplayer-core": "2.0.134-dev.51cb11d6.0",
|
|
59
|
+
"@vkontakte/videoplayer-interactive": "1.0.39-dev.611ad1c8.0",
|
|
60
|
+
"@vkontakte/videoplayer-shared": "1.0.62-dev.ab831acf.0",
|
|
61
|
+
"@vkontakte/videoplayer-statistics": "1.0.80-dev.4094eb5b.0"
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -5,7 +5,6 @@ import { type QualityLimits } from '@vkontakte/videoplayer-shared';
|
|
|
5
5
|
import { InterfaceLanguage } from '@vkontakte/videoplayer-shared';
|
|
6
6
|
import { type PlaybackRate } from '@vkontakte/videoplayer-core';
|
|
7
7
|
import type { IStatContext } from '@vkontakte/videoplayer-statistics';
|
|
8
|
-
import { ThinOneStat } from '@vkontakte/videoplayer-statistics';
|
|
9
8
|
import { AnnotationsApi } from '../utils/webAPI/annotationsApi/annotationsApi';
|
|
10
9
|
import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem } from '../components/Menus/subMenuTabs/types';
|
|
11
10
|
import type { AdditionalButton } from '../components/Controls/types';
|
|
@@ -53,7 +52,6 @@ export declare class VKVideoPlayer extends HTMLElement {
|
|
|
53
52
|
private isControlDisabled;
|
|
54
53
|
private getNextVideoInfo;
|
|
55
54
|
private createOneStat;
|
|
56
|
-
private createThinOneStat;
|
|
57
55
|
private createPlayer;
|
|
58
56
|
private addPlayerInfoSubscriptions;
|
|
59
57
|
playNextVideo(): void;
|
|
@@ -82,6 +80,8 @@ export declare class VKVideoPlayer extends HTMLElement {
|
|
|
82
80
|
stop(): void;
|
|
83
81
|
setMuted(muted: boolean): void;
|
|
84
82
|
toggleSubtitle(): void;
|
|
83
|
+
hideControls(): void;
|
|
84
|
+
showControls(): void;
|
|
85
85
|
setPiPEnabled(enabled: boolean): void;
|
|
86
86
|
setVolume(volume: number): void;
|
|
87
87
|
setRepeat(repeat: boolean): void;
|
|
@@ -114,9 +114,16 @@ export declare class VKVideoPlayer extends HTMLElement {
|
|
|
114
114
|
updateAdditionalButton(itemId: string, fields: Partial<Omit<AdditionalButton, 'id' | 'type'>>): void;
|
|
115
115
|
addAdditionalButton(newButton: AdditionalButton): void;
|
|
116
116
|
removeAdditionalButton(itemId: string): void;
|
|
117
|
-
updateStatContext(statContext: Partial<IStatContext
|
|
117
|
+
updateStatContext(statContext: Partial<IStatContext>): void;
|
|
118
118
|
handleTimerNextVideo(state: boolean): void;
|
|
119
119
|
togglePictureInPicture(): void;
|
|
120
120
|
focus(): void;
|
|
121
|
+
/**
|
|
122
|
+
* Обработка внешнего события клавиатуры.
|
|
123
|
+
* Метод preventDefault не будет вызван при обработке внешего события.
|
|
124
|
+
* @param {KeyboardEvent} event Событие из внешнего обработчика
|
|
125
|
+
* @returns {boolean} Было ли событие обработано внутри плеера
|
|
126
|
+
*/
|
|
127
|
+
handleExternalKeyboardEvent(event: KeyboardEvent): boolean;
|
|
121
128
|
private unmountComponent;
|
|
122
129
|
}
|
|
@@ -58,13 +58,16 @@ export interface RootExports {
|
|
|
58
58
|
pause: () => void;
|
|
59
59
|
setMuted: (muted: boolean) => void;
|
|
60
60
|
toggleSubtitle: () => void;
|
|
61
|
+
hideControls: () => void;
|
|
62
|
+
showControls: () => void;
|
|
61
63
|
setVolume: (volume: number) => void;
|
|
62
64
|
seekTime: (time: number) => void;
|
|
63
65
|
seekEpisodeStartTime: (time: number) => void;
|
|
64
66
|
returnFocusToEpisodes: () => void;
|
|
65
67
|
setPlaybackRate: (playbackRate: PlaybackRate) => void;
|
|
66
68
|
setAutoQualityLimits: (limits: QualityLimits) => void;
|
|
67
|
-
keyboardControls
|
|
69
|
+
keyboardControls?: {
|
|
68
70
|
focus: () => void;
|
|
69
|
-
|
|
71
|
+
handleExternalKeyboardEvent: (event: KeyboardEvent) => boolean;
|
|
72
|
+
};
|
|
70
73
|
}
|
package/types/config.d.ts
CHANGED
|
@@ -109,6 +109,7 @@ export interface IUIConfig {
|
|
|
109
109
|
episodesClustering: boolean;
|
|
110
110
|
copyVideoLink: boolean;
|
|
111
111
|
videoRotate: boolean;
|
|
112
|
+
tracer: boolean;
|
|
112
113
|
interactiveGraph: boolean;
|
|
113
114
|
interactiveResponsiveUi?: boolean;
|
|
114
115
|
seekToInteractive: boolean;
|
|
@@ -122,6 +123,7 @@ export interface IUIConfig {
|
|
|
122
123
|
interactiveControlsExpectTimeBlinkAnimation: boolean;
|
|
123
124
|
interactiveControlsTapPlace: boolean;
|
|
124
125
|
interactiveControlsFillAnimation: boolean;
|
|
126
|
+
interactiveControlsHideAnimation: boolean;
|
|
125
127
|
thumbTimer: boolean;
|
|
126
128
|
hotKeyMapModal: boolean;
|
|
127
129
|
hotKeyHelpers: boolean;
|
|
@@ -182,6 +184,12 @@ export interface IUIConfig {
|
|
|
182
184
|
buttonColor: string | null;
|
|
183
185
|
buttonToggleOnColor: string | null;
|
|
184
186
|
focusedColor: string | null;
|
|
187
|
+
font: string | null;
|
|
188
|
+
focusedOutlineWidth: string | null;
|
|
189
|
+
focusedOutlineRadius: string | null;
|
|
190
|
+
controlsDesktopPaddingHorizontal: string | null;
|
|
191
|
+
timelinePaddingHorizontal: string | null;
|
|
192
|
+
settingsBackgroundColor: string | null;
|
|
185
193
|
};
|
|
186
194
|
}
|
|
187
195
|
export declare const defaultConfig: IUIConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SUBTITLE_OFF_VALUE = "off";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { type ISubscription } from '@vkontakte/videoplayer-shared';
|
|
2
|
-
import { type IOneStat, type
|
|
2
|
+
import { type IOneStat, type IMediascopePixel } from '@vkontakte/videoplayer-statistics';
|
|
3
3
|
export interface IUIStatistics {
|
|
4
4
|
statSubscription: ISubscription;
|
|
5
|
-
oneStat
|
|
6
|
-
|
|
5
|
+
oneStat: IOneStat;
|
|
6
|
+
mediascopePixel?: IMediascopePixel;
|
|
7
7
|
destroy: () => void;
|
|
8
8
|
}
|
|
9
9
|
export declare class UIOneStat implements IUIStatistics {
|
|
10
|
-
oneStat
|
|
11
|
-
|
|
10
|
+
oneStat: IOneStat;
|
|
11
|
+
mediascopePixel?: IMediascopePixel | undefined;
|
|
12
12
|
statSubscription: ISubscription;
|
|
13
|
-
constructor(oneStat
|
|
13
|
+
constructor(oneStat: IOneStat, mediascopePixel?: IMediascopePixel | undefined, statSubscription?: ISubscription);
|
|
14
14
|
destroy(): void;
|
|
15
15
|
}
|
package/types/store/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ import { GridTypes, type PlayPrevChapterDisabledTooltipKey } from '../constans';
|
|
|
15
15
|
import { UIOneStat } from '../services/statistics';
|
|
16
16
|
import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem, ContextMenuItem, SettingsMenuItem } from '../components/Menus/subMenuTabs/types';
|
|
17
17
|
import type { AdditionalButton, AdditionalDesktopControlPanelButton } from '../components/Controls/types';
|
|
18
|
+
import type { SlotsApi } from '../utils/webAPI/slotsApi';
|
|
18
19
|
type Info = {
|
|
19
20
|
appliesTo?: QualitySettingsAppliesTo;
|
|
20
21
|
changeReason?: 'default' | 'limit-changed';
|
|
@@ -30,6 +31,10 @@ export interface IAdsState {
|
|
|
30
31
|
export interface IUIState {
|
|
31
32
|
t: (key: Key, params?: Record<string, string>) => string;
|
|
32
33
|
controlsVisible: Writable<boolean>;
|
|
34
|
+
/**
|
|
35
|
+
* Определяет, могут ли вообще контролы быть показаны.
|
|
36
|
+
*/
|
|
37
|
+
isControlsAvailable: Writable<boolean>;
|
|
33
38
|
touched: Writable<boolean>;
|
|
34
39
|
controls: {
|
|
35
40
|
prevButton: Writable<IControlInfo | undefined>;
|
|
@@ -121,6 +126,7 @@ export interface IUIState {
|
|
|
121
126
|
export interface IWebApi {
|
|
122
127
|
pictureInPictureApi?: IPictureInPictureApi;
|
|
123
128
|
annotationsApi?: IAnnotationsApi;
|
|
129
|
+
slotsApi?: SlotsApi;
|
|
124
130
|
}
|
|
125
131
|
export interface IStore {
|
|
126
132
|
initVideo: (config: IConfig & {
|
|
@@ -300,6 +306,8 @@ export interface IStore {
|
|
|
300
306
|
addAdditionalButton: (newButton: AdditionalButton) => void;
|
|
301
307
|
removeAdditionalButton: (itemId: string) => void;
|
|
302
308
|
setLiveLowLatency: (isLowLatency: boolean) => void;
|
|
309
|
+
hideControls: () => void;
|
|
310
|
+
showControls: () => void;
|
|
303
311
|
};
|
|
304
312
|
};
|
|
305
313
|
callbacks?: IVKVideoPlayerCallbacks;
|
package/types/store/utils.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export declare const getMicroStores: () => IMicroStores;
|
|
|
12
12
|
*/
|
|
13
13
|
export declare const storeFromObservable: <T>(observable$: IValueObservable<T>, onNewValueEmitted?: (value: T) => void) => Readable<T>;
|
|
14
14
|
export declare const storeFromObservableWithInitValue: <T>(observable$: IObservable<T>, initValue: T, onNewValueEmitted?: (value: T) => void) => Readable<T>;
|
|
15
|
-
export declare const constructDebugTextData: (player: IPlayer, config: IConfig, store: IStore) => string;
|
|
15
|
+
export declare const constructDebugTextData: (player: IPlayer, config: IConfig, store: IStore, traceId: string) => string;
|
|
16
16
|
export type DebugData = {
|
|
17
17
|
version: string;
|
|
18
18
|
viewport: string;
|
|
@@ -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' | '
|
|
2
|
+
export type Key = 'auto_quality_invariant' | 'auto_quality' | 'menu_quality' | 'menu_playback_rate' | 'menu_traffic_saving' | 'menu_report' | 'menu_pip' | 'menu_copy_video_link' | 'menu_copy_video_link_with_timestamp' | 'menu_video_rotate' | 'menu_video_loop_on' | 'menu_video_loop_off' | 'menu_chromecast' | 'menu_copy_debug' | 'menu_save_debug' | 'menu_debug_overlay' | 'menu_copy_embed_code' | 'pip_dummy_title' | 'submenu_traffic_saving' | 'submenu_quality' | 'submenu_playback_rate' | 'submenu_settings' | 'submenu_audio_languages' | 'auto_quality_option' | 'mobile_unmute' | 'playing_ads' | 'skip_ads_now' | 'skip_ads_after' | 'visit_advertiser' | 'aria_timeline' | 'aria_timeline_value' | 'doubletap_seek_step' | 'playback_rate_1' | 'playback_rate' | 'video360' | 'subtitles_caption' | 'subtitles_auto' | 'subtitles_off' | 'subtitles_auto_caption' | 'subtitles_turn_on' | 'subtitles_turn_off' | 'traffic_saving_off' | 'traffic_saving_on' | 'traffic_saving_helper_text' | 'tooltip_previous' | 'tooltip_restart' | 'tooltip_play' | 'tooltip_pause' | 'tooltip_next' | 'tooltip_button_disabled' | 'tooltip_interactive_go_back' | 'tooltip_interactive_go_back_disabled' | 'tooltip_interactive_go_back_disabled_first' | 'tooltip_interactive_go_back_disabled_limit' | 'tooltip_chapter_without_interactive' | 'tooltip_interactive_of_chapter_completed' | 'tooltip_interactive_seek' | 'tooltip_interactive_graph_off' | 'tooltip_interactive_graph_on' | 'tooltip_live' | 'tooltip_episodes' | 'tooltip_volume_on' | 'tooltip_volume_muted' | 'tooltip_sound_unavailable' | 'tooltip_settings_on' | 'tooltip_subtitles_off' | 'tooltip_settings_off' | 'tooltip_subtitles_on' | 'tooltip_fullscreen_off' | 'tooltip_fullscreen_on' | 'tooltip_chromecast_off' | 'tooltip_chromecast_on' | 'tooltip_episode_finished' | 'tooltip_episode_unfinished' | 'tooltip_disabled_when_interactive' | 'tooltip_disabled_when_graph_on' | 'tooltip_interactive_interaction_time_indicator' | 'tooltip_vk_logo' | 'tooltip_vk_video_logo' | 'tooltip_autoplay_off' | 'tooltip_autoplay_on' | 'tooltip_context_menu_open' | 'tooltip_context_menu_close' | 'download_video_caption' | 'hotkey_helper_current_volume' | 'hotkey_map_modal_title' | 'hotkey_map_modal_close_btn_text' | 'hotkey_map_group_title_common' | 'hotkey_map_group_title_playback' | 'hotkey_map_group_title_subtitles' | 'hotkey_map_group_title_episodes' | 'hotkey_map_item_mute_description' | 'hotkey_map_item_mute_value' | 'hotkey_map_item_volume_down_description' | 'hotkey_map_item_volume_down_value' | 'hotkey_map_item_volume_up_description' | 'hotkey_map_item_volume_up_value' | 'hotkey_map_item_pip_description' | 'hotkey_map_item_pip_value' | 'hotkey_map_item_full_screen_description' | 'hotkey_map_item_full_screen_value' | 'hotkey_map_item_show_context_menu_description' | 'hotkey_map_item_show_context_menu_value' | 'hotkey_map_item_show_hotkey_map_description' | 'hotkey_map_item_show_hotkey_map_value' | 'hotkey_map_item_play_toggle_description' | 'hotkey_map_item_play_toggle_value' | 'hotkey_map_item_seek_backward_description' | 'hotkey_map_item_seek_backward_value' | 'hotkey_map_item_seek_forward_description' | 'hotkey_map_item_seek_forward_value' | 'hotkey_map_item_fast_seek_backward_description' | 'hotkey_map_item_fast_seek_backward_value' | 'hotkey_map_item_fast_seek_forward_description' | 'hotkey_map_item_fast_seek_forward_value' | 'hotkey_map_item_rate_down_description' | 'hotkey_map_item_rate_down_value' | 'hotkey_map_item_rate_up_description' | 'hotkey_map_item_rate_up_value' | 'hotkey_map_item_prev_frame_description' | 'hotkey_map_item_prev_frame_value' | 'hotkey_map_item_next_frame_description' | 'hotkey_map_item_next_frame_value' | 'hotkey_map_item_jump_seek_description' | 'hotkey_map_item_jump_seek_value' | 'hotkey_map_item_subtitles_toggle_description' | 'hotkey_map_item_subtitles_toggle_value' | 'hotkey_map_item_prev_episode_description' | 'hotkey_map_item_prev_episode_pc_value' | 'hotkey_map_item_prev_episode_mac_value' | 'hotkey_map_item_next_episode_description' | 'hotkey_map_item_next_episode_pc_value' | 'hotkey_map_item_next_episode_mac_value' | 'hotkey_map_item_next_video_description' | 'hotkey_map_item_next_video_value' | 'hotkey_map_item_prev_video_description' | 'hotkey_map_item_prev_video_value' | 'waiting_live_day_value' | 'waiting_live_hour_value' | 'waiting_live_minute_value' | 'waiting_live_second_value' | 'waiting_live_colon' | 'waiting_live_upcoming_title' | 'waiting_live_timer_title' | 'waiting_live_recover_title' | 'waiting_record_title' | 'aria_label_submenu_traffic_saving' | 'aria_label_submenu_back' | 'aria_label_menu_quality' | 'aria_label_menu_rate' | 'aria_label_menu_subtitle' | 'aria_label_menu_download' | 'aria_label_new_tab_alert' | 'aria_label_menu_debug_overlay' | 'aria_label_menu_rotate' | 'aria_label_menu_loop' | 'aria_label_debug_panel' | 'aria_label_context_menu' | 'aria_label_video_player' | 'aria_label_spherical_control' | 'aria_label_menu_audio_languages' | 'aria_label_volume' | 'aria_label_settings' | 'menu_audio_languages' | 'audio_stream_display_language_label' | 'audio_stream_display_language_label_index' | 'audio_stream_display_label_index' | 'audio_stream_display_language_index' | 'audio_stream_display_unknown' | 'end_screen_next_video' | 'end_screen_recommended_video' | 'other_quality' | 'high_quality' | 'high_quality_description' | 'auto_quality_limit' | 'traffic_saving_quality' | 'traffic_saving_quality_description' | 'quality_applience' | 'quality_applience_action' | 'default_quality_for_any_video' | 'slow_video_notification_button' | 'slow_video_notification_force_description' | 'slow_video_notification_suggest_description';
|
|
3
3
|
export type LanguagePack = Record<Key, string>;
|
|
4
4
|
export type LanguageConfig = {
|
|
5
5
|
language: string;
|
package/types/types/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { VideoQuality, VideoFormat, ISources, IExternalTextTrack } from '@v
|
|
|
2
2
|
import type { IValueObservable, InterfaceLanguage, Subscription, IRectangle, DevNullEntry } from '@vkontakte/videoplayer-shared';
|
|
3
3
|
import type { Manifest, VideoInfo, Interactives, IInteractiveOptions } from '@vkontakte/videoplayer-interactive';
|
|
4
4
|
import { PlaybackState } from '@vkontakte/videoplayer-core';
|
|
5
|
+
import type { MediascopePixelTypes } from '@vkontakte/videoplayer-statistics';
|
|
5
6
|
import type { Writable, Readable } from 'svelte/store';
|
|
6
7
|
import type { ISDKConfig, IUIConfig } from '../config';
|
|
7
8
|
import type { IStore } from '../store';
|
|
@@ -21,6 +22,7 @@ export declare const enum AdditionalVideoQuality {
|
|
|
21
22
|
export type VideoQualityUI = VideoQuality | AdditionalVideoQuality;
|
|
22
23
|
export interface IVKVideoPlayerCallbacks {
|
|
23
24
|
onInited?: () => void;
|
|
25
|
+
onDomReady?: () => void;
|
|
24
26
|
onStarted?: () => void;
|
|
25
27
|
onEnded?: () => void;
|
|
26
28
|
onPlay?: () => void;
|
|
@@ -283,6 +285,7 @@ export interface IVKVideoPlayerConfig {
|
|
|
283
285
|
showNextPrevButtons?: boolean;
|
|
284
286
|
pipEnabled?: boolean;
|
|
285
287
|
playerView?: VideoPlayerView;
|
|
288
|
+
mediascopePixels?: MediascopePixelTypes.Pixel[];
|
|
286
289
|
}
|
|
287
290
|
export interface IControlInfo {
|
|
288
291
|
left: number;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
type Params = {
|
|
2
2
|
isAudioDisabled: boolean;
|
|
3
|
-
audioDisabledHintCallback?: () => void;
|
|
4
3
|
isAudioAvailable: boolean;
|
|
4
|
+
isAds: boolean;
|
|
5
|
+
audioDisabledHintCallback?: () => void;
|
|
5
6
|
audioIsNotExistHintCallback?: () => void;
|
|
6
|
-
}
|
|
7
|
+
};
|
|
8
|
+
export declare const isAvailableVolumeChange: ({ isAudioDisabled, isAudioAvailable, isAds, audioDisabledHintCallback, audioIsNotExistHintCallback, }: Params) => boolean;
|
|
9
|
+
export {};
|