@vkontakte/videoplayer 1.1.80 → 1.1.81-dev.169e8a40.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,11 +1,11 @@
1
1
  {
2
2
  "name": "@vkontakte/videoplayer",
3
- "version": "1.1.80",
3
+ "version": "1.1.81-dev.169e8a40.0",
4
4
  "author": "vk.com",
5
5
  "description": "Videoplayer based on the vk.com platform",
6
6
  "homepage": "https://vk.com",
7
7
  "license": "GPL-3.0",
8
- "main": "./esnext.cjs.js",
8
+ "main": "./esnext.cjs",
9
9
  "module": "./esnext.esm.js",
10
10
  "types": "./types/index.d.ts",
11
11
  "type": "module",
@@ -13,51 +13,51 @@
13
13
  ".": {
14
14
  "types": "./types/index.d.ts",
15
15
  "import": "./esnext.esm.js",
16
- "require": "./esnext.cjs.js"
16
+ "require": "./esnext.cjs"
17
17
  },
18
18
  "./evergreen": {
19
19
  "types": "./types/index.d.ts",
20
20
  "import": "./evergreen.esm.js",
21
- "require": "./evergreen.cjs.js"
21
+ "require": "./evergreen.cjs"
22
22
  },
23
23
  "./esnext": {
24
24
  "types": "./types/index.d.ts",
25
25
  "import": "./esnext.esm.js",
26
- "require": "./esnext.cjs.js"
26
+ "require": "./esnext.cjs"
27
27
  },
28
28
  "./es2024": {
29
29
  "types": "./types/index.d.ts",
30
30
  "import": "./es2024.esm.js",
31
- "require": "./es2024.cjs.js"
31
+ "require": "./es2024.cjs"
32
32
  },
33
33
  "./es2018": {
34
34
  "types": "./types/index.d.ts",
35
35
  "import": "./es2018.esm.js",
36
- "require": "./es2018.cjs.js"
36
+ "require": "./es2018.cjs"
37
37
  },
38
38
  "./es2015": {
39
39
  "types": "./types/index.d.ts",
40
40
  "import": "./es2015.esm.js",
41
- "require": "./es2015.cjs.js"
41
+ "require": "./es2015.cjs"
42
42
  },
43
43
  "./evergreen.esm.js": "./evergeen.esm.js",
44
44
  "./esnext.esm.js": "./esnext.esm.js",
45
- "./esnext.cjs.js": "./esnext.cjs.js",
45
+ "./esnext.cjs": "./esnext.cjs",
46
46
  "./es2018.esm.js": "./es2018.esm.js",
47
- "./es2018.cjs.js": "./es2018.cjs.js",
47
+ "./es2018.cjs": "./es2018.cjs",
48
48
  "./es2015.esm.js": "./es2015.esm.js",
49
- "./es2015.cjs.js": "./es2015.cjs.js"
49
+ "./es2015.cjs": "./es2015.cjs"
50
50
  },
51
51
  "files": [
52
- "*.cjs.js",
52
+ "*.cjs",
53
53
  "*.esm.js",
54
54
  "**/*.d.ts"
55
55
  ],
56
56
  "dependencies": {
57
57
  "@adtech/rbadman": "2.2.57",
58
- "@vkontakte/videoplayer-core": "2.0.149",
59
- "@vkontakte/videoplayer-interactive": "1.0.55",
60
- "@vkontakte/videoplayer-shared": "1.0.78",
61
- "@vkontakte/videoplayer-statistics": "1.0.95"
58
+ "@vkontakte/videoplayer-core": "2.0.150-dev.169e8a40.0",
59
+ "@vkontakte/videoplayer-interactive": "1.0.56-dev.169e8a40.0",
60
+ "@vkontakte/videoplayer-shared": "1.0.79-dev.169e8a40.0",
61
+ "@vkontakte/videoplayer-statistics": "1.0.96-dev.169e8a40.0"
62
62
  }
63
63
  }
@@ -0,0 +1,2 @@
1
+ import { type Constructor } from '@vkontakte/videoplayer-shared';
2
+ export declare const HTMLElement: Constructor<HTMLElement>;
@@ -10,6 +10,7 @@ import { AnnotationsApi } from '../utils/webAPI/annotationsApi/annotationsApi';
10
10
  import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem } from '../components/Menus/subMenuTabs/types';
11
11
  import type { AdditionalButton } from '../components/Controls/types';
12
12
  import { SlotsApi } from '../utils/webAPI/slotsApi';
13
+ import { HTMLElement } from './HTMLElement';
13
14
  export declare class VKVideoPlayer extends HTMLElement {
14
15
  private svelteStubComponent?;
15
16
  private svelteRootComponent?;
@@ -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
@@ -251,6 +251,14 @@ export interface IUIConfig {
251
251
  */
252
252
  suitableDurationForUsingRichSeek: Seconds;
253
253
  titleShowBehaviour: TitleShowBehaviour;
254
+ /**
255
+ * Отключаем слоты по идентификаторам.
256
+ */
257
+ disabledSlotIds: string[];
258
+ /**
259
+ * Отключаем внешне переданные кнопки по идентификаторам.
260
+ */
261
+ disabledAdditionalButtonIds: string[];
254
262
  }
255
263
  export declare const defaultConfig: IUIConfig;
256
264
  export type IOptionalUIConfig = RecursivePartial<IUIConfig>;
@@ -307,7 +307,7 @@ export interface IVKVideoPlayerConfig {
307
307
  pipEnabled?: boolean;
308
308
  playerView?: VideoPlayerView;
309
309
  mediascopePixels?: MediascopePixelTypes.Pixel[];
310
- getVideoDeeplink?: () => string;
310
+ getVideoDeeplink?: (timestamp: number) => string;
311
311
  }
312
312
  export interface IControlInfo {
313
313
  left: 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;
@@ -18,13 +18,20 @@ type AddOptions = {
18
18
  hideAllControls?: boolean;
19
19
  controlsBehaviour?: HideControlsWhenIntersectedOptions;
20
20
  };
21
+ type AddReturnType = {
22
+ success: true;
23
+ } | {
24
+ success: false;
25
+ message: string;
26
+ };
21
27
  export declare class SlotsApi {
22
28
  private shadowRootContainer;
23
29
  private slots;
24
30
  private store;
25
- constructor();
31
+ private disabledIds;
32
+ constructor(disabledIds: string[]);
26
33
  init(shadowRootContainer: HTMLElement, store: IStore | undefined): void;
27
- add(element: HTMLElement, options: AddOptions): void;
34
+ add(element: HTMLElement, options: AddOptions): AddReturnType;
28
35
  private setupSlotStyles;
29
36
  /**
30
37
  * Запускаем отслеживание пересечения между переданным элементом внутри слота и контролами.