@vkontakte/videoplayer-core 2.0.129-dev.1e8837e1.0 → 2.0.129-dev.26e89d23.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.129-dev.1e8837e1.0",
3
+ "version": "2.0.129-dev.26e89d23.0",
4
4
  "author": "vk.com",
5
5
  "description": "Videoplayer core library based on the vk.com platform",
6
6
  "homepage": "https://vk.com",
@@ -49,7 +49,7 @@
49
49
  "**/*.d.ts"
50
50
  ],
51
51
  "dependencies": {
52
- "@vkontakte/videoplayer-shared": "1.0.57-dev.6b82279a.0",
52
+ "@vkontakte/videoplayer-shared": "1.0.56",
53
53
  "hls.js": "~1.4.7"
54
54
  }
55
55
  }
@@ -8,20 +8,26 @@ interface IConnectData {
8
8
  isBuffering$: IObservable<boolean>;
9
9
  isSeeked$: IObservable<boolean>;
10
10
  looped$: IObservable<Seconds>;
11
- currentStallDuration$: IObservable<Milliseconds>;
12
- qualityLimitsOnStall: ITuningConfig['dash']['qualityLimitsOnStall'];
11
+ playing$: IObservable<undefined>;
12
+ currentStallDuration$: IValueSubject<Milliseconds>;
13
+ tuning: ITuningConfig['stallsManager'];
14
+ abrParams: ITuningConfig['autoTrackSelection'];
13
15
  }
14
16
  declare class StallsManager {
15
17
  private currentStallDuration$;
16
18
  private videoLastDataObtainedTimestamp$;
17
19
  private throughput$;
18
20
  private rtt$;
19
- private qualityLimitsOnStall;
21
+ private tuning;
22
+ private abrParams;
20
23
  private isSeeked$;
21
24
  private isBuffering$;
22
- private currentStallsCount;
23
25
  private maxQualityLimit;
24
26
  private lastUniqueVideoTrackSelected;
27
+ private currentStallsCount;
28
+ private sumStallsDuration;
29
+ private lastStallDuration;
30
+ private providerStartWatchingTimestamp;
25
31
  private lastUniqueVideoTrackSelectedTimestamp;
26
32
  private predictedThroughputWithoutData;
27
33
  private qualityRestrictionTimer;
@@ -30,7 +36,15 @@ declare class StallsManager {
30
36
  connect(data: IConnectData): void;
31
37
  get videoMaxQualityLimit(): ExactVideoQuality | undefined;
32
38
  get predictedThroughput(): Kbps;
39
+ get abrTuningParams(): ITuningConfig['autoTrackSelection'];
33
40
  set lastVideoTrackSelected(lastUniqueVideoTrackSelected: IVideoTrack);
34
41
  destroy(): void;
42
+ private updateStoredAbrParams;
43
+ private calculateOptimalAbrParams;
44
+ private getStoredData;
45
+ private setStoredData;
46
+ private addStallInfoToHistory;
47
+ private updateStallData;
48
+ private subscribe;
35
49
  }
36
50
  export default StallsManager;
@@ -24,11 +24,14 @@ export type ITuningConfig = {
24
24
  };
25
25
  autoTrackSelection: {
26
26
  bitrateFactorAtEmptyBuffer: number;
27
+ minBitrateFactorAtEmptyBuffer: number;
28
+ maxBitrateFactorAtEmptyBuffer: number;
27
29
  bitrateAudioFactorAtEmptyBuffer: number;
28
30
  bitrateFactorAtFullBuffer: number;
31
+ minBitrateFactorAtFullBuffer: number;
32
+ maxBitrateFactorAtFullBuffer: number;
29
33
  bitrateAudioFactorAtFullBuffer: number;
30
34
  minVideoAudioRatio: number;
31
- minAvailableThroughputAudioRatio: number;
32
35
  limitByContainer: boolean;
33
36
  usePixelRatio: boolean;
34
37
  /** @deprecated */
@@ -36,6 +39,8 @@ export type ITuningConfig = {
36
39
  pixelRatioLogBase: number;
37
40
  pixelRatioLogCoefficients: number[];
38
41
  containerSizeFactor: number;
42
+ minContainerSizeFactor: number;
43
+ maxContainerSizeFactor: number;
39
44
  lazyQualitySwitch: boolean;
40
45
  minBufferToSwitchUp: number;
41
46
  considerPlaybackRate: boolean;
@@ -55,6 +60,24 @@ export type ITuningConfig = {
55
60
  qualityUpWaitingTime: number;
56
61
  minQualityBanLimit: ExactVideoQuality;
57
62
  };
63
+ stallsManager: {
64
+ stallDurationNoDataBeforeQualityDecrease: Milliseconds;
65
+ stallCountBeforeQualityDecrease: Milliseconds;
66
+ resetQualityRestrictionTimeout: Milliseconds;
67
+ ignoreStallsOnSeek: boolean;
68
+ maxTvtToBeCounted: Seconds;
69
+ minTvtToBeCounted: Seconds;
70
+ maxPossibleStallDuration: Seconds;
71
+ stallsMetricsHistoryLength: number;
72
+ emaAlpha: number;
73
+ targetStallsDurationPerTvt: number;
74
+ deviationStallsDurationPerTvt: number;
75
+ criticalStallsDurationPerTvt: number;
76
+ abrAdjustingSpeed: number;
77
+ useTotalStallsDurationPerTvt: boolean;
78
+ useAverageStallsDurationPerTvt: boolean;
79
+ useEmaStallsDurationPerTvt: boolean;
80
+ };
58
81
  dash: {
59
82
  /** @deprecated */
60
83
  forwardBufferTarget: Milliseconds;
@@ -72,13 +95,6 @@ export type ITuningConfig = {
72
95
  enableSubSegmentBufferFeeding: boolean;
73
96
  bufferEmptinessTolerance: Milliseconds;
74
97
  useFetchPriorityHints: boolean;
75
- qualityLimitsOnStall: {
76
- stallDurationNoDataBeforeQualityDecrease: Milliseconds;
77
- stallDurationToBeCount: Milliseconds;
78
- stallCountBeforeQualityDecrease: Milliseconds;
79
- resetQualityRestrictionTimeout: Milliseconds;
80
- ignoreStallsOnSeek: boolean;
81
- };
82
98
  enableBaseUrlSupport: boolean;
83
99
  maxSegmentRetryCount: number;
84
100
  sourceOpenTimeout: number;