@vkontakte/videoplayer-core 2.0.140-dev.4c27f703.0 → 2.0.140-dev.7b3cdcf7.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.js +39 -39
- package/es2015.esm.js +43 -43
- package/es2018.cjs.js +38 -38
- package/es2018.esm.js +35 -35
- package/es2024.cjs.js +47 -47
- package/es2024.esm.js +44 -44
- package/esnext.cjs.js +47 -47
- package/esnext.esm.js +44 -44
- package/evergreen.esm.js +48 -48
- package/package.json +2 -2
- package/types/player/Player.d.ts +2 -1
- package/types/providers/DashProvider/baseDashProvider.d.ts +1 -0
- package/types/providers/DashProvider/lib/buffer.d.ts +11 -0
- 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/providers/HlsProvider/index.d.ts +1 -0
- package/types/utils/playerOptions.d.ts +3 -0
- package/types/utils/qualityLimits.d.ts +0 -1
- package/types/utils/tuningConfig.d.ts +6 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer-core",
|
|
3
|
-
"version": "2.0.140-dev.
|
|
3
|
+
"version": "2.0.140-dev.7b3cdcf7.0",
|
|
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.68-dev.
|
|
57
|
+
"@vkontakte/videoplayer-shared": "1.0.68-dev.50d4d525.0"
|
|
58
58
|
}
|
|
59
59
|
}
|
package/types/player/Player.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IOptionalTuningConfig } from '../utils/tuningConfig';
|
|
2
2
|
import { IError, ILogEntry, Seconds, Subject, ValueSubject, QualityLimits, VideoQuality, ITracer } from '@vkontakte/videoplayer-shared';
|
|
3
3
|
import { ChromecastState, HttpConnectionType, IAudioStream, IConfig, ICueSettings, IExternalTextTrack, IPlayer, ISeekRequest, ISources, ITextTrack, IVideoStream, PlaybackRate, PlaybackState, PredefinedQualityLimits, StartEnd, Surface, VideoFormat } from './types';
|
|
4
|
+
import { IPlayerOptions } from '../utils/playerOptions';
|
|
4
5
|
export default class Player implements IPlayer {
|
|
5
6
|
private subscription;
|
|
6
7
|
private domContainer;
|
|
@@ -119,7 +120,7 @@ export default class Player implements IPlayer {
|
|
|
119
120
|
dumpTelemetry: (receiver: (value: Record<string, any>) => void) => void;
|
|
120
121
|
getCurrentTime$: ValueSubject<null>;
|
|
121
122
|
};
|
|
122
|
-
constructor(tuning?: IOptionalTuningConfig, tracer?: ITracer);
|
|
123
|
+
constructor(tuning?: IOptionalTuningConfig, tracer?: ITracer, playerOptions?: IPlayerOptions);
|
|
123
124
|
initVideo(config: IConfig): IPlayer;
|
|
124
125
|
destroy(): void;
|
|
125
126
|
prepare(): IPlayer;
|
|
@@ -45,6 +45,7 @@ export default abstract class BaseDashProvider implements IProvider {
|
|
|
45
45
|
protected audioStreamsMap: Map<Stream, IAudioTrack[]>;
|
|
46
46
|
protected videoTrackSwitchHistory: TrackHistory<IVideoTrack>;
|
|
47
47
|
protected audioTrackSwitchHistory: TrackHistory<import("../../player/types").IBaseTrack>;
|
|
48
|
+
private unmuteAfterBrowserResetsHappened;
|
|
48
49
|
constructor(params: IParams);
|
|
49
50
|
protected abstract seek(position: Milliseconds, forcePrecise: boolean): void;
|
|
50
51
|
protected getProviderSubscriptionInfo(): IProviderSubscriptionInfo;
|
|
@@ -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;
|
|
@@ -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,9 @@ export type ITuningConfig = {
|
|
|
107
110
|
timeupdateEventTickThrottle: number;
|
|
108
111
|
fetcherBufferOptimisation: boolean;
|
|
109
112
|
codecsPrioritizeEnabled: boolean;
|
|
113
|
+
usePersistentGaps: boolean;
|
|
114
|
+
abrThrottle: number;
|
|
115
|
+
useVideoElementWaitingCurrentTimeReassign: boolean;
|
|
110
116
|
};
|
|
111
117
|
dashCmafLive: {
|
|
112
118
|
maxActiveLiveOffset: Milliseconds;
|
|
@@ -186,7 +192,6 @@ export type ITuningConfig = {
|
|
|
186
192
|
useNewDashProvider: boolean;
|
|
187
193
|
useNewAutoSelectVideoTrack: boolean;
|
|
188
194
|
useSafariEndlessRequestBugfix: boolean;
|
|
189
|
-
useRefactoredSearchGap: boolean;
|
|
190
195
|
isAudioDisabled: boolean;
|
|
191
196
|
autoplayOnlyInActiveTab: boolean;
|
|
192
197
|
dynamicImportTimeout: Milliseconds;
|