@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.
- package/es2015.cjs +83 -136
- package/es2015.esm.js +77 -130
- package/es2018.cjs +77 -130
- package/es2018.esm.js +75 -128
- package/es2024.cjs +83 -136
- package/es2024.esm.js +81 -134
- package/esnext.cjs +83 -136
- package/esnext.esm.js +81 -134
- package/evergreen.esm.js +82 -135
- package/package.json +2 -2
- package/types/enums/AndroidPreferredFormat.d.ts +6 -6
- package/types/enums/IOSPreferredFormat.d.ts +2 -2
- package/types/enums/WebmCodecStrategy.d.ts +5 -5
- package/types/index.d.ts +16 -13
- package/types/player/Player.d.ts +219 -210
- package/types/player/types.d.ts +595 -591
- package/types/player/utils/optimisticPosition.d.ts +7 -7
- package/types/player/utils/selectContainer.d.ts +1 -1
- package/types/providers/ChromecastPresentationApiProvider/ChromecastPresentationApiConnector.d.ts +107 -106
- package/types/providers/ChromecastPresentationApiProvider/ChromecastPresentationApiInitializer.d.ts +23 -23
- package/types/providers/ChromecastPresentationApiProvider/ChromecastPresentationApiProvider.d.ts +34 -34
- package/types/providers/ChromecastPresentationApiProvider/ProgressTicker.d.ts +9 -9
- package/types/providers/ChromecastPresentationApiProvider/index.d.ts +3 -3
- package/types/providers/ChromecastPresentationApiProvider/types.d.ts +31 -31
- package/types/providers/ChromecastPresentationApiProvider/utils.d.ts +1 -1
- package/types/providers/ChromecastProvider/ChromecastInitializer/index.d.ts +22 -22
- package/types/providers/ChromecastProvider/ChromecastInitializer/types.d.ts +22 -22
- package/types/providers/ChromecastProvider/index.d.ts +23 -23
- package/types/providers/ChromecastProvider/types.d.ts +7 -7
- package/types/providers/ChromecastProvider/utils.d.ts +1 -1
- package/types/providers/DashLiveProvider/DashLiveProvider.d.ts +33 -33
- package/types/providers/DashLiveProvider/index.d.ts +1 -1
- package/types/providers/DashLiveProvider/types.d.ts +17 -17
- package/types/providers/DashLiveProvider/utils/FilesFetcher.d.ts +23 -23
- package/types/providers/DashLiveProvider/utils/LiveDashPlayer.d.ts +149 -150
- package/types/providers/DashLiveProvider/utils/ThroughputEstimator.d.ts +12 -30
- package/types/providers/DashLiveProvider/utils/liveDashPlayerUtil.d.ts +19 -22
- package/types/providers/DashProvider/baseDashProvider.d.ts +57 -56
- package/types/providers/DashProvider/dashCmafLiveProvider.d.ts +6 -6
- package/types/providers/DashProvider/dashProvider.d.ts +4 -4
- package/types/providers/DashProvider/index.d.ts +2 -2
- package/types/providers/DashProvider/lib/ElementSizeManager.d.ts +14 -14
- package/types/providers/DashProvider/lib/LiveTextManager.d.ts +21 -21
- package/types/providers/DashProvider/lib/buffer.d.ts +123 -122
- package/types/providers/DashProvider/lib/fetcher.d.ts +70 -69
- package/types/providers/DashProvider/lib/player.d.ts +109 -107
- package/types/providers/DashProvider/lib/sourceBufferTaskQueue.d.ts +17 -17
- package/types/providers/DashProvider/lib/types.d.ts +20 -20
- package/types/providers/DashProvider/lib/utils.d.ts +4 -4
- package/types/providers/DashProviderVirtual/baseDashProvider.d.ts +58 -57
- package/types/providers/DashProviderVirtual/consts.d.ts +2 -2
- package/types/providers/DashProviderVirtual/dashCmafLiveProvider.d.ts +8 -8
- package/types/providers/DashProviderVirtual/dashProvider.d.ts +6 -6
- package/types/providers/DashProviderVirtual/index.d.ts +2 -2
- package/types/providers/DashProviderVirtual/lib/ElementSizeManager.d.ts +15 -14
- package/types/providers/DashProviderVirtual/lib/LiveTextManager.d.ts +21 -21
- package/types/providers/DashProviderVirtual/lib/buffer/nativeBufferManager.d.ts +17 -17
- package/types/providers/DashProviderVirtual/lib/buffer/sourceBufferTaskQueue.d.ts +17 -17
- package/types/providers/DashProviderVirtual/lib/buffer/types.d.ts +39 -39
- package/types/providers/DashProviderVirtual/lib/buffer/virtualBuffer/baseVirtualBufferManager.d.ts +94 -92
- package/types/providers/DashProviderVirtual/lib/buffer/virtualBuffer/byteRangeVirtualBufferManager.d.ts +19 -19
- package/types/providers/DashProviderVirtual/lib/buffer/virtualBuffer/liveVirtualBuffer.d.ts +25 -25
- package/types/providers/DashProviderVirtual/lib/buffer/virtualBuffer/templateVirtualBufferManager.d.ts +19 -19
- package/types/providers/DashProviderVirtual/lib/buffer/virtualBuffer/virtualBufferFactory.d.ts +4 -4
- package/types/providers/DashProviderVirtual/lib/fetcher.d.ts +68 -67
- package/types/providers/DashProviderVirtual/lib/player/basePlayer.d.ts +103 -100
- package/types/providers/DashProviderVirtual/lib/player/livePlayer.d.ts +34 -34
- package/types/providers/DashProviderVirtual/lib/player/player.d.ts +9 -9
- package/types/providers/DashProviderVirtual/lib/player/types.d.ts +13 -13
- package/types/providers/DashProviderVirtual/lib/types.d.ts +20 -20
- package/types/providers/DashProviderVirtual/lib/utils.d.ts +4 -4
- package/types/providers/HlsLiveProvider/LiveTextManager.d.ts +35 -35
- package/types/providers/HlsLiveProvider/index.d.ts +29 -28
- package/types/providers/HlsLiveProvider/seekBackTimeExtractor.d.ts +1 -1
- package/types/providers/HlsProvider/index.d.ts +19 -19
- package/types/providers/HlsProvider/manifestDataExtractor.d.ts +13 -13
- package/types/providers/MpegProvider/index.d.ts +17 -17
- package/types/providers/ProviderContainer/index.d.ts +47 -45
- package/types/providers/ProviderContainer/types.d.ts +16 -16
- package/types/providers/ProviderContainer/utils/formatsSupport.d.ts +9 -9
- package/types/providers/ProviderContainer/utils/playbackHangup.d.ts +9 -8
- package/types/providers/WebRTCLiveProvider/WebRTCLiveClient.d.ts +185 -185
- package/types/providers/WebRTCLiveProvider/WebRTCLiveProvider.d.ts +58 -57
- package/types/providers/WebRTCLiveProvider/interface/WebRTCLiveClientOptions.d.ts +6 -6
- package/types/providers/types.d.ts +103 -102
- package/types/providers/utils/HTMLVideoElement/DroppedFramesManager.d.ts +40 -39
- package/types/providers/utils/HTMLVideoElement/TextTrackManager.d.ts +28 -28
- package/types/providers/utils/HTMLVideoElement/forcePlay.d.ts +5 -5
- package/types/providers/utils/HTMLVideoElement/observable.d.ts +25 -25
- package/types/providers/utils/HTMLVideoElement/pool.d.ts +5 -4
- package/types/providers/utils/LiveOffset/index.d.ts +12 -12
- package/types/providers/utils/LiveOffset/types.d.ts +8 -8
- package/types/providers/utils/StallsManager.d.ts +49 -49
- package/types/providers/utils/debug.d.ts +13 -12
- package/types/providers/utils/extractConnectionHeaders.d.ts +3 -3
- package/types/providers/utils/generateLiveUrl.d.ts +4 -4
- package/types/providers/utils/guessNetworkErrorCause.d.ts +1 -1
- package/types/providers/utils/mergeIntervals.d.ts +1 -1
- package/types/providers/utils/okQualityStringToVideoQuality.d.ts +1 -1
- package/types/providers/utils/parsers/ietf/index.d.ts +8 -8
- package/types/providers/utils/parsers/index.d.ts +1 -1
- package/types/providers/utils/parsers/mpd.d.ts +1 -1
- package/types/providers/utils/parsers/mpeg/BoxModel.d.ts +18 -17
- package/types/providers/utils/parsers/mpeg/BoxParser.d.ts +15 -15
- package/types/providers/utils/parsers/mpeg/BoxTypeEnum.d.ts +27 -27
- package/types/providers/utils/parsers/mpeg/box.d.ts +68 -68
- package/types/providers/utils/parsers/mpeg/boxes/avc1.d.ts +5 -5
- package/types/providers/utils/parsers/mpeg/boxes/equi.d.ts +18 -18
- package/types/providers/utils/parsers/mpeg/boxes/ftyp.d.ts +14 -14
- package/types/providers/utils/parsers/mpeg/boxes/index.d.ts +27 -26
- package/types/providers/utils/parsers/mpeg/boxes/mdat.d.ts +12 -12
- package/types/providers/utils/parsers/mpeg/boxes/mdia.d.ts +5 -5
- package/types/providers/utils/parsers/mpeg/boxes/mfhd.d.ts +8 -8
- package/types/providers/utils/parsers/mpeg/boxes/minf.d.ts +5 -5
- package/types/providers/utils/parsers/mpeg/boxes/moof.d.ts +5 -5
- package/types/providers/utils/parsers/mpeg/boxes/moov.d.ts +5 -5
- package/types/providers/utils/parsers/mpeg/boxes/mvhd.d.ts +32 -32
- package/types/providers/utils/parsers/mpeg/boxes/prhd.d.ts +13 -13
- package/types/providers/utils/parsers/mpeg/boxes/proj.d.ts +5 -5
- package/types/providers/utils/parsers/mpeg/boxes/sidx.d.ts +43 -43
- package/types/providers/utils/parsers/mpeg/boxes/st3d.d.ts +16 -16
- package/types/providers/utils/parsers/mpeg/boxes/stbl.d.ts +5 -5
- package/types/providers/utils/parsers/mpeg/boxes/stsd.d.ts +8 -8
- package/types/providers/utils/parsers/mpeg/boxes/sv3d.d.ts +5 -5
- package/types/providers/utils/parsers/mpeg/boxes/tfdt.d.ts +14 -14
- package/types/providers/utils/parsers/mpeg/boxes/tfhd.d.ts +19 -19
- package/types/providers/utils/parsers/mpeg/boxes/tkhd.d.ts +39 -39
- package/types/providers/utils/parsers/mpeg/boxes/traf.d.ts +5 -5
- package/types/providers/utils/parsers/mpeg/boxes/trak.d.ts +5 -5
- package/types/providers/utils/parsers/mpeg/boxes/trun.d.ts +28 -28
- package/types/providers/utils/parsers/mpeg/boxes/unknown.d.ts +4 -5
- package/types/providers/utils/parsers/mpeg/boxes/uuid.d.ts +10 -10
- package/types/providers/utils/parsers/mpeg/fullBox.d.ts +12 -12
- package/types/providers/utils/parsers/mpeg/isobmff.d.ts +7 -7
- package/types/providers/utils/parsers/types.d.ts +137 -139
- package/types/providers/utils/parsers/webm/ebml.d.ts +62 -62
- package/types/providers/utils/parsers/webm/webm.d.ts +1 -1
- package/types/providers/utils/restorePlaybackRateInSafari.d.ts +17 -17
- package/types/providers/utils/syncDesiredState.d.ts +10 -10
- package/types/providers/utils/syncPlaybackState.d.ts +2 -2
- package/types/providers/utils/videoStreamRepresentaionsFilter.d.ts +2 -2
- package/types/utils/3d/Camera3D.d.ts +11 -11
- package/types/utils/3d/CameraRotationManager.d.ts +59 -59
- package/types/utils/3d/Scene3D.d.ts +129 -129
- package/types/utils/3d/types.d.ts +14 -14
- package/types/utils/ClientChecker/ClientChecker.d.ts +19 -19
- package/types/utils/ClientChecker/index.d.ts +2 -2
- package/types/utils/ClientChecker/services/AudioChecker.d.ts +7 -7
- package/types/utils/ClientChecker/services/BrowserChecker.d.ts +36 -36
- package/types/utils/ClientChecker/services/DeviceChecker.d.ts +38 -38
- package/types/utils/ClientChecker/services/DisplayChecker.d.ts +20 -20
- package/types/utils/ClientChecker/services/VideoChecker.d.ts +35 -35
- package/types/utils/ClientChecker/types/checker.d.ts +1 -1
- package/types/utils/ClientChecker/types/currentClientBrowser.d.ts +10 -10
- package/types/utils/ClientChecker/types/currentClientDevice.d.ts +8 -8
- package/types/utils/ClientChecker/types/userAgentData.d.ts +21 -21
- package/types/utils/StateMachine/StateMachine.d.ts +17 -17
- package/types/utils/StateMachine/types.d.ts +56 -56
- package/types/utils/StatefulIterator/index.d.ts +13 -13
- package/types/utils/ThroughputEstimator.d.ts +22 -22
- package/types/utils/VolumeMultiplierManager/VolumeMultiplierManager.d.ts +20 -20
- package/types/utils/VolumeMultiplierManager/index.d.ts +1 -1
- package/types/utils/autoSelectTrack.d.ts +28 -27
- package/types/utils/buffer/createTimeRanges.d.ts +2 -1
- package/types/utils/buffer/getBufferedRangeForPosition.d.ts +2 -2
- package/types/utils/buffer/getForwardBufferDuration.d.ts +1 -1
- package/types/utils/buffer/getTotalBufferDuration.d.ts +1 -1
- package/types/utils/buffer/isPositionBuffered.d.ts +1 -1
- package/types/utils/buffer/isSourceBufferValid.d.ts +1 -1
- package/types/utils/changePlaybackRate.d.ts +1 -1
- package/types/utils/decodingInfoLogger.d.ts +1 -1
- package/types/utils/mediaSource.d.ts +1 -5
- package/types/utils/observeElementVisibility.d.ts +1 -1
- package/types/utils/playbackTelemetry.d.ts +4 -4
- package/types/utils/playerOptions.d.ts +3 -3
- package/types/utils/qualityLimits.d.ts +15 -14
- package/types/utils/setStateWithSubscribe.d.ts +6 -3
- package/types/utils/smoothedValue/baseSmoothedValue.d.ts +16 -16
- package/types/utils/smoothedValue/emaAndMaSmoothedValue.d.ts +5 -5
- package/types/utils/smoothedValue/emaTopExtremumValue.d.ts +8 -8
- package/types/utils/smoothedValue/smoothedValueFactory.d.ts +4 -4
- package/types/utils/smoothedValue/twoEmaSmoothedValue.d.ts +6 -6
- package/types/utils/smoothedValue/types.d.ts +16 -16
- package/types/utils/tuningConfig.d.ts +304 -287
- package/types/utils/videoFormat.d.ts +1 -1
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
export declare const getWindowMediaSource: () =>
|
|
2
|
-
new (): ManagedMediaSource;
|
|
3
|
-
prototype: ManagedMediaSource;
|
|
4
|
-
isTypeSupported(type: string): boolean;
|
|
5
|
-
};
|
|
1
|
+
export declare const getWindowMediaSource: () => typeof ManagedMediaSource | typeof MediaSource;
|
|
6
2
|
export declare const isManagedMediaSourceSupported: () => boolean;
|
|
7
3
|
export declare const isMediaSourceSupported: () => boolean;
|
|
8
4
|
export declare const getMediaSource: () => MediaSource | ManagedMediaSource;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IObservable } from
|
|
1
|
+
import type { IObservable } from "@vkontakte/videoplayer-shared";
|
|
2
2
|
declare const observeElementVisibility: (element: Element, options?: IntersectionObserverInit) => IObservable<boolean>;
|
|
3
3
|
export default observeElementVisibility;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { IEmitter } from
|
|
1
|
+
import type { IEmitter } from "@vkontakte/videoplayer-shared";
|
|
2
2
|
declare let store: Record<string, any>;
|
|
3
3
|
export declare const setEnabled: (value: boolean) => void;
|
|
4
4
|
export declare const clear: () => void;
|
|
5
5
|
export declare const dump: (receiver: (value: typeof store) => void) => void;
|
|
6
6
|
export declare const storeMeta: (name: string, value: unknown) => void;
|
|
7
7
|
export declare class TimeSeries<Value> implements IEmitter<Value> {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
private name;
|
|
9
|
+
constructor(name: string);
|
|
10
|
+
next(value: Value): void;
|
|
11
11
|
}
|
|
12
12
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DevNullEntry } from
|
|
1
|
+
import type { DevNullEntry } from "@vkontakte/videoplayer-shared";
|
|
2
2
|
export type IPlayerOptions = {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
playerId?: string;
|
|
4
|
+
onDevNullLog?: (entry: DevNullEntry) => void;
|
|
5
5
|
};
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { IVideoTrack
|
|
2
|
-
import {
|
|
1
|
+
import type { IVideoTrack } from "../player/types";
|
|
2
|
+
import { PredefinedQualityLimits } from "../player/types";
|
|
3
|
+
import type { ExactVideoQuality, Nullable, QualityLimits } from "@vkontakte/videoplayer-shared";
|
|
3
4
|
export declare function getQualityLimitsPredefinedType(limits: QualityLimits, highQualityLimit: ExactVideoQuality, trafficSavingLimit: ExactVideoQuality): PredefinedQualityLimits;
|
|
4
5
|
type LimitsAsHeightValidParams = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
limits?: {
|
|
7
|
+
min?: number;
|
|
8
|
+
max?: number;
|
|
9
|
+
};
|
|
10
|
+
highestAvailableHeight: Nullable<number>;
|
|
11
|
+
lowestAvailableHeight: Nullable<number>;
|
|
11
12
|
};
|
|
12
|
-
export declare function areLimitsInvalid(limits: Nullable<QualityLimits>, highestAvailableQuality: Nullable<ExactVideoQuality>, lowestAvailableQuality: Nullable<ExactVideoQuality>): boolean
|
|
13
|
+
export declare function areLimitsInvalid(limits: Nullable<QualityLimits>, highestAvailableQuality: Nullable<ExactVideoQuality>, lowestAvailableQuality: Nullable<ExactVideoQuality>): boolean;
|
|
13
14
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export declare function areLimitsInvalidInHeights({ limits, highestAvailableHeight, lowestAvailableHeight }: LimitsAsHeightValidParams): boolean
|
|
15
|
+
* Проверяем лимиты качества, когда указана высота качества.
|
|
16
|
+
*/
|
|
17
|
+
export declare function areLimitsInvalidInHeights({ limits, highestAvailableHeight, lowestAvailableHeight }: LimitsAsHeightValidParams): boolean;
|
|
17
18
|
type TrackFitsLimitsParams = {
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
limits: QualityLimits;
|
|
20
|
+
track: IVideoTrack;
|
|
20
21
|
};
|
|
21
22
|
export declare function trackFitsLimits({ limits, track }: TrackFitsLimitsParams): boolean;
|
|
22
23
|
export {};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import type { IValueSubject } from
|
|
2
|
-
import type { IStateMachine } from
|
|
3
|
-
export declare const setStateWithSubscribe: <
|
|
1
|
+
import type { IValueSubject } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import type { IStateMachine } from "./StateMachine/types";
|
|
3
|
+
export declare const setStateWithSubscribe: <
|
|
4
|
+
State,
|
|
5
|
+
Value
|
|
6
|
+
>(nextState: State | undefined, currentState: IStateMachine<State | undefined>, availableValues: IValueSubject<Array<Value>> | undefined, predicate: (value: Value) => boolean) => void;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ISmoothedValue, IParams } from
|
|
2
|
-
import { IValueSubject } from
|
|
1
|
+
import type { ISmoothedValue, IParams } from "./types";
|
|
2
|
+
import type { IValueSubject } from "@vkontakte/videoplayer-shared";
|
|
3
3
|
export declare abstract class BaseSmoothedValue implements ISmoothedValue {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
private prevReported;
|
|
5
|
+
private rawSeries$;
|
|
6
|
+
private smoothedSeries$;
|
|
7
|
+
private reportedSeries$;
|
|
8
|
+
protected smoothed: number;
|
|
9
|
+
protected pastMeasures: number[];
|
|
10
|
+
protected takenMeasures: number;
|
|
11
|
+
protected measuresCursor: number;
|
|
12
|
+
protected params: IParams;
|
|
13
|
+
smoothed$: IValueSubject<number>;
|
|
14
|
+
debounced$: IValueSubject<number>;
|
|
15
|
+
constructor(params: IParams);
|
|
16
|
+
protected abstract updateSmoothedValue(value: number): void;
|
|
17
|
+
next(value: number): void;
|
|
18
18
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IEmaAndMaParams } from
|
|
2
|
-
import { BaseSmoothedValue } from
|
|
1
|
+
import type { IEmaAndMaParams } from "./types";
|
|
2
|
+
import { BaseSmoothedValue } from "./baseSmoothedValue";
|
|
3
3
|
export declare class EmaAndMaSmoothedValue extends BaseSmoothedValue {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
private emaSmoothed;
|
|
5
|
+
constructor(params: IEmaAndMaParams);
|
|
6
|
+
protected updateSmoothedValue(value: number): void;
|
|
7
7
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { BaseSmoothedValue } from
|
|
2
|
-
import { IEmaTopExtremumParams } from
|
|
1
|
+
import { BaseSmoothedValue } from "./baseSmoothedValue";
|
|
2
|
+
import type { IEmaTopExtremumParams } from "./types";
|
|
3
3
|
export declare class EmaTopExtremumValue extends BaseSmoothedValue {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
private readonly extremumInterval;
|
|
5
|
+
private furtherValues;
|
|
6
|
+
private currentTopExtremumValue;
|
|
7
|
+
constructor(params: IEmaTopExtremumParams);
|
|
8
|
+
next(value: number): void;
|
|
9
|
+
protected updateSmoothedValue(value: number): void;
|
|
10
10
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ITuningConfig } from
|
|
2
|
-
import { ISmoothedValue } from
|
|
1
|
+
import type { ITuningConfig } from "../tuningConfig";
|
|
2
|
+
import type { ISmoothedValue } from "./types";
|
|
3
3
|
export declare class SmoothedValueFactory {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
static getSmoothedValue(initialThroughput: number, fastDirection: 1 | -1, tuning: ITuningConfig["throughputEstimator"]): ISmoothedValue;
|
|
5
|
+
static getLiveBufferSmoothedValue(initialBufferLength: number, tuning: ITuningConfig["dashCmafLive"]["lowLatency"]["bufferEstimator"]): ISmoothedValue;
|
|
6
6
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ITwoEmaParams } from
|
|
2
|
-
import { BaseSmoothedValue } from
|
|
1
|
+
import type { ITwoEmaParams } from "./types";
|
|
2
|
+
import { BaseSmoothedValue } from "./baseSmoothedValue";
|
|
3
3
|
export declare class TwoEmaSmoothedValue extends BaseSmoothedValue {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
private slow;
|
|
5
|
+
private fast;
|
|
6
|
+
constructor(params: ITwoEmaParams);
|
|
7
|
+
protected updateSmoothedValue(value: number): void;
|
|
8
8
|
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { IValueSubject } from
|
|
1
|
+
import type { IValueSubject } from "@vkontakte/videoplayer-shared";
|
|
2
2
|
export interface IParams {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
initial: number;
|
|
4
|
+
changeThreshold: number;
|
|
5
|
+
deviationDepth: number;
|
|
6
|
+
deviationFactor: number;
|
|
7
|
+
label?: string;
|
|
8
8
|
}
|
|
9
9
|
export interface IEmaAndMaParams extends IParams {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
emaAlpha: number;
|
|
11
|
+
basisTrendChangeCount: number;
|
|
12
12
|
}
|
|
13
13
|
export interface ITwoEmaParams extends IParams {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
emaAlphaSlow: number;
|
|
15
|
+
emaAlphaFast: number;
|
|
16
|
+
fastDirection: 1 | -1;
|
|
17
17
|
}
|
|
18
18
|
export interface IEmaTopExtremumParams extends IParams {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
emaAlpha: number;
|
|
20
|
+
extremumInterval: number;
|
|
21
21
|
}
|
|
22
22
|
export interface ISmoothedValue {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
smoothed$: IValueSubject<number>;
|
|
24
|
+
debounced$: IValueSubject<number>;
|
|
25
|
+
next(value: number): void;
|
|
26
26
|
}
|