@vkontakte/videoplayer-core 2.0.75 → 2.0.76

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-core",
3
- "version": "2.0.75",
3
+ "version": "2.0.76",
4
4
  "author": "vk.com",
5
5
  "description": "Videoplayer core library based on the vk.com platform",
6
6
  "homepage": "https://vk.com",
@@ -39,7 +39,7 @@
39
39
  "**/*.d.ts"
40
40
  ],
41
41
  "dependencies": {
42
- "@vkontakte/videoplayer-shared": "^1.0.17",
42
+ "@vkontakte/videoplayer-shared": "^1.0.18",
43
43
  "dashjs": "4.4.1",
44
44
  "hls.js": "1.2.1",
45
45
  "lodash": "4.17.21"
package/player/types.d.ts CHANGED
@@ -305,6 +305,7 @@ export interface IConfig {
305
305
  container: string | HTMLElement;
306
306
  sources: ISources;
307
307
  meta?: IMetadata;
308
+ failoverHosts?: string[];
308
309
  }
309
310
  export interface ISources {
310
311
  [VideoFormat.MPEG]?: IMpegSource;
@@ -324,7 +325,7 @@ export interface IMetadata {
324
325
  subtitle?: string;
325
326
  videoId?: string;
326
327
  }
327
- declare type QualitySetSource = Partial<Record<VideoQuality, string>>;
328
+ export declare type QualitySetSource = Partial<Record<VideoQuality, string>>;
328
329
  export declare type URLSource = {
329
330
  type: 'url';
330
331
  url: string;
@@ -7,6 +7,7 @@ interface IParams extends IProviderDependencies {
7
7
  container: HTMLElement;
8
8
  sources: ISources;
9
9
  meta: IMetadata;
10
+ failoverHosts: string[];
10
11
  screenFormatsPriority: VideoFormat[];
11
12
  chromecastFormatsPriority: VideoFormat[];
12
13
  desiredState: IDesiredState;
@@ -47,6 +48,7 @@ export default class ProviderContainer implements IProviderContainer {
47
48
  private chromecastFormatsIterator;
48
49
  private log;
49
50
  private params;
51
+ private failoverIndex;
50
52
  constructor(params: IParams);
51
53
  init(): void;
52
54
  destroy(): void;
@@ -61,6 +63,7 @@ export default class ProviderContainer implements IProviderContainer {
61
63
  private chooseFormat;
62
64
  private skipFormat;
63
65
  private handleNoFormatsError;
66
+ private applyFailoverHost;
64
67
  private initProviderErrorHandling;
65
68
  }
66
69
  export {};