@vkontakte/videoplayer-core 2.0.155 → 2.0.156-dev.04ce2cd1.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.
Files changed (185) hide show
  1. package/es2015.cjs +83 -136
  2. package/es2015.esm.js +77 -130
  3. package/es2018.cjs +77 -130
  4. package/es2018.esm.js +75 -128
  5. package/es2024.cjs +83 -136
  6. package/es2024.esm.js +81 -134
  7. package/esnext.cjs +83 -136
  8. package/esnext.esm.js +81 -134
  9. package/evergreen.esm.js +82 -135
  10. package/package.json +2 -2
  11. package/types/enums/AndroidPreferredFormat.d.ts +6 -6
  12. package/types/enums/IOSPreferredFormat.d.ts +2 -2
  13. package/types/enums/WebmCodecStrategy.d.ts +5 -5
  14. package/types/index.d.ts +16 -13
  15. package/types/player/Player.d.ts +219 -210
  16. package/types/player/types.d.ts +595 -591
  17. package/types/player/utils/optimisticPosition.d.ts +7 -7
  18. package/types/player/utils/selectContainer.d.ts +1 -1
  19. package/types/providers/ChromecastPresentationApiProvider/ChromecastPresentationApiConnector.d.ts +107 -106
  20. package/types/providers/ChromecastPresentationApiProvider/ChromecastPresentationApiInitializer.d.ts +23 -23
  21. package/types/providers/ChromecastPresentationApiProvider/ChromecastPresentationApiProvider.d.ts +34 -34
  22. package/types/providers/ChromecastPresentationApiProvider/ProgressTicker.d.ts +9 -9
  23. package/types/providers/ChromecastPresentationApiProvider/index.d.ts +3 -3
  24. package/types/providers/ChromecastPresentationApiProvider/types.d.ts +31 -31
  25. package/types/providers/ChromecastPresentationApiProvider/utils.d.ts +1 -1
  26. package/types/providers/ChromecastProvider/ChromecastInitializer/index.d.ts +22 -22
  27. package/types/providers/ChromecastProvider/ChromecastInitializer/types.d.ts +22 -22
  28. package/types/providers/ChromecastProvider/index.d.ts +23 -23
  29. package/types/providers/ChromecastProvider/types.d.ts +7 -7
  30. package/types/providers/ChromecastProvider/utils.d.ts +1 -1
  31. package/types/providers/DashLiveProvider/DashLiveProvider.d.ts +33 -33
  32. package/types/providers/DashLiveProvider/index.d.ts +1 -1
  33. package/types/providers/DashLiveProvider/types.d.ts +17 -17
  34. package/types/providers/DashLiveProvider/utils/FilesFetcher.d.ts +23 -23
  35. package/types/providers/DashLiveProvider/utils/LiveDashPlayer.d.ts +149 -150
  36. package/types/providers/DashLiveProvider/utils/ThroughputEstimator.d.ts +12 -30
  37. package/types/providers/DashLiveProvider/utils/liveDashPlayerUtil.d.ts +19 -22
  38. package/types/providers/DashProvider/baseDashProvider.d.ts +57 -56
  39. package/types/providers/DashProvider/dashCmafLiveProvider.d.ts +6 -6
  40. package/types/providers/DashProvider/dashProvider.d.ts +4 -4
  41. package/types/providers/DashProvider/index.d.ts +2 -2
  42. package/types/providers/DashProvider/lib/ElementSizeManager.d.ts +14 -14
  43. package/types/providers/DashProvider/lib/LiveTextManager.d.ts +21 -21
  44. package/types/providers/DashProvider/lib/buffer.d.ts +123 -122
  45. package/types/providers/DashProvider/lib/fetcher.d.ts +70 -69
  46. package/types/providers/DashProvider/lib/player.d.ts +109 -107
  47. package/types/providers/DashProvider/lib/sourceBufferTaskQueue.d.ts +17 -17
  48. package/types/providers/DashProvider/lib/types.d.ts +20 -20
  49. package/types/providers/DashProvider/lib/utils.d.ts +4 -4
  50. package/types/providers/DashProviderVirtual/baseDashProvider.d.ts +58 -57
  51. package/types/providers/DashProviderVirtual/consts.d.ts +2 -2
  52. package/types/providers/DashProviderVirtual/dashCmafLiveProvider.d.ts +8 -8
  53. package/types/providers/DashProviderVirtual/dashProvider.d.ts +6 -6
  54. package/types/providers/DashProviderVirtual/index.d.ts +2 -2
  55. package/types/providers/DashProviderVirtual/lib/ElementSizeManager.d.ts +15 -14
  56. package/types/providers/DashProviderVirtual/lib/LiveTextManager.d.ts +21 -21
  57. package/types/providers/DashProviderVirtual/lib/buffer/nativeBufferManager.d.ts +17 -17
  58. package/types/providers/DashProviderVirtual/lib/buffer/sourceBufferTaskQueue.d.ts +17 -17
  59. package/types/providers/DashProviderVirtual/lib/buffer/types.d.ts +39 -39
  60. package/types/providers/DashProviderVirtual/lib/buffer/virtualBuffer/baseVirtualBufferManager.d.ts +94 -92
  61. package/types/providers/DashProviderVirtual/lib/buffer/virtualBuffer/byteRangeVirtualBufferManager.d.ts +19 -19
  62. package/types/providers/DashProviderVirtual/lib/buffer/virtualBuffer/liveVirtualBuffer.d.ts +25 -25
  63. package/types/providers/DashProviderVirtual/lib/buffer/virtualBuffer/templateVirtualBufferManager.d.ts +19 -19
  64. package/types/providers/DashProviderVirtual/lib/buffer/virtualBuffer/virtualBufferFactory.d.ts +4 -4
  65. package/types/providers/DashProviderVirtual/lib/fetcher.d.ts +68 -67
  66. package/types/providers/DashProviderVirtual/lib/player/basePlayer.d.ts +103 -100
  67. package/types/providers/DashProviderVirtual/lib/player/livePlayer.d.ts +34 -34
  68. package/types/providers/DashProviderVirtual/lib/player/player.d.ts +9 -9
  69. package/types/providers/DashProviderVirtual/lib/player/types.d.ts +13 -13
  70. package/types/providers/DashProviderVirtual/lib/types.d.ts +20 -20
  71. package/types/providers/DashProviderVirtual/lib/utils.d.ts +4 -4
  72. package/types/providers/HlsLiveProvider/LiveTextManager.d.ts +35 -35
  73. package/types/providers/HlsLiveProvider/index.d.ts +29 -28
  74. package/types/providers/HlsLiveProvider/seekBackTimeExtractor.d.ts +1 -1
  75. package/types/providers/HlsProvider/index.d.ts +19 -19
  76. package/types/providers/HlsProvider/manifestDataExtractor.d.ts +13 -13
  77. package/types/providers/MpegProvider/index.d.ts +17 -17
  78. package/types/providers/ProviderContainer/index.d.ts +47 -45
  79. package/types/providers/ProviderContainer/types.d.ts +16 -16
  80. package/types/providers/ProviderContainer/utils/formatsSupport.d.ts +9 -9
  81. package/types/providers/ProviderContainer/utils/playbackHangup.d.ts +9 -8
  82. package/types/providers/WebRTCLiveProvider/WebRTCLiveClient.d.ts +185 -185
  83. package/types/providers/WebRTCLiveProvider/WebRTCLiveProvider.d.ts +58 -57
  84. package/types/providers/WebRTCLiveProvider/interface/WebRTCLiveClientOptions.d.ts +6 -6
  85. package/types/providers/types.d.ts +103 -102
  86. package/types/providers/utils/HTMLVideoElement/DroppedFramesManager.d.ts +40 -39
  87. package/types/providers/utils/HTMLVideoElement/TextTrackManager.d.ts +28 -28
  88. package/types/providers/utils/HTMLVideoElement/forcePlay.d.ts +5 -5
  89. package/types/providers/utils/HTMLVideoElement/observable.d.ts +25 -25
  90. package/types/providers/utils/HTMLVideoElement/pool.d.ts +5 -4
  91. package/types/providers/utils/LiveOffset/index.d.ts +12 -12
  92. package/types/providers/utils/LiveOffset/types.d.ts +8 -8
  93. package/types/providers/utils/StallsManager.d.ts +49 -49
  94. package/types/providers/utils/debug.d.ts +13 -12
  95. package/types/providers/utils/extractConnectionHeaders.d.ts +3 -3
  96. package/types/providers/utils/generateLiveUrl.d.ts +4 -4
  97. package/types/providers/utils/guessNetworkErrorCause.d.ts +1 -1
  98. package/types/providers/utils/mergeIntervals.d.ts +1 -1
  99. package/types/providers/utils/okQualityStringToVideoQuality.d.ts +1 -1
  100. package/types/providers/utils/parsers/ietf/index.d.ts +8 -8
  101. package/types/providers/utils/parsers/index.d.ts +1 -1
  102. package/types/providers/utils/parsers/mpd.d.ts +1 -1
  103. package/types/providers/utils/parsers/mpeg/BoxModel.d.ts +18 -17
  104. package/types/providers/utils/parsers/mpeg/BoxParser.d.ts +15 -15
  105. package/types/providers/utils/parsers/mpeg/BoxTypeEnum.d.ts +27 -27
  106. package/types/providers/utils/parsers/mpeg/box.d.ts +68 -68
  107. package/types/providers/utils/parsers/mpeg/boxes/avc1.d.ts +5 -5
  108. package/types/providers/utils/parsers/mpeg/boxes/equi.d.ts +18 -18
  109. package/types/providers/utils/parsers/mpeg/boxes/ftyp.d.ts +14 -14
  110. package/types/providers/utils/parsers/mpeg/boxes/index.d.ts +27 -26
  111. package/types/providers/utils/parsers/mpeg/boxes/mdat.d.ts +12 -12
  112. package/types/providers/utils/parsers/mpeg/boxes/mdia.d.ts +5 -5
  113. package/types/providers/utils/parsers/mpeg/boxes/mfhd.d.ts +8 -8
  114. package/types/providers/utils/parsers/mpeg/boxes/minf.d.ts +5 -5
  115. package/types/providers/utils/parsers/mpeg/boxes/moof.d.ts +5 -5
  116. package/types/providers/utils/parsers/mpeg/boxes/moov.d.ts +5 -5
  117. package/types/providers/utils/parsers/mpeg/boxes/mvhd.d.ts +32 -32
  118. package/types/providers/utils/parsers/mpeg/boxes/prhd.d.ts +13 -13
  119. package/types/providers/utils/parsers/mpeg/boxes/proj.d.ts +5 -5
  120. package/types/providers/utils/parsers/mpeg/boxes/sidx.d.ts +43 -43
  121. package/types/providers/utils/parsers/mpeg/boxes/st3d.d.ts +16 -16
  122. package/types/providers/utils/parsers/mpeg/boxes/stbl.d.ts +5 -5
  123. package/types/providers/utils/parsers/mpeg/boxes/stsd.d.ts +8 -8
  124. package/types/providers/utils/parsers/mpeg/boxes/sv3d.d.ts +5 -5
  125. package/types/providers/utils/parsers/mpeg/boxes/tfdt.d.ts +14 -14
  126. package/types/providers/utils/parsers/mpeg/boxes/tfhd.d.ts +19 -19
  127. package/types/providers/utils/parsers/mpeg/boxes/tkhd.d.ts +39 -39
  128. package/types/providers/utils/parsers/mpeg/boxes/traf.d.ts +5 -5
  129. package/types/providers/utils/parsers/mpeg/boxes/trak.d.ts +5 -5
  130. package/types/providers/utils/parsers/mpeg/boxes/trun.d.ts +28 -28
  131. package/types/providers/utils/parsers/mpeg/boxes/unknown.d.ts +4 -5
  132. package/types/providers/utils/parsers/mpeg/boxes/uuid.d.ts +10 -10
  133. package/types/providers/utils/parsers/mpeg/fullBox.d.ts +12 -12
  134. package/types/providers/utils/parsers/mpeg/isobmff.d.ts +7 -7
  135. package/types/providers/utils/parsers/types.d.ts +137 -139
  136. package/types/providers/utils/parsers/webm/ebml.d.ts +62 -62
  137. package/types/providers/utils/parsers/webm/webm.d.ts +1 -1
  138. package/types/providers/utils/restorePlaybackRateInSafari.d.ts +17 -17
  139. package/types/providers/utils/syncDesiredState.d.ts +10 -10
  140. package/types/providers/utils/syncPlaybackState.d.ts +2 -2
  141. package/types/providers/utils/videoStreamRepresentaionsFilter.d.ts +2 -2
  142. package/types/utils/3d/Camera3D.d.ts +11 -11
  143. package/types/utils/3d/CameraRotationManager.d.ts +59 -59
  144. package/types/utils/3d/Scene3D.d.ts +129 -129
  145. package/types/utils/3d/types.d.ts +14 -14
  146. package/types/utils/ClientChecker/ClientChecker.d.ts +19 -19
  147. package/types/utils/ClientChecker/index.d.ts +2 -2
  148. package/types/utils/ClientChecker/services/AudioChecker.d.ts +7 -7
  149. package/types/utils/ClientChecker/services/BrowserChecker.d.ts +36 -36
  150. package/types/utils/ClientChecker/services/DeviceChecker.d.ts +38 -38
  151. package/types/utils/ClientChecker/services/DisplayChecker.d.ts +20 -20
  152. package/types/utils/ClientChecker/services/VideoChecker.d.ts +35 -35
  153. package/types/utils/ClientChecker/types/checker.d.ts +1 -1
  154. package/types/utils/ClientChecker/types/currentClientBrowser.d.ts +10 -10
  155. package/types/utils/ClientChecker/types/currentClientDevice.d.ts +8 -8
  156. package/types/utils/ClientChecker/types/userAgentData.d.ts +21 -21
  157. package/types/utils/StateMachine/StateMachine.d.ts +17 -17
  158. package/types/utils/StateMachine/types.d.ts +56 -56
  159. package/types/utils/StatefulIterator/index.d.ts +13 -13
  160. package/types/utils/ThroughputEstimator.d.ts +22 -22
  161. package/types/utils/VolumeMultiplierManager/VolumeMultiplierManager.d.ts +20 -20
  162. package/types/utils/VolumeMultiplierManager/index.d.ts +1 -1
  163. package/types/utils/autoSelectTrack.d.ts +28 -27
  164. package/types/utils/buffer/createTimeRanges.d.ts +2 -1
  165. package/types/utils/buffer/getBufferedRangeForPosition.d.ts +2 -2
  166. package/types/utils/buffer/getForwardBufferDuration.d.ts +1 -1
  167. package/types/utils/buffer/getTotalBufferDuration.d.ts +1 -1
  168. package/types/utils/buffer/isPositionBuffered.d.ts +1 -1
  169. package/types/utils/buffer/isSourceBufferValid.d.ts +1 -1
  170. package/types/utils/changePlaybackRate.d.ts +1 -1
  171. package/types/utils/decodingInfoLogger.d.ts +1 -1
  172. package/types/utils/mediaSource.d.ts +1 -5
  173. package/types/utils/observeElementVisibility.d.ts +1 -1
  174. package/types/utils/playbackTelemetry.d.ts +4 -4
  175. package/types/utils/playerOptions.d.ts +3 -3
  176. package/types/utils/qualityLimits.d.ts +15 -14
  177. package/types/utils/setStateWithSubscribe.d.ts +6 -3
  178. package/types/utils/smoothedValue/baseSmoothedValue.d.ts +16 -16
  179. package/types/utils/smoothedValue/emaAndMaSmoothedValue.d.ts +5 -5
  180. package/types/utils/smoothedValue/emaTopExtremumValue.d.ts +8 -8
  181. package/types/utils/smoothedValue/smoothedValueFactory.d.ts +4 -4
  182. package/types/utils/smoothedValue/twoEmaSmoothedValue.d.ts +6 -6
  183. package/types/utils/smoothedValue/types.d.ts +16 -16
  184. package/types/utils/tuningConfig.d.ts +304 -287
  185. package/types/utils/videoFormat.d.ts +1 -1
