@vkontakte/videoplayer-core 2.0.176-dev.d50c4f142.0 → 2.0.176-dev.e1dd55487.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 +16 -16
- package/es2015.esm.js +8 -8
- package/esnext.cjs +7 -7
- package/esnext.esm.js +7 -7
- package/evergreen.esm.js +7 -7
- package/package.json +2 -2
- package/types/index.d.ts +6 -1
- package/types/player/types.d.ts +6 -0
- package/types/providers/DashProvider/baseDashProvider.d.ts +2 -0
- package/types/providers/DashProvider/lib/fetcher.d.ts +11 -1
- package/types/providers/DashProvider/lib/player.d.ts +3 -0
- package/types/providers/DashProviderVirtual/baseDashProvider.d.ts +2 -0
- package/types/providers/DashProviderVirtual/lib/fetcher.d.ts +11 -1
- package/types/providers/DashProviderVirtual/lib/player/types.d.ts +4 -0
- package/types/providers/ProviderContainer/index.d.ts +2 -0
- package/types/providers/ProviderContainer/utils/selectFormats.d.ts +10 -0
- package/types/utils/prepareSources.d.ts +31 -0
- package/types/utils/tuningConfig.d.ts +19 -0
- package/types/utils/warmUpSources.d.ts +21 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer-core",
|
|
3
|
-
"version": "2.0.176-dev.
|
|
3
|
+
"version": "2.0.176-dev.e1dd55487.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.105-dev.
|
|
45
|
+
"@vkontakte/videoplayer-shared": "1.0.105-dev.e1dd55487.0"
|
|
46
46
|
}
|
|
47
47
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -3,6 +3,10 @@ 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 warmUpSources from "./utils/warmUpSources";
|
|
7
|
+
import type { IWarmUp, IWarmUpTargets } from "./utils/warmUpSources";
|
|
8
|
+
import prepareSources from "./utils/prepareSources";
|
|
9
|
+
import type { IPreparedSources } from "./utils/prepareSources";
|
|
6
10
|
import type { IPlayer, IPlayerInfo, IPlayerEvents, IConfig, ISources, ICueSettings, IExternalTextTrack, ITextTrack, PlaybackRate, IVideoStream, IAudioStream, StartEnd, HttpConnectionMetrics, HttpDownloadMetrics } from "./player/types";
|
|
7
11
|
import { PlaybackState, ChromecastState, HttpConnectionType } from "./player/types";
|
|
8
12
|
import type { IOptionalTuningConfig } from "./utils/tuningConfig";
|
|
@@ -16,4 +20,5 @@ import { Subscription, Observable, Subject, ValueSubject, VideoQuality } from "@
|
|
|
16
20
|
*/
|
|
17
21
|
declare const SDK_VERSION: string;
|
|
18
22
|
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 };
|
|
19
|
-
export {
|
|
23
|
+
export type { IWarmUp, IWarmUpTargets, IPreparedSources };
|
|
24
|
+
export { Player, warmUpSources, prepareSources, PlaybackState, ChromecastState, HttpConnectionType, Surface, Subscription, VideoFormat, VideoQuality, Observable, Subject, ValueSubject, VERSION, SDK_VERSION, PredefinedQualityLimits, VideoCodec, VideoCodecName };
|
package/types/player/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { IPreparedSources } from "../utils/prepareSources";
|
|
1
2
|
import type { DebugData, IError, ILogEntry, IObservable, IRectangle, IValueObservable, IValueSubject, Kbps, Milliseconds, QualityLimits, Seconds, Subject, ValueSubject, VideoQuality } from "@vkontakte/videoplayer-shared";
|
|
2
3
|
import type { dump } from "../utils/playbackTelemetry";
|
|
3
4
|
export interface StartEnd<Unit extends number> {
|
|
@@ -558,6 +559,11 @@ export interface IConfig {
|
|
|
558
559
|
* Нужно ли recoverableError обрабатывать как ошибку провайдера или будет снаружи обрабатываться.
|
|
559
560
|
*/
|
|
560
561
|
handleNetworkRecoverableErrorAsProviderError?: boolean;
|
|
562
|
+
/**
|
|
563
|
+
* UVP-11502: манифест, запрошенный потребителем заранее — см. prepareSources.
|
|
564
|
+
* Не передан — плеер запрашивает манифест сам, как и раньше.
|
|
565
|
+
*/
|
|
566
|
+
preparedSources?: IPreparedSources;
|
|
561
567
|
}
|
|
562
568
|
export interface ISources {
|
|
563
569
|
[VideoFormat.MPEG]?: IMpegSource;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { IPreparedSources } from "../../utils/prepareSources";
|
|
1
2
|
import type { IAudioTrack, IDashURLSource, IHLSSource, IInternalTextTrack, IVideoTrack, VideoCodec } from "../../player/types";
|
|
2
3
|
import type { IProviderSubscriptionInfo } from "./lib/types";
|
|
3
4
|
import { ProviderState } from "./lib/types";
|
|
@@ -13,6 +14,7 @@ import StallsManager from "../utils/StallsManager";
|
|
|
13
14
|
import { AbrManager } from "../utils/Abr/abrManager";
|
|
14
15
|
import { ElementSizeManager } from "../utils/HTMLVideoElement/ElementSizeManager";
|
|
15
16
|
type IParams = IProviderParams<IDashURLSource> & {
|
|
17
|
+
preparedSources?: IPreparedSources;
|
|
16
18
|
sourceHls?: IHLSSource;
|
|
17
19
|
forceVideoCodec?: VideoCodec;
|
|
18
20
|
isOnDemand?: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { HttpConnectionType, HttpConnectionMetrics, HttpDownloadMetrics } from "../../../player/types";
|
|
2
|
+
import type { IPreparedSources } from "../../../utils/prepareSources";
|
|
2
3
|
import type ThroughputEstimator from "../../../utils/ThroughputEstimator";
|
|
3
4
|
import type { Byte, IValueSubject, ISubject, Milliseconds, IRange, ITracer, IError } from "@vkontakte/videoplayer-shared";
|
|
4
5
|
import { abortable } from "@vkontakte/videoplayer-shared";
|
|
@@ -30,6 +31,8 @@ export interface IParams {
|
|
|
30
31
|
cacheHitTtfbMaxMs?: Milliseconds;
|
|
31
32
|
preloadFirstSegment?: boolean;
|
|
32
33
|
maxQualityForFirstSegmentPreload?: ExactVideoQuality;
|
|
34
|
+
preparedSources?: IPreparedSources;
|
|
35
|
+
preparedSourcesTimeout?: Milliseconds;
|
|
33
36
|
}
|
|
34
37
|
export type Priority = "high" | "low" | "auto";
|
|
35
38
|
export interface FetchParamsWithUrl extends FetchParams {
|
|
@@ -78,13 +81,15 @@ export declare class Fetcher {
|
|
|
78
81
|
private measureNonSegmentRequests;
|
|
79
82
|
private measureFastSamples;
|
|
80
83
|
private cacheHitTtfbMaxMs;
|
|
84
|
+
private preparedSources?;
|
|
85
|
+
private preparedSourcesTimeout;
|
|
81
86
|
private preloadFirstSegment;
|
|
82
87
|
private maxQualityForFirstSegmentPreload;
|
|
83
88
|
private startupPhase;
|
|
84
89
|
private performanceObserver;
|
|
85
90
|
private pendingConnectionMetrics;
|
|
86
91
|
private handleExtendedNetworkErrorsSet;
|
|
87
|
-
constructor({ throughputEstimator, requestQuic, tracer, compatibilityMode, useEnableSubtitlesParam, handleExtendedNetworkErrorsSet, useUrlCacheMechanism, measureNonSegmentRequests, measureFastSamples, cacheHitTtfbMaxMs, preloadFirstSegment, maxQualityForFirstSegmentPreload }: IParams);
|
|
92
|
+
constructor({ throughputEstimator, requestQuic, tracer, compatibilityMode, useEnableSubtitlesParam, handleExtendedNetworkErrorsSet, useUrlCacheMechanism, measureNonSegmentRequests, measureFastSamples, cacheHitTtfbMaxMs, preloadFirstSegment, maxQualityForFirstSegmentPreload, preparedSources, preparedSourcesTimeout }: IParams);
|
|
88
93
|
private onHeadersReceived;
|
|
89
94
|
private setupPerformanceObserver;
|
|
90
95
|
private processPerformanceResourceTiming;
|
|
@@ -99,6 +104,11 @@ export declare class Fetcher {
|
|
|
99
104
|
private fetchByteRangeRepresentation;
|
|
100
105
|
private fetchTemplateRepresentation;
|
|
101
106
|
private isLikelyCacheHitByTtfb;
|
|
107
|
+
/**
|
|
108
|
+
* Ответ на манифест, запрошенный до создания плеера. Отдаётся один раз и только на тот же URL:
|
|
109
|
+
* разойдётся адрес — значит подготовка выбрала другой формат, и запрос идёт обычным путём.
|
|
110
|
+
*/
|
|
111
|
+
private takePrepared;
|
|
102
112
|
private doFetch;
|
|
103
113
|
private unsubscribeAbortSubscription;
|
|
104
114
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { IPreparedSources } from "../../../utils/prepareSources";
|
|
1
2
|
import type { IHLSSource, HttpConnectionType, HttpConnectionMetrics, HttpDownloadMetrics, VideoCodec } from "../../../player/types";
|
|
2
3
|
import { LiveStreamStatus } from "./types";
|
|
3
4
|
import type { CommonInit, Manifest, Representation, Segment, TextRepresentation } from "../../utils/parsers/types";
|
|
@@ -18,6 +19,8 @@ export interface Params {
|
|
|
18
19
|
throughputEstimator: ThroughputEstimator;
|
|
19
20
|
tuning: ITuningConfig;
|
|
20
21
|
compatibilityMode?: boolean;
|
|
22
|
+
preparedSources?: IPreparedSources;
|
|
23
|
+
preparedSourcesTimeout?: Milliseconds;
|
|
21
24
|
forceVideoCodec?: VideoCodec;
|
|
22
25
|
tracer: ITracer;
|
|
23
26
|
isOnDemand: boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { IPreparedSources } from "../../utils/prepareSources";
|
|
1
2
|
import type { IAudioTrack, IDashURLSource, IHLSSource, IInternalTextTrack, IVideoTrack, VideoCodec } from "../../player/types";
|
|
2
3
|
import type { IProviderSubscriptionInfo } from "./lib/types";
|
|
3
4
|
import { ProviderState } from "./lib/types";
|
|
@@ -13,6 +14,7 @@ import { ElementSizeManager } from "../utils/HTMLVideoElement/ElementSizeManager
|
|
|
13
14
|
import type { BasePlayer } from "./lib/player/basePlayer";
|
|
14
15
|
import { AbrManager } from "../utils/Abr/abrManager";
|
|
15
16
|
type IParams = IProviderParams<IDashURLSource> & {
|
|
17
|
+
preparedSources?: IPreparedSources;
|
|
16
18
|
sourceHls?: IHLSSource;
|
|
17
19
|
forceVideoCodec?: VideoCodec;
|
|
18
20
|
isOnDemand?: boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { IPreparedSources } from "../../../utils/prepareSources";
|
|
1
2
|
import type { HttpConnectionType, HttpConnectionMetrics, HttpDownloadMetrics } from "../../../player/types";
|
|
2
3
|
import type ThroughputEstimator from "../../../utils/ThroughputEstimator";
|
|
3
4
|
import type { Byte, IError, IRange, ISubject, ITracer, IValueSubject, Milliseconds } from "@vkontakte/videoplayer-shared";
|
|
@@ -21,6 +22,8 @@ export interface IParams {
|
|
|
21
22
|
throughputEstimator?: ThroughputEstimator;
|
|
22
23
|
requestQuic: boolean;
|
|
23
24
|
compatibilityMode?: boolean;
|
|
25
|
+
preparedSources?: IPreparedSources;
|
|
26
|
+
preparedSourcesTimeout?: Milliseconds;
|
|
24
27
|
tracer: ITracer;
|
|
25
28
|
useEnableSubtitlesParam?: boolean;
|
|
26
29
|
handleExtendedNetworkErrorsSet?: boolean;
|
|
@@ -77,13 +80,15 @@ export declare class Fetcher {
|
|
|
77
80
|
private measureNonSegmentRequests;
|
|
78
81
|
private measureFastSamples;
|
|
79
82
|
private cacheHitTtfbMaxMs;
|
|
83
|
+
private preparedSources?;
|
|
84
|
+
private preparedSourcesTimeout;
|
|
80
85
|
private preloadFirstSegment;
|
|
81
86
|
private maxQualityForFirstSegmentPreload;
|
|
82
87
|
private startupPhase;
|
|
83
88
|
private performanceObserver;
|
|
84
89
|
private pendingConnectionMetrics;
|
|
85
90
|
private handleExtendedNetworkErrorsSet;
|
|
86
|
-
constructor({ throughputEstimator, requestQuic, tracer, compatibilityMode, useEnableSubtitlesParam, handleExtendedNetworkErrorsSet, useUrlCacheMechanism, measureNonSegmentRequests, measureFastSamples, cacheHitTtfbMaxMs, preloadFirstSegment, maxQualityForFirstSegmentPreload }: IParams);
|
|
91
|
+
constructor({ throughputEstimator, requestQuic, tracer, compatibilityMode, useEnableSubtitlesParam, handleExtendedNetworkErrorsSet, useUrlCacheMechanism, measureNonSegmentRequests, measureFastSamples, cacheHitTtfbMaxMs, preparedSources, preparedSourcesTimeout, preloadFirstSegment, maxQualityForFirstSegmentPreload }: IParams);
|
|
87
92
|
private onHeadersReceived;
|
|
88
93
|
private setupPerformanceObserver;
|
|
89
94
|
private processResourceTiming;
|
|
@@ -98,5 +103,10 @@ export declare class Fetcher {
|
|
|
98
103
|
private fetchByteRangeRepresentation;
|
|
99
104
|
private fetchTemplateRepresentation;
|
|
100
105
|
private isLikelyCacheHitByTtfb;
|
|
106
|
+
/**
|
|
107
|
+
* Ответ на манифест, запрошенный до создания плеера. Отдаётся один раз и только на тот же URL:
|
|
108
|
+
* разойдётся адрес — значит подготовка выбрала другой формат, и запрос идёт обычным путём.
|
|
109
|
+
*/
|
|
110
|
+
private takePrepared;
|
|
101
111
|
private doFetch;
|
|
102
112
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { Milliseconds } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import type { IPreparedSources } from "../../../../utils/prepareSources";
|
|
1
3
|
import type ThroughputEstimator from "../../../../utils/ThroughputEstimator";
|
|
2
4
|
import type { ITuningConfig } from "../../../../utils/tuningConfig";
|
|
3
5
|
import type { VideoCodec } from "../../../../player/types";
|
|
@@ -12,6 +14,8 @@ export interface Params {
|
|
|
12
14
|
throughputEstimator: ThroughputEstimator;
|
|
13
15
|
tuning: ITuningConfig;
|
|
14
16
|
compatibilityMode?: boolean;
|
|
17
|
+
preparedSources?: IPreparedSources;
|
|
18
|
+
preparedSourcesTimeout?: Milliseconds;
|
|
15
19
|
forceVideoCodec?: VideoCodec;
|
|
16
20
|
tracer: ITracer;
|
|
17
21
|
isOnDemand?: boolean;
|
|
@@ -5,6 +5,7 @@ import type { IError, ISubject, IValueSubject, IRectangle } from "@vkontakte/vid
|
|
|
5
5
|
import { ValueSubject } from "@vkontakte/videoplayer-shared";
|
|
6
6
|
import type { IDesiredState, IProviderDependencies, IProviderOutput } from "../types";
|
|
7
7
|
import type { IProviderContainer, IProviderEntry } from "./types";
|
|
8
|
+
import type { IPreparedSources } from "../../utils/prepareSources";
|
|
8
9
|
interface IParams extends IProviderDependencies {
|
|
9
10
|
container: HTMLElement;
|
|
10
11
|
sources: ISources;
|
|
@@ -16,6 +17,7 @@ interface IParams extends IProviderDependencies {
|
|
|
16
17
|
panelSize?: IRectangle;
|
|
17
18
|
skipVideoElVolumeSync$: ValueSubject<boolean>;
|
|
18
19
|
handleNetworkRecoverableErrorAsProviderError?: boolean;
|
|
20
|
+
preparedSources?: IPreparedSources;
|
|
19
21
|
}
|
|
20
22
|
export default class ProviderContainer implements IProviderContainer {
|
|
21
23
|
current$: IValueSubject<IProviderEntry>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ISources, VideoFormat } from "../../../player/types";
|
|
2
|
+
import type { ITuningConfig } from "../../../utils/tuningConfig";
|
|
3
|
+
/**
|
|
4
|
+
* Порядок форматов для экрана: платформенный приоритет, пересечённый с тем, что реально отдал API,
|
|
5
|
+
* с учётом принудительного формата и списка нежелательных.
|
|
6
|
+
*
|
|
7
|
+
* Вынесено из ProviderContainer, потому что тот же порядок нужен подготовке источников снаружи
|
|
8
|
+
* плеера: она обязана выбрать тот же формат, иначе прогретый запрос уйдёт не за тем манифестом.
|
|
9
|
+
*/
|
|
10
|
+
export declare const selectScreenFormats: (sources: ISources, tuning: ITuningConfig) => VideoFormat[];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ISources } from "../player/types";
|
|
2
|
+
import { VideoFormat } from "../player/types";
|
|
3
|
+
import type { IOptionalTuningConfig } from "./tuningConfig";
|
|
4
|
+
export interface IPreparedSources {
|
|
5
|
+
/** URL, ради которого всё затевалось: плеер возьмёт ответ, только если запросит ровно его. */
|
|
6
|
+
readonly url: string;
|
|
7
|
+
readonly format: VideoFormat;
|
|
8
|
+
/** Ответ на запрос манифеста. Тело не вычитано — его прочитает плеер. */
|
|
9
|
+
readonly response: Promise<Response | undefined>;
|
|
10
|
+
destroy: () => void;
|
|
11
|
+
}
|
|
12
|
+
interface IOptions {
|
|
13
|
+
/** Конфиг плеера потребителя: недостающее добирается дефолтами, как это сделает сам плеер. */
|
|
14
|
+
tuning?: IOptionalTuningConfig;
|
|
15
|
+
/**
|
|
16
|
+
* Хэндл прошлой подготовки того же видео. Потребитель зовёт подготовку и до загрузки конфига
|
|
17
|
+
* плеера, и после: сошёлся URL — отдаём прежний запрос, разошёлся — прежний отменяем и идём
|
|
18
|
+
* заново. Иначе конфиг, меняющий URL или формат, тихо обесценил бы подготовку.
|
|
19
|
+
*/
|
|
20
|
+
previous?: IPreparedSources;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Запрашивает манифест до создания плеера — как только потребителю стали известны источники.
|
|
24
|
+
*
|
|
25
|
+
* Смысл в запасе: между ответом API со ссылками и первым запросом плеера проходят сотни
|
|
26
|
+
* миллисекунд, и в них укладывается DNS, TCP, TLS и сама загрузка манифеста. Выбор формата
|
|
27
|
+
* и достройка URL повторяют логику плеера, поэтому подготовленный ответ подходит ему как есть;
|
|
28
|
+
* разойдутся — плеер сходит за манифестом сам.
|
|
29
|
+
*/
|
|
30
|
+
declare const _default: (sources: ISources, { tuning, previous }?: IOptions) => IPreparedSources | undefined;
|
|
31
|
+
export default _default;
|
|
@@ -475,6 +475,25 @@ export type ITuningConfig = {
|
|
|
475
475
|
*/
|
|
476
476
|
useUrlCacheMechanism?: boolean;
|
|
477
477
|
/**
|
|
478
|
+
* Прогревать ли соединение к хостам раздачи. **Сам SDK этот флаг не читает** — прогрев живёт
|
|
479
|
+
* в `warmUpSources`, а зовёт её потребитель: внутри SDK запаса времени до первого запроса нет.
|
|
480
|
+
* Флаг лежит здесь, чтобы раскаткой управлял тот же ключ конфига плеера, что и остальными
|
|
481
|
+
* экспериментами, а не отдельная ручка на каждом потребителе.
|
|
482
|
+
*/
|
|
483
|
+
usePreconnectSources?: boolean;
|
|
484
|
+
/**
|
|
485
|
+
* Запрашивать ли манифест до создания плеера. **Сам SDK этот флаг не читает** — подготовку
|
|
486
|
+
* зовёт потребитель через `prepareSources`, потому что запас времени есть только у него.
|
|
487
|
+
* Флаг лежит здесь, чтобы раскаткой управлял ключ конфига плеера, а не ручка на потребителе.
|
|
488
|
+
*/
|
|
489
|
+
usePreparedSources?: boolean;
|
|
490
|
+
/**
|
|
491
|
+
* Сколько ждать манифест, запрошенный потребителем заранее (`prepareSources`), прежде чем
|
|
492
|
+
* идти за ним самому. Ноль ожидания не отменяет подготовку — он делает её бесполезной,
|
|
493
|
+
* поэтому предел нужен только как страховка от зависшего запроса снаружи.
|
|
494
|
+
*/
|
|
495
|
+
preparedSourcesTimeout: Milliseconds;
|
|
496
|
+
/**
|
|
478
497
|
* Очищаем кэш урлов при падение провайдера.
|
|
479
498
|
*/
|
|
480
499
|
dropUrlCacheWhenProviderCrashed?: boolean;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ISources } from "../player/types";
|
|
2
|
+
export interface IWarmUpTargets {
|
|
3
|
+
preconnect: string[];
|
|
4
|
+
dnsPrefetch: string[];
|
|
5
|
+
}
|
|
6
|
+
export interface IWarmUp {
|
|
7
|
+
applied: IWarmUpTargets;
|
|
8
|
+
destroy: () => void;
|
|
9
|
+
}
|
|
10
|
+
interface IOptions {
|
|
11
|
+
failoverHosts?: string[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Прогрев соединения к хостам раздачи по готовым `sources` — до того, как создан плеер.
|
|
15
|
+
*
|
|
16
|
+
* Экономия равна запасу времени до первого запроса, поэтому звать имеет смысл там, где `sources`
|
|
17
|
+
* появились сильно раньше плеера: сразу после ответа API у потребителя. Сам SDK прогрев не вызывает,
|
|
18
|
+
* а флаг `tuning.usePreconnectSources` нужен потребителю, чтобы раскаткой управлял конфиг плеера.
|
|
19
|
+
*/
|
|
20
|
+
declare const _default: (sources: ISources, { failoverHosts }?: IOptions) => IWarmUp;
|
|
21
|
+
export default _default;
|