@vkontakte/videoplayer-core 2.0.174-dev.a56aca573.0 → 2.0.174-dev.cef9bdc0c.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.174-dev.a56aca573.0",
3
+ "version": "2.0.174-dev.cef9bdc0c.0",
4
4
  "author": "vk.ru",
5
5
  "description": "Videoplayer core library based on the vk.ru platform",
6
6
  "homepage": "https://vk.ru",
@@ -42,6 +42,6 @@
42
42
  "**/*.d.ts"
43
43
  ],
44
44
  "dependencies": {
45
- "@vkontakte/videoplayer-shared": "1.0.103-dev.a56aca573.0"
45
+ "@vkontakte/videoplayer-shared": "1.0.103-dev.cef9bdc0c.0"
46
46
  }
47
47
  }
package/types/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import type { IMpegSource, IDashSource, IHLSSource, IDashURLSource, IHLSLiveSour
3
3
  import type { VideoCodec } from "./player/types";
4
4
  import { VideoFormat, Surface, PredefinedQualityLimits, VideoCodecName } from "./player/types";
5
5
  import Player from "./player/Player";
6
- import type { IPlayer, IPlayerInfo, IPlayerEvents, IConfig, ISources, ICueSettings, IExternalTextTrack, ITextTrack, PlaybackRate, IVideoStream, IAudioStream, StartEnd, HttpConnectionMetrics, HttpDownloadMetrics } from "./player/types";
6
+ import type { IPlayer, IPlayerInfo, IPlayerEvents, IConfig, ISources, ICueSettings, IExternalTextTrack, ITextTrack, PlaybackRate, IVideoStream, IAudioStream } from "./player/types";
7
7
  import { PlaybackState, ChromecastState, HttpConnectionType } from "./player/types";
8
8
  import type { IOptionalTuningConfig } from "./utils/tuningConfig";
9
9
  export { clientChecker, isMobile } from "./utils/ClientChecker";
@@ -15,5 +15,5 @@ import { Subscription, Observable, Subject, ValueSubject, VideoQuality } from "@
15
15
  * @deprecated
16
16
  */
17
17
  declare const SDK_VERSION: string;
18
- export type { IPlayer, IPlayerInfo, IPlayerEvents, IConfig, IOptionalTuningConfig, ILogEntry, ISources, IExternalTextTrack, ITextTrack, ISubscription, IUnsubscriber, IObservable, IEmitter, IValueObservable, IValue, IOperator, IListener, IMpegSource, IDashSource, IDashURLSource, IHLSSource, IHLSLiveSource, URLSource, RawSource, URLSourceWithSeek, ExactVideoQuality, IRange, ISeekRequest, ICueSettings, PlaybackRate, IVideoStream, IAudioStream, StartEnd, HttpConnectionMetrics, HttpDownloadMetrics };
18
+ export type { IPlayer, IPlayerInfo, IPlayerEvents, IConfig, IOptionalTuningConfig, ILogEntry, ISources, IExternalTextTrack, ITextTrack, ISubscription, IUnsubscriber, IObservable, IEmitter, IValueObservable, IValue, IOperator, IListener, IMpegSource, IDashSource, IDashURLSource, IHLSSource, IHLSLiveSource, URLSource, RawSource, URLSourceWithSeek, ExactVideoQuality, IRange, ISeekRequest, ICueSettings, PlaybackRate, IVideoStream, IAudioStream };
19
19
  export { Player, PlaybackState, ChromecastState, HttpConnectionType, Surface, Subscription, VideoFormat, VideoQuality, Observable, Subject, ValueSubject, VERSION, SDK_VERSION, PredefinedQualityLimits, VideoCodec, VideoCodecName };
@@ -34,5 +34,4 @@ export default class DashLiveProvider implements IProvider {
34
34
  private seek;
35
35
  private _dashCb;
36
36
  private syncPlayback;
37
- private isSeekOffsetSupported;
38
37
  }
@@ -5,5 +5,4 @@ export default class DashCmafLiveProvider extends BaseDashProvider {
5
5
  constructor(params: IParams);
6
6
  protected override subscribe(): void;
7
7
  protected override seek(position: Milliseconds): void;
8
- private isSeekOffsetSupported;
9
8
  }
@@ -84,7 +84,6 @@ export declare class BufferManager {
84
84
  switchTo: ReturnType<typeof abortable<[Representation["id"], boolean | undefined], void>>;
85
85
  switchToOld: ReturnType<typeof abortable<[Representation["id"], boolean | undefined], void>>;
86
86
  warmUpMediaSource(): void;
87
- private releaseStrandedSegment;
88
87
  abort(): Promise<boolean>;
89
88
  maintain(currentPosition?: Milliseconds | undefined): void;
90
89
  get lastDataObtainedTimestamp(): number;
@@ -27,7 +27,6 @@ export interface IParams {
27
27
  useUrlCacheMechanism?: boolean;
28
28
  measureNonSegmentRequests?: boolean;
29
29
  measureFastSamples?: boolean;
30
- cacheHitTtfbMaxMs?: Milliseconds;
31
30
  preloadFirstSegment?: boolean;
32
31
  maxQualityForFirstSegmentPreload?: ExactVideoQuality;
33
32
  }
@@ -77,14 +76,13 @@ export declare class Fetcher {
77
76
  private useUrlCacheMechanism;
78
77
  private measureNonSegmentRequests;
79
78
  private measureFastSamples;
80
- private cacheHitTtfbMaxMs;
81
79
  private preloadFirstSegment;
82
80
  private maxQualityForFirstSegmentPreload;
83
81
  private startupPhase;
84
82
  private performanceObserver;
85
83
  private pendingConnectionMetrics;
86
84
  private handleExtendedNetworkErrorsSet;
87
- constructor({ throughputEstimator, requestQuic, tracer, compatibilityMode, useEnableSubtitlesParam, handleExtendedNetworkErrorsSet, useUrlCacheMechanism, measureNonSegmentRequests, measureFastSamples, cacheHitTtfbMaxMs, preloadFirstSegment, maxQualityForFirstSegmentPreload }: IParams);
85
+ constructor({ throughputEstimator, requestQuic, tracer, compatibilityMode, useEnableSubtitlesParam, handleExtendedNetworkErrorsSet, useUrlCacheMechanism, measureNonSegmentRequests, measureFastSamples, preloadFirstSegment, maxQualityForFirstSegmentPreload }: IParams);
88
86
  private onHeadersReceived;
89
87
  private setupPerformanceObserver;
90
88
  private processPerformanceResourceTiming;
@@ -1,5 +1,4 @@
1
1
  import type { Byte, IError, ISubject, Milliseconds } from "@vkontakte/videoplayer-shared";
2
- import type { ITuningConfig } from "../../../utils/tuningConfig";
3
2
  declare class SourceBufferTaskQueue {
4
3
  bufferFull$: ISubject<Byte>;
5
4
  error$: ISubject<IError>;
@@ -8,8 +7,7 @@ declare class SourceBufferTaskQueue {
8
7
  private currentTask;
9
8
  private destroyed;
10
9
  private abortRequested;
11
- private readonly tuning;
12
- constructor(buffer: SourceBuffer, tuning: ITuningConfig);
10
+ constructor(buffer: SourceBuffer);
13
11
  append(data: BufferSource, signal?: AbortSignal): Promise<boolean>;
14
12
  remove(from: Milliseconds, to: Milliseconds, signal?: AbortSignal): Promise<boolean>;
15
13
  abort(init?: BufferSource): Promise<boolean>;
@@ -27,7 +27,6 @@ export interface IParams {
27
27
  useUrlCacheMechanism?: boolean;
28
28
  measureNonSegmentRequests?: boolean;
29
29
  measureFastSamples?: boolean;
30
- cacheHitTtfbMaxMs?: Milliseconds;
31
30
  preloadFirstSegment?: boolean;
32
31
  maxQualityForFirstSegmentPreload?: ExactVideoQuality;
33
32
  }
@@ -76,14 +75,13 @@ export declare class Fetcher {
76
75
  private useUrlCacheMechanism;
77
76
  private measureNonSegmentRequests;
78
77
  private measureFastSamples;
79
- private cacheHitTtfbMaxMs;
80
78
  private preloadFirstSegment;
81
79
  private maxQualityForFirstSegmentPreload;
82
80
  private startupPhase;
83
81
  private performanceObserver;
84
82
  private pendingConnectionMetrics;
85
83
  private handleExtendedNetworkErrorsSet;
86
- constructor({ throughputEstimator, requestQuic, tracer, compatibilityMode, useEnableSubtitlesParam, handleExtendedNetworkErrorsSet, useUrlCacheMechanism, measureNonSegmentRequests, measureFastSamples, cacheHitTtfbMaxMs, preloadFirstSegment, maxQualityForFirstSegmentPreload }: IParams);
84
+ constructor({ throughputEstimator, requestQuic, tracer, compatibilityMode, useEnableSubtitlesParam, handleExtendedNetworkErrorsSet, useUrlCacheMechanism, measureNonSegmentRequests, measureFastSamples, preloadFirstSegment, maxQualityForFirstSegmentPreload }: IParams);
87
85
  private onHeadersReceived;
88
86
  private setupPerformanceObserver;
89
87
  private processResourceTiming;
@@ -30,5 +30,4 @@ export default class HlsLiveProvider implements IProvider {
30
30
  private seek;
31
31
  private syncPlayback;
32
32
  private generateLiveUrl;
33
- private isSeekOffsetSupported;
34
33
  }
@@ -4,7 +4,6 @@ export declare enum OffsetParameterType {
4
4
  PLAYBACK_SHIFT = 1,
5
5
  DASH_CMAF_OFFSET_P = 2
6
6
  }
7
- export declare const hasOffsetMarker: (url: string) => boolean;
8
7
  declare const _default: (url: string, offset?: Milliseconds, type?: OffsetParameterType) => string;
9
8
  export default _default;
10
9
  export declare const getLiveUrlOffset: (url: string, type: OffsetParameterType) => number;
@@ -1,7 +1,6 @@
1
1
  import { CurrentClientDevice } from "../types/currentClientDevice";
2
2
  import type { DisplayChecker } from "./DisplayChecker";
3
3
  import type { Checker } from "../types/checker";
4
- import type { HighEntropyValues } from "../types/userAgentData";
5
4
  export interface OS {
6
5
  name: string;
7
6
  version: string;
@@ -11,12 +10,6 @@ export interface DeviceDetails {
11
10
  vendor: string;
12
11
  model: string;
13
12
  }
14
- export interface DeviceHardware {
15
- cpuCores?: number;
16
- memoryGb?: number;
17
- gpuVendor?: string;
18
- gpuArchitecture?: string;
19
- }
20
13
  export declare class DeviceChecker implements Checker {
21
14
  private _displayChecker;
22
15
  private _isMobile;
@@ -25,14 +18,10 @@ export declare class DeviceChecker implements Checker {
25
18
  private _highEntropyValues;
26
19
  private _os;
27
20
  private _details;
28
- private _hardware;
29
- private _gpuDetection;
30
21
  constructor(displayChecker: DisplayChecker);
31
22
  get current(): CurrentClientDevice;
32
23
  get os(): OS;
33
24
  get details(): DeviceDetails;
34
- get hardware(): DeviceHardware;
35
- get highEntropyValues(): HighEntropyValues;
36
25
  get isIOS(): boolean;
37
26
  get isIPadOS(): boolean;
38
27
  get isMac(): boolean;
@@ -44,9 +33,6 @@ export declare class DeviceChecker implements Checker {
44
33
  get isMobile(): boolean;
45
34
  get iOSVersion(): number | undefined;
46
35
  detect(): void;
47
- private detectHardware;
48
- detectGpu(): Promise<void>;
49
- private requestGpuInfo;
50
36
  private detectHighEntropyValues;
51
37
  private detectDevice;
52
38
  private detectOS;
@@ -10,7 +10,6 @@ export declare class DisplayChecker implements Checker {
10
10
  private _screenHeight;
11
11
  private _screenWidth;
12
12
  private _colorDepth;
13
- private _colorGamut;
14
13
  private _displayMode;
15
14
  private _isStandalone;
16
15
  get isTouch(): boolean;
@@ -22,10 +21,8 @@ export declare class DisplayChecker implements Checker {
22
21
  get pixelRatio(): number;
23
22
  get isHDR(): boolean;
24
23
  get colorDepth(): number;
25
- get colorGamut(): ColorGamut | undefined;
26
24
  get displayMode(): DisplayMode;
27
25
  get isStandalone(): boolean;
28
26
  detect(): void;
29
- private detectColorGamut;
30
27
  private detectDisplayMode;
31
28
  }
@@ -43,13 +43,6 @@ export type ITuningConfig = {
43
43
  smallSampleMinDuration: Milliseconds;
44
44
  cacheThresholdSize: Milliseconds;
45
45
  /**
46
- * UVP-11541: верхняя граница порога, ниже которого ответ считается кэш-хитом по TTFB.
47
- * Без неё порог растёт вместе с rtt и после деградации сети объявляет кэшем любой быстрый
48
- * сетевой ответ — оценка застывает навсегда. Замер на CDN: кэш отвечает за 0.5–1.2 мс,
49
- * сеть не быстрее 45 мс, так что коридор широкий.
50
- */
51
- cacheHitTtfbMaxMs: Milliseconds;
52
- /**
53
46
  * Фичафлаг UVP-10855: лечит залипание throughput на быстрых соединениях.
54
47
  *
55
48
  * Проблема: на быстром соединении крупный сегмент реально скачивается за ≤ cacheThresholdSize
@@ -259,8 +252,6 @@ export type ITuningConfig = {
259
252
  maxQualityForFirstSegmentPreload: ExactVideoQuality;
260
253
  /** Включает отправку телеметрии трейсера (resume) при превышении stall watchdog */
261
254
  tracerResumeOnUnexpectedStall: boolean;
262
- /** Включает отправку телеметрии трейсера (resume) при выборе ABR качества не выше lowQualityTelemetryLimit */
263
- tracerResumeOnLowQuality: boolean;
264
255
  /**
265
256
  * Эксперимент: при `true` отключает `await this.reinitDecoderIfNeeded(shouldForceSeek)`
266
257
  * внутри `stallWatchdogIntervalCallback`. По умолчанию `false` — текущее поведение
@@ -277,23 +268,6 @@ export type ITuningConfig = {
277
268
  * Включать поэтапно, начиная с процента трафика, для A/B по метрикам утечек и восстановления.
278
269
  */
279
270
  resolveQueueOnDestroy: boolean;
280
- /**
281
- * Освобождает застрявшую загрузку сегментов в `DashProvider`: запись из `activeSegments`,
282
- * когда её загрузчик закончил работу или когда `warmUpMediaSource()` переоткрыл
283
- * `mediaSource`, и колбэки задач `sourceBufferTaskQueue`, когда очередь разрушается
284
- * посреди `append` (UVP-11642, UVP-11519).
285
- *
286
- * Без первого ранний выход `onSegmentFullyAppended` по протухшему `sourceBuffer` оставляет
287
- * запись навсегда, а `maintain()` планирует загрузки только при пустом `activeSegments` —
288
- * видеодорожка перестаёт докачиваться до конца жизни `BufferManager`. Без второго
289
- * `destroy()` зануляет `currentTask`, не вызвав callback, `loadTemplateSegment` навсегда
290
- * стоит на `await`, а `initRepresentations` не доходит до `REPRESENTATIOS_READY`.
291
- *
292
- * Освобождённый сегмент возвращается в `NONE` через `abortSegment()`, то есть будет скачан
293
- * заново: пережили ли байты переоткрытие буфера, достоверно неизвестно, и лишняя докачка
294
- * дешевле замершего воспроизведения.
295
- */
296
- recoverStuckSegmentLoading: boolean;
297
271
  };
298
272
  dashCmafLive: {
299
273
  externalStopControl: boolean;
@@ -341,15 +315,6 @@ export type ITuningConfig = {
341
315
  */
342
316
  maxPausedTime: number;
343
317
  catchupLiveForMutedInactiveTab: boolean;
344
- /**
345
- * UVP-2618. Отключать перемотку лайва, если ссылка пришла без маркера offset (`_offset_p` в пути
346
- * или query-параметр `?offset_p=`). Применяется ко всем live-форматам: dash_live, dash_live_cmaf,
347
- * hls_live, hls_live_cmaf. Когда манифест отдаёт DVR-окно (shiftDuration / liveSeekableDuration /
348
- * X-Playback-Duration), но в URL нет маркера, `generateLiveUrl` не сможет подставить offset и плеер
349
- * молча переинициализируется на live edge. Включение делает DVR-окно нулевым и скрывает таймлайн.
350
- * По умолчанию false (прежнее поведение), включается для эксперимента.
351
- */
352
- disableLiveSeekWithoutOffsetMarker: boolean;
353
318
  };
354
319
  enableWakeLock: boolean;
355
320
  enableTelemetryAtStart: boolean;
@@ -390,7 +355,6 @@ export type ITuningConfig = {
390
355
  * include-threshold - записываем столлы длинее stallIgnoreThreshold
391
356
  */
392
357
  stallHandlingStrategy: "verbose" | "exclude-threshold" | "include-threshold";
393
- stallIgnoreOnPause: boolean;
394
358
  gapWatchdogInterval: Milliseconds;
395
359
  requestQuick: boolean;
396
360
  /** @deprecated HLS.js удалён, флаг ничего не делает */