@@ -1,21 +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';
1
+ import { BaseVirtualBufferManager } from "./baseVirtualBufferManager";
2
+ import type { Dependencies, IBufferPlaybackQueueItem, ISomeDataLoadedCallbackParams, IVirtualBufferManager } from "../types";
3
+ import type { TemplateSegment, Representation, StreamKind } from "../../../../utils/parsers/types";
4
+ import type { NativeBufferManager } from "../nativeBufferManager";
5
+ import type { FetchParamsWithUrl, Priority } from "../../fetcher";
6
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;
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
21
  }
@@ -1,6 +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';
1
+ import type { Representation, StreamKind } from "../../../../utils/parsers/types";
2
+ import type { NativeBufferManager } from "../nativeBufferManager";
3
+ import type { Dependencies, IVirtualBufferManager } from "../types";
4
4
  export declare class VirtualBufferFactory {
5
- static getBufferManager(kind: StreamKind, nativeBufferManager: NativeBufferManager, representations: Representation[], dependencies: Dependencies): IVirtualBufferManager;
5
+ static getBufferManager(kind: StreamKind, nativeBufferManager: NativeBufferManager, representations: Representation[], dependencies: Dependencies): IVirtualBufferManager;
6
6
  }
@@ -1,81 +1,82 @@
1
- import { HttpConnectionType, HttpConnectionMetrics, HttpDownloadMetrics } 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';
1
+ import type { HttpConnectionType, HttpConnectionMetrics, HttpDownloadMetrics } from "../../../player/types";
2
+ import type ThroughputEstimator from "../../../utils/ThroughputEstimator";
3
+ import type { Byte, IError, IRange, ISubject, ITracer, IValueSubject, Milliseconds } from "@vkontakte/videoplayer-shared";
4
+ import { abortable } from "@vkontakte/videoplayer-shared";
5
+ import type { CommonInit, GenericContainerParser, Segment, SegmentReference } from "../../utils/parsers/types";
5
6
  declare global {
6
- interface Navigator {
7
- connection: {
8
- effectiveType: string;
9
- downlink: number;
10
- rtt: number;
11
- };
12
- }
7
+ interface Navigator {
8
+ connection: {
9
+ effectiveType: string;
10
+ downlink: number;
11
+ rtt: number;
12
+ };
13
+ }
13
14
  }
