@vkontakte/videoplayer-core 2.0.46 → 2.0.47

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.46",
3
+ "version": "2.0.47",
4
4
  "author": "vk.com",
5
5
  "description": "Videoplayer core library based on the vk.com platform",
6
6
  "homepage": "https://vk.com",
@@ -14,7 +14,7 @@
14
14
  "**/*.d.ts"
15
15
  ],
16
16
  "dependencies": {
17
- "@vkontakte/videoplayer-shared": "1.0.9",
17
+ "@vkontakte/videoplayer-shared": "1.0.11",
18
18
  "dashjs": "4.3.0",
19
19
  "hls.js": "1.1.5",
20
20
  "lodash": "4.17.21"
@@ -1,15 +1,20 @@
1
1
  import { ITuningConfig } from "../../../utils/tuningConfig";
2
2
  import { IError, ISubject, IValueSubject, Milliseconds } from '@vkontakte/videoplayer-shared';
3
3
  import type { Fetcher } from './fetcher';
4
- import { Container, Representation, RepresentationKind } from './types';
4
+ import { Container, Range, Representation, RepresentationKind } from './types';
5
5
  export interface Dependencies {
6
6
  fetcher: Fetcher;
7
7
  tuning: ITuningConfig['dash'];
8
8
  }
9
+ export interface Gap extends Range<Milliseconds> {
10
+ representation: Representation['id'];
11
+ }
9
12
  export declare class BufferManager {
10
- ended$: IValueSubject<boolean>;
13
+ onLastSegment$: IValueSubject<boolean>;
14
+ fullyBuffered$: IValueSubject<boolean>;
11
15
  playingRepresentation$: IValueSubject<Representation['id'] | undefined>;
12
16
  error$: ISubject<IError>;
17
+ gaps: Gap[];
13
18
  private subscription;
14
19
  private kind;
15
20
  private container;
@@ -28,6 +33,8 @@ export declare class BufferManager {
28
33
  private allInitsLoaded;
29
34
  private tuning;
30
35
  private fetcher;
36
+ private bufferUpdateQueue;
37
+ private bufferUpdateQueueInProgress;
31
38
  constructor(kind: RepresentationKind, mediaSource: MediaSource, container: Container, representations: Representation[], { fetcher, tuning }: Dependencies);
32
39
  startWith(id: Representation['id']): Promise<boolean>;
33
40
  switchTo(newRepresentationId: Representation['id']): Promise<void>;
@@ -30,6 +30,8 @@ export declare class Player {
30
30
  lastConnectionReused$: IValueSubject<boolean | undefined>;
31
31
  lastRequestFirstBytes$: IValueSubject<Milliseconds | undefined>;
32
32
  private forceEnded$;
33
+ private gapWatchdogStarted;
34
+ private gapWatchdogSubscription;
33
35
  constructor(params: Params);
34
36
  initManifest(element: HTMLVideoElement, manifestUrl: string): Promise<Manifest>;
35
37
  initRepresentations(initialVideo: Representation['id'], initialAudio: Representation['id']): Promise<void>;
@@ -38,4 +40,5 @@ export declare class Player {
38
40
  stop(): void;
39
41
  destroy(): void;
40
42
  private tick;
43
+ private jumGap;
41
44
  }
@@ -38,6 +38,7 @@ export declare type ITuningConfig = {
38
38
  dashSeekInSegmentAlwaysSeekDelta: Milliseconds;
39
39
  endGapTolerance: Milliseconds;
40
40
  stallIgnoreThreshold: Milliseconds;
41
+ gapWatchdogInterval: Milliseconds;
41
42
  };
42
43
  export declare type IOptionalTuningConfig = {
43
44
  [key in keyof ITuningConfig]?: Partial<ITuningConfig[key]>;