@vkontakte/videoplayer 1.1.81-dev.c564bb3a.0 → 1.1.81-dev.cb1cd8be.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.81-dev.c564bb3a.0",
3
+ "version": "1.1.81-dev.cb1cd8be.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.150-dev.c564bb3a.0",
59
- "@vkontakte/videoplayer-interactive": "1.0.56-dev.c564bb3a.0",
60
- "@vkontakte/videoplayer-shared": "1.0.79-dev.c564bb3a.0",
61
- "@vkontakte/videoplayer-statistics": "1.0.96-dev.c564bb3a.0"
58
+ "@vkontakte/videoplayer-core": "2.0.150-dev.cb1cd8be.0",
59
+ "@vkontakte/videoplayer-interactive": "1.0.56-dev.cb1cd8be.0",
60
+ "@vkontakte/videoplayer-shared": "1.0.79-dev.cb1cd8be.0",
61
+ "@vkontakte/videoplayer-statistics": "1.0.96-dev.cb1cd8be.0"
62
62
  }
63
63
  }
@@ -32,6 +32,7 @@ export declare class VKVideoPlayer extends HTMLElement {
32
32
  private uiConfig;
33
33
  private coreConfig;
34
34
  private statisticsConfig;
35
+ private metaConfig;
35
36
  private interactiveController;
36
37
  private interactiveContainer;
37
38
  private graphMadePause;
@@ -54,7 +54,7 @@ export interface RootProps {
54
54
  showAutoplayNext: boolean;
55
55
  keyboardControls?: KeyboardControls | undefined;
56
56
  needToRepeatPlaylist?: boolean;
57
- getVideoDeeplink?: () => string;
57
+ getVideoDeeplink?: (timestamp: number) => string;
58
58
  }
59
59
  export interface RootExports {
60
60
  play: () => void;
package/types/config.d.ts CHANGED
@@ -267,6 +267,7 @@ export interface ISDKConfig {
267
267
  ui: RecursivePartial<IUIConfig>;
268
268
  core: ICoreConfig;
269
269
  statistics: IStatisticsConfig;
270
+ meta?: string[];
270
271
  }
271
272
  export declare const setConfig: (config: IUIConfig) => IUIConfig;
272
273
  export declare const getConfig: () => IUIConfig;
@@ -1,7 +1,7 @@
1
1
  import type { IAudioStream, IConfig, IExternalTextTrack, IOptionalTuningConfig, IPlayer, ISources, ITextTrack, IVideoStream, PlaybackRate } from '@vkontakte/videoplayer-core';
2
2
  import { ChromecastState, PlaybackState, VideoFormat } from '@vkontakte/videoplayer-core';
3
3
  import { type IError, type ILogger, InterfaceLanguage, type IRectangle, type IValueObservable, type QualityLimits, VideoQuality, type InternalsExposure } from '@vkontakte/videoplayer-shared';
4
- import type { IUIConfig } from '../config';
4
+ import type { ISDKConfig, IUIConfig } from '../config';
5
5
  import { SeekAction } from '@vkontakte/videoplayer-statistics';
6
6
  import type { InteractiveRange } from '@vkontakte/videoplayer-interactive';
7
7
  import type { Readable, Writable } from 'svelte/store';
@@ -370,6 +370,7 @@ interface IStoreParams {
370
370
  previewThumbsData?: ITimelinePreviewThumbsData;
371
371
  uiConfig: IUIConfig;
372
372
  coreConfig: IOptionalTuningConfig;
373
+ metaConfig: ISDKConfig['meta'];
373
374
  player?: IPlayer;
374
375
  isInteractive: boolean;
375
376
  interactiveRanges$?: IValueObservable<InteractiveRange[]>;
@@ -400,5 +401,5 @@ interface IStoreParams {
400
401
  * Store приложения.
401
402
  * Если будет слишком большим - можно разделить его на модули
402
403
  */
403
- 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, playPrevVideo, playNextVideo, onVideoChanged, looped, statistics: uiStatistics, saveRate, internalsExposure, playerView, playerId, }: IStoreParams) => IStore;
404
+ 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, playPrevVideo, playNextVideo, onVideoChanged, looped, statistics: uiStatistics, saveRate, internalsExposure, playerView, playerId, metaConfig, }: IStoreParams) => IStore;
404
405
  export {};
@@ -4,6 +4,7 @@ import type { IPlayer, IConfig, IObservable } from '@vkontakte/videoplayer-core'
4
4
  import type { IStore } from '.';
5
5
  import type { AdditionalButtonDeprecated, IMicroStores } from '../types';
6
6
  import type { AdditionalDesktopControlPanelButton } from '../components/Controls/types';
7
+ import type { ISDKConfig } from '../config';
7
8
  export declare const setStores: (store: IStore, microStores: IMicroStores) => void;
8
9
  export declare const getStore: () => IStore;
9
10
  export declare const getMicroStores: () => IMicroStores;
@@ -12,7 +13,7 @@ export declare const getMicroStores: () => IMicroStores;
12
13
  */