14
15
  export declare enum RangeMethod {
15
- HEADER = 0,
16
- PARAM = 1
16
+ HEADER = 0,
17
+ PARAM = 1
17
18
  }
18
19
  export interface IParams {
19
- throughputEstimator?: ThroughputEstimator;
20
- requestQuic: boolean;
21
- compatibilityMode?: boolean;
22
- tracer: ITracer;
23
- useEnableSubtitlesParam?: boolean;
20
+ throughputEstimator?: ThroughputEstimator;
21
+ requestQuic: boolean;
22
+ compatibilityMode?: boolean;
23
+ tracer: ITracer;
24
+ useEnableSubtitlesParam?: boolean;
24
25
  }
25
- export type Priority = 'high' | 'low' | 'auto';
26
+ export type Priority = "high" | "low" | "auto";
26
27
  export interface FetchParamsWithUrl extends FetchParams {
27
- url: string;
28
+ url: string;
28
29
  }
29
30
  export interface FetchParams {
30
- range?: IRange<Byte>;
31
- rangeMethod?: RangeMethod;
32
- onProgress?: (dataView: DataView, loaded: number) => void;
33
- onProgressTasks?: Promise<void>[];
34
- signal?: AbortSignal;
35
- priority?: Priority;
36
- measureThroughput?: boolean;
37
- isLowLatency?: boolean;
38
- bufferOptimisation?: boolean;
31
+ range?: IRange<Byte>;
32
+ rangeMethod?: RangeMethod;
33
+ onProgress?: (dataView: DataView, loaded: number) => void;
34
+ onProgressTasks?: Promise<void>[];
35
+ signal?: AbortSignal;
36
+ priority?: Priority;
37
+ measureThroughput?: boolean;
38
+ isLowLatency?: boolean;
39
+ bufferOptimisation?: boolean;
39
40
  }
