@vkontakte/videoplayer-core 2.0.178-beta.0 → 2.0.178-dev.614e3da4f.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.178-beta.0",
3
+ "version": "2.0.178-dev.614e3da4f.0",
4
4
  "author": "vk.ru",
5
5
  "description": "Videoplayer core library based on the vk.ru platform",
6
6
  "homepage": "https://vk.ru",
@@ -42,6 +42,6 @@
42
42
  "**/*.d.ts"
43
43
  ],
44
44
  "dependencies": {
45
- "@vkontakte/videoplayer-shared": "1.0.107-beta.0"
45
+ "@vkontakte/videoplayer-shared": "1.0.107-dev.614e3da4f.0"
46
46
  }
47
47
  }
@@ -315,12 +315,14 @@ export interface PlayerInfoValues {
315
315
  *
316
316
  * default value: `undefined`
317
317
  */
318
+ currentVirtualVideoBuffer$: StartEnd<Seconds> | undefined;
318
319
  currentVideoBuffer$: StartEnd<Seconds> | undefined;
319
320
  /**
320
321
  * Текущий аудио-буффер плеера (тот; который содержит текущую позицию воспроизведения)
321
322
  *
322
323
  * default value: `undefined`
323
324
  */
325
+ currentVirtualAudioBuffer$: StartEnd<Seconds> | undefined;
324
326
  currentAudioBuffer$: StartEnd<Seconds> | undefined;
325
327
  /**
326
328
  * Текущий браузерный видео-буффер (тот; который содержит текущую позицию воспроизведения)
@@ -62,10 +62,11 @@ export declare abstract class BasePlayer {
62
62
  liveSeekableDuration$: IValueSubject<Milliseconds>;
63
63
  liveAvailabilityStartTime$: IValueSubject<Milliseconds>;
64
64
  liveStreamStatus$: IValueSubject<LiveStreamStatus | undefined>;
65
- currentVideoBuffer$: IValueSubject<IRange<Seconds>>;
66
- currentAudioBuffer$: IValueSubject<IRange<Seconds>>;
65
+ currentVirtualVideoBuffer$: IValueSubject<IRange<Seconds>>;
66
+ currentVirtualAudioBuffer$: IValueSubject<IRange<Seconds>>;
67
67
  bufferLength$: IValueSubject<Milliseconds>;
68
68
  nativeBufferLength$: IValueSubject<Milliseconds>;
69
+ nativeVideoBufferLength$: IValueSubject<IRange<Seconds>>;
69
70
  nativeAudioBufferLength$: IValueSubject<IRange<Seconds>>;
70
71
  liveLatency$: IValueSubject<Milliseconds | undefined>;
71
72
  liveLoadBufferLength$: IValueSubject<Milliseconds>;
@@ -81,8 +81,8 @@ export interface IProviderOutput {
81
81
  autoVideoTrackLimits$: IValueSubject<QualityLimits | undefined>;
82
82
  autoVideoTrackLimitingAvailable$: IValueSubject<boolean>;
83
83
  canChangePlaybackSpeed$: IValueSubject<boolean | undefined>;
84
- currentVideoBuffer$: IValueSubject<IRange<Seconds> | undefined>;
85
- currentAudioBuffer$: IValueSubject<IRange<Seconds> | undefined>;
84
+ currentVirtualVideoBuffer$: IValueSubject<IRange<Seconds> | undefined>;
85
+ currentVirtualAudioBuffer$: IValueSubject<IRange<Seconds> | undefined>;
86
86
  currentNativeVideoBuffer$: IValueSubject<IRange<Seconds> | undefined>;
87
87
  currentNativeAudioBuffer$: IValueSubject<IRange<Seconds> | undefined>;
88
88
  totalBufferDuration$: IValueSubject<Milliseconds | undefined>;
@@ -1,4 +1,4 @@
1
- import type { IAbrController, IAbrRule, IBaseAbrControllerContext, IRuleInitContext, RuleLogData } from "./types";
1
+ import type { AbrLimitSources, IAbrController, IAbrRule, IBaseAbrControllerContext, IRuleInitContext, RuleLogData } from "./types";
2
2
  import type { IBaseTrack } from "../../../player/types";
3
3
  export declare const formatRuleLog: ({ name, ...logData }: RuleLogData) => string;
4
4
  export default class AbrController<
@@ -8,7 +8,9 @@ export default class AbrController<
8
8
  private history;
9
9
  private rules;
10
10
  private _context;
11
+ private _limitSources;
11
12
  get context(): C;
13
+ get limitSources(): AbrLimitSources;
12
14
  init(rules: IAbrRule<T, C>[], initContext: IRuleInitContext): void;
13
15
  destroy(): void;
14
16
  updateContext(context: C): void;
@@ -5,6 +5,10 @@ import type { Representation, Segment } from "../parsers/types";
5
5
  import type { ElementSizeManager } from "../HTMLVideoElement/ElementSizeManager";
6
6
  import type { IObservableMediaElement } from "../HTMLVideoElement/observable";
7
7
  import type { AbrPhase } from "./controllers/abrPhaseController";
8
+ export type AbrLimitSources = {
9
+ readonly above: string | undefined;
10
+ readonly below: string | undefined;
11
+ };
8
12
  export declare enum RuleConfidence {
9
13
  Low = 0,
10
14
  Normal = 1,
@@ -97,6 +101,7 @@ export interface IAbrController<T extends IBaseTrack> {
97
101
  destroy(): void;
98
102
  updateContext(context: IBaseAbrControllerContext): void;
99
103
  autoSelectTrack(rules?: IAbrRule<T, IBaseAbrControllerContext>[]): T;
104
+ readonly limitSources: AbrLimitSources;
100
105
  }
101
106
  export interface IBaseAbrControllerContext extends IVideoTracksContext {
102
107
  currentVideoTrack: Nullable<IVideoTrack>;
@@ -1,6 +1,6 @@
1
1
  import type { ITuningConfig } from "../../../utils/tuningConfig";
2
- type DisposeConstraints = Pick<ITuningConfig, "reuseOwnVideoElementOnBackgroundTabOnly" | "reuseOwnVideoElement" | "clearAudioElementOnDispose">;
3
- export declare const allocate: (container: HTMLElement, { audioVideoSyncRate, disableYandexPiP, reuseOwnVideoElement, reuseOwnVideoElementOnBackgroundTabOnly }: ITuningConfig) => HTMLVideoElement;
2
+ type DisposeConstraints = Pick<ITuningConfig, "reuseOwnVideoElement" | "clearAudioElementOnDispose">;
3
+ export declare const allocate: (container: HTMLElement, { audioVideoSyncRate, disableYandexPiP, reuseOwnVideoElement }: ITuningConfig) => HTMLVideoElement;
4
4
  export declare const initializeAudio: (element: HTMLAudioElement) => HTMLAudioElement;
5
5
  export declare const dispose: (element: HTMLMediaElement, constraints: DisposeConstraints) => void;
6
6
  export {};
@@ -465,7 +465,6 @@ export type ITuningConfig = {
465
465
  * (Скорее всего имеет смысл включить такой же флаг в настройках ui)
466
466
  */
467
467
  reuseOwnVideoElement?: boolean;
468
- reuseOwnVideoElementOnBackgroundTabOnly?: boolean;
469
468
  /**
470
469
  * Обрабатываем все сетевые ошибки, которые приходят с бэка.
471
470
  * на http 500 не падаем в краш.