@vkontakte/videoplayer 1.1.46-dev.46b40b0d.0 → 1.1.46-dev.bbf4a6fe.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/videoplayer",
3
- "version": "1.1.46-dev.46b40b0d.0",
3
+ "version": "1.1.46-dev.bbf4a6fe.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.113-dev.a853d449.0",
53
- "@vkontakte/videoplayer-interactive": "1.0.21-dev.3ce37858.0",
54
- "@vkontakte/videoplayer-shared": "1.0.45-dev.47c22cbb.0",
55
- "@vkontakte/videoplayer-statistics": "1.0.60-dev.cbacb775.0"
52
+ "@vkontakte/videoplayer-core": "2.0.113-dev.85777574.0",
53
+ "@vkontakte/videoplayer-interactive": "1.0.21-dev.d53f43ca.0",
54
+ "@vkontakte/videoplayer-shared": "1.0.45-dev.74fc43b7.0",
55
+ "@vkontakte/videoplayer-statistics": "1.0.60-dev.1191b4bb.0"
56
56
  }
57
57
  }
@@ -6,7 +6,6 @@ import { type PlaybackRate } from '@vkontakte/videoplayer-core';
6
6
  import type { IStatContext } from '@vkontakte/videoplayer-statistics';
7
7
  import { AnnotationsApi } from '../utils/webAPI/annotationsApi/annotationsApi';
8
8
  import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem } from '../components/Menus/types';