40
41
  export type RepresentationFetchResult<T extends Segment> = {
41
- initMetadata: CommonInit | null;
42
- initDataView: DataView;
43
- segments: T[];
42
+ initMetadata: CommonInit | null;
43
+ initDataView: DataView;
44
+ segments: T[];
44
45
  };
45
46
  export declare class Fetcher {
46
- private throughputEstimator;
47
- private requestQuic;
48
- private tracer;
49
- manifestRequested: ISubject<void>;
50
- manifestReceived: ISubject<void>;
51
- firstBytesRequested: ISubject<void>;
52
- firstBytesReceived: ISubject<void>;
53
- lastConnectionType$: IValueSubject<HttpConnectionType | undefined>;
54
- lastConnectionReused$: IValueSubject<boolean | undefined>;
55
- lastRequestFirstBytes$: IValueSubject<Milliseconds | undefined>;
56
- lastConnectionMetrics$: IValueSubject<HttpConnectionMetrics | undefined>;
57
- lastDownloadMetrics$: IValueSubject<HttpDownloadMetrics | undefined>;
58
- recoverableError$: ISubject<IError>;
59
- error$: ISubject<IError>;
60
- private abortAllController;
61
- private subscription;
62
- private compatibilityMode;
63
- private useEnableSubtitlesParam;
64
- private performanceObserver;
65
- private pendingConnectionMetrics;
66
- constructor({ throughputEstimator, requestQuic, tracer, compatibilityMode, useEnableSubtitlesParam }: IParams);
67
- private onHeadersReceived;
68
- private setupPerformanceObserver;
69
- private processResourceTiming;
70
- private estimateNetworkType;
71
- private extractConnectionMetrics;
72
- private findMatchingRequest;
73
- private trackRequestStart;
74
- fetchManifest: (param_0: string) => Promise<string | null | undefined>;
75
- fetch: (param_0: string, param_1: FetchParams) => Promise<ArrayBuffer | null | undefined>;
76
- fetchRepresentation<T extends Segment>(segmentReference: SegmentReference, parser: GenericContainerParser<unknown>, priority?: Priority): Promise<RepresentationFetchResult<T> | null | undefined>;
77
- destroy(): void;
78
- private fetchByteRangeRepresentation;
79
- private fetchTemplateRepresentation;
80
- private doFetch;
47
+ private throughputEstimator;
48
+ private requestQuic;
49
+ private tracer;
50
+ manifestRequested: ISubject<void>;
51
+ manifestReceived: ISubject<void>;
52
+ firstBytesRequested: ISubject<void>;
53
+ firstBytesReceived: ISubject<void>;
54
+ lastConnectionType$: IValueSubject<HttpConnectionType | undefined>;
55
+ lastConnectionReused$: IValueSubject<boolean | undefined>;
56
+ lastRequestFirstBytes$: IValueSubject<Milliseconds | undefined>;
57
+ lastConnectionMetrics$: IValueSubject<HttpConnectionMetrics | undefined>;
58
+ lastDownloadMetrics$: IValueSubject<HttpDownloadMetrics | undefined>;
59
+ recoverableError$: ISubject<IError>;
60
+ error$: ISubject<IError>;
61
+ private abortAllController;
62
+ private subscription;
63
+ private compatibilityMode;
64
+ private useEnableSubtitlesParam;
65
+ private performanceObserver;
66
+ private pendingConnectionMetrics;
67
+ constructor({ throughputEstimator, requestQuic, tracer, compatibilityMode, useEnableSubtitlesParam }: IParams);
68
+ private onHeadersReceived;
69
+ private setupPerformanceObserver;
70
+ private processResourceTiming;
71
+ private estimateNetworkType;
72
+ private extractConnectionMetrics;
73
+ private findMatchingRequest;
74
+ private trackRequestStart;
75
+ fetchManifest: ReturnType<typeof abortable<[string], string | null>>;
76
+ fetch: ReturnType<typeof abortable<[string, FetchParams], ArrayBuffer | null>>;
77
+ fetchRepresentation<T extends Segment>(segmentReference: SegmentReference, parser: GenericContainerParser<unknown>, priority?: Priority): Promise<RepresentationFetchResult<T> | null | undefined>;
78
+ destroy(): void;
79
+ private fetchByteRangeRepresentation;
80
+ private fetchTemplateRepresentation;
81
+ private doFetch;
81
82
  }
