@vkontakte/videoplayer-core 2.0.159-dev.0948a7cb.0 → 2.0.159-dev.a6a7544e.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-core",
3
- "version": "2.0.159-dev.0948a7cb.0",
3
+ "version": "2.0.159-dev.a6a7544e.0",
4
4
  "author": "vk.com",
5
5
  "description": "Videoplayer core library based on the vk.com platform",
6
6
  "homepage": "https://vk.com",
@@ -42,6 +42,6 @@
42
42
  "**/*.d.ts"
43
43
  ],
44
44
  "dependencies": {
45
- "@vkontakte/videoplayer-shared": "1.0.88-dev.0948a7cb.0"
45
+ "@vkontakte/videoplayer-shared": "1.0.88-dev.a6a7544e.0"
46
46
  }
47
47
  }
@@ -22,6 +22,7 @@ export interface IParams {
22
22
  compatibilityMode?: boolean;
23
23
  tracer: ITracer;
24
24
  useEnableSubtitlesParam?: boolean;
25
+ handleExtendedNetworkErrorsSet?: boolean;
25
26
  }
26
27
  export type Priority = "high" | "low" | "auto";
27
28
  export interface FetchParamsWithUrl extends FetchParams {
@@ -65,7 +66,8 @@ export declare class Fetcher {
65
66
  private useEnableSubtitlesParam;
66
67
  private performanceObserver;
67
68
  private pendingConnectionMetrics;
68
- constructor({ throughputEstimator, requestQuic, tracer, compatibilityMode, useEnableSubtitlesParam }: IParams);
69
+ private handleExtendedNetworkErrorsSet;
70
+ constructor({ throughputEstimator, requestQuic, tracer, compatibilityMode, useEnableSubtitlesParam, handleExtendedNetworkErrorsSet }: IParams);
69
71
  private onHeadersReceived;
70
72
  private setupPerformanceObserver;
71
73
  private processPerformanceResourceTiming;
@@ -0,0 +1,9 @@
1
+ import type { IError, ISubject } from "@vkontakte/videoplayer-shared";
2
+ type Params = {
3
+ txtCode: string;
4
+ error$: ISubject<IError>;
5
+ recoverableError$: ISubject<IError>;
6
+ httpCode?: number | undefined;
7
+ };
8
+ export declare const processNetworkErrors: ({ txtCode, error$, recoverableError$, httpCode }: Params) => void;
9
+ export {};
@@ -22,6 +22,7 @@ export interface IParams {
22
22
  compatibilityMode?: boolean;
23
23
  tracer: ITracer;
24
24
  useEnableSubtitlesParam?: boolean;
25
+ handleExtendedNetworkErrorsSet?: boolean;
25
26
  }
26
27
  export type Priority = "high" | "low" | "auto";
27
28
  export interface FetchParamsWithUrl extends FetchParams {
@@ -64,7 +65,8 @@ export declare class Fetcher {
64
65
  private useEnableSubtitlesParam;
65
66
  private performanceObserver;
66
67
  private pendingConnectionMetrics;
67
- constructor({ throughputEstimator, requestQuic, tracer, compatibilityMode, useEnableSubtitlesParam }: IParams);
68
+ private handleExtendedNetworkErrorsSet;
69
+ constructor({ throughputEstimator, requestQuic, tracer, compatibilityMode, useEnableSubtitlesParam, handleExtendedNetworkErrorsSet }: IParams);
68
70
  private onHeadersReceived;
69
71
  private setupPerformanceObserver;
70
72
  private processResourceTiming;
@@ -0,0 +1,9 @@
1
+ import type { IError, ISubject } from "@vkontakte/videoplayer-shared";
2
+ type Params = {
3
+ txtCode: string;
4
+ error$: ISubject<IError>;
5
+ recoverableError$: ISubject<IError>;
6
+ httpCode?: number | undefined;
7
+ };
8
+ export declare const processNetworkErrors: ({ txtCode, error$, recoverableError$, httpCode }: Params) => void;
9
+ export {};
@@ -320,6 +320,11 @@ export type ITuningConfig = {
320
320
  * (Скорее всего имеет смысл включить такой же флаг в настройках ui)
321
321
  */
322
322
  reuseOwnVideoElement?: boolean;
323
+ /**
324
+ * Обрабатываем все сетевые ошибки, которые приходят с бэка.
325
+ * на http 500 не падаем в краш.
326
+ */
327
+ handleExtendedNetworkErrorsSet?: boolean;
323
328
  };
324
329
  export type IOptionalTuningConfig = RecursivePartial<ITuningConfig>;
325
330
  export declare const fillDefault: (partial: IOptionalTuningConfig) => ITuningConfig;