@vkontakte/videoplayer-core 2.0.171 → 2.0.172-beta.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/es2015.cjs +19 -241
- package/es2015.esm.js +19 -241
- package/esnext.cjs +19 -241
- package/esnext.esm.js +19 -241
- package/evergreen.esm.js +19 -241
- package/package.json +2 -2
- package/types/player/Player.d.ts +5 -1
- package/types/player/types.d.ts +21 -5
- package/types/providers/DashLiveProvider/utils/LiveDashPlayer.d.ts +3 -0
- package/types/providers/DashProvider/baseDashProvider.d.ts +1 -7
- package/types/providers/DashProvider/lib/buffer.d.ts +6 -2
- package/types/providers/DashProvider/lib/player.d.ts +1 -0
- package/types/providers/DashProvider/lib/sourceBufferTaskQueue.d.ts +1 -2
- package/types/providers/DashProviderVirtual/baseDashProvider.d.ts +2 -7
- package/types/providers/DashProviderVirtual/lib/buffer/nativeBufferManager.d.ts +4 -2
- package/types/providers/DashProviderVirtual/lib/buffer/sourceBufferTaskQueue.d.ts +3 -2
- package/types/providers/DashProviderVirtual/lib/buffer/virtualBuffer/baseVirtualBufferManager.versionA.d.ts +3 -1
- package/types/providers/DashProviderVirtual/lib/player/basePlayer.d.ts +3 -1
- package/types/providers/ProviderContainer/Mayday/GraceTimeout.d.ts +17 -0
- package/types/providers/ProviderContainer/Mayday/heuristics/SegmentAppendHeuristic.d.ts +10 -0
- package/types/providers/ProviderContainer/Mayday/heuristics/StartupHangupHeuristic.d.ts +46 -0
- package/types/providers/ProviderContainer/Mayday/heuristics/TvFetcherErrorHeuristic.d.ts +10 -0
- package/types/providers/ProviderContainer/Mayday/index.d.ts +2 -1
- package/types/providers/ProviderContainer/Mayday/types.d.ts +2 -1
- package/types/providers/ProviderContainer/index.d.ts +0 -1
- package/types/providers/ProviderContainer/utils/formatsSupport.d.ts +0 -1
- package/types/providers/ProviderContainer/utils/playbackHangup.d.ts +6 -2
- package/types/providers/types.d.ts +4 -2
- package/types/providers/utils/Abr/abrController.d.ts +4 -1
- package/types/providers/utils/Abr/abrManager.d.ts +3 -0
- package/types/providers/utils/Abr/controllers/stallsController.d.ts +8 -1
- package/types/providers/utils/Abr/rules/audio/audioThroughputRule.d.ts +2 -2
- package/types/providers/utils/Abr/rules/audio/minAudioForVideoRule.d.ts +2 -2
- package/types/providers/utils/Abr/rules/baseRule.d.ts +2 -2
- package/types/providers/utils/Abr/rules/video/abandonRequestRule.d.ts +2 -2
- package/types/providers/utils/Abr/rules/video/bolaRule.d.ts +2 -2
- package/types/providers/utils/Abr/rules/video/bufferRule.d.ts +2 -2
- package/types/providers/utils/Abr/rules/video/fitsContainerRule.d.ts +2 -2
- package/types/providers/utils/Abr/rules/video/insufficientBufferRule.d.ts +2 -2
- package/types/providers/utils/Abr/rules/video/lowerLimitRule.d.ts +2 -2
- package/types/providers/utils/Abr/rules/video/stallsRule.d.ts +6 -2
- package/types/providers/utils/Abr/rules/video/throughputRule.d.ts +2 -2
- package/types/providers/utils/Abr/rules/video/tvDisabledVideoTrackRule.d.ts +2 -2
- package/types/providers/utils/Abr/rules/video/upperLimitRule.d.ts +2 -2
- package/types/providers/utils/Abr/selectTrackByRules.d.ts +23 -0
- package/types/providers/utils/Abr/types.d.ts +6 -8
- package/types/providers/utils/Abr/utils.d.ts +3 -2
- package/types/providers/utils/HTMLVideoElement/destroy.d.ts +1 -1
- package/types/providers/utils/HTMLVideoElement/observable.d.ts +1 -1
- package/types/providers/utils/HTMLVideoElement/pool.d.ts +2 -3
- package/types/utils/ThroughputEstimator.d.ts +2 -0
- package/types/utils/buffer/isBrokenSegmentAppend.d.ts +3 -0
- package/types/utils/buffer/timeRangesToIntervals.d.ts +3 -0
- package/types/utils/timers.d.ts +2 -0
- package/types/utils/tuningConfig.d.ts +58 -37
- package/types/providers/ProviderContainer/Mayday/heuristics/HangupHeuristic.d.ts +0 -23
- package/types/providers/utils/Abr/rules/video/downloadTimeRule.d.ts +0 -15
- package/types/providers/utils/Abr/rules/video/failedVideoTrackRule.d.ts +0 -14
- package/types/utils/autoSelectTrack.d.ts +0 -37
- package/types/utils/buffer/dynamicBufferTarget.d.ts +0 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IAbrRule, IAbrRuleResolution, IVideoAbrContext } from "../../types";
|
|
1
|
+
import type { IAbrRule, IAbrRuleResolution, IVideoAbrContext, RuleLogData } from "../../types";
|
|
2
2
|
import type { IVideoTrack } from "../../../../../player/types";
|
|
3
3
|
import type { Nullable } from "@vkontakte/videoplayer-shared";
|
|
4
4
|
import { LimitAboveRule } from "../limitAboveRule";
|
|
@@ -12,6 +12,6 @@ type BufferRuleLogsArgs = [currentVideoTrack: Nullable<IVideoTrack>, lastVideoTr
|
|
|
12
12
|
export declare class BufferRule extends LimitAboveRule<IVideoTrack, IVideoAbrContext, BufferRuleLogsArgs> implements IAbrRule<IVideoTrack, IVideoAbrContext> {
|
|
13
13
|
constructor(phaseConfig: RulePhaseConfig);
|
|
14
14
|
execute(context: IVideoAbrContext): IAbrRuleResolution<IVideoTrack>;
|
|
15
|
-
protected
|
|
15
|
+
protected createLogData(selectedTrack: IVideoTrack, currentVideoTrack: Nullable<IVideoTrack>, lastVideoTrackSelected: Nullable<IVideoTrack>, forwardBufferHealth: Nullable<number>, abrTuning: ITuningConfig["autoTrackSelection"]): RuleLogData;
|
|
16
16
|
}
|
|
17
17
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IAbrRule, IAbrRuleResolution, IVideoAbrContext } from "../../types";
|
|
1
|
+
import type { IAbrRule, IAbrRuleResolution, IVideoAbrContext, RuleLogData } from "../../types";
|
|
2
2
|
import type { IVideoTrack } from "../../../../../player/types";
|
|
3
3
|
import type { IRectangle, Nullable } from "@vkontakte/videoplayer-shared";
|
|
4
4
|
import { LimitAboveRule } from "../limitAboveRule";
|
|
@@ -9,7 +9,7 @@ type FitsContainerLogsArgs = [containerSizeLimit: Nullable<IContainerSizeLimit>,
|
|
|
9
9
|
export declare class FitsContainerRule extends LimitAboveRule<IVideoTrack, IVideoAbrContext, FitsContainerLogsArgs> implements IAbrRule<IVideoTrack, IVideoAbrContext> {
|
|
10
10
|
constructor(phaseConfig: RulePhaseConfig);
|
|
11
11
|
execute(context: IVideoAbrContext): IAbrRuleResolution<IVideoTrack>;
|
|
12
|
-
protected
|
|
12
|
+
protected createLogData(selectedTrack: IVideoTrack, containerSizeLimit: Nullable<IContainerSizeLimit>, containerSizeFactor: number, abrTuning: ITuningConfig["autoTrackSelection"]): RuleLogData;
|
|
13
13
|
private getContainerSizeLimit;
|
|
14
14
|
}
|
|
15
15
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IAbrRule, IAbrRuleResolution, IRuleInitContext, IVideoAbrContext } from "../../types";
|
|
1
|
+
import type { IAbrRule, IAbrRuleResolution, IRuleInitContext, IVideoAbrContext, RuleLogData } from "../../types";
|
|
2
2
|
import type { IVideoTrack } from "../../../../../player/types";
|
|
3
3
|
import type { Milliseconds } from "@vkontakte/videoplayer-shared";
|
|
4
4
|
import { LimitAboveRule } from "../limitAboveRule";
|
|
@@ -10,6 +10,6 @@ export declare class InsufficientBufferRule extends LimitAboveRule<IVideoTrack,
|
|
|
10
10
|
override init(initContext: IRuleInitContext): void;
|
|
11
11
|
execute(context: IVideoAbrContext): IAbrRuleResolution<IVideoTrack>;
|
|
12
12
|
private selectThroughputAwareFallback;
|
|
13
|
-
protected
|
|
13
|
+
protected createLogData(selectedTrack: IVideoTrack, forwardBufferDuration: Milliseconds | undefined, thresholdMs: Milliseconds, triggered: boolean, suppressedByGrace: boolean): RuleLogData;
|
|
14
14
|
}
|
|
15
15
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IAbrRule, IAbrRuleResolution, IVideoAbrContext } from "../../types";
|
|
1
|
+
import type { IAbrRule, IAbrRuleResolution, IVideoAbrContext, RuleLogData } from "../../types";
|
|
2
2
|
import type { IVideoTrack } from "../../../../../player/types";
|
|
3
3
|
import type { Nullable, QualityLimits } from "@vkontakte/videoplayer-shared";
|
|
4
4
|
import { type ExactVideoQuality } from "@vkontakte/videoplayer-shared";
|
|
@@ -8,6 +8,6 @@ type LowerLimitLogsArgs = [limitsAreInvalid: boolean, lowestAvailableQuality: Nu
|
|
|
8
8
|
export declare class LowerLimitRule extends LimitBelowRule<IVideoTrack, IVideoAbrContext, LowerLimitLogsArgs> implements IAbrRule<IVideoTrack, IVideoAbrContext> {
|
|
9
9
|
constructor(phaseConfig: RulePhaseConfig);
|
|
10
10
|
execute(context: IVideoAbrContext): IAbrRuleResolution<IVideoTrack>;
|
|
11
|
-
protected
|
|
11
|
+
protected createLogData(selectedTrack: IVideoTrack, limitsAreInvalid: boolean, lowestAvailableQuality: Nullable<ExactVideoQuality>, highestAvailableQuality: Nullable<ExactVideoQuality>, limits: QualityLimits): RuleLogData;
|
|
12
12
|
}
|
|
13
13
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IAbrRule, IAbrRuleResolution, IVideoAbrContext } from "../../types";
|
|
1
|
+
import type { IAbrRule, IAbrRuleResolution, IVideoAbrContext, RuleLogData } from "../../types";
|
|
2
2
|
import type { IVideoTrack } from "../../../../../player/types";
|
|
3
3
|
import type { Kbps, Nullable } from "@vkontakte/videoplayer-shared";
|
|
4
4
|
import { LimitAboveRule } from "../limitAboveRule";
|
|
@@ -11,9 +11,13 @@ export declare class StallsRule extends LimitAboveRule<IVideoTrack, IVideoAbrCon
|
|
|
11
11
|
private lastStallDurationRestriction;
|
|
12
12
|
private maxQualityLimitOnStall;
|
|
13
13
|
private predictedThroughputWithoutData;
|
|
14
|
+
private restrictionTracer;
|
|
15
|
+
private restrictionStartedAt;
|
|
14
16
|
constructor(phaseConfig: RulePhaseConfig);
|
|
15
17
|
execute(context: IVideoAbrContext): IAbrRuleResolution<IVideoTrack>;
|
|
16
|
-
protected
|
|
18
|
+
protected createLogData(selectedTrack: IVideoTrack, forwardBufferHealth: Nullable<number>, playbackRate: number, reserve: Kbps, playbackRateFactor: number, bitrateFactor: number, tuning: ITuningConfig): RuleLogData;
|
|
19
|
+
private traceRestrictionSet;
|
|
20
|
+
private traceRestrictionReset;
|
|
17
21
|
private updateStallQualityLimits;
|
|
18
22
|
}
|
|
19
23
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IAbrRule, IAbrRuleResolution, IVideoAbrContext } from "../../types";
|
|
1
|
+
import type { IAbrRule, IAbrRuleResolution, IVideoAbrContext, RuleLogData } from "../../types";
|
|
2
2
|
import type { IVideoTrack } from "../../../../../player/types";
|
|
3
3
|
import type { Kbps, Nullable } from "@vkontakte/videoplayer-shared";
|
|
4
4
|
import { LimitAboveRule } from "../limitAboveRule";
|
|
@@ -8,6 +8,6 @@ type ThroughputLogsArgs = [forwardBufferHealth: Nullable<number>, playbackRate:
|
|
|
8
8
|
export declare class ThroughputRule extends LimitAboveRule<IVideoTrack, IVideoAbrContext, ThroughputLogsArgs> implements IAbrRule<IVideoTrack, IVideoAbrContext> {
|
|
9
9
|
constructor(phaseConfig: RulePhaseConfig);
|
|
10
10
|
execute(context: IVideoAbrContext): IAbrRuleResolution<IVideoTrack>;
|
|
11
|
-
protected
|
|
11
|
+
protected createLogData(selectedTrack: IVideoTrack, forwardBufferHealth: Nullable<number>, playbackRate: number, reserve: Kbps, playbackRateFactor: number, bitrateFactor: number, estimatedThroughput: Kbps, phase: AbrPhase | undefined, tuning: ITuningConfig): RuleLogData;
|
|
12
12
|
}
|
|
13
13
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { IAbrRule, IAbrRuleResolution, IVideoAbrContext } from "../../types";
|
|
1
|
+
import type { IAbrRule, IAbrRuleResolution, IVideoAbrContext, RuleLogData } from "../../types";
|
|
2
2
|
import type { IVideoTrack } from "../../../../../player/types";
|
|
3
3
|
import { LimitAboveRule } from "../limitAboveRule";
|
|
4
4
|
import type { RulePhaseConfig } from "../../controllers/abrPhaseController";
|
|
5
5
|
export declare class TvDisabledVideoTrackRule extends LimitAboveRule<IVideoTrack, IVideoAbrContext> implements IAbrRule<IVideoTrack, IVideoAbrContext> {
|
|
6
6
|
constructor(phaseConfig: RulePhaseConfig);
|
|
7
7
|
execute(context: IVideoAbrContext): IAbrRuleResolution<IVideoTrack>;
|
|
8
|
-
protected
|
|
8
|
+
protected createLogData(selectedTrack: IVideoTrack): RuleLogData;
|
|
9
9
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IAbrRule, IAbrRuleResolution, IVideoAbrContext } from "../../types";
|
|
1
|
+
import type { IAbrRule, IAbrRuleResolution, IVideoAbrContext, RuleLogData } from "../../types";
|
|
2
2
|
import type { IVideoTrack } from "../../../../../player/types";
|
|
3
3
|
import type { Nullable, QualityLimits, VideoQuality } from "@vkontakte/videoplayer-shared";
|
|
4
4
|
import { type ExactVideoQuality } from "@vkontakte/videoplayer-shared";
|
|
@@ -63,7 +63,7 @@ type UpperLimitsLogsArgs = [limitsAreInvalid: boolean, lowestAvailableQuality: N
|
|
|
63
63
|
export declare class UpperLimitsRule extends LimitAboveRule<IVideoTrack, IVideoAbrContext, UpperLimitsLogsArgs> implements IAbrRule<IVideoTrack, IVideoAbrContext> {
|
|
64
64
|
constructor(phaseConfig: RulePhaseConfig);
|
|
65
65
|
execute(context: IVideoAbrContext): IAbrRuleResolution<IVideoTrack>;
|
|
66
|
-
protected
|
|
66
|
+
protected createLogData(selectedTrack: IVideoTrack, limitsAreInvalid: boolean, lowestAvailableQuality: Nullable<ExactVideoQuality>, highestAvailableQuality: Nullable<ExactVideoQuality>, visible: boolean, limits: QualityLimits, backgroundVideoQualityLimit: VideoQuality, effectiveType: string | undefined, connectionDataQualityLimit: ExactVideoQuality | undefined): RuleLogData;
|
|
67
67
|
private getConnection;
|
|
68
68
|
private resolveConnectionDataQualityLimit;
|
|
69
69
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { IComponentLogger, IRectangle, ITracer, Kbps, Milliseconds, Nullable, QualityLimits } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import type { IVideoTrack } from "../../../player/types";
|
|
3
|
+
import type { ITuningConfig } from "../../../utils/tuningConfig";
|
|
4
|
+
export interface ISelectTrackByRulesContext {
|
|
5
|
+
videoTracks: IVideoTrack[];
|
|
6
|
+
tuning: ITuningConfig;
|
|
7
|
+
abrLogger: IComponentLogger;
|
|
8
|
+
tracer: ITracer;
|
|
9
|
+
estimatedThroughput: Kbps;
|
|
10
|
+
container?: Nullable<IRectangle>;
|
|
11
|
+
panelSize?: Nullable<IRectangle>;
|
|
12
|
+
limits?: QualityLimits;
|
|
13
|
+
playbackRate?: number;
|
|
14
|
+
forwardBufferHealth?: number;
|
|
15
|
+
forwardBufferDuration?: Milliseconds;
|
|
16
|
+
visible?: boolean;
|
|
17
|
+
currentVideoTrack?: Nullable<IVideoTrack>;
|
|
18
|
+
reserve?: Kbps;
|
|
19
|
+
isLive?: boolean;
|
|
20
|
+
element?: HTMLMediaElement;
|
|
21
|
+
}
|
|
22
|
+
export declare const defaultEmptyArrayErrorMessage = "Assertion \"ABR Tracks is empty array\" failed";
|
|
23
|
+
export declare function selectTrackByRules(context: ISelectTrackByRulesContext): IVideoTrack;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IAudioTrack, IBaseTrack, IVideoTrack } from "../../../player/types";
|
|
2
|
-
import type { Byte, IComponentLogger, IObservable, IRectangle, IValueSubject, Kbps, Milliseconds, Nullable, QualityLimits } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import type { Byte, IComponentLogger, IObservable, IRectangle, ITracer, IValueSubject, Kbps, Milliseconds, Nullable, QualityLimits } from "@vkontakte/videoplayer-shared";
|
|
3
3
|
import type { ITuningConfig } from "../../../utils/tuningConfig";
|
|
4
4
|
import type { Representation, Segment } from "../parsers/types";
|
|
5
5
|
import type { ElementSizeManager } from "../HTMLVideoElement/ElementSizeManager";
|
|
@@ -15,15 +15,13 @@ export declare enum VideoRuleName {
|
|
|
15
15
|
Buffer = "buffer_rule",
|
|
16
16
|
Bola = "bola_rule",
|
|
17
17
|
FitsContainer = "fits_container_rule",
|
|
18
|
-
FailedVideoTrack = "failed_video_track_rule",
|
|
19
18
|
TvDisabledVideoTrack = "tv_disabled_video_track_rule",
|
|
20
19
|
Stalls = "stalls_rule",
|
|
21
20
|
LowerLimit = "lower_limit_rule",
|
|
22
21
|
UpperLimit = "upper_limit_rule",
|
|
23
22
|
Throughput = "throughput_rule",
|
|
24
23
|
AbandonRequest = "abandon_request_rule",
|
|
25
|
-
InsufficientBuffer = "insufficient_buffer_rule"
|
|
26
|
-
DownloadTime = "download_time_rule"
|
|
24
|
+
InsufficientBuffer = "insufficient_buffer_rule"
|
|
27
25
|
}
|
|
28
26
|
export declare enum AudioRuleName {
|
|
29
27
|
MinAudioForVideo = "min_audio_for_video_rule",
|
|
@@ -41,7 +39,6 @@ export interface IUpdatableAbrManagerContext {
|
|
|
41
39
|
desiredVideoTrack: Nullable<IVideoTrack>;
|
|
42
40
|
limits: QualityLimits;
|
|
43
41
|
forwardBufferHealth?: number;
|
|
44
|
-
forwardBufferTarget: Milliseconds;
|
|
45
42
|
forwardVideoBufferRepresentations: Nullable<Map<Representation["id"], Segment[]>>;
|
|
46
43
|
forwardAudioBufferRepresentations: Nullable<Map<Representation["id"], Segment[]>>;
|
|
47
44
|
forwardBufferDuration?: Milliseconds;
|
|
@@ -59,8 +56,8 @@ export interface IInitAbrManagerContext {
|
|
|
59
56
|
rtt$: IValueSubject<Milliseconds>;
|
|
60
57
|
throughputVariance$?: IValueSubject<number>;
|
|
61
58
|
element: HTMLMediaElement;
|
|
62
|
-
failedVideoTrack: Nullable<IVideoTrack>;
|
|
63
59
|
abrLogger: IComponentLogger;
|
|
60
|
+
tracer: ITracer;
|
|
64
61
|
panelSize?: IRectangle;
|
|
65
62
|
}
|
|
66
63
|
export interface IVideoElementAbrManagerContext {
|
|
@@ -77,12 +74,13 @@ export interface IAudioTracksContext {
|
|
|
77
74
|
audioTracksDesc: IAudioTrack[];
|
|
78
75
|
}
|
|
79
76
|
export type IAbrManagerContext = Omit<IUpdatableAbrManagerContext, "videoTracks" | "audioTracks"> & IVideoElementAbrManagerContext & IInitAbrManagerContext & IVideoTracksContext & IAudioTracksContext;
|
|
77
|
+
export type RuleLogData = Record<string, string | number | boolean | undefined>;
|
|
80
78
|
export interface IAbrRuleResolution<T extends IBaseTrack> {
|
|
81
79
|
track: T;
|
|
82
80
|
confidence: number;
|
|
83
81
|
type: RuleType;
|
|
84
82
|
name: string;
|
|
85
|
-
|
|
83
|
+
logData: RuleLogData;
|
|
86
84
|
}
|
|
87
85
|
export interface IRuleInitContext extends IInitAbrManagerContext {}
|
|
88
86
|
export interface IAbrRule<
|
|
@@ -105,6 +103,7 @@ export interface IBaseAbrControllerContext extends IVideoTracksContext {
|
|
|
105
103
|
lastVideoTrackSelected: Nullable<IVideoTrack>;
|
|
106
104
|
tuning: ITuningConfig;
|
|
107
105
|
abrLogger: IComponentLogger;
|
|
106
|
+
tracer: ITracer;
|
|
108
107
|
estimatedThroughput: Kbps;
|
|
109
108
|
reserve: Kbps;
|
|
110
109
|
forwardBufferHealth: Nullable<number>;
|
|
@@ -122,7 +121,6 @@ export interface IVideoAbrContext extends IBaseAbrControllerContext {
|
|
|
122
121
|
container: Nullable<IRectangle>;
|
|
123
122
|
panelSize: Nullable<IRectangle>;
|
|
124
123
|
forwardBufferRepresentations: Nullable<Map<Representation["id"], Segment[]>>;
|
|
125
|
-
forwardBufferTarget: Milliseconds;
|
|
126
124
|
limits: QualityLimits;
|
|
127
125
|
visible: boolean;
|
|
128
126
|
severeStallOccurred: boolean;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { Kbps, Milliseconds, Nullable } from "@vkontakte/videoplayer-shared";
|
|
2
2
|
import type { IAudioTrack, IBaseTrack, IVideoTrack } from "../../../player/types";
|
|
3
|
-
import type { Segment } from "../parsers/types";
|
|
4
|
-
export declare const computeForwardBitrate: (segments: Nullable<Segment[]>) => Kbps;
|
|
3
|
+
import type { Representation, Segment } from "../parsers/types";
|
|
5
4
|
export declare const bufferToPlaybackMs: (contentMs: Milliseconds | undefined, playbackRate: number) => Milliseconds;
|
|
6
5
|
export declare enum CompareTrack {
|
|
7
6
|
Descending = -1,
|
|
@@ -15,3 +14,5 @@ export declare const isLowerTrack: <T extends IBaseTrack>(track1: T, track2: T)
|
|
|
15
14
|
export declare const logBase: (base: number, x: number) => number;
|
|
16
15
|
export declare const bitrateFactorFromBufferLevel: (forwardBufferHealth: number, emptyFactor: number, fullFactor: number) => number;
|
|
17
16
|
export declare const getMinPossibleAudioForVideo: (videoTrack: Nullable<IVideoTrack>, sortedVideoTracksAsc: IVideoTrack[], sortedAudioTracksAsc: IAudioTrack[], minVideoAudioRatio: number) => IAudioTrack | undefined;
|
|
17
|
+
export declare const getForwardBitrateKbps: (forwardBufferRepresentations: Nullable<Map<Representation["id"], Segment[]>>, videoTrack: Nullable<IVideoTrack>) => Kbps | undefined;
|
|
18
|
+
export declare const isVideoTail: (remainingDurationMs: Nullable<Milliseconds>, mpdSegmentDurationMs: Nullable<Milliseconds>) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const destroy: (video: HTMLMediaElement
|
|
1
|
+
export declare const destroy: (video: HTMLMediaElement) => void;
|
|
@@ -17,7 +17,7 @@ export interface IObservableVideo {
|
|
|
17
17
|
loadedMetadata$: IObservable<undefined>;
|
|
18
18
|
loadedData$: IObservable<undefined>;
|
|
19
19
|
isBuffering$: IObservable<boolean>;
|
|
20
|
-
|
|
20
|
+
currentVideoBuffer$: IObservable<IRange<Seconds>>;
|
|
21
21
|
totalBufferDuration$: IObservable<Milliseconds>;
|
|
22
22
|
bufferRangeCount$: IObservable<number>;
|
|
23
23
|
volumeState$: IObservable<IVolumeState>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ITuningConfig } from "../../../utils/tuningConfig";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const allocate: (container: HTMLElement, { audioVideoSyncRate, disableYandexPiP, clearVideoElementInnerHTML, reuseOwnVideoElement }: ITuningConfig) => HTMLVideoElement;
|
|
2
|
+
type DisposeConstraints = Pick<ITuningConfig, "reuseOwnVideoElement" | "clearAudioElementOnDispose">;
|
|
3
|
+
export declare const allocate: (container: HTMLElement, { audioVideoSyncRate, disableYandexPiP, reuseOwnVideoElement }: ITuningConfig) => HTMLVideoElement;
|
|
5
4
|
export declare const initializeAudio: (element: HTMLAudioElement) => HTMLAudioElement;
|
|
6
5
|
export declare const dispose: (element: HTMLMediaElement, constraints: DisposeConstraints) => void;
|
|
7
6
|
export {};
|
|
@@ -14,6 +14,8 @@ declare class ThroughputEstimator {
|
|
|
14
14
|
trackXHR(xhr: XMLHttpRequest): void;
|
|
15
15
|
trackStream(stream: ReadableStream, isLowLatency?: boolean): void;
|
|
16
16
|
addRawSpeed(size: Byte, time: Milliseconds, concurrency?: number, isLowLatency?: boolean): void;
|
|
17
|
+
private countActiveDownloads;
|
|
18
|
+
private isFastSample;
|
|
17
19
|
/**
|
|
18
20
|
* Стоит использовать только когда другие методы совсем не получается
|
|
19
21
|
*/
|
|
@@ -2,7 +2,7 @@ import type { VideoCodecName, VideoFormat } from "../player/types";
|
|
|
2
2
|
import { WebmCodecStrategy } from "../enums/WebmCodecStrategy";
|
|
3
3
|
import { AndroidPreferredFormat } from "../enums/AndroidPreferredFormat";
|
|
4
4
|
import { IOSPreferredFormat } from "../enums/IOSPreferredFormat";
|
|
5
|
-
import type { Byte, Kbps, Milliseconds, RecursivePartial, Seconds } from "@vkontakte/videoplayer-shared";
|
|
5
|
+
import type { Byte, Kbps, Milliseconds, RecursivePartial, Seconds, TimerModule } from "@vkontakte/videoplayer-shared";
|
|
6
6
|
import { type ExactVideoQuality, VideoQuality } from "@vkontakte/videoplayer-shared";
|
|
7
7
|
import { AudioRuleName, VideoRuleName } from "../providers/utils/Abr/types";
|
|
8
8
|
export type ITuningConfig = {
|
|
@@ -13,24 +13,23 @@ export type ITuningConfig = {
|
|
|
13
13
|
playingUnstableThresholdMs: Milliseconds;
|
|
14
14
|
/** Список имён включённых эвристик. Пустой массив = все эвристики выключены */
|
|
15
15
|
heuristics: string[];
|
|
16
|
+
/** Множитель уменьшения grace-таймаута при каждом поступлении данных в StartupHangupHeuristic */
|
|
17
|
+
hangupGraceDecayFactor: number;
|
|
18
|
+
/** Минимальный grace-таймаут (мс). При достижении — следующий decay возвращает 0 (немедленный expire) */
|
|
19
|
+
hangupGraceMinTimeoutMs: Milliseconds;
|
|
20
|
+
/**
|
|
21
|
+
* Если true — audible (не muted) хэнгап в hidden-вкладке откладывается до возврата на visible (reinit),
|
|
22
|
+
* desired state при этом не меняется.
|
|
23
|
+
* Если false — audible хэнгап в hidden-вкладке мониторится: данные перезапускают decay-таймер,
|
|
24
|
+
* при ≥3 поступлениях данных без завершения перехода — эскалация в switch_codec/switch_provider.
|
|
25
|
+
*/
|
|
26
|
+
deferAudibleHangupOnHiddenTab: boolean;
|
|
16
27
|
};
|
|
17
28
|
/**
|
|
18
|
-
* Если true, внутренний video элемент не будет уничтожаться при реините провайдера
|
|
19
|
-
* и при создании нового экземляра Player.
|
|
20
|
-
* Будет веcти себя аналогично элементу переданному снаружи
|
|
21
|
-
* Для кейса прямого использовани ядра
|
|
22
|
-
*/
|
|
23
|
-
keepVideoElement: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Временный флаг для тестирования очистки video элемента
|
|
26
|
-
* Если true, при очистке будет вызван innerHTML = '' для очистки дочерних элементов трэков
|
|
27
|
-
* В противном случае они размножаются
|
|
28
|
-
*/
|
|
29
|
-
clearVideoElementInnerHTML: boolean;
|
|
30
|
-
/**
|
|
31
29
|
* Включает очистку состояния плеера при вызове метода stop()
|
|
32
30
|
*/
|
|
33
31
|
allowPlayerReuse: boolean;
|
|
32
|
+
useWorkerTimers: TimerModule[];
|
|
34
33
|
throughputEstimator: {
|
|
35
34
|
type: "TwoEma" | "EmaAndMa";
|
|
36
35
|
emaAlphaSlow: number;
|
|
@@ -57,8 +56,19 @@ export type ITuningConfig = {
|
|
|
57
56
|
* - fromCache — попадание в Cache API (doFetch дёргает onCacheHit);
|
|
58
57
|
* - TTFB — headersReceivedAt - requestStartedAt < max(rtt*0.5, 2мс) (кэш ~0, реал ≥ RTT).
|
|
59
58
|
* 2. sanityCheck отключает порог time ≤ cacheThresholdSize → реальные быстрые сэмплы проходят.
|
|
59
|
+
* 3. Прошедший быстрый сэмпл применяется только если поднимает оценку: по объекту, который
|
|
60
|
+
* укладывается в одно окно, наблюдаемое время — латентность, а не size/полоса, поэтому
|
|
61
|
+
* он задаёт нижнюю границу и не может доказать, что сеть стала медленнее.
|
|
62
|
+
* 4. Финальный замер стрима делит полосу на параллельные загрузки, как промежуточные:
|
|
63
|
+
* мелкий сегмент качается параллельно с аудио и другого замера не получает.
|
|
64
|
+
* Параллельной считается загрузка, отдававшая байты внутри окна замера: открытая,
|
|
65
|
+
* но молчащая (подвисла либо уже выкачала своё и ждёт done) полосу не занимает.
|
|
60
66
|
* Честный кэш (мгновенная отдача → rate > 1 Гбит/с) по-прежнему режется проверкой rate выше.
|
|
61
67
|
*
|
|
68
|
+
* Пункты 3 и 4 добавлены после эксперимента 37621: без них включённые быстрые сэмплы
|
|
69
|
+
* систематически занижали оценку, ABR держал низкое качество и сегменты оставались
|
|
70
|
+
* мелкими — петля с положительной обратной связью, вердикт NO-GO.
|
|
71
|
+
*
|
|
62
72
|
* По умолчанию false — поведение не меняется.
|
|
63
73
|
*/
|
|
64
74
|
measureFastSamples: boolean;
|
|
@@ -119,6 +129,7 @@ export type ITuningConfig = {
|
|
|
119
129
|
activeVideoAreaThreshold: number;
|
|
120
130
|
trafficSavingLimit: ExactVideoQuality;
|
|
121
131
|
highQualityLimit: ExactVideoQuality;
|
|
132
|
+
lowQualityTelemetryLimit: ExactVideoQuality;
|
|
122
133
|
};
|
|
123
134
|
stallsManager: {
|
|
124
135
|
enabled: boolean;
|
|
@@ -159,7 +170,6 @@ export type ITuningConfig = {
|
|
|
159
170
|
forwardBufferTargetManual: Milliseconds;
|
|
160
171
|
forwardBufferTargetPreload: Milliseconds;
|
|
161
172
|
audioBufferAheadOfVideoMs: Milliseconds;
|
|
162
|
-
useDynamicBufferTarget: boolean;
|
|
163
173
|
seekBiasInTheEnd: Milliseconds;
|
|
164
174
|
maxSegmentDurationLeftToSelectNextSegment: Milliseconds;
|
|
165
175
|
minSafeBufferThreshold: number;
|
|
@@ -180,16 +190,15 @@ export type ITuningConfig = {
|
|
|
180
190
|
useNewRepresentationSwitch: boolean;
|
|
181
191
|
useDelayedRepresentationSwitch: boolean;
|
|
182
192
|
useSmartRepresentationSwitch: boolean;
|
|
183
|
-
|
|
193
|
+
brokenSegmentAppendDetection: boolean;
|
|
194
|
+
brokenSegmentAppendTolerance: Milliseconds;
|
|
184
195
|
useFetchPriorityHints: boolean;
|
|
185
|
-
useAbortMSEFix: boolean;
|
|
186
196
|
enableBaseUrlSupport: boolean;
|
|
187
197
|
maxSegmentRetryCount: number;
|
|
188
198
|
sourceOpenTimeout: number;
|
|
189
199
|
vktvAbrThrottle: number;
|
|
190
200
|
timeupdateEventTickThrottle: number;
|
|
191
201
|
fetcherBufferOptimisation: boolean;
|
|
192
|
-
codecsPrioritizeEnabled: boolean;
|
|
193
202
|
usePersistentGaps: boolean;
|
|
194
203
|
abrThrottle: number;
|
|
195
204
|
useVideoElementWaitingCurrentTimeReassign: boolean;
|
|
@@ -203,14 +212,10 @@ export type ITuningConfig = {
|
|
|
203
212
|
tickMaintainInterval: Milliseconds;
|
|
204
213
|
minSafeBufferToPlay: Milliseconds;
|
|
205
214
|
useBufferHoldingOnlyOnStall: boolean;
|
|
206
|
-
useNewAbr: boolean;
|
|
207
215
|
useAbrPhases: boolean;
|
|
208
216
|
abrVideoRules: VideoRuleName[];
|
|
209
217
|
abrAudioRules: AudioRuleName[];
|
|
210
|
-
useDynamicBirtateRule: boolean;
|
|
211
|
-
useNewFailoverLogic: boolean;
|
|
212
218
|
useFailoverHostsOnAllProviderCrash: boolean;
|
|
213
|
-
videoTrackBanAfterProviderFail: Milliseconds;
|
|
214
219
|
saveData3gQualityLimit: ExactVideoQuality;
|
|
215
220
|
saveData2gQualityLimit: ExactVideoQuality;
|
|
216
221
|
useConnectionDataUpperLimit: boolean;
|
|
@@ -238,26 +243,28 @@ export type ITuningConfig = {
|
|
|
238
243
|
budgetFactor: number;
|
|
239
244
|
fallbackSegmentDurationMs: Milliseconds;
|
|
240
245
|
};
|
|
241
|
-
dynamicBufferTarget: {
|
|
242
|
-
maxMs: Milliseconds;
|
|
243
|
-
optimisticHeadroomLow: number;
|
|
244
|
-
optimisticHeadroomHigh: number;
|
|
245
|
-
weakThroughputLowKbps: Kbps;
|
|
246
|
-
weakThroughputHighKbps: Kbps;
|
|
247
|
-
maxFactor: number;
|
|
248
|
-
};
|
|
249
246
|
videoStreamRepresentaionsFilter: [VideoQuality, number, VideoCodecName][];
|
|
250
247
|
filterOnDemandQualityList: boolean;
|
|
251
248
|
dashMaxTvVideoQuality: boolean;
|
|
252
249
|
checkRepresentationCanPlayType: Extract<CanPlayTypeResult, "maybe" | "probably"> | false;
|
|
253
250
|
preloadFirstSegment: boolean;
|
|
254
251
|
maxQualityForFirstSegmentPreload: ExactVideoQuality;
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
252
|
+
/** Включает отправку телеметрии трейсера (resume) при превышении stall watchdog */
|
|
253
|
+
tracerResumeOnUnexpectedStall: boolean;
|
|
254
|
+
/**
|
|
255
|
+
* При отмене signal текущей задачи sourceBufferTaskQueue (например, через
|
|
256
|
+
* `maintainAbortController.abort()` в `prepareSeek`) прерывать зависшую MSE-операцию
|
|
257
|
+
* через `buffer.abort()`. Без этого `completeTask` не вызовется при залипшем
|
|
258
|
+
* SourceBuffer и промис `append`/`remove` зависнет навечно — `prepareSeek`
|
|
259
|
+
* застрянет на `await maintainMutexPromise` (V3 deadlock), stall растёт до
|
|
260
|
+
* `crashOnStallTimeout=25с`.
|
|
261
|
+
*
|
|
262
|
+
* По умолчанию false (opt-in). Дешёвый фикс, но поведенческое изменение:
|
|
263
|
+
* единственный побочный эффект — лишний `buffer.abort()` при штатной отмене
|
|
264
|
+
* maintain (например, при обычном seek), но MSE `abort()` без активной операции
|
|
265
|
+
* — no-op по спеке. Включать поэтапно, начиная с процента.
|
|
266
|
+
*/
|
|
267
|
+
abortSourceBufferOnSignal: boolean;
|
|
261
268
|
};
|
|
262
269
|
dashCmafLive: {
|
|
263
270
|
externalStopControl: boolean;
|
|
@@ -355,7 +362,8 @@ export type ITuningConfig = {
|
|
|
355
362
|
alwaysAbortPreviousSwitch: boolean;
|
|
356
363
|
useDashProviderVirtual: boolean;
|
|
357
364
|
useDashProviderVirtualMobile: boolean;
|
|
358
|
-
|
|
365
|
+
useDashLiveProviderVirtual: boolean;
|
|
366
|
+
useDashLiveProviderVirtualMobile: boolean;
|
|
359
367
|
useSafariEndlessRequestBugfix: boolean;
|
|
360
368
|
/**
|
|
361
369
|
* Ручка для фикса сброса playbackRate при перемотке live-трансляции на Safari.
|
|
@@ -454,6 +462,19 @@ export type ITuningConfig = {
|
|
|
454
462
|
useDurationFromSegments: boolean;
|
|
455
463
|
/** включен режим проигрывания только аудио (без видео) */
|
|
456
464
|
audioOnly: boolean;
|
|
465
|
+
/**
|
|
466
|
+
* В audio-режиме при dispose провайдера очищает внешний <audio> (снятие src + load())
|
|
467
|
+
* вместо destroy(), который удаляет элемент из DOM.
|
|
468
|
+
*/
|
|
469
|
+
clearAudioElementOnDispose: boolean;
|
|
470
|
+
/**
|
|
471
|
+
* Переводить провайдер в READY по loadedmetadata вместо canplay.
|
|
472
|
+
* canplay означает, что видео уже может играться, что избыточно для READY —
|
|
473
|
+
* достаточно получить манифест (loadedmetadata).
|
|
474
|
+
* Применяется только когда желаемое состояние — READY (preload): при автоплее
|
|
475
|
+
* провайдер по-прежнему ждёт canplay, чтобы play() не вызывался до появления данных.
|
|
476
|
+
*/
|
|
477
|
+
readyOnLoadedMetadata: boolean;
|
|
457
478
|
};
|
|
458
479
|
export type IOptionalTuningConfig = RecursivePartial<ITuningConfig>;
|
|
459
480
|
export declare const fillDefault: (partial: IOptionalTuningConfig) => ITuningConfig;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Subject } from "@vkontakte/videoplayer-shared";
|
|
2
|
-
import type { IError } from "@vkontakte/videoplayer-shared";
|
|
3
|
-
import type { IHeuristicDeps, IMaydayEvent } from "../types";
|
|
4
|
-
import type { IAsyncHeuristic, HeuristicResult } from "./IHeuristic";
|
|
5
|
-
export declare class HangupHeuristic implements IAsyncHeuristic {
|
|
6
|
-
private deps;
|
|
7
|
-
static readonly heuristicName = "HangupHeuristic";
|
|
8
|
-
readonly type = "async";
|
|
9
|
-
readonly recommendation$: Subject<IMaydayEvent>;
|
|
10
|
-
private timerId;
|
|
11
|
-
private sub;
|
|
12
|
-
private error;
|
|
13
|
-
private manifestRequested;
|
|
14
|
-
private manifestRequestedAt;
|
|
15
|
-
private manifestReceivedMs;
|
|
16
|
-
constructor(deps: IHeuristicDeps);
|
|
17
|
-
analyze(error: IError): HeuristicResult;
|
|
18
|
-
private restartTimer;
|
|
19
|
-
private expire;
|
|
20
|
-
private cancel;
|
|
21
|
-
reset(): void;
|
|
22
|
-
destroy(): void;
|
|
23
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { IAbrRule, IAbrRuleResolution, IVideoAbrContext } from "../../types";
|
|
2
|
-
import type { IVideoTrack } from "../../../../../player/types";
|
|
3
|
-
import type { Kbps, Milliseconds } from "@vkontakte/videoplayer-shared";
|
|
4
|
-
import { LimitAboveRule } from "../limitAboveRule";
|
|
5
|
-
import type { RulePhaseConfig } from "../../controllers/abrPhaseController";
|
|
6
|
-
type DownloadTimeLogsArgs = [estimatedThroughput: Kbps, forwardBufferDuration: Milliseconds, simulatedFinalBufferMs: Milliseconds | null];
|
|
7
|
-
export declare class DownloadTimeRule extends LimitAboveRule<IVideoTrack, IVideoAbrContext, DownloadTimeLogsArgs> implements IAbrRule<IVideoTrack, IVideoAbrContext> {
|
|
8
|
-
constructor(phaseConfig: RulePhaseConfig);
|
|
9
|
-
execute(context: IVideoAbrContext): IAbrRuleResolution<IVideoTrack>;
|
|
10
|
-
private buildReferenceTimeline;
|
|
11
|
-
private resolveLookaheadCount;
|
|
12
|
-
private simulate;
|
|
13
|
-
protected createLogMessage(selectedTrack: IVideoTrack, estimatedThroughput: Kbps, forwardBufferDuration: Milliseconds, simulatedFinalBufferMs: Milliseconds | null): string;
|
|
14
|
-
}
|
|
15
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { IAbrRule, IAbrRuleResolution, IRuleInitContext, IVideoAbrContext } from "../../types";
|
|
2
|
-
import type { IVideoTrack } from "../../../../../player/types";
|
|
3
|
-
import type { Nullable } from "@vkontakte/videoplayer-shared";
|
|
4
|
-
import { LimitAboveRule } from "../limitAboveRule";
|
|
5
|
-
import type { RulePhaseConfig } from "../../controllers/abrPhaseController";
|
|
6
|
-
type FailedVideoTracLogsArgs = [banTrack: Nullable<IVideoTrack>];
|
|
7
|
-
export declare class FailedVideoTrackRule extends LimitAboveRule<IVideoTrack, IVideoAbrContext, FailedVideoTracLogsArgs> implements IAbrRule<IVideoTrack, IVideoAbrContext> {
|
|
8
|
-
protected banTrack: Nullable<IVideoTrack>;
|
|
9
|
-
constructor(phaseConfig: RulePhaseConfig);
|
|
10
|
-
init(initContext: IRuleInitContext): void;
|
|
11
|
-
execute(context: IVideoAbrContext): IAbrRuleResolution<IVideoTrack>;
|
|
12
|
-
protected createLogMessage(selectedTrack: IVideoTrack, banTrack: Nullable<IVideoTrack>): string;
|
|
13
|
-
}
|
|
14
|
-
export {};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { ITuningConfig } from "./tuningConfig";
|
|
2
|
-
import type { Kbps, Milliseconds, IRectangle, QualityLimits, IComponentLogger, Nullable } from "@vkontakte/videoplayer-shared";
|
|
3
|
-
import { type ExactVideoQuality } from "@vkontakte/videoplayer-shared";
|
|
4
|
-
import type { IAudioTrack, IBaseTrack, IVideoTrack } from "../player/types";
|
|
5
|
-
interface IConstraints<T extends IBaseTrack> {
|
|
6
|
-
container?: IRectangle;
|
|
7
|
-
estimatedThroughput?: Kbps;
|
|
8
|
-
tuning: ITuningConfig["autoTrackSelection"];
|
|
9
|
-
limits?: QualityLimits;
|
|
10
|
-
reserve?: Kbps;
|
|
11
|
-
playbackRate?: number;
|
|
12
|
-
forwardBufferHealth?: number;
|
|
13
|
-
current?: T;
|
|
14
|
-
failedVideoTrack?: Nullable<T>;
|
|
15
|
-
visible?: boolean;
|
|
16
|
-
history?: TrackHistory<T>;
|
|
17
|
-
droppedVideoMaxQualityLimit?: ExactVideoQuality;
|
|
18
|
-
stallsVideoMaxQualityLimit?: ExactVideoQuality;
|
|
19
|
-
stallsPredictedThroughput?: Kbps;
|
|
20
|
-
abrLogger: IComponentLogger;
|
|
21
|
-
panelSize?: IRectangle;
|
|
22
|
-
}
|
|
23
|
-
export declare class TrackHistory<T extends IBaseTrack> {
|
|
24
|
-
last: T | undefined;
|
|
25
|
-
history: Record<IBaseTrack["id"], Milliseconds>;
|
|
26
|
-
recordSelection(track: T): void;
|
|
27
|
-
recordSwitch(track: T | undefined): void;
|
|
28
|
-
clear(): void;
|
|
29
|
-
}
|
|
30
|
-
export declare const defaultEmptyArrayErrorMessage = "Assertion \"ABR Tracks is empty array\" failed";
|
|
31
|
-
export declare const getMinPossibleAudioForVideoOld: (videoTrack: IVideoTrack, videoTracks: IVideoTrack[], audioTracks: IAudioTrack[], minVideoAudioRatio: number) => IAudioTrack | undefined;
|
|
32
|
-
export declare const getMinPossibleAudioForVideoNew: (videoTrack: IVideoTrack, videoTracks: IVideoTrack[], audioTracks: IAudioTrack[], minVideoAudioRatio: number) => IAudioTrack | undefined;
|
|
33
|
-
export declare const autoSelectVideoTrackNew: (videoTracks: IVideoTrack[], { container, estimatedThroughput, tuning, limits, reserve, forwardBufferHealth, playbackRate, current, failedVideoTrack, history, visible, droppedVideoMaxQualityLimit, stallsVideoMaxQualityLimit, stallsPredictedThroughput, abrLogger, panelSize }: IConstraints<IVideoTrack>) => IVideoTrack;
|
|
34
|
-
export declare const autoSelectVideoTrackOld: (videoTracks: IVideoTrack[], { container, estimatedThroughput, tuning, limits, reserve, forwardBufferHealth, playbackRate, current, failedVideoTrack, history, visible, droppedVideoMaxQualityLimit, stallsVideoMaxQualityLimit, stallsPredictedThroughput, abrLogger, panelSize }: IConstraints<IVideoTrack>) => IVideoTrack;
|
|
35
|
-
export declare const autoSelectAudioTrackForVideoOld: (selectedVideoTrack: IVideoTrack, videoTracks: IVideoTrack[], audioTracks: IAudioTrack[], { estimatedThroughput, tuning, playbackRate, forwardBufferHealth, history, abrLogger, stallsPredictedThroughput }: IConstraints<IAudioTrack>) => IAudioTrack | undefined;
|
|
36
|
-
export declare const autoSelectAudioTrackForVideoNew: (selectedVideoTrack: IVideoTrack, videoTracks: IVideoTrack[], audioTracks: IAudioTrack[], { estimatedThroughput, tuning, playbackRate, forwardBufferHealth, history, abrLogger, stallsPredictedThroughput }: IConstraints<IAudioTrack>) => IAudioTrack | undefined;
|
|
37
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Kbps, Milliseconds, Nullable } from "@vkontakte/videoplayer-shared";
|
|
2
|
-
import type { ITuningConfig } from "../tuningConfig";
|
|
3
|
-
type DynamicBufferTargetConfig = ITuningConfig["dash"]["dynamicBufferTarget"];
|
|
4
|
-
export interface IDynamicBufferTargetState {
|
|
5
|
-
throughputKbps: Kbps;
|
|
6
|
-
currentBitrateKbps: Nullable<Kbps>;
|
|
7
|
-
baseTargetMs: Milliseconds;
|
|
8
|
-
}
|
|
9
|
-
export declare const computeDynamicBufferTarget: (state: IDynamicBufferTargetState, config: DynamicBufferTargetConfig) => Milliseconds;
|
|
10
|
-
export {};
|