@@ -1,102 +1,105 @@
1
- import { IHLSSource, HttpConnectionType, HttpConnectionMetrics, HttpDownloadMetrics, 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';
1
+ import type { IHLSSource, HttpConnectionType, HttpConnectionMetrics, HttpDownloadMetrics, VideoCodec } from "../../../../player/types";
2
+ import type { LiveStreamStatus } from "../types";
3
+ import type { CommonInit, Manifest, Representation, TextRepresentation } from "../../../utils/parsers/types";
4
+ import { StreamKind } from "../../../utils/parsers/types";
5
+ import StateMachine from "../../../../utils/StateMachine/StateMachine";
6
+ import type ThroughputEstimator from "../../../../utils/ThroughputEstimator";
7
+ import type { ITuningConfig } from "../../../../utils/tuningConfig";
8
+ import type { IError, IRange, ISubject, ISubscription, ITracer, IValueSubject, Milliseconds, Nullable, Seconds } from "@vkontakte/videoplayer-shared";
9
+ import { abortable, Subject, Subscription, SubscriptionRemovable } from "@vkontakte/videoplayer-shared";
10
+ import { Fetcher } from "../fetcher";
11
+ import type { Dependencies, IVirtualBufferManager } from "../buffer/types";
12
+ import type { Params } from "./types";
13
+ import { State } from "./types";
14
+ import { NativeBufferManager } from "../buffer/nativeBufferManager";
12
15
  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
- lastConnectionMetrics$: IValueSubject<HttpConnectionMetrics | undefined>;
49
- lastDownloadMetrics$: IValueSubject<HttpDownloadMetrics | undefined>;
50
- currentLiveTextRepresentation$: IValueSubject<TextRepresentation | null>;
51
- private timeoutSourceOpenId;
52
- isLive$: IValueSubject<boolean>;
53
- isActiveLive$: IValueSubject<boolean>;
54
- isLowLatency$: IValueSubject<boolean>;
55
- liveDuration$: IValueSubject<Milliseconds>;
56
- liveSeekableDuration$: IValueSubject<Milliseconds>;
57
- liveAvailabilityStartTime$: IValueSubject<Milliseconds>;
58
- liveStreamStatus$: IValueSubject<LiveStreamStatus | undefined>;
59
- currentBuffer$: IValueSubject<IRange<Seconds>>;
60
- bufferLength$: IValueSubject<Milliseconds>;
61
- nativeBufferLength$: IValueSubject<Milliseconds>;
62
- liveLatency$: IValueSubject<Milliseconds | undefined>;
63
- liveLoadBufferLength$: IValueSubject<Milliseconds>;
64
- livePositionFromPlayer$: IValueSubject<number>;
65
- currentStallDuration$: IValueSubject<Milliseconds>;
66
- videoLastDataObtainedTimestamp$: IValueSubject<Milliseconds>;
67
- fetcherRecoverableError$: Subject<IError>;
68
- fetcherError$: Subject<IError>;
69
- protected constructor(params: Params);
70
- protected abstract prepareManifestUrlString(manifestBaseUrlString: string, offset: number): string;
71
- protected abstract setSourceDuration(): void;
72
- protected abstract restoreAfterDeepStall(stallTraceAttributes: Record<string, number>): Promise<void>;
73
- initRepresentations: (param_0: string, param_1: string | undefined, param_2: import("../../../../player/types").URLSource | undefined) => Promise<void | undefined>;
74
- initManifest(element: HTMLVideoElement, manifestBaseUrlString: string, offset: number): Promise<void>;
75
- initBuffer(): void;
76
- switchRepresentation(kind: StreamKind, id: Representation['id'], isAuto?: boolean): Promise<void>;
77
- seek(requestedPosition: Milliseconds, forcePrecise?: boolean): Promise<void>;
78
- warmUpMediaSourceIfNeeded(position?: Milliseconds | undefined): void;
79
- calculateDurationFromSegments(representationId: Representation['id']): Milliseconds;
80
- get isStreamEnded(): boolean;
81
- getStreams(): Manifest['streams'] | undefined;
82
- getCodecs(): Manifest['codecs'] | undefined;
83
- setBufferTarget(time: Milliseconds): void;
84
- setPreloadOnly(preloadOnly: boolean): void;
85
- stop(): void;
86
- destroy(): void;
87
- protected get isStreamNotOpen(): boolean;
88
- protected reinitDecoderIfNeeded(force?: boolean): Promise<void>;
89
- protected stallWatchdogIntervalCallback(): Promise<void>;
90
- protected isStallExceeded(timeInWaiting: Milliseconds): boolean;
91
- protected updateManifest(): Promise<Manifest | null>;
92
- protected fetchManifest: () => Promise<Nullable<string>>;
93
- protected parseManifest(manifestString: string): Nullable<Manifest>;
94
- protected getResultManifest(manifest: Manifest): Manifest;
95
- protected stopStallWatchdogSubscription(): void;
96
- protected createBuffers(dependencies: Dependencies, initialVideo: Representation['id'], initialAudio?: Representation['id'], sourceHls?: IHLSSource): void;
97
- protected waitStreamToOpen(): Promise<void>;
98
- protected initRepresentationSubscriptions(): void;
99
- protected initBufferLengthSubscription(): void;
100
- protected initTracerSubscription(): void;
101
- protected tick(): Promise<void>;
16
+ protected element: HTMLVideoElement | null;
17
+ protected manifestUrlString: string;
18
+ protected source: MediaSource | null;
19
+ protected manifest: Manifest | null;
20
+ protected tuning: ITuningConfig;
21
+ protected tracer: ITracer;
22
+ protected forceVideoCodec?: VideoCodec;
23
+ protected videoBufferManager: IVirtualBufferManager | null;
24
+ protected audioBufferManager: IVirtualBufferManager | null;
25
+ protected bufferManagers: IVirtualBufferManager[];
26
+ protected videoNativeBufferManager: NativeBufferManager | null;
27
+ protected audioNativeBufferManager: NativeBufferManager | null;
28
+ protected nativeBufferManagers: NativeBufferManager[];
29
+ protected throughputEstimator: ThroughputEstimator;
30
+ protected subscription: Subscription;
31
+ protected subscriptionRemovable: SubscriptionRemovable;
32
+ protected representationSubscription: Subscription;
33
+ protected fetcher: Fetcher;
34
+ protected forceEnded$: ISubject<void>;
35
+ protected stallWatchdogSubscription: ISubscription | undefined;
36
+ protected destroyController: AbortController;
37
+ state$: StateMachine<State>;
38
+ currentVideoRepresentation$: IValueSubject<Representation["id"] | undefined>;
39
+ currentVideoRepresentationInit$: IValueSubject<CommonInit | undefined>;
40
+ currentAudioRepresentation$: IValueSubject<Representation["id"] | undefined>;
41
+ currentVideoSegmentLength$: IValueSubject<number>;
42
+ currentAudioSegmentLength$: IValueSubject<number>;
43
+ error$: ISubject<IError>;
44
+ manifestRequested: ISubject<void>;
45
+ manifestReceived: ISubject<void>;
46
+ firstBytesRequested: ISubject<void>;
47
+ firstBytesReceived: ISubject<void>;
48
+ lastConnectionType$: IValueSubject<HttpConnectionType | undefined>;
49
+ lastConnectionReused$: IValueSubject<boolean | undefined>;
50
+ lastRequestFirstBytes$: IValueSubject<Milliseconds | undefined>;
51
+ lastConnectionMetrics$: IValueSubject<HttpConnectionMetrics | undefined>;
52
+ lastDownloadMetrics$: IValueSubject<HttpDownloadMetrics | undefined>;
53
+ currentLiveTextRepresentation$: IValueSubject<TextRepresentation | null>;
54
+ private timeoutSourceOpenId;
55
+ isLive$: IValueSubject<boolean>;
56
+ isActiveLive$: IValueSubject<boolean>;
57
+ isLowLatency$: IValueSubject<boolean>;
58
+ liveDuration$: IValueSubject<Milliseconds>;
59
+ liveSeekableDuration$: IValueSubject<Milliseconds>;
60
+ liveAvailabilityStartTime$: IValueSubject<Milliseconds>;
61
+ liveStreamStatus$: IValueSubject<LiveStreamStatus | undefined>;
62
+ currentBuffer$: IValueSubject<IRange<Seconds>>;
63
+ bufferLength$: IValueSubject<Milliseconds>;
64
+ nativeBufferLength$: IValueSubject<Milliseconds>;
65
+ liveLatency$: IValueSubject<Milliseconds | undefined>;
66
+ liveLoadBufferLength$: IValueSubject<Milliseconds>;
67
+ livePositionFromPlayer$: IValueSubject<number>;
68
+ currentStallDuration$: IValueSubject<Milliseconds>;
69
+ videoLastDataObtainedTimestamp$: IValueSubject<Milliseconds>;
70
+ fetcherRecoverableError$: Subject<IError>;
71
+ fetcherError$: Subject<IError>;
72
+ protected constructor(params: Params);
73
+ protected abstract prepareManifestUrlString(manifestBaseUrlString: string, offset: number): string;
74
+ protected abstract setSourceDuration(): void;
75
+ protected abstract restoreAfterDeepStall(stallTraceAttributes: Record<string, number>): Promise<void>;
76
+ initRepresentations: ReturnType<typeof abortable<[Representation["id"], Representation["id"] | undefined, IHLSSource | undefined]>>;
77
+ initManifest(element: HTMLVideoElement, manifestBaseUrlString: string, offset: number): Promise<void>;
78
+ initBuffer(): void;
79
+ switchRepresentation(kind: StreamKind, id: Representation["id"], isAuto?: boolean): Promise<void>;
80
+ seek(requestedPosition: Milliseconds, forcePrecise?: boolean): Promise<void>;
81
+ warmUpMediaSourceIfNeeded(position?: Milliseconds | undefined): void;
82
+ calculateDurationFromSegments(representationId: Representation["id"]): Milliseconds;
83
+ get isStreamEnded(): boolean;
84
+ getStreams(): Manifest["streams"] | undefined;
85
+ getCodecs(): Manifest["codecs"] | undefined;
86
+ setBufferTarget(time: Milliseconds): void;
87
+ setPreloadOnly(preloadOnly: boolean): void;
88
+ stop(): void;
89
+ destroy(): void;
90
+ protected get isStreamNotOpen(): boolean;
91
+ protected reinitDecoderIfNeeded(force?: boolean): Promise<void>;
92
+ protected stallWatchdogIntervalCallback(): Promise<void>;
93
+ protected isStallExceeded(timeInWaiting: Milliseconds): boolean;
94
+ protected updateManifest(): Promise<Manifest | null>;
95
+ protected fetchManifest: ReturnType<typeof abortable<[], Nullable<string>>>;
96
+ protected parseManifest(manifestString: string): Nullable<Manifest>;
97
+ protected getResultManifest(manifest: Manifest): Manifest;
98
+ protected stopStallWatchdogSubscription(): void;
99
+ protected createBuffers(dependencies: Dependencies, initialVideo: Representation["id"], initialAudio?: Representation["id"], sourceHls?: IHLSSource): void;
100
+ protected waitStreamToOpen(): Promise<void>;
101
+ protected initRepresentationSubscriptions(): void;
102
+ protected initBufferLengthSubscription(): void;
103
+ protected initTracerSubscription(): void;
104
+ protected tick(): Promise<void>;
102
105
  }
