@vkontakte/videoplayer-core 2.0.35 → 2.0.36
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,8 +1,10 @@
|
|
|
1
1
|
import type ThroughputEstimator from "../../../utils/ThroughputEstimator";
|
|
2
|
+
import { ITuningConfig } from "../../../utils/tuningConfig";
|
|
2
3
|
import { IError, ISubject, IValueSubject, Milliseconds } from '@vkontakte/videoplayer-shared';
|
|
3
4
|
import { Representation, RepresentationKind } from './types';
|
|
4
5
|
export interface Dependencies {
|
|
5
6
|
throughputEstimator: ThroughputEstimator;
|
|
7
|
+
tuning: ITuningConfig['dash'];
|
|
6
8
|
}
|
|
7
9
|
export declare class BufferManager {
|
|
8
10
|
ended$: IValueSubject<boolean>;
|
|
@@ -21,7 +23,8 @@ export declare class BufferManager {
|
|
|
21
23
|
private abortController;
|
|
22
24
|
private loadAllInitsPromise;
|
|
23
25
|
private throughputEstimator;
|
|
24
|
-
|
|
26
|
+
private tuning;
|
|
27
|
+
constructor(kind: RepresentationKind, mediaSource: MediaSource, representations: Representation[], { throughputEstimator, tuning }: Dependencies);
|
|
25
28
|
startWith(id: Representation['id']): Promise<void>;
|
|
26
29
|
switchTo(newRepresentationId: Representation['id']): Promise<void>;
|
|
27
30
|
maintain(currentPosition: Milliseconds): Promise<void>;
|
|
@@ -6,6 +6,7 @@ export interface Constraints {
|
|
|
6
6
|
container?: IRectangle;
|
|
7
7
|
throughput?: Kbps;
|
|
8
8
|
tuning: ITuningConfig['autoTrackSelection'];
|
|
9
|
+
forwardBufferHealth?: number;
|
|
9
10
|
}
|
|
10
|
-
declare const autoSelectVideoTrack: (tracks: IVideoTrack[], { container, throughput, tuning, }: Constraints) => IVideoTrack;
|
|
11
|
+
declare const autoSelectVideoTrack: (tracks: IVideoTrack[], { container, throughput, tuning, forwardBufferHealth, }: Constraints) => IVideoTrack;
|
|
11
12
|
export default autoSelectVideoTrack;
|
package/utils/tuningConfig.d.ts
CHANGED
|
@@ -11,12 +11,17 @@ export declare type ITuningConfig = {
|
|
|
11
11
|
streamMinSampleTime: Milliseconds;
|
|
12
12
|
};
|
|
13
13
|
autoTrackSelection: {
|
|
14
|
-
|
|
14
|
+
bitrateFactorAtEmptyBuffer: number;
|
|
15
|
+
bitrateFactorAtFullBuffer: number;
|
|
15
16
|
limitByContainer: boolean;
|
|
16
17
|
usePixelRatio: boolean;
|
|
17
18
|
containerSizeFactor: number;
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
};
|
|
20
|
+
dash: {
|
|
21
|
+
extraInitSize: Milliseconds;
|
|
22
|
+
forwardBufferTarget: Milliseconds;
|
|
23
|
+
segmentRequestSize: Byte;
|
|
24
|
+
representationSwitchForwardBufferGap: Milliseconds;
|
|
20
25
|
};
|
|
21
26
|
enableTelemetryAtStart: boolean;
|
|
22
27
|
formatsToAvoid: VideoFormat[];
|