13
14
  export declare const storeFromObservable: <T>(observable$: IValueObservable<T>, onNewValueEmitted?: (value: T) => void) => Readable<T>;
14
15
  export declare const storeFromObservableWithInitValue: <T>(observable$: IObservable<T>, initValue: T, onNewValueEmitted?: (value: T) => void) => Readable<T>;
15
- export declare const constructDebugTextData: (player: IPlayer, config: IConfig | undefined, store: IStore, traceId: string) => string;
16
+ export declare const constructDebugTextData: (player: IPlayer, config: IConfig | undefined, store: IStore, traceId: string, metaConfig?: ISDKConfig["meta"]) => string;
16
17
  export type DebugData = {
17
18
  version: string;
18
19
  viewport: string;
@@ -21,10 +21,6 @@ export declare const enum AdditionalVideoQuality {
21
21
  AUTO = "auto"
22
22
  }
23
23
  export type VideoQualityUI = VideoQuality | AdditionalVideoQuality;
24
- export type TransitionInfo = {
25
- duration: string;
26
- timingFunction: string;
27
- };
28
24
  export interface IVKVideoPlayerCallbacks {
29
25
  onInited?: () => void;
30
26
  onDomReady?: () => void;
@@ -96,6 +92,7 @@ export interface IVKVideoPlayerCallbacks {
96
92
  onAutoplaySoundProhibited?: () => void;
97
93
  onDevNullLog?: (entry: DevNullEntry) => void;
98
94
  onTitleClicked?: () => void;
95
+ onRichSeekActiveChanged?: (active: boolean) => void;
99
96
  uiInfo?: {
100
97
  onUpcomingLiveViewStateChanged?: (value: IUpcomingLiveViewControlInfo) => void;
101
98
  onControlsVisibleChanged?: (value?: boolean) => void;
@@ -144,7 +141,6 @@ export interface IVKVideoPlayerCallbacks {
144
141
  onBottomLeftControlBlockChanged?: (value?: IControlInfo) => void;
145
142
  onBottomRightControlBlockChanged?: (value?: IControlInfo) => void;
146
143
  onTitleChanged?: (value?: IControlInfo) => void;
147
- onControlsBottomWillChange?: (startValue?: IControlInfo, transitionInfo?: TransitionInfo) => void;
148
144
  };
149
145
  adsInfo?: {
150
146
  onLoadStarted?: () => void;
@@ -312,7 +308,7 @@ export interface IVKVideoPlayerConfig {
312
308
  pipEnabled?: boolean;
313
309
  playerView?: VideoPlayerView;
314
310
  mediascopePixels?: MediascopePixelTypes.Pixel[];
315
- getVideoDeeplink?: () => string;
311
+ getVideoDeeplink?: (timestamp: number) => string;
316
312
  }
317
313
  export interface IControlInfo {
318
314
  left: number;
@@ -1,4 +1,4 @@
1
- export declare function getControlInfo<TRefKey extends string, Refs extends Record<TRefKey, HTMLElement | undefined>>(parentElement: HTMLElement | null, refs: Refs, key: TRefKey, show: boolean, forceCalculation?: boolean): {
1
+ export declare function getControlInfo<TRefKey extends string, Refs extends Record<TRefKey, HTMLElement | undefined>>(parentElement: HTMLElement | null, refs: Refs, key: TRefKey, show: boolean): {
2
2
  left: number;
3
3
  right: number;
4
4
  top: number;
@@ -35,7 +35,13 @@ export declare const getPreferredQualitySettings: (videoId: number | undefined)
35
35
  }) | null, migrateSettingsToLegacyWay: (videoId?: number) => void, savePreferredQualitySettings: (value: PreferredQualitySettingsValue, appliesTo?: QualitySettingsAppliesTo) => void, savePreferredDefaultQualitySettings: (value: DefaultPreferredQualitySettingsValue) => void, removePreferredQualitySettingsByVideo: () => void, getPreferredDefaultQualitySettings: () => DefaultPreferredQualitySettingsValue | null;
36
36
  type IUserSalt = string & {};
37
37
  type IVideoId = string & {};
38
- interface IVideoPrefsUserVideo {
38
+ export interface IVideoPrefs {
39
+ [userSalt: IUserSalt]: IVideoPrefsUser;
40
+ }
41
+ export interface IVideoPrefsUser {
42
+ [videoId: IVideoId]: IVideoPrefsUserVideo;
43
+ }
44
+ export interface IVideoPrefsUserVideo {
39
45
  updatedTs: number;
40
46
  subtitleTrackId?: string;
41
47
  audioTrackId?: string;
@@ -31,7 +31,7 @@ export declare class SlotsApi {
31
31
  private disabledIds;
32
32
  constructor(disabledIds: string[]);
33
33
  init(shadowRootContainer: HTMLElement, store: IStore | undefined): void;
34
- add(element: HTMLElement, options: AddOptions): AddReturnType;
34
+ add(elementParam: HTMLElement | (() => HTMLElement), options: AddOptions): AddReturnType;
35
35
  private setupSlotStyles;
36
36
  /**
37
37
  * Запускаем отслеживание пересечения между переданным элементом внутри слота и контролами.