@@ -1,36 +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';
1
+ import { BasePlayer } from "./basePlayer";
2
+ import type { ISmoothedValue } from "../../../../utils/smoothedValue/types";
3
+ import type { ISubscription, Milliseconds } from "@vkontakte/videoplayer-shared";
4
+ import type { Params } from "./types";
5
+ import type { Manifest, Representation } from "../../../utils/parsers/types";
6
+ import type { LiveVirtualBuffer } from "../buffer/virtualBuffer/liveVirtualBuffer";
7
+ import type { IHLSSource } from "../../../../player/types";
8
+ import { LiveTextManager } from "../LiveTextManager";
9
+ import type { Dependencies } from "../buffer/types";
10
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;
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
36
  }
@@ -1,11 +1,11 @@
1
- import { BasePlayer } from '../../../../providers/DashProviderVirtual/lib/player/basePlayer';
2
- import { Params } from '../../../../providers/DashProviderVirtual/lib/player/types';
1
+ import { BasePlayer } from "./basePlayer";
2
+ import type { Params } from "./types";
3
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;
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
11
  }
@@ -1,17 +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';
1
+ import type ThroughputEstimator from "../../../../utils/ThroughputEstimator";
2
+ import type { ITuningConfig } from "../../../../utils/tuningConfig";
3
+ import type { VideoCodec } from "../../../../player/types";
4
+ import type { ITracer } from "@vkontakte/videoplayer-shared";
5
5
  export declare enum State {
6
- NONE = "none",
7
- MANIFEST_READY = "manifest_ready",
8
- REPRESENTATIOS_READY = "representations_ready",
9
- RUNNING = "running"
6
+ NONE = "none",
7
+ MANIFEST_READY = "manifest_ready",
8
+ REPRESENTATIOS_READY = "representations_ready",
9
+ RUNNING = "running"
10
10
  }
