@vkontakte/videoplayer-core 2.0.139 → 2.0.140-beta.1
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.js +45 -45
- package/es2015.esm.js +49 -49
- package/es2018.cjs.js +43 -43
- package/es2018.esm.js +40 -40
- package/es2024.cjs.js +40 -40
- package/es2024.esm.js +40 -40
- package/esnext.cjs.js +40 -40
- package/esnext.esm.js +40 -40
- package/evergreen.esm.js +44 -44
- package/package.json +2 -2
- package/types/providers/DashProvider/lib/buffer.d.ts +11 -0
- package/types/providers/DashProvider/lib/fetcher.d.ts +2 -1
- package/types/providers/DashProvider/lib/player.d.ts +1 -0
- package/types/providers/DashProviderNew/lib/buffer.d.ts +2 -0
- package/types/providers/DashProviderNew/lib/player.d.ts +1 -0
- package/types/utils/qualityLimits.d.ts +0 -1
- package/types/utils/tuningConfig.d.ts +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer-core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.140-beta.1",
|
|
4
4
|
"author": "vk.com",
|
|
5
5
|
"description": "Videoplayer core library based on the vk.com platform",
|
|
6
6
|
"homepage": "https://vk.com",
|
|
@@ -54,6 +54,6 @@
|
|
|
54
54
|
"**/*.d.ts"
|
|
55
55
|
],
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@vkontakte/videoplayer-shared": "1.0.
|
|
57
|
+
"@vkontakte/videoplayer-shared": "1.0.68-beta.1"
|
|
58
58
|
}
|
|
59
59
|
}
|
|
@@ -12,6 +12,15 @@ export interface Dependencies {
|
|
|
12
12
|
}
|
|
13
13
|
export interface Gap extends IRange<Milliseconds> {
|
|
14
14
|
representation: Representation['id'];
|
|
15
|
+
/**
|
|
16
|
+
* дырки, которые не нужно удалять при парсинге буфера (те `detectGapsWhenIdle`).
|
|
17
|
+
* те, например, которые были обнаружены при парсинге сегментов из манифеста.
|
|
18
|
+
*
|
|
19
|
+
* в функции `detectGapsWhenIdle` мы сравниваем ранее найденные дырки с данными буфера,
|
|
20
|
+
* проблема в том, что не смотря на то, что буфер может показать, что как будто дырки нет,
|
|
21
|
+
* по факту, найденная в манифесте дырка, скорее всего, никуда не делась и это приведет к зависанию видео.
|
|
22
|
+
*/
|
|
23
|
+
persistent: boolean;
|
|
15
24
|
}
|
|
16
25
|
export declare class BufferManager {
|
|
17
26
|
currentLiveSegmentServerLatency$: IValueSubject<number>;
|
|
@@ -39,6 +48,7 @@ export declare class BufferManager {
|
|
|
39
48
|
private downloadAbortController;
|
|
40
49
|
private switchAbortController;
|
|
41
50
|
private destroyAbortController;
|
|
51
|
+
private useSmartRepresentationSwitch;
|
|
42
52
|
private readonly getCurrentPosition;
|
|
43
53
|
private readonly isActiveLowLatency;
|
|
44
54
|
private tuning;
|
|
@@ -76,6 +86,7 @@ export declare class BufferManager {
|
|
|
76
86
|
updateLive(manifest: Manifest | null): void;
|
|
77
87
|
proceedLowLatencyLive(): void;
|
|
78
88
|
calculateDurationFromSegments(): number;
|
|
89
|
+
setSmartRepresentationSwitch(state: boolean): void;
|
|
79
90
|
private updateLowLatencyLiveIfNeeded;
|
|
80
91
|
findSegmentStartTime(position: Milliseconds): Milliseconds | undefined;
|
|
81
92
|
setTarget(time: Milliseconds): void;
|
|
@@ -47,7 +47,7 @@ export declare class Fetcher {
|
|
|
47
47
|
recoverableError$: ISubject<IError>;
|
|
48
48
|
error$: ISubject<IError>;
|
|
49
49
|
private abortAllController;
|
|
50
|
-
private subscription;
|
|
50
|
+
private readonly subscription;
|
|
51
51
|
private compatibilityMode;
|
|
52
52
|
private useEnableSubtitlesParam;
|
|
53
53
|
constructor({ throughputEstimator, requestQuic, tracer, compatibilityMode, useEnableSubtitlesParam }: IParams);
|
|
@@ -59,5 +59,6 @@ export declare class Fetcher {
|
|
|
59
59
|
private fetchByteRangeRepresentation;
|
|
60
60
|
private fetchTemplateRepresentation;
|
|
61
61
|
private doFetch;
|
|
62
|
+
private unsubscribeAbortSubscription;
|
|
62
63
|
}
|
|
63
64
|
export declare const suppressAbort: (e: Error | unknown) => void | never;
|
|
@@ -78,6 +78,7 @@ export declare class Player {
|
|
|
78
78
|
constructor(params: Params);
|
|
79
79
|
initManifest: (param_0: HTMLVideoElement, param_1: string, param_2: number) => Promise<void | undefined>;
|
|
80
80
|
updateManifest: () => Promise<Manifest | null | undefined>;
|
|
81
|
+
setSmartRepresentationSwitch(state: boolean): void;
|
|
81
82
|
seekLive(nextOffset: Milliseconds): Promise<void>;
|
|
82
83
|
initRepresentations: (param_0: string, param_1: string | undefined, param_2: import("../../../player/types").URLSource | undefined) => Promise<void | undefined>;
|
|
83
84
|
initBuffer(): void;
|
|
@@ -48,6 +48,7 @@ export declare class BufferManager {
|
|
|
48
48
|
private downloadAbortController;
|
|
49
49
|
private switchAbortController;
|
|
50
50
|
private destroyAbortController;
|
|
51
|
+
private useSmartRepresentationSwitch;
|
|
51
52
|
private readonly getCurrentPosition;
|
|
52
53
|
private readonly isActiveLowLatency;
|
|
53
54
|
private tuning;
|
|
@@ -85,6 +86,7 @@ export declare class BufferManager {
|
|
|
85
86
|
seekLive: (param_0: Stream[] | undefined) => Promise<void | undefined>;
|
|
86
87
|
updateLive(manifest: Manifest | null): void;
|
|
87
88
|
proceedLowLatencyLive(): void;
|
|
89
|
+
setSmartRepresentationSwitch(state: boolean): void;
|
|
88
90
|
private updateLowLatencyLiveIfNeeded;
|
|
89
91
|
findSegmentStartTime(position: Milliseconds): Milliseconds | undefined;
|
|
90
92
|
setTarget(time: Milliseconds): void;
|
|
@@ -78,6 +78,7 @@ export declare class Player {
|
|
|
78
78
|
constructor(params: Params);
|
|
79
79
|
initManifest: (param_0: HTMLVideoElement, param_1: string, param_2: number) => Promise<void | undefined>;
|
|
80
80
|
updateManifest: () => Promise<Manifest | null | undefined>;
|
|
81
|
+
setSmartRepresentationSwitch(state: boolean): void;
|
|
81
82
|
seekLive(nextOffset: Milliseconds): Promise<void>;
|
|
82
83
|
initRepresentations: (param_0: string, param_1: string | undefined, param_2: import("../../../player/types").URLSource | undefined) => Promise<void | undefined>;
|
|
83
84
|
initBuffer(): void;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IVideoTrack, PredefinedQualityLimits } from '../player/types';
|
|
2
2
|
import { ExactVideoQuality, Nullable, QualityLimits } from '@vkontakte/videoplayer-shared';
|
|
3
3
|
export declare function getQualityLimitsPredefinedType(limits: QualityLimits, highQualityLimit: ExactVideoQuality, trafficSavingLimit: ExactVideoQuality): PredefinedQualityLimits;
|
|
4
|
-
export declare function isHighQualityEnabled(limits: Nullable<QualityLimits>, highQualityLimit: ExactVideoQuality, trafficSavingLimit: ExactVideoQuality): boolean;
|
|
5
4
|
type LimitsAsHeightValidParams = {
|
|
6
5
|
limits?: {
|
|
7
6
|
min?: number;
|
|
@@ -99,6 +99,9 @@ export type ITuningConfig = {
|
|
|
99
99
|
crashOnStallTWithoutDataTimeout: Milliseconds;
|
|
100
100
|
enableSubSegmentBufferFeeding: boolean;
|
|
101
101
|
bufferEmptinessTolerance: Milliseconds;
|
|
102
|
+
useNewRepresentationSwitch: boolean;
|
|
103
|
+
useDelayedRepresentationSwitch: boolean;
|
|
104
|
+
useSmartRepresentationSwitch: boolean;
|
|
102
105
|
useFetchPriorityHints: boolean;
|
|
103
106
|
enableBaseUrlSupport: boolean;
|
|
104
107
|
maxSegmentRetryCount: number;
|
|
@@ -107,6 +110,8 @@ export type ITuningConfig = {
|
|
|
107
110
|
timeupdateEventTickThrottle: number;
|
|
108
111
|
fetcherBufferOptimisation: boolean;
|
|
109
112
|
codecsPrioritizeEnabled: boolean;
|
|
113
|
+
usePersistentGaps: boolean;
|
|
114
|
+
abrThrottle: number;
|
|
110
115
|
};
|
|
111
116
|
dashCmafLive: {
|
|
112
117
|
maxActiveLiveOffset: Milliseconds;
|
|
@@ -186,7 +191,6 @@ export type ITuningConfig = {
|
|
|
186
191
|
useNewDashProvider: boolean;
|
|
187
192
|
useNewAutoSelectVideoTrack: boolean;
|
|
188
193
|
useSafariEndlessRequestBugfix: boolean;
|
|
189
|
-
useRefactoredSearchGap: boolean;
|
|
190
194
|
isAudioDisabled: boolean;
|
|
191
195
|
autoplayOnlyInActiveTab: boolean;
|
|
192
196
|
dynamicImportTimeout: Milliseconds;
|