@vkontakte/videoplayer 1.1.57-dev.a7ac042e.0 → 1.1.57

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/videoplayer",
3
- "version": "1.1.57-dev.a7ac042e.0",
3
+ "version": "1.1.57",
4
4
  "author": "vk.com",
5
5
  "description": "Videoplayer based on the vk.com platform",
6
6
  "homepage": "https://vk.com",
@@ -50,9 +50,9 @@
50
50
  ],
51
51
  "dependencies": {
52
52
  "@adtech/rbadman": "^2.2.57",
53
- "@vkontakte/videoplayer-core": "2.0.127-dev.be6a8612.0",
54
- "@vkontakte/videoplayer-interactive": "1.0.32-dev.162375f7.0",
55
- "@vkontakte/videoplayer-shared": "^1.0.54",
56
- "@vkontakte/videoplayer-statistics": "1.0.72-dev.c1757667.0"
53
+ "@vkontakte/videoplayer-core": "^2.0.127",
54
+ "@vkontakte/videoplayer-interactive": "^1.0.32",
55
+ "@vkontakte/videoplayer-shared": "^1.0.55",
56
+ "@vkontakte/videoplayer-statistics": "^1.0.72"
57
57
  }
58
58
  }
@@ -1,7 +1,7 @@
1
1
  import type { ISDKConfig } from '../config';
2
2
  import type { LanguageConfig } from '../translation/types';
3
3
  import type { IVideoData, IVKVideoPlayerConfig } from '../types';
4
- import type { QualityLimits } from '@vkontakte/videoplayer-shared';
4
+ 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';
@@ -33,6 +33,7 @@ interface IConfig {
33
33
  runtimeTimeout: Milliseconds;
34
34
  useAdmanFromNPM: boolean;
35
35
  volumeMultiplier: number;
36
+ isVsidOriginal: boolean;
36
37
  }
