@vkontakte/videoplayer-core 2.0.148 → 2.0.149-dev.a444d83a.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 +55 -51
- package/es2015.esm.js +53 -49
- package/es2018.cjs.js +53 -49
- package/es2018.esm.js +53 -49
- package/es2024.cjs.js +58 -54
- package/es2024.esm.js +50 -46
- package/esnext.cjs.js +58 -54
- package/esnext.esm.js +50 -46
- package/evergreen.esm.js +44 -40
- package/package.json +2 -2
- package/types/player/Player.d.ts +3 -0
- package/types/player/types.d.ts +7 -1
- package/types/providers/ChromecastPresentationApiProvider/ChromecastPresentationApiConnector.d.ts +124 -0
- package/types/providers/ChromecastPresentationApiProvider/ChromecastPresentationApiInitializer.d.ts +25 -0
- package/types/providers/ChromecastPresentationApiProvider/ChromecastPresentationApiProvider.d.ts +36 -0
- package/types/providers/ChromecastPresentationApiProvider/ProgressTicker.d.ts +11 -0
- package/types/providers/ChromecastPresentationApiProvider/index.d.ts +3 -0
- package/types/providers/ChromecastPresentationApiProvider/types.d.ts +49 -0
- package/types/providers/ChromecastPresentationApiProvider/utils.d.ts +4 -0
- package/types/providers/ChromecastProvider/ChromecastInitializer/index.d.ts +2 -10
- package/types/providers/ChromecastProvider/ChromecastInitializer/types.d.ts +8 -1
- package/types/providers/ChromecastProvider/index.d.ts +2 -10
- package/types/providers/ChromecastProvider/types.d.ts +8 -0
- package/types/providers/ChromecastProvider/utils.d.ts +2 -0
- package/types/providers/DashLiveProvider/utils/LiveDashPlayer.d.ts +1 -0
- package/types/providers/DashProvider/lib/fetcher.d.ts +0 -1
- package/types/providers/DashProviderNew/lib/fetcher.d.ts +0 -1
- package/types/providers/DashProviderVirtual/baseDashProvider.d.ts +61 -0
- package/types/providers/DashProviderVirtual/consts.d.ts +3 -0
- package/types/providers/DashProviderVirtual/dashCmafLiveProvider.d.ts +10 -0
- package/types/providers/DashProviderVirtual/dashProvider.d.ts +8 -0
- package/types/providers/DashProviderVirtual/index.d.ts +2 -0
- package/types/providers/DashProviderVirtual/lib/ElementSizeManager.d.ts +19 -0
- package/types/providers/DashProviderVirtual/lib/LiveTextManager.d.ts +23 -0
- package/types/providers/DashProviderVirtual/lib/buffer/nativeBufferManager.d.ts +19 -0
- package/types/providers/DashProviderVirtual/lib/buffer/sourceBufferTaskQueue.d.ts +19 -0
- package/types/providers/DashProviderVirtual/lib/buffer/types.d.ts +46 -0
- package/types/providers/DashProviderVirtual/lib/buffer/virtualBuffer/baseVirtualBufferManager.d.ts +93 -0
- package/types/providers/DashProviderVirtual/lib/buffer/virtualBuffer/byteRangeVirtualBufferManager.d.ts +21 -0
- package/types/providers/DashProviderVirtual/lib/buffer/virtualBuffer/liveVirtualBuffer.d.ts +27 -0
- package/types/providers/DashProviderVirtual/lib/buffer/virtualBuffer/templateVirtualBufferManager.d.ts +21 -0
- package/types/providers/DashProviderVirtual/lib/buffer/virtualBuffer/virtualBufferFactory.d.ts +6 -0
- package/types/providers/DashProviderVirtual/lib/fetcher.d.ts +63 -0
- package/types/providers/DashProviderVirtual/lib/player/basePlayer.d.ts +100 -0
- package/types/providers/DashProviderVirtual/lib/player/livePlayer.d.ts +36 -0
- package/types/providers/DashProviderVirtual/lib/player/player.d.ts +11 -0
- package/types/providers/DashProviderVirtual/lib/player/types.d.ts +17 -0
- package/types/providers/DashProviderVirtual/lib/types.d.ts +29 -0
- package/types/providers/DashProviderVirtual/lib/utils.d.ts +14 -0
- package/types/providers/types.d.ts +1 -0
- package/types/providers/utils/debug.d.ts +16 -0
- package/types/providers/utils/mergeIntervals.d.ts +3 -0
- package/types/providers/utils/parsers/types.d.ts +28 -7
- package/types/utils/ClientChecker/services/DeviceChecker.d.ts +19 -0
- package/types/utils/decodingInfoLogger.d.ts +1 -0
- package/types/utils/playerOptions.d.ts +2 -0
- package/types/utils/tuningConfig.d.ts +18 -0
package/types/providers/DashProviderVirtual/lib/buffer/virtualBuffer/baseVirtualBufferManager.d.ts
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Fetcher, FetchParamsWithUrl, Priority, RepresentationFetchResult } from '../../../../../providers/DashProviderVirtual/lib/fetcher';
|
|
2
|
+
import { CommonInit, ContainerParser, Representation, Segment, StreamKind } from '../../../../../providers/utils/parsers/types';
|
|
3
|
+
import { ITuningConfig } from '../../../../../utils/tuningConfig';
|
|
4
|
+
import { Byte, IError, IRange, ISubject, IValueSubject, Milliseconds, Seconds, Subscription } from '@vkontakte/videoplayer-shared';
|
|
5
|
+
import { NativeBufferManager } from '../../../../../providers/DashProviderVirtual/lib/buffer/nativeBufferManager';
|
|
6
|
+
import { Dependencies, IBufferPlaybackQueueItem, ISomeDataLoadedCallbackParams, IVirtualBufferManager } from '../../../../../providers/DashProviderVirtual/lib/buffer/types';
|
|
7
|
+
export declare abstract class BaseVirtualBufferManager<T extends Segment> implements IVirtualBufferManager {
|
|
8
|
+
error$: ISubject<IError>;
|
|
9
|
+
playingRepresentation$: IValueSubject<Representation['id'] | undefined>;
|
|
10
|
+
playingRepresentationInit$: IValueSubject<CommonInit | undefined>;
|
|
11
|
+
currentSegmentLength$: IValueSubject<number>;
|
|
12
|
+
onLastSegment$: IValueSubject<boolean>;
|
|
13
|
+
fullyBuffered$: IValueSubject<boolean>;
|
|
14
|
+
protected readonly kind: StreamKind;
|
|
15
|
+
protected readonly nativeBufferManager: NativeBufferManager;
|
|
16
|
+
protected readonly fetcher: Fetcher;
|
|
17
|
+
protected readonly tuning: ITuningConfig;
|
|
18
|
+
protected representations: Map<Representation['id'], Representation>;
|
|
19
|
+
protected playingRepresentationId: Representation['id'] | undefined;
|
|
20
|
+
protected downloadingRepresentationId: Representation['id'] | undefined;
|
|
21
|
+
protected switchingRepresentationId: Representation['id'] | null;
|
|
22
|
+
protected initData: Map<Representation['id'], ArrayBuffer>;
|
|
23
|
+
protected initDataPromises: Map<Representation['id'], Promise<RepresentationFetchResult<T> | null | undefined>>;
|
|
24
|
+
protected idleCallbacks: Map<Representation['id'], number>;
|
|
25
|
+
protected parsedInitData: Map<Representation['id'], CommonInit>;
|
|
26
|
+
protected segments: Map<Representation['id'], T[]>;
|
|
27
|
+
protected containerParser: ContainerParser;
|
|
28
|
+
protected bufferPlaybackQueue: IBufferPlaybackQueueItem<T>[];
|
|
29
|
+
protected downloadingBufferItems: IBufferPlaybackQueueItem<T>[];
|
|
30
|
+
protected preloadOnly: boolean;
|
|
31
|
+
protected forwardBufferTarget: Milliseconds;
|
|
32
|
+
protected failedDownloads: number;
|
|
33
|
+
protected lastDataObtainedTimestampMs: Milliseconds;
|
|
34
|
+
protected loadByteRangeSegmentsTimeoutId: number;
|
|
35
|
+
protected currentVirtualBufferSize: Byte;
|
|
36
|
+
private baseUrls;
|
|
37
|
+
private baseUrlsIndex;
|
|
38
|
+
protected maintainPlaybackBufferMutex: boolean;
|
|
39
|
+
protected maintainNativeBufferMutex: boolean;
|
|
40
|
+
protected bufferClearingMutex: boolean;
|
|
41
|
+
protected abortNativeBufferMutex: boolean;
|
|
42
|
+
protected switchMutex: boolean;
|
|
43
|
+
protected destroyAbortController: AbortController;
|
|
44
|
+
protected downloadAbortController: AbortController;
|
|
45
|
+
protected subscription: Subscription;
|
|
46
|
+
protected readonly getCurrentPosition: () => Milliseconds | undefined;
|
|
47
|
+
protected constructor(kind: StreamKind, nativeBufferManager: NativeBufferManager, representations: Representation[], { fetcher, tuning, getCurrentPosition, manifest }: Dependencies);
|
|
48
|
+
protected abstract loadItems(itemsToLoad: IBufferPlaybackQueueItem<T>[], representation: Representation, priority?: Priority): Promise<void>;
|
|
49
|
+
protected abstract selectItemsToLoad(): IBufferPlaybackQueueItem<T>[];
|
|
50
|
+
protected abstract prepareFetchParams(items: IBufferPlaybackQueueItem<T>[], representation: Representation): FetchParamsWithUrl;
|
|
51
|
+
protected abstract onSomeDataLoaded(data: ISomeDataLoadedCallbackParams<T>): Promise<void>;
|
|
52
|
+
protected abstract updateRepresentationBaseUrl(representation: Representation, newBaseUrl: string): void;
|
|
53
|
+
startWith: (param_0: string) => Promise<void | undefined>;
|
|
54
|
+
switchTo: (param_0: string, param_1: boolean | undefined) => Promise<void | undefined>;
|
|
55
|
+
seek(position: Milliseconds): Promise<void>;
|
|
56
|
+
maintain(currentPosition?: Milliseconds | undefined): Promise<void>;
|
|
57
|
+
getForwardPlaybackBufferDuration(currentPosition?: Milliseconds | undefined): Milliseconds;
|
|
58
|
+
getPlaybackBufferState(): IRange<Milliseconds> | null;
|
|
59
|
+
abort(): Promise<void>;
|
|
60
|
+
findSegmentStartTime(position: Milliseconds): Milliseconds | undefined;
|
|
61
|
+
getRepresentationInitialTime(): Seconds;
|
|
62
|
+
calculateDurationFromSegments(): Milliseconds;
|
|
63
|
+
get lastDataObtainedTimestamp(): Milliseconds;
|
|
64
|
+
setTarget(time: Milliseconds): void;
|
|
65
|
+
setPreloadOnly(preloadOnly: boolean): void;
|
|
66
|
+
destroy(): void;
|
|
67
|
+
protected forceSwitchCondition(oldRepresentation: Representation, newRepresentation: Representation): boolean;
|
|
68
|
+
protected clearBuffer(): Promise<void>;
|
|
69
|
+
protected abortDownload(): void;
|
|
70
|
+
protected abortDownloadingItems(): void;
|
|
71
|
+
protected abortNativeBuffer(): Promise<boolean>;
|
|
72
|
+
protected loadInits(startingRepresentation: Representation): Promise<void>;
|
|
73
|
+
protected loadInitIfNeeded(representation: Representation, requestedPriority?: Priority, critical?: boolean): Promise<void>;
|
|
74
|
+
protected loadInit(representation: Representation, requestedPriority?: Priority, critical?: boolean): Promise<void>;
|
|
75
|
+
protected maintainNativeBuffer(): Promise<void>;
|
|
76
|
+
protected maintainPlaybackBuffer(position: Milliseconds): Promise<void>;
|
|
77
|
+
protected actualizeLastSegmentInfo(currentPosition: Milliseconds): void;
|
|
78
|
+
protected selectDownloadingItems(position: Milliseconds, segments: T[]): IBufferPlaybackQueueItem<T>[];
|
|
79
|
+
protected processCachedItems(): Promise<void>;
|
|
80
|
+
protected withinInterval(currentPosition: Milliseconds | undefined, { from, to }: IRange<Milliseconds>, tolerance?: Milliseconds): boolean;
|
|
81
|
+
protected withinAppendInterval(currentPosition: Milliseconds | undefined, { from, to }: IRange<Milliseconds>): boolean;
|
|
82
|
+
protected withinRemoveInterval(currentPosition: Milliseconds | undefined, { to }: IRange<Milliseconds>): boolean;
|
|
83
|
+
protected waitExponentialDownloadDelay: () => Promise<void | undefined>;
|
|
84
|
+
protected appendSegmentFully(nextPlayingItem: IBufferPlaybackQueueItem<T>, signal: AbortSignal): Promise<void>;
|
|
85
|
+
protected appendSegmentPartially(nextPlayingItem: IBufferPlaybackQueueItem<T>, signal: AbortSignal): Promise<void>;
|
|
86
|
+
protected parseFeedableSegmentChunk(chunk: DataView): DataView | null;
|
|
87
|
+
protected onItemFullyDownloaded(downloadedItem: IBufferPlaybackQueueItem<T>): void;
|
|
88
|
+
protected onItemFullyAppended(appendedItem: IBufferPlaybackQueueItem<T>): void;
|
|
89
|
+
protected removeSegment(nextRemoveItem: IBufferPlaybackQueueItem<T>, signal: AbortSignal): Promise<void>;
|
|
90
|
+
protected onDownloadItem(downloadedItem: IBufferPlaybackQueueItem<T>): Promise<void>;
|
|
91
|
+
protected pruneVirtualBuffer(currentPosition: Milliseconds): void;
|
|
92
|
+
protected updateRepresentationsBaseUrlIfNeeded(): void;
|
|
93
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseVirtualBufferManager } from '../../../../../providers/DashProviderVirtual/lib/buffer/virtualBuffer/baseVirtualBufferManager';
|
|
2
|
+
import { Dependencies, IBufferPlaybackQueueItem, ISomeDataLoadedCallbackParams, IVirtualBufferManager } from '../../../../../providers/DashProviderVirtual/lib/buffer/types';
|
|
3
|
+
import { ByteRangeSegment, Representation, StreamKind } from '../../../../../providers/utils/parsers/types';
|
|
4
|
+
import { NativeBufferManager } from '../../../../../providers/DashProviderVirtual/lib/buffer/nativeBufferManager';
|
|
5
|
+
import { FetchParamsWithUrl, Priority } from '../../../../../providers/DashProviderVirtual/lib/fetcher';
|
|
6
|
+
export declare class ByteRangeVirtualBufferManager extends BaseVirtualBufferManager<ByteRangeSegment> implements IVirtualBufferManager {
|
|
7
|
+
constructor(kind: StreamKind, nativeBufferManager: NativeBufferManager, representations: Representation[], dependencies: Dependencies);
|
|
8
|
+
protected loadItems(itemsToLoad: IBufferPlaybackQueueItem<ByteRangeSegment>[], representation: Representation, priority?: Priority): Promise<void>;
|
|
9
|
+
protected selectItemsToLoad(): IBufferPlaybackQueueItem<ByteRangeSegment>[];
|
|
10
|
+
protected prepareFetchParams(items: IBufferPlaybackQueueItem<ByteRangeSegment>[], representation: Representation): FetchParamsWithUrl;
|
|
11
|
+
/**
|
|
12
|
+
* Закидываем в буфер сегменты атомарнее чем сегмент целиком. Например, по боксам в мпеге и по блокам в вебме.
|
|
13
|
+
* Таким образом не ждём его полной загрузки и готовы играть его намного быстрее
|
|
14
|
+
* @param dataView – данные, размер буфера – весь запрос
|
|
15
|
+
* @param globalFrom – Отступ dataView от начала файла, совпадает с отсупами сегментов
|
|
16
|
+
* @param loaded – Объём загруженных в dataView данных (всё что больше – пока нули)
|
|
17
|
+
* @private
|
|
18
|
+
*/
|
|
19
|
+
protected onSomeDataLoaded({ downloadingItems, dataView, representationId, globalFrom, loaded, signal, }: ISomeDataLoadedCallbackParams<ByteRangeSegment>): Promise<void>;
|
|
20
|
+
protected updateRepresentationBaseUrl(representation: Representation, newBaseUrl: string): void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { TemplateVirtualBufferManager } from '../../../../../providers/DashProviderVirtual/lib/buffer/virtualBuffer/templateVirtualBufferManager';
|
|
2
|
+
import { Manifest, Representation, StreamKind, TemplateSegment, TemplateSegmentReference } from '../../../../../providers/utils/parsers/types';
|
|
3
|
+
import { NativeBufferManager } from '../../../../../providers/DashProviderVirtual/lib/buffer/nativeBufferManager';
|
|
4
|
+
import { Dependencies, IBufferPlaybackQueueItem, ISomeDataLoadedCallbackParams } from '../../../../../providers/DashProviderVirtual/lib/buffer/types';
|
|
5
|
+
import { FetchParamsWithUrl, Priority } from '../../../../../providers/DashProviderVirtual/lib/fetcher';
|
|
6
|
+
import { IRange, IValueSubject, Milliseconds } from '@vkontakte/videoplayer-shared';
|
|
7
|
+
export declare class LiveVirtualBuffer extends TemplateVirtualBufferManager {
|
|
8
|
+
currentLiveSegmentServerLatency$: IValueSubject<number>;
|
|
9
|
+
currentLowLatencySegmentLength$: IValueSubject<number>;
|
|
10
|
+
protected liveInitialAdditionalOffset: number;
|
|
11
|
+
protected isSeekingLive: boolean;
|
|
12
|
+
protected readonly isActiveLowLatency: () => boolean;
|
|
13
|
+
constructor(kind: StreamKind, nativeBufferManager: NativeBufferManager, representations: Representation[], dependencies: Dependencies);
|
|
14
|
+
updateManifest(manifest: Manifest | null): void;
|
|
15
|
+
proceedLowLatencyLive(): void;
|
|
16
|
+
getLiveSegmentsToLoadState(manifest: Manifest | null): IRange<Milliseconds> | undefined;
|
|
17
|
+
getRepresentationInitialTime(): Milliseconds;
|
|
18
|
+
protected prepareFetchParams(items: IBufferPlaybackQueueItem<TemplateSegment>[], representation: Representation): FetchParamsWithUrl;
|
|
19
|
+
protected onSomeDataLoaded({ downloadingItems, ...params }: ISomeDataLoadedCallbackParams<TemplateSegment>): Promise<void>;
|
|
20
|
+
protected onItemFullyDownloaded(downloadedItem: IBufferPlaybackQueueItem<TemplateSegment>): void;
|
|
21
|
+
protected updateLowLatencyItemTime(item: IBufferPlaybackQueueItem<TemplateSegment>): void;
|
|
22
|
+
protected updateLowLatencyLive(latestItem: IBufferPlaybackQueueItem<TemplateSegment>): void;
|
|
23
|
+
protected parseFeedableSegmentChunk(chunk: DataView): DataView | null;
|
|
24
|
+
protected getFetchUrl(items: IBufferPlaybackQueueItem<TemplateSegment>[], representation: Representation): URL;
|
|
25
|
+
protected loadInit(representation: Representation, requestedPriority?: Priority, critical?: boolean): Promise<void>;
|
|
26
|
+
protected getActualLiveStartingSegments(templateSegmentReference: TemplateSegmentReference): TemplateSegment[];
|
|
27
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseVirtualBufferManager } from '../../../../../providers/DashProviderVirtual/lib/buffer/virtualBuffer/baseVirtualBufferManager';
|
|
2
|
+
import { Dependencies, IBufferPlaybackQueueItem, ISomeDataLoadedCallbackParams, IVirtualBufferManager } from '../../../../../providers/DashProviderVirtual/lib/buffer/types';
|
|
3
|
+
import { TemplateSegment, Representation, StreamKind } from '../../../../../providers/utils/parsers/types';
|
|
4
|
+
import { NativeBufferManager } from '../../../../../providers/DashProviderVirtual/lib/buffer/nativeBufferManager';
|
|
5
|
+
import { FetchParamsWithUrl, Priority } from '../../../../../providers/DashProviderVirtual/lib/fetcher';
|
|
6
|
+
export declare class TemplateVirtualBufferManager extends BaseVirtualBufferManager<TemplateSegment> implements IVirtualBufferManager {
|
|
7
|
+
constructor(kind: StreamKind, nativeBufferManager: NativeBufferManager, representations: Representation[], dependencies: Dependencies);
|
|
8
|
+
protected loadItems(itemsToLoad: IBufferPlaybackQueueItem<TemplateSegment>[], representation: Representation, priority?: Priority): Promise<void>;
|
|
9
|
+
protected selectItemsToLoad(): IBufferPlaybackQueueItem<TemplateSegment>[];
|
|
10
|
+
protected prepareFetchParams(items: IBufferPlaybackQueueItem<TemplateSegment>[], representation: Representation): FetchParamsWithUrl;
|
|
11
|
+
protected getFetchUrl(items: IBufferPlaybackQueueItem<TemplateSegment>[], representation: Representation): URL;
|
|
12
|
+
/**
|
|
13
|
+
* Закидываем в буфер сегменты атомарнее чем сегмент целиком. Например, по боксам в мпеге и по блокам в вебме.
|
|
14
|
+
* Таким образом не ждём его полной загрузки и готовы играть его намного быстрее
|
|
15
|
+
* @param dataView – данные, размер буфера – весь запрос
|
|
16
|
+
* @param loaded – Объём загруженных в dataView данных (всё что больше – пока нули)
|
|
17
|
+
* @private
|
|
18
|
+
*/
|
|
19
|
+
protected onSomeDataLoaded({ downloadingItems, dataView, representationId, loaded, signal, }: ISomeDataLoadedCallbackParams<TemplateSegment>): Promise<void>;
|
|
20
|
+
protected updateRepresentationBaseUrl(representation: Representation, newBaseUrl: string): void;
|
|
21
|
+
}
|
package/types/providers/DashProviderVirtual/lib/buffer/virtualBuffer/virtualBufferFactory.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Representation, StreamKind } from '../../../../../providers/utils/parsers/types';
|
|
2
|
+
import { NativeBufferManager } from '../../../../../providers/DashProviderVirtual/lib/buffer/nativeBufferManager';
|
|
3
|
+
import { Dependencies, IVirtualBufferManager } from '../../../../../providers/DashProviderVirtual/lib/buffer/types';
|
|
4
|
+
export declare class VirtualBufferFactory {
|
|
5
|
+
static getBufferManager(kind: StreamKind, nativeBufferManager: NativeBufferManager, representations: Representation[], dependencies: Dependencies): IVirtualBufferManager;
|
|
6
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { HttpConnectionType } from '../../../player/types';
|
|
2
|
+
import type ThroughputEstimator from '../../../utils/ThroughputEstimator';
|
|
3
|
+
import { Byte, IError, IRange, ISubject, ITracer, IValueSubject, Milliseconds } from '@vkontakte/videoplayer-shared';
|
|
4
|
+
import { CommonInit, GenericContainerParser, Segment, SegmentReference } from '../../../providers/utils/parsers/types';
|
|
5
|
+
export declare enum RangeMethod {
|
|
6
|
+
HEADER = 0,
|
|
7
|
+
PARAM = 1
|
|
8
|
+
}
|
|
9
|
+
export interface IParams {
|
|
10
|
+
throughputEstimator?: ThroughputEstimator;
|
|
11
|
+
requestQuic: boolean;
|
|
12
|
+
compatibilityMode?: boolean;
|
|
13
|
+
tracer: ITracer;
|
|
14
|
+
useEnableSubtitlesParam?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export type Priority = 'high' | 'low' | 'auto';
|
|
17
|
+
export interface FetchParamsWithUrl extends FetchParams {
|
|
18
|
+
url: string;
|
|
19
|
+
}
|
|
20
|
+
export interface FetchParams {
|
|
21
|
+
range?: IRange<Byte>;
|
|
22
|
+
rangeMethod?: RangeMethod;
|
|
23
|
+
onProgress?: (dataView: DataView, loaded: number) => void;
|
|
24
|
+
onProgressTasks?: Promise<void>[];
|
|
25
|
+
signal?: AbortSignal;
|
|
26
|
+
priority?: Priority;
|
|
27
|
+
measureThroughput?: boolean;
|
|
28
|
+
isLowLatency?: boolean;
|
|
29
|
+
bufferOptimisation?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export type RepresentationFetchResult<T extends Segment> = {
|
|
32
|
+
initMetadata: CommonInit | null;
|
|
33
|
+
initDataView: DataView;
|
|
34
|
+
segments: T[];
|
|
35
|
+
};
|
|
36
|
+
export declare class Fetcher {
|
|
37
|
+
private throughputEstimator;
|
|
38
|
+
private requestQuic;
|
|
39
|
+
private tracer;
|
|
40
|
+
manifestRequested: ISubject<void>;
|
|
41
|
+
manifestReceived: ISubject<void>;
|
|
42
|
+
firstBytesRequested: ISubject<void>;
|
|
43
|
+
firstBytesReceived: ISubject<void>;
|
|
44
|
+
lastConnectionType$: IValueSubject<HttpConnectionType | undefined>;
|
|
45
|
+
lastConnectionReused$: IValueSubject<boolean | undefined>;
|
|
46
|
+
lastRequestFirstBytes$: IValueSubject<Milliseconds | undefined>;
|
|
47
|
+
recoverableError$: ISubject<IError>;
|
|
48
|
+
error$: ISubject<IError>;
|
|
49
|
+
private abortAllController;
|
|
50
|
+
private subscription;
|
|
51
|
+
private compatibilityMode;
|
|
52
|
+
private useEnableSubtitlesParam;
|
|
53
|
+
constructor({ throughputEstimator, requestQuic, tracer, compatibilityMode, useEnableSubtitlesParam }: IParams);
|
|
54
|
+
private onHeadersReceived;
|
|
55
|
+
fetchManifest: (param_0: string) => Promise<string | null | undefined>;
|
|
56
|
+
fetch: (param_0: string, param_1: FetchParams) => Promise<ArrayBuffer | null | undefined>;
|
|
57
|
+
fetchRepresentation<T extends Segment>(segmentReference: SegmentReference, parser: GenericContainerParser<unknown>, priority?: Priority): Promise<RepresentationFetchResult<T> | null | undefined>;
|
|
58
|
+
destroy(): void;
|
|
59
|
+
private fetchByteRangeRepresentation;
|
|
60
|
+
private fetchTemplateRepresentation;
|
|
61
|
+
private doFetch;
|
|
62
|
+
}
|
|
63
|
+
export declare const suppressAbort: (e: Error | unknown) => void | never;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { IHLSSource, HttpConnectionType, VideoCodec } from '../../../../player/types';
|
|
2
|
+
import { LiveStreamStatus } from '../types';
|
|
3
|
+
import { CommonInit, Manifest, Representation, StreamKind, TextRepresentation } from '../../../../providers/utils/parsers/types';
|
|
4
|
+
import StateMachine from '../../../../utils/StateMachine/StateMachine';
|
|
5
|
+
import type ThroughputEstimator from '../../../../utils/ThroughputEstimator';
|
|
6
|
+
import { ITuningConfig } from '../../../../utils/tuningConfig';
|
|
7
|
+
import { IError, IRange, ISubject, ISubscription, ITracer, IValueSubject, Milliseconds, Nullable, Seconds, Subject, Subscription, SubscriptionRemovable } from '@vkontakte/videoplayer-shared';
|
|
8
|
+
import { Fetcher } from '../fetcher';
|
|
9
|
+
import { Dependencies, IVirtualBufferManager } from '../../../../providers/DashProviderVirtual/lib/buffer/types';
|
|
10
|
+
import { Params, State } from '../../../../providers/DashProviderVirtual/lib/player/types';
|
|
11
|
+
import { NativeBufferManager } from '../../../../providers/DashProviderVirtual/lib/buffer/nativeBufferManager';
|
|
12
|
+
export declare abstract class BasePlayer {
|
|
13
|
+
protected element: HTMLVideoElement | null;
|
|
14
|
+
protected manifestUrlString: string;
|
|
15
|
+
protected source: MediaSource | null;
|
|
16
|
+
protected manifest: Manifest | null;
|
|
17
|
+
protected tuning: ITuningConfig;
|
|
18
|
+
protected tracer: ITracer;
|
|
19
|
+
protected forceVideoCodec?: VideoCodec;
|
|
20
|
+
protected videoBufferManager: IVirtualBufferManager | null;
|
|
21
|
+
protected audioBufferManager: IVirtualBufferManager | null;
|
|
22
|
+
protected bufferManagers: IVirtualBufferManager[];
|
|
23
|
+
protected videoNativeBufferManager: NativeBufferManager | null;
|
|
24
|
+
protected audioNativeBufferManager: NativeBufferManager | null;
|
|
25
|
+
protected nativeBufferManagers: NativeBufferManager[];
|
|
26
|
+
protected throughputEstimator: ThroughputEstimator;
|
|
27
|
+
protected subscription: Subscription;
|
|
28
|
+
protected subscriptionRemovable: SubscriptionRemovable;
|
|
29
|
+
protected representationSubscription: Subscription;
|
|
30
|
+
protected fetcher: Fetcher;
|
|
31
|
+
protected forceEnded$: ISubject<void>;
|
|
32
|
+
protected stallWatchdogSubscription: ISubscription | undefined;
|
|
33
|
+
protected destroyController: AbortController;
|
|
34
|
+
state$: StateMachine<State>;
|
|
35
|
+
currentVideoRepresentation$: IValueSubject<Representation['id'] | undefined>;
|
|
36
|
+
currentVideoRepresentationInit$: IValueSubject<CommonInit | undefined>;
|
|
37
|
+
currentAudioRepresentation$: IValueSubject<Representation['id'] | undefined>;
|
|
38
|
+
currentVideoSegmentLength$: IValueSubject<number>;
|
|
39
|
+
currentAudioSegmentLength$: IValueSubject<number>;
|
|
40
|
+
error$: ISubject<IError>;
|
|
41
|
+
manifestRequested: ISubject<void>;
|
|
42
|
+
manifestReceived: ISubject<void>;
|
|
43
|
+
firstBytesRequested: ISubject<void>;
|
|
44
|
+
firstBytesReceived: ISubject<void>;
|
|
45
|
+
lastConnectionType$: IValueSubject<HttpConnectionType | undefined>;
|
|
46
|
+
lastConnectionReused$: IValueSubject<boolean | undefined>;
|
|
47
|
+
lastRequestFirstBytes$: IValueSubject<Milliseconds | undefined>;
|
|
48
|
+
currentLiveTextRepresentation$: IValueSubject<TextRepresentation | null>;
|
|
49
|
+
private timeoutSourceOpenId;
|
|
50
|
+
isLive$: IValueSubject<boolean>;
|
|
51
|
+
isActiveLive$: IValueSubject<boolean>;
|
|
52
|
+
isLowLatency$: IValueSubject<boolean>;
|
|
53
|
+
liveDuration$: IValueSubject<Milliseconds>;
|
|
54
|
+
liveSeekableDuration$: IValueSubject<Milliseconds>;
|
|
55
|
+
liveAvailabilityStartTime$: IValueSubject<Milliseconds>;
|
|
56
|
+
liveStreamStatus$: IValueSubject<LiveStreamStatus | undefined>;
|
|
57
|
+
currentBuffer$: IValueSubject<IRange<Seconds>>;
|
|
58
|
+
bufferLength$: IValueSubject<Milliseconds>;
|
|
59
|
+
nativeBufferLength$: IValueSubject<Milliseconds>;
|
|
60
|
+
liveLatency$: IValueSubject<Milliseconds | undefined>;
|
|
61
|
+
liveLoadBufferLength$: IValueSubject<Milliseconds>;
|
|
62
|
+
livePositionFromPlayer$: IValueSubject<number>;
|
|
63
|
+
currentStallDuration$: IValueSubject<Milliseconds>;
|
|
64
|
+
videoLastDataObtainedTimestamp$: IValueSubject<Milliseconds>;
|
|
65
|
+
fetcherRecoverableError$: Subject<IError>;
|
|
66
|
+
fetcherError$: Subject<IError>;
|
|
67
|
+
protected constructor(params: Params);
|
|
68
|
+
protected abstract prepareManifestUrlString(manifestBaseUrlString: string, offset: number): string;
|
|
69
|
+
protected abstract setSourceDuration(): void;
|
|
70
|
+
protected abstract restoreAfterDeepStall(stallTraceAttributes: Record<string, number>): Promise<void>;
|
|
71
|
+
initRepresentations: (param_0: string, param_1: string | undefined, param_2: import("../../../../player/types").URLSource | undefined) => Promise<void | undefined>;
|
|
72
|
+
initManifest(element: HTMLVideoElement, manifestBaseUrlString: string, offset: number): Promise<void>;
|
|
73
|
+
initBuffer(): void;
|
|
74
|
+
switchRepresentation(kind: StreamKind, id: Representation['id'], isAuto?: boolean): Promise<void>;
|
|
75
|
+
seek(requestedPosition: Milliseconds, forcePrecise?: boolean): Promise<void>;
|
|
76
|
+
warmUpMediaSourceIfNeeded(position?: Milliseconds | undefined): void;
|
|
77
|
+
calculateDurationFromSegments(): Milliseconds;
|
|
78
|
+
get isStreamEnded(): boolean;
|
|
79
|
+
getStreams(): Manifest['streams'] | undefined;
|
|
80
|
+
getCodecs(): Manifest['codecs'] | undefined;
|
|
81
|
+
setBufferTarget(time: Milliseconds): void;
|
|
82
|
+
setPreloadOnly(preloadOnly: boolean): void;
|
|
83
|
+
stop(): void;
|
|
84
|
+
destroy(): void;
|
|
85
|
+
protected get isStreamNotOpen(): boolean;
|
|
86
|
+
protected reinitDecoderIfNeeded(force?: boolean): Promise<void>;
|
|
87
|
+
protected stallWatchdogIntervalCallback(): Promise<void>;
|
|
88
|
+
protected isStallExceeded(timeInWaiting: Milliseconds): boolean;
|
|
89
|
+
protected updateManifest(): Promise<Manifest | null>;
|
|
90
|
+
protected fetchManifest: () => Promise<Nullable<string>>;
|
|
91
|
+
protected parseManifest(manifestString: string): Nullable<Manifest>;
|
|
92
|
+
protected getResultManifest(manifest: Manifest): Manifest;
|
|
93
|
+
protected stopStallWatchdogSubscription(): void;
|
|
94
|
+
protected createBuffers(dependencies: Dependencies, initialVideo: Representation['id'], initialAudio?: Representation['id'], sourceHls?: IHLSSource): void;
|
|
95
|
+
protected waitStreamToOpen(): Promise<void>;
|
|
96
|
+
protected initRepresentationSubscriptions(): void;
|
|
97
|
+
protected initBufferLengthSubscription(): void;
|
|
98
|
+
protected initTracerSubscription(): void;
|
|
99
|
+
protected tick(): Promise<void>;
|
|
100
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { BasePlayer } from '../../../../providers/DashProviderVirtual/lib/player/basePlayer';
|
|
2
|
+
import { ISmoothedValue } from '../../../../utils/smoothedValue/types';
|
|
3
|
+
import { ISubscription, Milliseconds } from '@vkontakte/videoplayer-shared';
|
|
4
|
+
import { Params } from '../../../../providers/DashProviderVirtual/lib/player/types';
|
|
5
|
+
import { Manifest, Representation } from '../../../../providers/utils/parsers/types';
|
|
6
|
+
import { LiveVirtualBuffer } from '../../../../providers/DashProviderVirtual/lib/buffer/virtualBuffer/liveVirtualBuffer';
|
|
7
|
+
import { IHLSSource } from '../../../../player/types';
|
|
8
|
+
import { LiveTextManager } from '../../../../providers/DashProviderVirtual/lib/LiveTextManager';
|
|
9
|
+
import { Dependencies } from '../../../../providers/DashProviderVirtual/lib/buffer/types';
|
|
10
|
+
export declare class LivePlayer extends BasePlayer {
|
|
11
|
+
protected liveTextManager: LiveTextManager | null;
|
|
12
|
+
protected liveStreamEndTimestamp: Milliseconds;
|
|
13
|
+
protected liveBuffer: ISmoothedValue;
|
|
14
|
+
protected livePauseWatchdogSubscription: ISubscription | undefined;
|
|
15
|
+
protected liveWasInterrupted: boolean;
|
|
16
|
+
constructor(params: Params);
|
|
17
|
+
seek(nextOffset: Milliseconds): Promise<void>;
|
|
18
|
+
initBuffer(): void;
|
|
19
|
+
protected forcePositionToRepresentationInitialTime(): Promise<void>;
|
|
20
|
+
protected tick(): Promise<void>;
|
|
21
|
+
protected setSourceDuration(): void;
|
|
22
|
+
protected isStallExceeded(timeInWaiting: Milliseconds): boolean;
|
|
23
|
+
protected restoreAfterDeepStall(stallTraceAttributes: Record<string, number>): Promise<void>;
|
|
24
|
+
protected updateManifest(): Promise<Manifest | null>;
|
|
25
|
+
protected prepareManifestUrlString(manifestBaseUrlString: string, offset: number): string;
|
|
26
|
+
protected updateManifestUrlWithTimeOffset(nextOffset: Milliseconds): void;
|
|
27
|
+
protected createBuffers(dependencies: Dependencies, initialVideo: Representation['id'], initialAudio?: Representation['id'], sourceHls?: IHLSSource): void;
|
|
28
|
+
protected initRepresentationSubscriptions(): void;
|
|
29
|
+
protected initStreamDurationOnPauseSubscription(): void;
|
|
30
|
+
protected initLiveDurationSubscriptions(videoBufferManager: LiveVirtualBuffer): void;
|
|
31
|
+
protected initLiveChangePlaybackRateSubscriptions(): void;
|
|
32
|
+
protected initLiveBufferInfoSubscriptions(videoBufferManager: LiveVirtualBuffer, bufferManagers: LiveVirtualBuffer[]): void;
|
|
33
|
+
protected initLiveMaintainSubscription(bufferManagers: LiveVirtualBuffer[]): void;
|
|
34
|
+
protected isManualDecreasePlaybackInLive(): boolean;
|
|
35
|
+
protected normalizeLiveOffset(nextOffset: Milliseconds): Milliseconds;
|
|
36
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BasePlayer } from '../../../../providers/DashProviderVirtual/lib/player/basePlayer';
|
|
2
|
+
import { Params } from '../../../../providers/DashProviderVirtual/lib/player/types';
|
|
3
|
+
export declare class Player extends BasePlayer {
|
|
4
|
+
constructor(params: Params);
|
|
5
|
+
protected prepareManifestUrlString(manifestBaseUrlString: string, _offset: number): string;
|
|
6
|
+
protected initRepresentationSubscriptions(): void;
|
|
7
|
+
protected setSourceDuration(): void;
|
|
8
|
+
protected restoreAfterDeepStall(stallTraceAttributes: Record<string, number>): Promise<void>;
|
|
9
|
+
protected initDisableStallWatchdogSubscription(): void;
|
|
10
|
+
protected initEndOfVideoSubscription(): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type ThroughputEstimator from '../../../../utils/ThroughputEstimator';
|
|
2
|
+
import { ITuningConfig } from '../../../../utils/tuningConfig';
|
|
3
|
+
import { VideoCodec } from '../../../../player/types';
|
|
4
|
+
import { ITracer } from '@vkontakte/videoplayer-shared';
|
|
5
|
+
export declare enum State {
|
|
6
|
+
NONE = "none",
|
|
7
|
+
MANIFEST_READY = "manifest_ready",
|
|
8
|
+
REPRESENTATIOS_READY = "representations_ready",
|
|
9
|
+
RUNNING = "running"
|
|
10
|
+
}
|
|
11
|
+
export interface Params {
|
|
12
|
+
throughputEstimator: ThroughputEstimator;
|
|
13
|
+
tuning: ITuningConfig;
|
|
14
|
+
compatibilityMode?: boolean;
|
|
15
|
+
forceVideoCodec?: VideoCodec;
|
|
16
|
+
tracer: ITracer;
|
|
17
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { IObservable, ISubject, IValueSubject } from '@vkontakte/videoplayer-shared';
|
|
2
|
+
import { IDesiredState, IProviderOutput, IProviderParams } from '../../../providers/types';
|
|
3
|
+
import { IObservableVideo } from '../../../providers/utils/HTMLVideoElement/observable';
|
|
4
|
+
import { IDashURLSource } from '../../../player/types';
|
|
5
|
+
export declare enum LiveStatus {
|
|
6
|
+
ActiveLowLatency = "active_low_latency",
|
|
7
|
+
LiveWithTargetOffset = "live_with_target_offset",
|
|
8
|
+
LiveForwardBuffering = "live_forward_buffering",
|
|
9
|
+
None = "none"
|
|
10
|
+
}
|
|
11
|
+
export declare enum LiveStreamStatus {
|
|
12
|
+
Active = "active",
|
|
13
|
+
UnexpectedlyDown = "unexpectedly_down",// Стрим в сети, но трансляция оборвалась из-за тех. проблем
|
|
14
|
+
Unpublished = "unpublished"
|
|
15
|
+
}
|
|
16
|
+
export interface IProviderSubscriptionInfo {
|
|
17
|
+
output: IProviderOutput;
|
|
18
|
+
desiredState: IDesiredState;
|
|
19
|
+
observableVideo: IObservableVideo;
|
|
20
|
+
genericErrorListener: (error: Error | unknown) => void;
|
|
21
|
+
connect: <Value>(from: IObservable<Value>, to: ISubject<Value> | IValueSubject<Value> | ((v: Value) => void)) => void;
|
|
22
|
+
}
|
|
23
|
+
export declare enum ProviderState {
|
|
24
|
+
STOPPED = "stopped",
|
|
25
|
+
READY = "ready",
|
|
26
|
+
PLAYING = "playing",
|
|
27
|
+
PAUSED = "paused"
|
|
28
|
+
}
|
|
29
|
+
export type IParams = IProviderParams<IDashURLSource>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Representation, Segment, SegmentReference, Stream, TemplateSegment, TemplateSegmentReference, TextRepresentation } from '../../../providers/utils/parsers/types';
|
|
2
|
+
import { IAudioStream, IAudioTrack, IInternalTextTrack, IVideoStream, IVideoTrack } from '../../../player/types';
|
|
3
|
+
export declare const representationToVideoTrack: ({ id, width, height, bitrate, fps, quality: qualityString, streamId }: Representation) => IVideoTrack | undefined;
|
|
4
|
+
export declare const representationToAudioTrack: ({ id, bitrate }: Representation) => IAudioTrack;
|
|
5
|
+
export declare const representationToTextTrack: ({ language, label }: Stream, { id, url, isAuto }: Representation & {
|
|
6
|
+
url: string;
|
|
7
|
+
isAuto: boolean;
|
|
8
|
+
}) => IInternalTextTrack;
|
|
9
|
+
export declare const textRepresentationToTextTrack: ({ language, label, id, url, isAuto }: TextRepresentation) => IInternalTextTrack;
|
|
10
|
+
export declare const streamToIAudioStream: ({ id, language, label, codecs, isDefault }: Stream) => IAudioStream;
|
|
11
|
+
export declare const streamToIVideoStream: ({ id, language, label, hdr, codecs }: Stream) => IVideoStream;
|
|
12
|
+
export declare const isTemplateSegment: (segment: Segment) => segment is TemplateSegment;
|
|
13
|
+
export declare const isTemplateSegmentReference: (segmentReference: SegmentReference) => segmentReference is TemplateSegmentReference;
|
|
14
|
+
export declare const isTextRepresentation: (representation: Representation | TextRepresentation) => representation is TextRepresentation;
|
|
@@ -68,6 +68,7 @@ export interface IProviderOutput {
|
|
|
68
68
|
autoVideoTrackLimitingAvailable$: IValueSubject<boolean>;
|
|
69
69
|
canChangePlaybackSpeed$: IValueSubject<boolean | undefined>;
|
|
70
70
|
currentBuffer$: IValueSubject<IRange<Seconds> | undefined>;
|
|
71
|
+
currentNativeBuffer$: IValueSubject<IRange<Seconds> | undefined>;
|
|
71
72
|
isBuffering$: IValueSubject<boolean>;
|
|
72
73
|
isLive$: IValueSubject<boolean | undefined>;
|
|
73
74
|
isLiveEnded$: IValueSubject<boolean | null>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DevNullEntry } from '@vkontakte/videoplayer-shared';
|
|
2
|
+
declare class Entry {
|
|
3
|
+
readonly tag: string;
|
|
4
|
+
readonly time: number;
|
|
5
|
+
readonly data: Record<string, unknown>;
|
|
6
|
+
readonly stack?: string | undefined;
|
|
7
|
+
constructor(tag: string, time: number, data: Record<string, unknown>, stack?: string | undefined);
|
|
8
|
+
toString(): string;
|
|
9
|
+
toDevNullEntry(): DevNullEntry;
|
|
10
|
+
}
|
|
11
|
+
export declare const dashLiveDebug: {
|
|
12
|
+
(data: Record<string, unknown>, addTrace?: boolean): void;
|
|
13
|
+
reset(): void;
|
|
14
|
+
drain(): Entry[];
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Byte, IRange, Kbps, Milliseconds } from '@vkontakte/videoplayer-shared';
|
|
1
|
+
import { Byte, IRange, Kbps, Milliseconds, Nullable } from '@vkontakte/videoplayer-shared';
|
|
2
2
|
import { IVideoStream, VideoCodec, AudioCodec } from '../../../player/types';
|
|
3
3
|
export declare enum StreamKind {
|
|
4
4
|
VIDEO = "video",
|
|
@@ -61,18 +61,39 @@ export type TemplateSegmentReference = {
|
|
|
61
61
|
timescale: number;
|
|
62
62
|
};
|
|
63
63
|
export type SegmentReference = ByteRangeSegmentReference | TemplateSegmentReference;
|
|
64
|
-
export interface
|
|
64
|
+
export interface SegmentInfo {
|
|
65
|
+
/**
|
|
66
|
+
* @deprecated После перехода на VirtualBuffer будет бесполезно. Можно будет удалить. Нужно для старого DashProvider
|
|
67
|
+
*/
|
|
65
68
|
status: SegmentStatus;
|
|
69
|
+
networkStatus: Nullable<SegmentNetworkStatus>;
|
|
70
|
+
bufferStatus: Nullable<SegmentBufferStatus>;
|
|
71
|
+
data: Nullable<BufferSource>;
|
|
72
|
+
size: Nullable<Byte>;
|
|
73
|
+
loadedBytes: Nullable<Byte>;
|
|
74
|
+
feedingBytes: Nullable<Byte>;
|
|
75
|
+
fedBytes: Nullable<Byte>;
|
|
76
|
+
}
|
|
77
|
+
export type ByteRangeSegment = SegmentInfo & {
|
|
66
78
|
time: IRange<Milliseconds>;
|
|
67
79
|
byte: IRange<Byte>;
|
|
68
|
-
}
|
|
69
|
-
export
|
|
70
|
-
status: SegmentStatus;
|
|
80
|
+
};
|
|
81
|
+
export type TemplateSegment = SegmentInfo & {
|
|
71
82
|
time: IRange<Milliseconds>;
|
|
72
|
-
size?: Byte;
|
|
73
83
|
url: string;
|
|
74
|
-
|
|
84
|
+
isCurrentLowLatency?: boolean;
|
|
85
|
+
};
|
|
75
86
|
export type Segment = ByteRangeSegment | TemplateSegment;
|
|
87
|
+
export declare enum SegmentNetworkStatus {
|
|
88
|
+
NONE = "none",
|
|
89
|
+
DOWNLOADING = "downloading",
|
|
90
|
+
DOWNLOADED = "downloaded"
|
|
91
|
+
}
|
|
92
|
+
export declare enum SegmentBufferStatus {
|
|
93
|
+
NONE = "none",
|
|
94
|
+
PARTIALLY_FED = "partially_fed",
|
|
95
|
+
FED = "fed"
|
|
96
|
+
}
|
|
76
97
|
export declare enum SegmentStatus {
|
|
77
98
|
NONE = "none",
|
|
78
99
|
DOWNLOADING = "downloading",
|
|
@@ -1,23 +1,42 @@
|
|
|
1
1
|
import { CurrentClientDevice } from '../../../utils/ClientChecker/types/currentClientDevice';
|
|
2
2
|
import { DisplayChecker } from '../../../utils/ClientChecker/services/DisplayChecker';
|
|
3
3
|
import { Checker } from '../../../utils/ClientChecker/types/checker';
|
|
4
|
+
export interface OS {
|
|
5
|
+
name: string;
|
|
6
|
+
version: string;
|
|
7
|
+
full: string;
|
|
8
|
+
}
|
|
9
|
+
export interface DeviceDetails {
|
|
10
|
+
vendor: string;
|
|
11
|
+
model: string;
|
|
12
|
+
}
|
|
4
13
|
export declare class DeviceChecker implements Checker {
|
|
5
14
|
private _displayChecker;
|
|
6
15
|
private _isMobile;
|
|
7
16
|
private _current;
|
|
8
17
|
private _iosVersion;
|
|
9
18
|
private _highEntropyValues;
|
|
19
|
+
private _os;
|
|
20
|
+
private _details;
|
|
10
21
|
constructor(displayChecker: DisplayChecker);
|
|
11
22
|
get current(): CurrentClientDevice;
|
|
23
|
+
get os(): OS;
|
|
24
|
+
get details(): DeviceDetails;
|
|
12
25
|
get isIOS(): boolean;
|
|
13
26
|
get isMac(): boolean;
|
|
14
27
|
get isApple(): boolean;
|
|
15
28
|
get isIphoneOrOldIpad(): boolean;
|
|
16
29
|
get isAndroid(): boolean;
|
|
30
|
+
get isWindows(): boolean;
|
|
31
|
+
get isLinux(): boolean;
|
|
17
32
|
get isMobile(): boolean;
|
|
18
33
|
get iOSVersion(): number | undefined;
|
|
19
34
|
detect(): void;
|
|
20
35
|
private detectHighEntropyValues;
|
|
21
36
|
private detectDevice;
|
|
37
|
+
private detectOS;
|
|
38
|
+
private detectDeviceDetails;
|
|
22
39
|
private detectIOSVersion;
|
|
40
|
+
private normalizeOSName;
|
|
41
|
+
private normalizeOSVersion;
|
|
23
42
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const collectDecodingInfo: () => () => void;
|