11
11
  export interface Params {
12
- throughputEstimator: ThroughputEstimator;
13
- tuning: ITuningConfig;
14
- compatibilityMode?: boolean;
15
- forceVideoCodec?: VideoCodec;
16
- tracer: ITracer;
12
+ throughputEstimator: ThroughputEstimator;
13
+ tuning: ITuningConfig;
14
+ compatibilityMode?: boolean;
15
+ forceVideoCodec?: VideoCodec;
16
+ tracer: ITracer;
17
17
  }
@@ -1,29 +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';
1
+ import type { IObservable, ISubject, IValueSubject } from "@vkontakte/videoplayer-shared";
2
+ import type { IDesiredState, IProviderOutput, IProviderParams } from "../../types";
3
+ import type { IObservableVideo } from "../../utils/HTMLVideoElement/observable";
4
+ import type { IDashURLSource } from "../../../player/types";
5
5
  export declare enum LiveStatus {
6
- ActiveLowLatency = "active_low_latency",
7
- LiveWithTargetOffset = "live_with_target_offset",
8
- LiveForwardBuffering = "live_forward_buffering",
9
- None = "none"
6
+ ActiveLowLatency = "active_low_latency",
7
+ LiveWithTargetOffset = "live_with_target_offset",
8
+ LiveForwardBuffering = "live_forward_buffering",
9
+ None = "none"
10
10
  }