37
38
  export declare class AdmanWrapper {
38
39
  private adman;
@@ -49,6 +50,7 @@ export declare class AdmanWrapper {
49
50
  private initTimeout;
50
51
  private runtimeTimeout;
51
52
  private useAdmanFromNPM;
53
+ private isVsidOriginal;
52
54
  private watchDogTimeout;
53
55
  events: {
54
56
  init$: Subject<void>;
package/types/config.d.ts CHANGED
@@ -16,6 +16,7 @@ export interface IUIConfig {
16
16
  tag?: string;
17
17
  colors?: string[];
18
18
  };
19
+ devNullLog: boolean;
19
20
  isSmoothVideoRotate: boolean;
20
21
  showSupport: boolean;
21
22
  supportLink: string;
@@ -35,6 +36,7 @@ export interface IUIConfig {
35
36
  isMobileGoToSiteButton: boolean;
36
37
  useAdmanFromNPM: boolean;
37
38
  volumeMultiplier: number;
39
+ isVsidOriginal: boolean;
38
40
  };
39
41
  volumeDefault: number;
40
42
  volumeMinRestore: number;
@@ -105,6 +107,7 @@ export interface IUIConfig {
105
107
  interactiveHideTime: boolean;
106
108
  interactivePlayPrevChapter: boolean;
107
109
  interactiveTimeIndicator: boolean;
110
+ interactiveTimeOpenUri: boolean;
108
111
  thumbTimer: boolean;
109
112
  hotKeyMapModal: boolean;
110
113
  hotKeyHelpers: boolean;
@@ -126,6 +129,10 @@ export interface IUIConfig {
126
129
  skipInitialPlaybackStateValue: boolean;
127
130
  skipInitialPlaybackRateValue: boolean;
128
131
  qualityDetailsSubMenuEnabled: boolean;
132
+ forceAutoQualityWhenSevereStallHappens: boolean;
133
+ showSlowVideoNotification: boolean;
134
+ maxCountShowSlowVideoNotification: number;
135
+ timeoutShowSlowVideoNotification: number;
129
136
  };
130
137
  interactive: {
131
138
  historyMaxLength: number;
@@ -3,7 +3,7 @@ import { ChromecastState, PlaybackState, VideoFormat } from '@vkontakte/videopla
3
3
  import { type IError, type ILogger, InterfaceLanguage, type IRectangle, type IValueObservable, type QualityLimits, VideoQuality, type InternalsExposure } from '@vkontakte/videoplayer-shared';
4
4
  import type { IUIConfig } from '../config';
5
5
  import { SeekAction } from '@vkontakte/videoplayer-statistics';
6
- import { type InteractiveRange } from '@vkontakte/videoplayer-interactive';
6
+ import type { InteractiveRange } from '@vkontakte/videoplayer-interactive';
7
7
  import type { Readable, Writable } from 'svelte/store';
8
8
  import { AdmanWrapper } from '../components/Ads/admanWrapper';
9
9
  import type { Key, LanguageConfig } from '../translation/types';
@@ -0,0 +1,12 @@
1
+ import { BaseMicroStore } from './base';
2
+ import { type InitMicroStoreParams, type NotificationId } from '../../types';
3
+ export default class Notifications extends BaseMicroStore {
4
+ readonly stateName = "notifications$";
5
+ private notificationManager;
6
+ state$: {
7
+ notificationsToShow$: import("svelte/store").Writable<Partial<Record<"slow_video", boolean>>>;
8
+ showNotification: (id: NotificationId) => void;
9
+ closeNotification: (id: NotificationId) => void;
10
+ };
11
+ init(initStoreParams: InitMicroStoreParams): import("@vkontakte/videoplayer-shared").Subscription;
12
+ }
@@ -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' | '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' | 'tooltip_autoplay_off' | 'tooltip_autoplay_on' | '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_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' | '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';
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' | 'tooltip_autoplay_off' | 'tooltip_autoplay_on' | '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_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' | '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;
@@ -1,9 +1,9 @@
1
1
  import type { VideoQuality, VideoFormat, ISources, IExternalTextTrack } from '@vkontakte/videoplayer-core';
2
- import type { IValueObservable, InterfaceLanguage, Subscription, IRectangle } from '@vkontakte/videoplayer-shared';
2
+ import type { IValueObservable, InterfaceLanguage, Subscription, IRectangle, DevNullEntry } from '@vkontakte/videoplayer-shared';
3
3
  import type { Manifest, VideoInfo, Interactives, InteractiveProjectInfo } from '@vkontakte/videoplayer-interactive';
4
4
  import { PlaybackState } from '@vkontakte/videoplayer-core';
5
5
  import type { Writable, Readable } from 'svelte/store';
6
- import type { ISDKConfig } from '../config';
6
+ import type { ISDKConfig, IUIConfig } from '../config';
7
7
  import type { IStore } from '../store';
8
8
  import { Controls, GridTypes, type SeekToInteractiveDisabledTooltipKey } from '../constans';
9
9
  import type { Key } from '../translation/types';
@@ -54,7 +54,6 @@ export interface IVKVideoPlayerCallbacks {
54
54
  onPiPEnter?: () => void;
55
55
  onPiPExit?: () => void;
56
56
  onLiveTime?: (liveTime: number | undefined) => void;
57
- onLiveEnded?: () => void;
58
57
  onReplayInteractiveVideo?: () => void;
59
58
  onInteractiveHistoryChanged?: (chapterIds: string[]) => void;
60
59
  onDisabledInteractiveClick?: () => void;
@@ -78,6 +77,7 @@ export interface IVKVideoPlayerCallbacks {
78
77
  onCopyEmbedCodeClicked?: () => string;
79
78
  onVSIDChanged?: (vsid?: string) => void;
80
79
  onAutoplaySoundProhibited?: () => void;
80
+ onDevNullLog?: (entry: DevNullEntry) => void;
81
81
  uiInfo?: {
82
82
  onControlsVisibleChanged?: (value?: boolean) => void;
83
83
  onIsMobileChanged?: (value?: boolean) => void;
@@ -223,6 +223,7 @@ export interface IVKVideoPlayerConfig {
223
223
  statAuthToken?: string;
224
224
  statUserSalt?: string;
225
225
  statTrackCode?: string;
226
+ statVKAppId?: string;
226
227
  refreshStatAuthToken?: () => Promise<string | undefined>;
227
228
  preload?: boolean;
228
229
  autoplay?: boolean;
@@ -504,6 +505,11 @@ export type PictureInPictureMicroStore = {
504
505
  isEnabled$: Writable<boolean>;
505
506
  type$: Writable<PictureInPictureType | undefined>;
506
507
  };
508
+ export type NotificationsMicroStore = {
509
+ notificationsToShow$: Writable<Partial<Record<NotificationId, boolean>>>;
510
+ showNotification: (id: NotificationId) => void;
511
+ closeNotification: (id: NotificationId) => void;
512
+ };
507
513
  export interface IMicroStores {
508
514
  fakeIsPlaying$: ToggleableMicroStore;
509
515
  interactiveControlsOpacity$: ToggleableMicroStore;
@@ -514,11 +520,13 @@ export interface IMicroStores {
514
520
  };
515
521
  graphIsOpened$: ToggleableMicroStore;
516
522
  pictureInPicture$: PictureInPictureMicroStore;
523
+ notifications$: NotificationsMicroStore;
517
524
  }
518
525
  export interface InitMicroStoreParams {
519
526
  store: IStore;
520
527
  microStores: IMicroStores;
521
528
  config: IVKVideoPlayerConfig;
529
+ uiConfig: IUIConfig;
522
530
  interactiveController?: Interactives;
523
531
  }
524
532
  export interface IMicroStore<StateName extends keyof IMicroStores = keyof IMicroStores> {
@@ -541,4 +549,5 @@ export interface Caption {
541
549
  timeAppeared?: number | null;
542
550
  value: string;
543
551
  }
552
+ export type NotificationId = 'slow_video';
544
553
  export {};
@@ -0,0 +1,9 @@
1
+ type Settings = {
2
+ timeout: number;
3
+ maxShowCount: number;
4
+ };
5
+ export declare const getNotificationManager: ({ maxShowCount, timeout }: Settings) => {
6
+ notificationShowed: (notificationId: string) => void;
7
+ canShowNotification: (notificationId: string) => boolean;
8
+ };
9
+ export {};
@@ -1 +1 @@
1
- export declare const roundFps: (fps: number) => 60 | "" | 50 | 120 | 240;
1
+ export declare const roundFps: (fps: number) => "" | 60 | 50 | 120 | 240;