9
- import type { AdditionalButton } from '../components/Controls/types';
10
9
  export declare class VKVideoPlayer extends HTMLElement {
11
10
  private svelteStubComponent?;
12
11
  private svelteRootComponent?;
@@ -94,8 +93,5 @@ export declare class VKVideoPlayer extends HTMLElement {
94
93
  updateAdditionalContextItem(itemId: string, fields: Partial<Omit<AdditionalContextMenuItem, 'id'>>): void;
95
94
  addAdditionalContextItem(newItem: AdditionalContextMenuItem): void;
96
95
  removeAdditionalContextItem(itemId: string): void;
97
- updateAdditionalButton(itemId: string, fields: Partial<Omit<AdditionalButton, 'id' | 'type'>>): void;
98
- addAdditionalButton(newButton: AdditionalButton): void;
99
- removeAdditionalButton(itemId: string): void;
100
96
  updateStatContext(statContext: Partial<IStatContext>): void;
101
97
  }
package/types/config.d.ts CHANGED
@@ -101,7 +101,6 @@ export interface IUIConfig {
101
101
  saveDebugInfoToFile: boolean;
102
102
  saveTraceInfoToFile: boolean;
103
103
  additionalButtons: boolean;
104
- additionalButtonsDesktopControlPanelRight: boolean;
105
104
  additionalSettingsMenuItems: boolean;
106
105
  additionalContextMenuItems: boolean;
107
106
  contextMenuButton: boolean;
package/types/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { VKVideoPlayer } from './VKVideoPlayer';
2
- import type { IVKVideoPlayerConfig, IControlInfo, IVKVideoPlayerCallbacks, IVideoData, AdsParams, HotKeyMapData, HotKeyMapItem, HotKeyMapGroup, IVideoLive, IInteractiveData, AdditionalButtonDeprecated } from './types';
2
+ import type { IVKVideoPlayerConfig, IControlInfo, IVKVideoPlayerCallbacks, IVideoData, AdsParams, HotKeyMapData, HotKeyMapItem, HotKeyMapGroup, IVideoLive, IInteractiveData, AdditionalButton } from './types';
3
3
  import { GridTypes } from './constans';
4
4
  import type { LanguagePack, LanguageConfig } from './translation/types';
5
5
  import type { ISources, IDashSource, URLSource, RawSource, URLSourceWithSeek } from '@vkontakte/videoplayer-core';
@@ -7,8 +7,7 @@ import type { Milliseconds, QualityLimits } from '@vkontakte/videoplayer-shared'
7
7
  export { VERSION } from './env';
8
8
  export declare const registerPlayerWebComponent: () => void;
9
9
  export { type AdditionalSettingsMenuItem, MenuItemType, type AdditionalClickSettingsMenuItem, type AdditionalSwitchSettingsMenuItem, type AdditionalContextMenuItem, } from './components/Menus/types';
10
- export { type AdditionalButton, ControlButtonType, } from './components/Controls/types';
11
- export type { VKVideoPlayer, IVKVideoPlayerConfig, IControlInfo, IVKVideoPlayerCallbacks, IVideoData, AdsParams, HotKeyMapData, HotKeyMapItem, HotKeyMapGroup, ISources, IDashSource, URLSource, RawSource, URLSourceWithSeek, LanguagePack, LanguageConfig, Milliseconds, IVideoLive, IInteractiveData, AdditionalButtonDeprecated, QualityLimits, };
10
+ export type { VKVideoPlayer, IVKVideoPlayerConfig, IControlInfo, IVKVideoPlayerCallbacks, IVideoData, AdsParams, HotKeyMapData, HotKeyMapItem, HotKeyMapGroup, ISources, IDashSource, URLSource, RawSource, URLSourceWithSeek, LanguagePack, LanguageConfig, Milliseconds, IVideoLive, IInteractiveData, AdditionalButton, QualityLimits, };
12
11
  export { GridTypes, };
13
12
  export { InterfaceLanguage, VKNumericLanguage, loadVKLangPack, } from '@vkontakte/videoplayer-shared';
14
13
  export { VideoQuality, VideoFormat, } from '@vkontakte/videoplayer-core';
@@ -7,13 +7,12 @@ 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 { LanguageConfig } from '../translation/types';
10
- import type { AdditionalButtonDeprecated, ControlsKeys, HotKeyMapData, IAnnotationsApi, IControlInfo, IDisabledControls, IInteractiveData, IPictureInPictureApi, IPlayerPhase, ITimelinePreviewThumbsData, IVideoEpisode, IVKVideoPlayerCallbacks, IVKVideoPlayerUICallbacks, Position, VideoPlaybackRate, VideoQualityForRender, VideoQualityUI, VideoSubtitle, VideoSubtitleParsed } from '../types';
10
+ import type { AdditionalButton, ControlsKeys, HotKeyMapData, IAnnotationsApi, IControlInfo, IDisabledControls, IInteractiveData, IPictureInPictureApi, IPlayerPhase, ITimelinePreviewThumbsData, IVideoEpisode, IVKVideoPlayerCallbacks, IVKVideoPlayerUICallbacks, Position, VideoPlaybackRate, VideoQualityForRender, VideoQualityUI, VideoSubtitle, VideoSubtitleParsed } from '../types';
11
11
  import { AdsPlaybackState, PictureInPictureType } from '../types';
12
12
  import type { DebugData } from './utils';
13
13
  import { GridTypes, type PlayPrevChapterDisabledTooltipKey } from '../constans';
14
14
  import { UIOneStat } from '../services/statistics';
15
15
  import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem, ContextMenuItem, SettingsMenuItem } from '../components/Menus/types';
16
- import type { AdditionalButton, AdditionalDesktopControlPanelButton } from '../components/Controls/types';
17
16
  export interface IAdsState {
18
17
  position: Writable<number>;
19
18
  duration: Writable<number>;
@@ -89,8 +88,7 @@ export interface IUIState {
89
88
  pictureInPictureType$: Readable<PictureInPictureType>;
90
89
  currentGridType$: Readable<GridTypes>;
91
90
  interactiveHideMobileControls: Writable<boolean>;
92
- additionalButtonsDeprecated$: Readable<AdditionalButtonDeprecated[]>;
93
- additionalDesktopControlPanelRightButtons$: Readable<AdditionalDesktopControlPanelButton[]>;
91
+ additionalButtons$: Readable<AdditionalButton[]>;
94
92
  additionalSettingsMenuItems$: Readable<SettingsMenuItem[]>;
95
93
  additionalContextMenuItems$: Readable<ContextMenuItem[]>;
96
94
  overlayContainer$: Writable<HTMLDivElement | undefined>;
@@ -233,7 +231,6 @@ export interface IStore {
233
231
  nextMovie: (movieId: number) => void;
234
232
  correctSeekTimeToInteractive: (time: number) => number;
235
233
  replayInteractive?: () => void;
236
- stopPlayer?: () => void;
237
234
  setLooped: (isLooped: boolean) => void;
238
235
  reportProblem: () => void;
239
236
  };
@@ -241,7 +238,6 @@ export interface IStore {
241
238
  firstStart: (showAds: boolean) => void;
242
239
  play: () => void;
243
240
  pause: () => void;
244
- stop: () => void;
245
241
  seekTime: (time: number) => void;
246
242
  seekEpisodeStartTime: (time: number) => void;
247
243
  setPlaybackRate: (playbackRate: PlaybackRate) => void;
@@ -255,9 +251,6 @@ export interface IStore {
255
251
  updateAdditionalContextItem: (itemId: string, fields: Partial<Omit<AdditionalContextMenuItem, 'id'>>) => void;
256
252
  addAdditionalContextItem: (newItem: AdditionalContextMenuItem) => void;
257
253
  removeAdditionalContextItem: (itemId: string) => void;
258
- updateAdditionalButton: (itemId: string, fields: Partial<Omit<AdditionalButton, 'id' | 'type'>>) => void;
259
- addAdditionalButton: (newButton: AdditionalButton) => void;
260
- removeAdditionalButton: (itemId: string) => void;
261
254
  };
262
255
  };
263
256
  callbacks?: IVKVideoPlayerCallbacks;
@@ -286,11 +279,10 @@ interface IStoreParams {
286
279
  interactiveRanges$?: IValueObservable<InteractiveRange[]>;
287
280
  isInteractiveTime$?: IValueObservable<boolean>;
288
281
  replayInteractive?: () => void;
289
- stopPlayer?: () => void;
290
282
  hasInteractiveBranches?: boolean;
291
283
  disabledControls: ControlsKeys;
292
284
  playPrevChapterDisabledTooltip: PlayPrevChapterDisabledTooltipKey;
293
- additionalButtons: Array<AdditionalButtonDeprecated | AdditionalDesktopControlPanelButton>;
285
+ additionalButtons: AdditionalButton[];
294
286
  additionalSettingsMenuItems: AdditionalSettingsMenuItem[];
295
287
  additionalContextMenuItems: AdditionalContextMenuItem[];
296
288
  looped?: boolean;
@@ -301,5 +293,5 @@ interface IStoreParams {
301
293
  * Store приложения.
302
294
  * Если будет слишком большим - можно разделить его на модули
303
295
  */
304
- export declare const createStore: ({ interfaceLanguage, isCyrillicRelatedInterface, videoId, isClip, isLiveCatchUpMode, statAuthToken, isAudioDisabled, canDownload, callbacks, webApi, videoEpisodes, previewThumbsData, uiConfig, coreConfig, player: playerInstance, disabledControls, isInteractive, interactiveRanges$, isInteractiveTime$, replayInteractive, stopPlayer, hasInteractiveBranches, playPrevChapterDisabledTooltip, additionalButtons, additionalSettingsMenuItems, additionalContextMenuItems, looped, statistics: uiStatistics, saveRate, }: IStoreParams) => IStore;
296
+ export declare const createStore: ({ interfaceLanguage, isCyrillicRelatedInterface, videoId, isClip, isLiveCatchUpMode, statAuthToken, isAudioDisabled, canDownload, callbacks, webApi, videoEpisodes, previewThumbsData, uiConfig, coreConfig, player: playerInstance, disabledControls, isInteractive, interactiveRanges$, isInteractiveTime$, replayInteractive, hasInteractiveBranches, playPrevChapterDisabledTooltip, additionalButtons, additionalSettingsMenuItems, additionalContextMenuItems, looped, statistics: uiStatistics, saveRate, }: IStoreParams) => IStore;
305
297
  export {};
@@ -2,8 +2,7 @@ import type { Readable } from 'svelte/store';
2
2
  import type { IValueObservable } from '@vkontakte/videoplayer-shared';
3
3
  import type { IPlayer, IConfig, IObservable } from '@vkontakte/videoplayer-core';
4
4
  import type { IStore } from '.';
5
- import type { AdditionalButtonDeprecated, IMicroStores } from '../types';
6
- import type { AdditionalDesktopControlPanelButton } from '../components/Controls/types';
5
+ import type { IMicroStores } from '../types';
7
6
  export declare const setStores: (store: IStore, microStores: IMicroStores) => void;
8
7
  export declare const getStore: () => IStore;
9
8
  export declare const getMicroStores: () => IMicroStores;
@@ -34,5 +33,3 @@ export type DebugData = {
34
33
  };
35
34
  export declare const constructDebugPanelData: (player: IPlayer, config: IConfig, store: IStore) => DebugData;
36
35
  export declare const fetchVideoFile: (url: string, filename: string) => void;
37
- export declare const isDeprecatedAdditionalButtonGuard: (btn: AdditionalButtonDeprecated | AdditionalDesktopControlPanelButton) => btn is AdditionalButtonDeprecated;
38
- export declare const isAdditionalButtonGuard: (btn: AdditionalButtonDeprecated | AdditionalDesktopControlPanelButton) => btn is AdditionalDesktopControlPanelButton;
@@ -173,10 +173,7 @@ export interface IInteractiveData {
173
173
  projectInfo?: InteractiveProjectInfo;
174
174
  tooltipHelpHintActive?: boolean;
175
175
  }
176
- /**
177
- * Deprecated. Старый механизм добавления кнопок, будет удален в будущих релизах
178
- */
179
- export interface AdditionalButtonDeprecated {
176
+ export interface AdditionalButton {
180
177
  iconUrl: string;
181
178
  onClick?: (event?: MouseEvent) => void;
182
179
  tooltip?: string;
@@ -223,7 +220,7 @@ export interface IVKVideoPlayerConfig {
223
220
  showThumbTimer?: boolean;
224
221
  is3DVideo?: boolean;
225
222
  callbacks?: IVKVideoPlayerCallbacks;
226
- additionalButtons?: AdditionalButtonDeprecated[];
223
+ additionalButtons?: AdditionalButton[];
227
224
  additionalSettingsMenuItems?: AdditionalSettingsMenuItem[];
228
225
  additionalContextMenuItems?: AdditionalContextMenuItem[];
229
226
  refDomain?: string;
@@ -1 +1 @@
1
- export declare const roundFps: (fps: number) => 60 | "" | 50 | 120 | 240;
1
+ export declare const roundFps: (fps: number) => "" | 50 | 60 | 120 | 240;
@@ -1,10 +0,0 @@
1
- export declare enum DesktopButtonsLeftIds {
2
- PREV = "prevButton",
3
- PLAY = "playButton",
4
- REPLAY = "replayButton",
5
- NEXT = "nextButton",
6
- INTERACTIVE_PREV = "playPrevChapterButton",
7
- INTERACTIVE_SEEK = "seekToInteractiveButton",
8
- INTERACTIVE_GRAPH = "interactiveGraphButton",
9
- LIVE = "liveButton"
10
- }
@@ -1,4 +0,0 @@
1
- import { DesktopButtonsLeftIds } from './desktopButtonsLeftIds';
2
- export declare const desktopButtonsLeftWeights: {
3
- [key in DesktopButtonsLeftIds]: number;
4
- };
@@ -1,9 +0,0 @@
1
- export declare enum DesktopButtonsRightIds {
2
- LOGO = "vkLogo",
3
- VOLUME = "volume",
4
- SUBTITLES = "subtitles",
5
- SETTINGS = "settings",
6
- CONTEXT = "context",
7
- FULLSCREEN = "fullscreen",
8
- CHROMECAST = "chromecast"
9
- }
@@ -1,4 +0,0 @@
1
- import { DesktopButtonsRightIds } from './desktopButtonsRightIds';
2
- export declare const desktopButtonsRightWeights: {
3
- [key in DesktopButtonsRightIds]: number;
4
- };
@@ -1,37 +0,0 @@
1
- import type { ComponentType } from 'svelte';
2
- import { GridTypes } from '../../constans';
3
- export declare enum ControlButtonType {
4
- DESKTOP_CONTROL_PANEL_LEFT = "desktop-control-panel-left",
5
- DESKTOP_CONTROL_PANEL_RIGHT = "desktop-control-panel-right"
6
- }
7
- interface BaseButton {
8
- id: string;
9
- weight: number;
10
- disabled?: boolean;
11
- }
12
- interface BaseInnerButton extends BaseButton {
13
- buttonComponent: ComponentType;
14
- buttonComponentProps?: Record<string, unknown>;
15
- }
16
- interface BaseAdditionalButton extends BaseButton {
17
- icon: string;
18
- ariaLabel: string;
19
- onClick?: () => void;
20
- testId?: string;
21
- ariaKeyShortCut?: string;
22
- ariaExpanded?: boolean;
23
- }
24
- export interface DesktopControlPanelButton extends BaseInnerButton {
25
- type: ControlButtonType.DESKTOP_CONTROL_PANEL_LEFT | ControlButtonType.DESKTOP_CONTROL_PANEL_RIGHT;
26
- tooltipText?: string;
27
- disabledTooltipContent?: string;
28
- className?: string;
29
- }
30
- export interface AdditionalDesktopControlPanelButton extends BaseAdditionalButton {
31
- type: ControlButtonType.DESKTOP_CONTROL_PANEL_RIGHT;
32
- tooltipText?: string;
33
- disabledTooltipContent?: string;
34
- hideOnDesktopGridTypes?: GridTypes[];
35
- }
36
- export type AdditionalButton = AdditionalDesktopControlPanelButton;
37
- export {};
@@ -1,2 +0,0 @@
1
- import type { AdditionalDesktopControlPanelButton, DesktopControlPanelButton } from '../types';
2
- export declare const isInnerButtonGuard: (btn: DesktopControlPanelButton | AdditionalDesktopControlPanelButton) => btn is DesktopControlPanelButton;
@@ -1,5 +0,0 @@
1
- export declare const sortByWeightAbc: (a: {
2
- weight: number;
3
- }, b: {
4
- weight: number;
5
- }) => number;