@vkontakte/videoplayer 1.1.72-dev.48273beb.0 → 1.1.72-dev.752fa0a9.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 +66 -67
- package/es2015.esm.js +66 -67
- package/es2018.cjs.js +66 -67
- package/es2018.esm.js +66 -67
- package/es2024.cjs.js +66 -67
- package/es2024.esm.js +66 -67
- package/esnext.cjs.js +66 -67
- package/esnext.esm.js +66 -67
- package/evergreen.esm.js +66 -67
- package/package.json +5 -5
- package/types/components/Ads/admanWrapper.d.ts +34 -6
- package/types/components/Root/types.d.ts +5 -7
- package/types/config.d.ts +4 -1
- package/types/index.d.ts +2 -3
- package/types/store/index.d.ts +5 -0
- package/types/translation/types.d.ts +1 -1
- package/types/types/index.d.ts +4 -5
- package/types/components/Ads/types.d.ts +0 -38
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer",
|
|
3
|
-
"version": "1.1.72-dev.
|
|
3
|
+
"version": "1.1.72-dev.752fa0a9.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.141-dev.
|
|
59
|
-
"@vkontakte/videoplayer-interactive": "1.0.47-dev.
|
|
60
|
-
"@vkontakte/videoplayer-shared": "1.0.69-dev.
|
|
61
|
-
"@vkontakte/videoplayer-statistics": "1.0.87-dev.
|
|
58
|
+
"@vkontakte/videoplayer-core": "2.0.141-dev.752fa0a9.0",
|
|
59
|
+
"@vkontakte/videoplayer-interactive": "1.0.47-dev.752fa0a9.0",
|
|
60
|
+
"@vkontakte/videoplayer-shared": "1.0.69-dev.752fa0a9.0",
|
|
61
|
+
"@vkontakte/videoplayer-statistics": "1.0.87-dev.752fa0a9.0"
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -1,9 +1,39 @@
|
|
|
1
|
+
import type { Readable } from 'svelte/store';
|
|
1
2
|
import type { AdsTimeRemained } from '../../types';
|
|
2
3
|
import { AdsSection } from '../../types';
|
|
3
|
-
import {
|
|
4
|
+
import type { AdsParams } from '../../types';
|
|
5
|
+
import { type ILogger, type Milliseconds } from '@vkontakte/videoplayer-shared';
|
|
4
6
|
import { Subject } from '@vkontakte/videoplayer-shared';
|
|
5
7
|
import type { IAdsState } from '../../store';
|
|
6
|
-
|
|
8
|
+
type ExternalActions = {
|
|
9
|
+
switchFromAdsToVideo: (callPlay?: boolean) => void;
|
|
10
|
+
switchFromVideoToAds: () => void;
|
|
11
|
+
setMuted: (muted: boolean) => void;
|
|
12
|
+
};
|
|
13
|
+
export type AdmanInitParams = {
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
isFullscreen: boolean;
|
|
17
|
+
isAutoplay: boolean;
|
|
18
|
+
slotId: number;
|
|
19
|
+
params?: AdsParams;
|
|
20
|
+
duration: number;
|
|
21
|
+
previewParam?: number;
|
|
22
|
+
adsContainer: HTMLElement;
|
|
23
|
+
adsVideoElement: HTMLVideoElement;
|
|
24
|
+
};
|
|
25
|
+
type IPlayerState = {
|
|
26
|
+
vsid: Readable<string | undefined>;
|
|
27
|
+
};
|
|
28
|
+
interface IConfig {
|
|
29
|
+
loadTimeout: Milliseconds;
|
|
30
|
+
initTimeout: Milliseconds;
|
|
31
|
+
runtimeTimeout: Milliseconds;
|
|
32
|
+
useAdmanFromNPM: boolean;
|
|
33
|
+
volumeMultiplier: number;
|
|
34
|
+
isVsidOriginal: boolean;
|
|
35
|
+
usePuid: boolean;
|
|
36
|
+
}
|
|
7
37
|
export declare class AdmanWrapper {
|
|
8
38
|
private adman;
|
|
9
39
|
private initialVolume;
|
|
@@ -21,9 +51,7 @@ export declare class AdmanWrapper {
|
|
|
21
51
|
private useAdmanFromNPM;
|
|
22
52
|
private isVsidOriginal;
|
|
23
53
|
private usePuid;
|
|
24
|
-
private debug;
|
|
25
54
|
private watchDogTimeout;
|
|
26
|
-
private externalApi?;
|
|
27
55
|
events: {
|
|
28
56
|
init$: Subject<number>;
|
|
29
57
|
loadStarted$: Subject<void>;
|
|
@@ -48,7 +76,7 @@ export declare class AdmanWrapper {
|
|
|
48
76
|
loadAdmanMailRu: (abortSignal: AbortSignal) => Promise<void>;
|
|
49
77
|
private loadAdmanNPM;
|
|
50
78
|
onAdmanLoadingError(): void;
|
|
51
|
-
initAdman(initParams: AdmanInitParams):
|
|
79
|
+
initAdman(initParams: AdmanInitParams): void;
|
|
52
80
|
private switchToVideo;
|
|
53
81
|
private setPostrollPassed;
|
|
54
82
|
togglePlay(): void;
|
|
@@ -75,5 +103,5 @@ export declare class AdmanWrapper {
|
|
|
75
103
|
skip(): void;
|
|
76
104
|
setPosition(position: number, duration: number): void;
|
|
77
105
|
destroy(): void;
|
|
78
|
-
private safeExternalCall;
|
|
79
106
|
}
|
|
107
|
+
export {};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { IExternalTextTrack, ISources, PlaybackRate } from '@vkontakte/videoplayer-core';
|
|
2
2
|
import type { IStore } from '../../store';
|
|
3
|
-
import type { IMicroStoresRoot, IVideoLive, IVKVideoPlayerConfig } from '../../types';
|
|
3
|
+
import type { AdsParams, IMicroStoresRoot, IVideoLive, IVKVideoPlayerConfig } from '../../types';
|
|
4
4
|
import type { IUIConfig } from '../../config';
|
|
5
5
|
import type { Interactives } from '@vkontakte/videoplayer-interactive';
|
|
6
6
|
import KeyboardControls from '../KeyboardControls.svelte';
|
|
7
7
|
import type { QualityLimits } from '@vkontakte/videoplayer-shared';
|
|
8
|
-
import type { AdmanInitParams } from '../Ads/types';
|
|
9
8
|
export interface RootProps {
|
|
10
9
|
sources: ISources | undefined;
|
|
11
10
|
store: IStore;
|
|
@@ -25,11 +24,10 @@ export interface RootProps {
|
|
|
25
24
|
fromTime: number;
|
|
26
25
|
canRewindLive: boolean;
|
|
27
26
|
showAds: boolean;
|
|
28
|
-
adsSlotId?:
|
|
29
|
-
adsParams?:
|
|
30
|
-
adsPreviewParam?:
|
|
31
|
-
adsAutoplayParam?:
|
|
32
|
-
adsExternalApi?: AdmanInitParams['externalApi'];
|
|
27
|
+
adsSlotId?: number | undefined;
|
|
28
|
+
adsParams?: AdsParams | undefined;
|
|
29
|
+
adsPreviewParam?: number | undefined;
|
|
30
|
+
adsAutoplayParam?: boolean;
|
|
33
31
|
duration?: number | undefined;
|
|
34
32
|
logoClickable: boolean;
|
|
35
33
|
logoHidden: boolean;
|
package/types/config.d.ts
CHANGED
|
@@ -39,7 +39,6 @@ export interface IUIConfig {
|
|
|
39
39
|
volumeMultiplier: number;
|
|
40
40
|
isVsidOriginal: boolean;
|
|
41
41
|
usePuid: boolean;
|
|
42
|
-
debug: boolean;
|
|
43
42
|
};
|
|
44
43
|
/**
|
|
45
44
|
* Если нет ранее сохранённого значения громкости будет использовано это
|
|
@@ -191,6 +190,10 @@ export interface IUIConfig {
|
|
|
191
190
|
* сохраняет выбранные состояния плеера в localStorage только от user actions
|
|
192
191
|
*/
|
|
193
192
|
savePreferredStatesOnUserActionOnly: boolean;
|
|
193
|
+
/**
|
|
194
|
+
* Включает возмодность х2 перемотки на горячие клавиши.
|
|
195
|
+
*/
|
|
196
|
+
doubleForwardAvailable: boolean;
|
|
194
197
|
};
|
|
195
198
|
interactive: {
|
|
196
199
|
historyMaxLength: number;
|
package/types/index.d.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { VKVideoPlayer } from './VKVideoPlayer/index.svelte';
|
|
2
|
-
import type { IVKVideoPlayerConfig, IControlInfo, IUpcomingLiveViewControlInfo, IVKVideoPlayerCallbacks, IVideoData, HotKeyMapData, HotKeyMapItem, HotKeyMapGroup, IVideoLive, IInteractiveData, AdditionalButtonDeprecated, IVideoEpisode, VideoPlayerView } from './types';
|
|
2
|
+
import type { IVKVideoPlayerConfig, IControlInfo, IUpcomingLiveViewControlInfo, IVKVideoPlayerCallbacks, IVideoData, AdsParams, HotKeyMapData, HotKeyMapItem, HotKeyMapGroup, IVideoLive, IInteractiveData, AdditionalButtonDeprecated, IVideoEpisode, VideoPlayerView } from './types';
|
|
3
3
|
import type { LanguagePack, LanguageConfig } from './translation/types';
|
|
4
4
|
import type { ISDKConfig } from './config';
|
|
5
|
-
import type { AdsParams, IAdmanInitParamsExternalApi } from './components/Ads/types';
|
|
6
5
|
import type { ISources, IDashSource, URLSource, RawSource, URLSourceWithSeek } from '@vkontakte/videoplayer-core';
|
|
7
6
|
import type { Milliseconds, QualityLimits } from '@vkontakte/videoplayer-shared';
|
|
8
7
|
export { VERSION } from './env';
|
|
9
8
|
export declare const registerPlayerWebComponent: () => void;
|
|
10
9
|
export { type AdditionalSettingsMenuItem, MenuItemType, type AdditionalClickSettingsMenuItem, type AdditionalSwitchSettingsMenuItem, type AdditionalContextMenuItem, } from './components/Menus/subMenuTabs/types';
|
|
11
10
|
export { type AdditionalButton, ControlButtonType, } from './components/Controls/types';
|
|
12
|
-
export type { VKVideoPlayer, IVKVideoPlayerConfig, IControlInfo, IUpcomingLiveViewControlInfo, IVKVideoPlayerCallbacks, IVideoData, AdsParams, HotKeyMapData, HotKeyMapItem, HotKeyMapGroup, ISources, IDashSource, URLSource, RawSource, URLSourceWithSeek, LanguagePack, LanguageConfig, Milliseconds, IVideoLive, IInteractiveData, AdditionalButtonDeprecated, QualityLimits, IVideoEpisode, ISDKConfig, VideoPlayerView,
|
|
11
|
+
export type { VKVideoPlayer, IVKVideoPlayerConfig, IControlInfo, IUpcomingLiveViewControlInfo, IVKVideoPlayerCallbacks, IVideoData, AdsParams, HotKeyMapData, HotKeyMapItem, HotKeyMapGroup, ISources, IDashSource, URLSource, RawSource, URLSourceWithSeek, LanguagePack, LanguageConfig, Milliseconds, IVideoLive, IInteractiveData, AdditionalButtonDeprecated, QualityLimits, IVideoEpisode, ISDKConfig, VideoPlayerView, };
|
|
13
12
|
export { GridTypes, } from './constans';
|
|
14
13
|
export { PlayerPhase, } from './types';
|
|
15
14
|
export { InterfaceLanguage, VKNumericLanguage, loadVKLangPack, } from '@vkontakte/videoplayer-shared';
|
package/types/store/index.d.ts
CHANGED
|
@@ -131,6 +131,10 @@ export interface IUIState {
|
|
|
131
131
|
* Положение заголовка названия видео.
|
|
132
132
|
*/
|
|
133
133
|
videoTitleInfo: Writable<IControlInfo | undefined>;
|
|
134
|
+
/**
|
|
135
|
+
* Ускорение видео х2.
|
|
136
|
+
*/
|
|
137
|
+
doubleForwardOn$: Writable<boolean>;
|
|
134
138
|
}
|
|
135
139
|
export interface IWebApi {
|
|
136
140
|
pictureInPictureApi?: IPictureInPictureApi;
|
|
@@ -292,6 +296,7 @@ export interface IStore {
|
|
|
292
296
|
nextVideoAnnouncementClick: () => void;
|
|
293
297
|
nextVideoAnnouncementAuto: () => void;
|
|
294
298
|
nextVideoAnnouncementCancel: () => void;
|
|
299
|
+
changeDoubleForwardOn: (enabled: boolean) => void;
|
|
295
300
|
};
|
|
296
301
|
external: {
|
|
297
302
|
firstStart: (showAds: boolean) => void;
|
|
@@ -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_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';
|
|
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';
|
|
3
3
|
export type LanguagePack = Record<Key, string>;
|
|
4
4
|
export type LanguageConfig = {
|
|
5
5
|
language: string;
|
package/types/types/index.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ import type { IUIStatistics } from '../services/statistics';
|
|
|
12
12
|
import { UISentry } from '../services/sentry';
|
|
13
13
|
import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem } from '../components/Menus/subMenuTabs/types';
|
|
14
14
|
import type { AdditionalDesktopControlPanelButton } from '../components/Controls/types';
|
|
15
|
-
import type { AdmanInitParams } from '../components/Ads/types';
|
|
16
15
|
export declare const enum UIType {
|
|
17
16
|
DESKTOP = "desktop",
|
|
18
17
|
MOBILE = "mobile"
|
|
@@ -164,6 +163,7 @@ export interface IVKVideoPlayerStatistics extends Partial<IUIStatistics> {
|
|
|
164
163
|
export interface IVKVideoPlayerSentry extends Partial<UISentry> {
|
|
165
164
|
config: ISDKConfig['ui']['sentry'];
|
|
166
165
|
}
|
|
166
|
+
export type AdsParams = Record<string, unknown>;
|
|
167
167
|
export interface IVideoEpisodesNormalizedTimeline {
|
|
168
168
|
from: number;
|
|
169
169
|
width: number;
|
|
@@ -200,9 +200,8 @@ export interface IVideoDataBase {
|
|
|
200
200
|
/**
|
|
201
201
|
* duration используется только для инициализации адмана.
|
|
202
202
|
*/
|
|
203
|
-
duration?:
|
|
204
|
-
adsParams?:
|
|
205
|
-
adsExternalApi?: AdmanInitParams['externalApi'];
|
|
203
|
+
duration?: number;
|
|
204
|
+
adsParams?: AdsParams;
|
|
206
205
|
videoEpisodes?: IVideoEpisode[];
|
|
207
206
|
previewThumbsData?: ITimelinePreviewThumbsData;
|
|
208
207
|
isClip?: boolean;
|
|
@@ -265,7 +264,7 @@ export interface IVKVideoPlayerConfig {
|
|
|
265
264
|
supportLink?: string;
|
|
266
265
|
showAds?: boolean;
|
|
267
266
|
adsSlotId?: number;
|
|
268
|
-
adsParams?:
|
|
267
|
+
adsParams?: AdsParams;
|
|
269
268
|
adsPreviewParam?: number;
|
|
270
269
|
adsAutoplayParam?: boolean;
|
|
271
270
|
interfaceLanguage?: InterfaceLanguage | string;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { Milliseconds } from '@vkontakte/videoplayer-shared';
|
|
2
|
-
import type { Readable } from 'svelte/store';
|
|
3
|
-
export type ExternalActions = {
|
|
4
|
-
switchFromAdsToVideo: (callPlay?: boolean) => void;
|
|
5
|
-
switchFromVideoToAds: () => void;
|
|
6
|
-
setMuted: (muted: boolean) => void;
|
|
7
|
-
};
|
|
8
|
-
export type AdsParams = Record<string, unknown>;
|
|
9
|
-
export interface IAdmanInitParamsExternalApi {
|
|
10
|
-
videoGetAds?: (p: AdsParams) => Promise<Record<string, unknown> | null>;
|
|
11
|
-
videoTrackAdEvent?: (sectionKey: string, bannerId: string) => Promise<void>;
|
|
12
|
-
}
|
|
13
|
-
export type AdmanInitParams = {
|
|
14
|
-
width: number;
|
|
15
|
-
height: number;
|
|
16
|
-
isFullscreen: boolean;
|
|
17
|
-
isAutoplay: boolean;
|
|
18
|
-
slotId: number;
|
|
19
|
-
params?: AdsParams;
|
|
20
|
-
duration: number;
|
|
21
|
-
previewParam?: number;
|
|
22
|
-
adsContainer: HTMLElement;
|
|
23
|
-
adsVideoElement: HTMLVideoElement;
|
|
24
|
-
externalApi?: IAdmanInitParamsExternalApi;
|
|
25
|
-
};
|
|
26
|
-
export type IPlayerState = {
|
|
27
|
-
vsid: Readable<string | undefined>;
|
|
28
|
-
};
|
|
29
|
-
export interface IConfig {
|
|
30
|
-
loadTimeout: Milliseconds;
|
|
31
|
-
initTimeout: Milliseconds;
|
|
32
|
-
runtimeTimeout: Milliseconds;
|
|
33
|
-
useAdmanFromNPM: boolean;
|
|
34
|
-
volumeMultiplier: number;
|
|
35
|
-
isVsidOriginal: boolean;
|
|
36
|
-
usePuid: boolean;
|
|
37
|
-
debug: boolean;
|
|
38
|
-
}
|