@vkontakte/videoplayer 1.1.38-dev.fb79366f.0 → 1.1.39-dev.001aa027.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 +19 -17
- package/es2015.esm.js +19 -17
- package/es2018.cjs.js +19 -17
- package/es2018.esm.js +19 -17
- package/esnext.cjs.js +19 -17
- package/esnext.esm.js +19 -17
- package/evergreen.esm.js +19 -17
- package/package.json +5 -5
- package/types/VKVideoPlayer/index.d.ts +0 -2
- package/types/config.d.ts +1 -0
- package/types/store/index.d.ts +7 -1
- 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 +2 -1
- package/types/utils/fullscreen.d.ts +0 -1
- package/types/utils/subtitleLanguages.d.ts +1 -0
- package/types/utils/userSettings.d.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.39-dev.001aa027.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.
|
|
53
|
-
"@vkontakte/videoplayer-interactive": "1.0.
|
|
54
|
-
"@vkontakte/videoplayer-shared": "1.0.37
|
|
55
|
-
"@vkontakte/videoplayer-statistics": "1.0.
|
|
52
|
+
"@vkontakte/videoplayer-core": "2.0.106-dev.a3723727.0",
|
|
53
|
+
"@vkontakte/videoplayer-interactive": "1.0.14-dev.e025b924.0",
|
|
54
|
+
"@vkontakte/videoplayer-shared": "^1.0.37",
|
|
55
|
+
"@vkontakte/videoplayer-statistics": "1.0.52-dev.a5f6699f.0"
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -15,7 +15,6 @@ export declare class VKVideoPlayer extends HTMLElement {
|
|
|
15
15
|
private _shadowRoot;
|
|
16
16
|
private playerContainer;
|
|
17
17
|
private rootContainer;
|
|
18
|
-
private shadowRootContainer;
|
|
19
18
|
private uiConfig;
|
|
20
19
|
private coreConfig;
|
|
21
20
|
private statisticsConfig;
|
|
@@ -82,7 +81,6 @@ export declare class VKVideoPlayer extends HTMLElement {
|
|
|
82
81
|
setLiveEnd(videoData: IVideoData): void;
|
|
83
82
|
getDeviceId(): string | undefined;
|
|
84
83
|
replayInteractiveVideo(): void;
|
|
85
|
-
replayInteractiveChapter(callback?: () => void): Promise<void>;
|
|
86
84
|
showInteractiveIndicatorTooltip(newValue: boolean, useTimeout?: boolean): void;
|
|
87
85
|
switchToActiveLive(): void;
|
|
88
86
|
}
|
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;
|
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;
|
|
@@ -53,13 +54,13 @@ export interface IVKVideoPlayerCallbacks {
|
|
|
53
54
|
onDisabledSeekToInteractiveClick?: (message: string | undefined) => void;
|
|
54
55
|
onInteractiveTimeIndicatorClick?: () => void;
|
|
55
56
|
onInteractiveTimeIndicatorHintDeactivated?: () => void;
|
|
56
|
-
onExternalFullscreenExit?: () => void;
|
|
57
57
|
onPrevVideoClick?: () => boolean;
|
|
58
58
|
onNextVideoClick?: () => boolean;
|
|
59
59
|
onTrafficSavingEnabledChanged?: (isEnabled: boolean) => void;
|
|
60
60
|
onCurrentPlaybackRateChanged?: (rate: number) => void;
|
|
61
61
|
onStalledChanged?: (isStalled: boolean) => void;
|
|
62
62
|
onLogoClicked?: () => void;
|
|
63
|
+
onCopyEmbedCodeClicked?: () => string;
|
|
63
64
|
uiInfo?: {
|
|
64
65
|
onControlsVisibleChanged?: (value?: boolean) => void;
|
|
65
66
|
onIsMobileChanged?: (value?: boolean) => void;
|
|
@@ -14,7 +14,6 @@ interface DocumentElementWithFullscreen extends HTMLElement {
|
|
|
14
14
|
export declare const requestFullscreen: (element: DocumentElementWithFullscreen) => Promise<void>;
|
|
15
15
|
export declare const exitFullscreen: (doc: DocumentWithFullscreen) => Promise<void>;
|
|
16
16
|
export declare const exitIosSafariVideoElementFullscreen: (videoElement: HTMLVideoElement) => Promise<void>;
|
|
17
|
-
export declare const getDocumentFullscreenElement: () => Element | undefined;
|
|
18
17
|
export declare const checkIsFullscreen: () => boolean;
|
|
19
18
|
export declare const registerFullscreenChangeEvent: (callback: () => void) => void;
|
|
20
19
|
export declare const removeFullscreenChangeEvent: (callback: () => void) => void;
|
|
@@ -9,5 +9,7 @@ export declare const savePreferMute: (preferMute: boolean) => void;
|
|
|
9
9
|
export declare const getPreferMute: () => boolean;
|
|
10
10
|
export declare const savePreferTrafficSavingEnabled: (trafficSavingEnabled: boolean) => void;
|
|
11
11
|
export declare const getPreferTrafficSavingEnabled: () => boolean;
|
|
12
|
+
export declare const getPreferredStreamLanguage: () => string | undefined;
|
|
13
|
+
export declare const savePreferredStreamLanguage: (language: string) => void;
|
|
12
14
|
export declare const savePreferredRate: (rate: PlaybackRate) => void;
|
|
13
15
|
export declare const getPreferredRate: () => PlaybackRate | undefined;
|