11
11
  export declare enum LiveStreamStatus {
12
- Active = "active",
13
- UnexpectedlyDown = "unexpectedly_down",// Стрим в сети, но трансляция оборвалась из-за тех. проблем
14
- Unpublished = "unpublished"
12
+ Active = "active",
13
+ UnexpectedlyDown = "unexpectedly_down",
14
+ Unpublished = "unpublished"
15
15
  }
16
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;
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
22
  }
23
23
  export declare enum ProviderState {
24
- STOPPED = "stopped",
25
- READY = "ready",
26
- PLAYING = "playing",
27
- PAUSED = "paused"
24
+ STOPPED = "stopped",
25
+ READY = "ready",
26
+ PLAYING = "playing",
27
+ PAUSED = "paused"
28
28
  }
29
29
  export type IParams = IProviderParams<IDashURLSource>;
@@ -1,10 +1,10 @@
1
- import { Representation, Segment, SegmentReference, Stream, TemplateSegment, TemplateSegmentReference, TextRepresentation } from '../../../providers/utils/parsers/types';
2
- import { IAudioStream, IAudioTrack, IInternalTextTrack, IVideoStream, IVideoTrack } from '../../../player/types';
1
+ import type { Representation, Segment, SegmentReference, Stream, TemplateSegment, TemplateSegmentReference, TextRepresentation } from "../../utils/parsers/types";
2
+ import type { IAudioStream, IAudioTrack, IInternalTextTrack, IVideoStream, IVideoTrack } from "../../../player/types";
3
3
  export declare const representationToVideoTrack: ({ id, width, height, bitrate, fps, quality: qualityString, streamId }: Representation) => IVideoTrack | undefined;
4
4
  export declare const representationToAudioTrack: ({ id, bitrate }: Representation) => IAudioTrack;
5
5
  export declare const representationToTextTrack: ({ language, label }: Stream, { id, url, isAuto }: Representation & {
6
- url: string;
7
- isAuto: boolean;
6
+ url: string;
7
+ isAuto: boolean;
8
8
  }) => IInternalTextTrack;
9
9
  export declare const textRepresentationToTextTrack: ({ language, label, id, url, isAuto }: TextRepresentation) => IInternalTextTrack;
10
10
  export declare const streamToIAudioStream: ({ id, language, label, codecs, isDefault }: Stream) => IAudioStream;