@vkontakte/videoplayer 1.1.38-dev.d5a672e2.0 → 1.1.38-dev.d61e758e.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 +18 -16
- package/es2015.esm.js +18 -16
- package/es2018.cjs.js +18 -16
- package/es2018.esm.js +18 -16
- package/esnext.cjs.js +18 -16
- package/esnext.esm.js +18 -16
- package/evergreen.esm.js +18 -16
- package/package.json +5 -5
- package/types/VKVideoPlayer/index.d.ts +1 -0
- package/types/config.d.ts +2 -0
- package/types/store/index.d.ts +9 -2
- package/types/store/utils.d.ts +5 -0
- package/types/translation/labels.d.ts +2 -0
- package/types/translation/types.d.ts +1 -1
- package/types/types/index.d.ts +4 -0
- package/types/utils/subtitleLanguages.d.ts +1 -0
- package/types/utils/userSettings.d.ts +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer",
|
|
3
|
-
"version": "1.1.38-dev.
|
|
3
|
+
"version": "1.1.38-dev.d61e758e.0",
|
|
4
4
|
"author": "vk.com",
|
|
5
5
|
"description": "Videoplayer based on the vk.com platform",
|
|
6
6
|
"homepage": "https://vk.com",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"**/*.d.ts"
|
|
50
50
|
],
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@vkontakte/videoplayer-core": "2.0.105-dev.
|
|
53
|
-
"@vkontakte/videoplayer-interactive": "1.0.13-dev.
|
|
54
|
-
"@vkontakte/videoplayer-shared": "1.0.37-dev.
|
|
55
|
-
"@vkontakte/videoplayer-statistics": "1.0.51-dev.
|
|
52
|
+
"@vkontakte/videoplayer-core": "2.0.105-dev.d0bcde09.0",
|
|
53
|
+
"@vkontakte/videoplayer-interactive": "1.0.13-dev.e654cf31.0",
|
|
54
|
+
"@vkontakte/videoplayer-shared": "1.0.37-dev.cf31253c.0",
|
|
55
|
+
"@vkontakte/videoplayer-statistics": "1.0.51-dev.e1167af7.0"
|
|
56
56
|
}
|
|
57
57
|
}
|
package/types/config.d.ts
CHANGED
package/types/store/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IConfig, IExternalTextTrack, IOptionalTuningConfig, IPlayer, ISources, PlaybackRate } from '@vkontakte/videoplayer-core';
|
|
1
|
+
import type { IConfig, IExternalTextTrack, IOptionalTuningConfig, IPlayer, ISources, PlaybackRate, IAudioStream, IVideoStream } from '@vkontakte/videoplayer-core';
|
|
2
2
|
import { ChromecastState, PlaybackState, VideoFormat } from '@vkontakte/videoplayer-core';
|
|
3
3
|
import { type ICurrentBrowserInfo, type IError, type ILogger, type IRectangle, type IValueObservable, type QualityLimits } from '@vkontakte/videoplayer-shared';
|
|
4
4
|
import { InterfaceLanguage, VideoQuality } from '@vkontakte/videoplayer-shared';
|
|
@@ -124,6 +124,10 @@ export interface IStore {
|
|
|
124
124
|
volume$: Readable<number>;
|
|
125
125
|
muted$: Readable<boolean>;
|
|
126
126
|
trafficSavingEnabled$: Readable<boolean>;
|
|
127
|
+
availableVideoStreams$: Readable<IVideoStream[]>;
|
|
128
|
+
availableAudioStreams$: Readable<IAudioStream[]>;
|
|
129
|
+
videoStream$: Readable<IVideoStream | undefined>;
|
|
130
|
+
audioStream$: Readable<IAudioStream | undefined>;
|
|
127
131
|
currentQuality$: Readable<VideoQuality | undefined>;
|
|
128
132
|
autoQualityLimitingAvailable$: Readable<boolean>;
|
|
129
133
|
isAutoQualityEnabled$: Readable<boolean | undefined>;
|
|
@@ -177,6 +181,8 @@ export interface IStore {
|
|
|
177
181
|
closeSettingsMenu: (wasOpenedByKey?: boolean) => void;
|
|
178
182
|
setTrafficSavingEnabled: (trafficSavingEnabled: boolean) => void;
|
|
179
183
|
setVolume: (volume: number, preferredVolume?: number) => void;
|
|
184
|
+
setAudioStream: (stream: IAudioStream) => void;
|
|
185
|
+
setVideoStream: (stream: IVideoStream) => void;
|
|
180
186
|
setQuality: (quality: VideoQualityUI) => void;
|
|
181
187
|
setPlaybackRate: (playbackRate: PlaybackRate) => void;
|
|
182
188
|
incrementPlaybackRate: () => void;
|
|
@@ -267,10 +273,11 @@ interface IStoreParams {
|
|
|
267
273
|
additionalButtons: AdditionalButton[];
|
|
268
274
|
looped?: boolean;
|
|
269
275
|
statistics: UIOneStat;
|
|
276
|
+
saveRate: boolean;
|
|
270
277
|
}
|
|
271
278
|
/**
|
|
272
279
|
* Store приложения.
|
|
273
280
|
* Если будет слишком большим - можно разделить его на модули
|
|
274
281
|
*/
|
|
275
|
-
export declare const createStore: ({ interfaceLanguage, videoId, isClip, isLiveCatchUpMode, statAuthToken, isAudioDisabled, canDownload, callbacks, webApi, videoEpisodes, previewThumbsData, uiConfig, coreConfig, player: playerInstance, disabledControls, isInteractive, interactiveRanges$, isInteractiveTime$, replayInteractive, hasInteractiveBranches, playPrevChapterDisabledTooltip, additionalButtons, looped, statistics: uiStatistics, }: IStoreParams) => IStore;
|
|
282
|
+
export declare const createStore: ({ interfaceLanguage, videoId, isClip, isLiveCatchUpMode, statAuthToken, isAudioDisabled, canDownload, callbacks, webApi, videoEpisodes, previewThumbsData, uiConfig, coreConfig, player: playerInstance, disabledControls, isInteractive, interactiveRanges$, isInteractiveTime$, replayInteractive, hasInteractiveBranches, playPrevChapterDisabledTooltip, additionalButtons, looped, statistics: uiStatistics, saveRate, }: IStoreParams) => IStore;
|
|
276
283
|
export {};
|
package/types/store/utils.d.ts
CHANGED
|
@@ -25,6 +25,11 @@ export type DebugData = {
|
|
|
25
25
|
bitrate?: number;
|
|
26
26
|
currentVideoSegmentLength?: number;
|
|
27
27
|
currentAudioSegmentLength?: number;
|
|
28
|
+
vsid?: string;
|
|
29
|
+
videoCodec?: string;
|
|
30
|
+
audioCodec?: string;
|
|
31
|
+
hdr?: boolean;
|
|
32
|
+
audioLanguage?: string;
|
|
28
33
|
};
|
|
29
34
|
export declare const constructDebugPanelData: (player: IPlayer, config: IConfig, store: IStore) => DebugData;
|
|
30
35
|
export declare const fetchVideoFile: (url: string, filename: string) => 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_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' | 'pip_dummy_title' | 'submenu_traffic_saving' | 'submenu_quality' | 'submenu_playback_rate' | 'submenu_settings' | 'auto_quality_option' | 'mobile_unmute' | 'playing_ads' | 'skip_ads_now' | 'skip_ads_after' | 'visit_advertiser' | 'aria_timeline' | 'aria_open_settings' | '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_disable' | 'traffic_saving_enable' | '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_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' | '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' | '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_record_title' | 'aria_label_menu_traffic_saving' | 'aria_label_submenu_traffic_saving_off' | 'aria_label_submenu_traffic_saving_on' | '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_enable' | 'aria_label_menu_debug_overlay_disable' | 'aria_label_menu_rotate' | 'aria_label_menu_loop' | 'aria_label_debug_panel' | 'aria_label_context_menu_open' | 'aria_label_context_menu_close' | 'aria_label_video_player' | 'aria_label_spherical_control';
|
|
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_open_settings' | '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_disable' | 'traffic_saving_enable' | '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_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' | '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' | '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_record_title' | 'aria_label_menu_traffic_saving' | 'aria_label_submenu_traffic_saving_off' | 'aria_label_submenu_traffic_saving_on' | '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_enable' | 'aria_label_menu_debug_overlay_disable' | 'aria_label_menu_rotate' | 'aria_label_menu_loop' | 'aria_label_debug_panel' | 'aria_label_context_menu_open' | 'aria_label_context_menu_close' | 'aria_label_video_player' | 'aria_label_spherical_control' | 'aria_label_menu_audio_languages' | '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';
|
|
3
3
|
export type LanguagePack = Record<Key, string>;
|
|
4
4
|
export type LanguageConfig = {
|
|
5
5
|
language: string;
|
package/types/types/index.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ export interface IVKVideoPlayerCallbacks {
|
|
|
43
43
|
onOpenHotKeyMap?: (mapData: HotKeyMapData) => void;
|
|
44
44
|
onCurrentQualityChanged?: (currentQuality: VideoQuality | undefined) => void;
|
|
45
45
|
onAvailableQualitiesChanged?: (availableQualities: VideoQuality[]) => void;
|
|
46
|
+
onAudioLanguagesAvailable?: () => void;
|
|
46
47
|
onPiPEnter?: () => void;
|
|
47
48
|
onPiPExit?: () => void;
|
|
48
49
|
onLiveTime?: (liveTime: number | undefined) => void;
|
|
@@ -59,6 +60,7 @@ export interface IVKVideoPlayerCallbacks {
|
|
|
59
60
|
onCurrentPlaybackRateChanged?: (rate: number) => void;
|
|
60
61
|
onStalledChanged?: (isStalled: boolean) => void;
|
|
61
62
|
onLogoClicked?: () => void;
|
|
63
|
+
onCopyEmbedCodeClicked?: () => string;
|
|
62
64
|
uiInfo?: {
|
|
63
65
|
onControlsVisibleChanged?: (value?: boolean) => void;
|
|
64
66
|
onIsMobileChanged?: (value?: boolean) => void;
|
|
@@ -214,6 +216,8 @@ export interface IVKVideoPlayerConfig {
|
|
|
214
216
|
callbacks?: IVKVideoPlayerCallbacks;
|
|
215
217
|
additionalButtons?: AdditionalButton[];
|
|
216
218
|
refDomain?: string;
|
|
219
|
+
volumeMultiplier?: number;
|
|
220
|
+
saveRate?: boolean;
|
|
217
221
|
}
|
|
218
222
|
export interface IControlInfo {
|
|
219
223
|
/** @deprecated Используйте новое поле left */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { VideoQuality } from '@vkontakte/videoplayer-shared';
|
|
2
|
+
import { type PlaybackRate } from '@vkontakte/videoplayer-core';
|
|
2
3
|
export declare const savePreferredVolume: (volume: number) => void;
|
|
3
4
|
export declare const getPreferredVolume: () => number | undefined;
|
|
4
5
|
export declare const savePreferredQuality: (videoId: number | undefined, value: VideoQuality) => void;
|
|
@@ -8,3 +9,7 @@ export declare const savePreferMute: (preferMute: boolean) => void;
|
|
|
8
9
|
export declare const getPreferMute: () => boolean;
|
|
9
10
|
export declare const savePreferTrafficSavingEnabled: (trafficSavingEnabled: boolean) => void;
|
|
10
11
|
export declare const getPreferTrafficSavingEnabled: () => boolean;
|
|
12
|
+
export declare const getPreferredStreamLanguage: () => string | undefined;
|
|
13
|
+
export declare const savePreferredStreamLanguage: (language: string) => void;
|
|
14
|
+
export declare const savePreferredRate: (rate: PlaybackRate) => void;
|
|
15
|
+
export declare const getPreferredRate: () => PlaybackRate | undefined;
|