@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,22 +1,22 @@
|
|
|
1
|
-
import { Checker } from
|
|
2
|
-
export { isMobile } from
|
|
1
|
+
import type { Checker } from "../types/checker";
|
|
2
|
+
export { isMobile } from "../utils/isMobile";
|
|
3
3
|
export declare class DisplayChecker implements Checker {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
4
|
+
private _maxTouchPoints;
|
|
5
|
+
private _height;
|
|
6
|
+
private _width;
|
|
7
|
+
private _isHdr;
|
|
8
|
+
private _pixelRatio;
|
|
9
|
+
private _screenHeight;
|
|
10
|
+
private _screenWidth;
|
|
11
|
+
private _colorDepth;
|
|
12
|
+
get isTouch(): boolean;
|
|
13
|
+
get maxTouchPoints(): number;
|
|
14
|
+
get height(): number;
|
|
15
|
+
get width(): number;
|
|
16
|
+
get screenHeight(): number;
|
|
17
|
+
get screenWidth(): number;
|
|
18
|
+
get pixelRatio(): number;
|
|
19
|
+
get isHDR(): boolean;
|
|
20
|
+
get colorDepth(): number;
|
|
21
|
+
detect(): void;
|
|
22
22
|
}
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { VideoFormat } from
|
|
2
|
-
import { DeviceChecker } from
|
|
3
|
-
import { BrowserChecker } from
|
|
4
|
-
import { Checker } from
|
|
1
|
+
import { VideoFormat } from "../../../player/types";
|
|
2
|
+
import type { DeviceChecker } from "./DeviceChecker";
|
|
3
|
+
import type { BrowserChecker } from "./BrowserChecker";
|
|
4
|
+
import type { Checker } from "../types/checker";
|
|
5
5
|
type Protocols = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
mms: boolean;
|
|
7
|
+
mse: boolean;
|
|
8
|
+
hls: boolean;
|
|
9
|
+
webrtc: boolean;
|
|
10
|
+
ws: boolean;
|
|
11
11
|
};
|
|
12
12
|
type Containers = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
mp4: boolean;
|
|
14
|
+
webm: boolean;
|
|
15
|
+
cmaf: boolean;
|
|
16
16
|
};
|
|
17
17
|
type Codecs = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
h264: boolean;
|
|
19
|
+
h265: boolean;
|
|
20
|
+
vp9: boolean;
|
|
21
|
+
av1: boolean;
|
|
22
|
+
aac: boolean;
|
|
23
|
+
opus: boolean;
|
|
24
|
+
mpeg: boolean;
|
|
25
25
|
};
|
|
26
26
|
export type WebmFormat = VideoFormat.DASH_WEBM | VideoFormat.DASH_WEBM_AV1;
|
|
27
27
|
export declare class VideoChecker implements Checker {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
28
|
+
private _video;
|
|
29
|
+
private _deviceChecker;
|
|
30
|
+
private _browserChecker;
|
|
31
|
+
private _protocols;
|
|
32
|
+
private _containers;
|
|
33
|
+
private _codecs;
|
|
34
|
+
private _nativeHlsSupported;
|
|
35
|
+
constructor(deviceChecker: DeviceChecker, browserChecker: BrowserChecker);
|
|
36
|
+
get protocols(): Protocols;
|
|
37
|
+
get containers(): Containers;
|
|
38
|
+
get codecs(): Codecs;
|
|
39
|
+
get webmDecodingInfo(): Record<WebmFormat, MediaCapabilitiesDecodingInfo> | undefined;
|
|
40
|
+
get supportedCodecs(): string[];
|
|
41
|
+
get nativeHlsSupported(): boolean;
|
|
42
|
+
detect(): void;
|
|
43
|
+
private destroyVideoElement;
|
|
44
44
|
}
|
|
45
45
|
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export declare enum CurrentClientBrowser {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
Unknown = "Unknown",
|
|
3
|
+
Yandex = "Yandex",
|
|
4
|
+
Chrome = "Chrome",
|
|
5
|
+
Chromium = "Chromium",
|
|
6
|
+
Firefox = "Firefox",
|
|
7
|
+
Safari = "Safari",
|
|
8
|
+
Opera = "Opera",
|
|
9
|
+
Edge = "Edge",
|
|
10
|
+
SamsungBrowser = "SamsungBrowser",
|
|
11
|
+
Rest = "Rest"
|
|
12
12
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export declare enum CurrentClientDevice {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
Unknown = "Unknown",
|
|
3
|
+
Android = "Android",
|
|
4
|
+
iPhone = "iPhone",
|
|
5
|
+
iPad = "iPad",
|
|
6
|
+
iPod = "iPod",
|
|
7
|
+
RestMobile = "RestMobile",
|
|
8
|
+
Mac = "Mac",
|
|
9
|
+
Desktop = "Desktop"
|
|
10
10
|
}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
export declare enum ClientArchitecture {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
ARM = "arm",
|
|
3
|
+
X86 = "x86"
|
|
4
4
|
}
|
|
5
5
|
export declare enum ClientBitness {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
SHORT = "32",
|
|
7
|
+
LONG = "64"
|
|
8
8
|
}
|
|
9
9
|
export interface UADataBrandItem {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
brand: string;
|
|
11
|
+
version: string;
|
|
12
12
|
}
|
|
13
13
|
export declare enum UADataPlatform {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
WINDOWS = "Windows",
|
|
15
|
+
MACOS = "macOS",
|
|
16
|
+
LINUX = "Linux",
|
|
17
|
+
ANDROID = "Android",
|
|
18
|
+
IOS = "iOS"
|
|
19
19
|
}
|
|
20
20
|
export interface HighEntropyValues {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
mobile?: boolean;
|
|
22
|
+
model?: string;
|
|
23
|
+
platform?: UADataPlatform;
|
|
24
|
+
platformVersion?: string;
|
|
25
|
+
architecture?: ClientArchitecture;
|
|
26
|
+
bitness?: ClientBitness;
|
|
27
|
+
brands?: UADataBrandItem[];
|
|
28
28
|
}
|
|
29
29
|
export type NavigatorWithUserAgentData = Navigator & {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
userAgentData: {
|
|
31
|
+
getHighEntropyValues: (values: Array<string>) => HighEntropyValues;
|
|
32
|
+
};
|
|
33
33
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { IObservable, ISubject } from
|
|
2
|
-
import { IStateMachine, ITransition } from
|
|
1
|
+
import type { IObservable, ISubject } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import type { IStateMachine, ITransition } from "./types";
|
|
3
3
|
export default class StateMachine<TState> implements IStateMachine<TState> {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
4
|
+
private state;
|
|
5
|
+
private prevState;
|
|
6
|
+
private transition?;
|
|
7
|
+
transitionStarted$: ISubject<ITransition<TState>>;
|
|
8
|
+
transitionEnded$: ISubject<ITransition<TState>>;
|
|
9
|
+
transitionUpdated$: ISubject<ITransition<TState>>;
|
|
10
|
+
forceChanged$: ISubject<ITransition<TState>>;
|
|
11
|
+
stateChangeStarted$: IObservable<ITransition<TState>>;
|
|
12
|
+
stateChangeEnded$: IObservable<ITransition<TState>>;
|
|
13
|
+
constructor(initialState: TState);
|
|
14
|
+
setState(newState: TState): void;
|
|
15
|
+
startTransitionTo(newState: TState): void;
|
|
16
|
+
getTransition(): ITransition<TState> | undefined;
|
|
17
|
+
getState(): TState;
|
|
18
|
+
getPrevState(): TState | undefined;
|
|
19
19
|
}
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import { IObservable } from
|
|
1
|
+
import type { IObservable } from "@vkontakte/videoplayer-shared";
|
|
2
2
|
export interface IStateMachine<TState> {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Событие о начале перехода между состояниями
|
|
5
|
+
*/
|
|
6
|
+
transitionStarted$: IObservable<ITransition<TState>>;
|
|
7
|
+
/**
|
|
8
|
+
* Событие об изменении целевого состояния в процессе осуществления перехода
|
|
9
|
+
*/
|
|
10
|
+
transitionUpdated$: IObservable<ITransition<TState>>;
|
|
11
|
+
/**
|
|
12
|
+
* Событие об окончании перехода между состояниями
|
|
13
|
+
*/
|
|
14
|
+
transitionEnded$: IObservable<ITransition<TState>>;
|
|
15
|
+
/**
|
|
16
|
+
* Событие о переходе в состояние, transition в которое не начинался
|
|
17
|
+
*/
|
|
18
|
+
forceChanged$: IObservable<ITransition<TState>>;
|
|
19
|
+
/**
|
|
20
|
+
* Приозводное от `transitionStarted$` и `transitionUpdated$` событие.
|
|
21
|
+
*/
|
|
22
|
+
stateChangeStarted$: IObservable<ITransition<TState>>;
|
|
23
|
+
/**
|
|
24
|
+
* Приозводное от `transitionEnded$` и `forceChanged$` событие.
|
|
25
|
+
*/
|
|
26
|
+
stateChangeEnded$: IObservable<ITransition<TState>>;
|
|
27
|
+
/**
|
|
28
|
+
* Начало перехода в состояние.
|
|
29
|
+
* Если в этот момент не было активного transition - будет отправлено событие `transitionStarted$`,
|
|
30
|
+
* иначе - `transitionUpdated$`
|
|
31
|
+
*/
|
|
32
|
+
startTransitionTo(state: TState): void;
|
|
33
|
+
/**
|
|
34
|
+
* Окончание перехода в состояние.
|
|
35
|
+
* Если transition в это состояние был начат - будет отправлено событие `transitionEnded$`,
|
|
36
|
+
* иначе - `forceChanged$`
|
|
37
|
+
*/
|
|
38
|
+
setState(state: TState): void;
|
|
39
|
+
/**
|
|
40
|
+
* Возвращает текущее состояние.
|
|
41
|
+
* Если сейчас есть активный transition - будет возвращено состояние, transition в которое сейчас выполняется (оптимистичноая стратегия изменений)
|
|
42
|
+
*/
|
|
43
|
+
getState(): TState;
|
|
44
|
+
/**
|
|
45
|
+
* Возвращает предыдущее состояние.
|
|
46
|
+
*/
|
|
47
|
+
getPrevState(): TState | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Возвращает текущий transition (если есть). Иначе - `undefined`
|
|
50
|
+
*/
|
|
51
|
+
getTransition(): ITransition<TState> | undefined;
|
|
52
52
|
}
|
|
53
53
|
export interface ITransition<TState> {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
from: TState;
|
|
55
|
+
to: TState;
|
|
56
|
+
/**
|
|
57
|
+
* Информация о том, что переход был осуществлён с прерыванием другого перехода
|
|
58
|
+
*/
|
|
59
|
+
canceledTransition?: ITransition<TState>;
|
|
60
60
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export interface IStatefulIterator<T> {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
next(): void;
|
|
3
|
+
getValue(): T;
|
|
4
|
+
isCompleted(): boolean;
|
|
5
|
+
isLast(): boolean;
|
|
6
6
|
}
|
|
7
7
|
export declare class StatefulIterator<T> implements IStatefulIterator<T> {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
private readonly length;
|
|
9
|
+
private index;
|
|
10
|
+
private iterator;
|
|
11
|
+
private current;
|
|
12
|
+
constructor(array: T[]);
|
|
13
|
+
next(): void;
|
|
14
|
+
getValue(): T;
|
|
15
|
+
isCompleted(): boolean;
|
|
16
|
+
isLast(): boolean;
|
|
17
17
|
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { Byte, Kbps, Milliseconds, IValueSubject } from
|
|
2
|
-
import { ITuningConfig } from
|
|
1
|
+
import type { Byte, Kbps, Milliseconds, IValueSubject } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import type { ITuningConfig } from "./tuningConfig";
|
|
3
3
|
declare class ThroughputEstimator {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
4
|
+
private throughput;
|
|
5
|
+
private rtt;
|
|
6
|
+
private subscription;
|
|
7
|
+
private tuningConfig;
|
|
8
|
+
private concurrentDownloads;
|
|
9
|
+
throughput$: IValueSubject<Kbps>;
|
|
10
|
+
rtt$: IValueSubject<Milliseconds>;
|
|
11
|
+
rttAdjustedThroughput$: IValueSubject<Kbps>;
|
|
12
|
+
constructor(tuning: ITuningConfig["throughputEstimator"]);
|
|
13
|
+
destroy(): void;
|
|
14
|
+
trackXHR(xhr: XMLHttpRequest): void;
|
|
15
|
+
trackStream(stream: ReadableStream, isLowLatency?: boolean): void;
|
|
16
|
+
addRawSpeed(size: Byte, time: Milliseconds, concurrency?: number, isLowLatency?: boolean): void;
|
|
17
|
+
/**
|
|
18
|
+
* Стоит использовать только когда другие методы совсем не получается
|
|
19
|
+
*/
|
|
20
|
+
addRawThroughput(rate: Kbps): void;
|
|
21
|
+
addRawRtt(time: Milliseconds): void;
|
|
22
|
+
private static sanityCheck;
|
|
23
|
+
private static load;
|
|
24
24
|
}
|
|
25
25
|
export default ThroughputEstimator;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { IError, ISubject, IValueSubject } from
|
|
2
|
-
import { IProviderOutput } from
|
|
3
|
-
import { IProviderEntry } from
|
|
1
|
+
import type { IError, ISubject, IValueSubject } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import type { IProviderOutput } from "../../providers/types";
|
|
3
|
+
import type { IProviderEntry } from "../../providers/ProviderContainer/types";
|
|
4
4
|
export declare class VolumeMultiplierManager {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
5
|
+
private providerOutput;
|
|
6
|
+
private provider$;
|
|
7
|
+
private volumeMultiplierError$;
|
|
8
|
+
private volumeMultiplier;
|
|
9
|
+
private static errorId;
|
|
10
|
+
private destroyController;
|
|
11
|
+
private subscriptions;
|
|
12
|
+
private audioContext;
|
|
13
|
+
private gainNode;
|
|
14
|
+
private mediaElementSource;
|
|
15
|
+
constructor(providerOutput: IProviderOutput, provider$: IValueSubject<IProviderEntry>, volumeMultiplierError$: ISubject<IError>, volumeMultiplier: number);
|
|
16
|
+
private subscribe;
|
|
17
|
+
static isSupported(): boolean;
|
|
18
|
+
private initAudioContextOnce;
|
|
19
|
+
private cleanup;
|
|
20
|
+
destroy(): void;
|
|
21
|
+
private handleError;
|
|
22
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { VolumeMultiplierManager } from
|
|
1
|
+
export { VolumeMultiplierManager } from "./VolumeMultiplierManager";
|
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
import { ITuningConfig } from
|
|
2
|
-
import { Kbps, Milliseconds, IRectangle,
|
|
3
|
-
import {
|
|
1
|
+
import type { ITuningConfig } from "./tuningConfig";
|
|
2
|
+
import type { Kbps, Milliseconds, IRectangle, QualityLimits, IComponentLogger } from "@vkontakte/videoplayer-shared";
|
|
3
|
+
import { type ExactVideoQuality } from "@vkontakte/videoplayer-shared";
|
|
4
|
+
import type { IAudioTrack, IBaseTrack, IVideoTrack } from "../player/types";
|
|
4
5
|
interface IConstraints<T extends IBaseTrack> {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
6
|
+
container?: IRectangle;
|
|
7
|
+
estimatedThroughput?: Kbps;
|
|
8
|
+
tuning: ITuningConfig["autoTrackSelection"];
|
|
9
|
+
limits?: QualityLimits;
|
|
10
|
+
reserve?: Kbps;
|
|
11
|
+
playbackRate?: number;
|
|
12
|
+
forwardBufferHealth?: number;
|
|
13
|
+
current?: T;
|
|
14
|
+
visible?: boolean;
|
|
15
|
+
history?: TrackHistory<T>;
|
|
16
|
+
droppedVideoMaxQualityLimit?: ExactVideoQuality;
|
|
17
|
+
stallsVideoMaxQualityLimit?: ExactVideoQuality;
|
|
18
|
+
stallsPredictedThroughput?: Kbps;
|
|
19
|
+
abrLogger: IComponentLogger;
|
|
20
|
+
panelSize?: IRectangle;
|
|
20
21
|
}
|
|
21
22
|
export declare class TrackHistory<T extends IBaseTrack> {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
last: T | undefined;
|
|
24
|
+
history: Record<IBaseTrack["id"], Milliseconds>;
|
|
25
|
+
recordSelection(track: T): void;
|
|
26
|
+
recordSwitch(track: T | undefined): void;
|
|
27
|
+
clear(): void;
|
|
27
28
|
}
|
|
28
29
|
export declare const defaultEmptyArrayErrorMessage = "Assertion \"ABR Tracks is empty array\" failed";
|
|
29
30
|
export declare const getMinPossibleAudioForVideoOld: (videoTrack: IVideoTrack, videoTracks: IVideoTrack[], audioTracks: IAudioTrack[], minVideoAudioRatio: number) => IAudioTrack | undefined;
|
|
30
31
|
export declare const getMinPossibleAudioForVideoNew: (videoTrack: IVideoTrack, videoTracks: IVideoTrack[], audioTracks: IAudioTrack[], minVideoAudioRatio: number) => IAudioTrack | undefined;
|
|
31
|
-
export declare const autoSelectVideoTrackNew: (videoTracks: IVideoTrack[], { container, estimatedThroughput, tuning, limits, reserve, forwardBufferHealth, playbackRate, current, history, visible, droppedVideoMaxQualityLimit, stallsVideoMaxQualityLimit, stallsPredictedThroughput, abrLogger, panelSize
|
|
32
|
-
export declare const autoSelectVideoTrackOld: (videoTracks: IVideoTrack[], { container, estimatedThroughput, tuning, limits, reserve, forwardBufferHealth, playbackRate, current, history, visible, droppedVideoMaxQualityLimit, stallsVideoMaxQualityLimit, stallsPredictedThroughput, abrLogger, panelSize
|
|
33
|
-
export declare const autoSelectAudioTrackForVideoOld: (selectedVideoTrack: IVideoTrack, videoTracks: IVideoTrack[], audioTracks: IAudioTrack[], { estimatedThroughput, tuning, playbackRate, forwardBufferHealth, history, abrLogger, stallsPredictedThroughput
|
|
34
|
-
export declare const autoSelectAudioTrackForVideoNew: (selectedVideoTrack: IVideoTrack, videoTracks: IVideoTrack[], audioTracks: IAudioTrack[], { estimatedThroughput, tuning, playbackRate, forwardBufferHealth, history, abrLogger, stallsPredictedThroughput
|
|
32
|
+
export declare const autoSelectVideoTrackNew: (videoTracks: IVideoTrack[], { container, estimatedThroughput, tuning, limits, reserve, forwardBufferHealth, playbackRate, current, history, visible, droppedVideoMaxQualityLimit, stallsVideoMaxQualityLimit, stallsPredictedThroughput, abrLogger, panelSize }: IConstraints<IVideoTrack>) => IVideoTrack;
|
|
33
|
+
export declare const autoSelectVideoTrackOld: (videoTracks: IVideoTrack[], { container, estimatedThroughput, tuning, limits, reserve, forwardBufferHealth, playbackRate, current, history, visible, droppedVideoMaxQualityLimit, stallsVideoMaxQualityLimit, stallsPredictedThroughput, abrLogger, panelSize }: IConstraints<IVideoTrack>) => IVideoTrack;
|
|
34
|
+
export declare const autoSelectAudioTrackForVideoOld: (selectedVideoTrack: IVideoTrack, videoTracks: IVideoTrack[], audioTracks: IAudioTrack[], { estimatedThroughput, tuning, playbackRate, forwardBufferHealth, history, abrLogger, stallsPredictedThroughput }: IConstraints<IAudioTrack>) => IAudioTrack | undefined;
|
|
35
|
+
export declare const autoSelectAudioTrackForVideoNew: (selectedVideoTrack: IVideoTrack, videoTracks: IVideoTrack[], audioTracks: IAudioTrack[], { estimatedThroughput, tuning, playbackRate, forwardBufferHealth, history, abrLogger, stallsPredictedThroughput }: IConstraints<IAudioTrack>) => IAudioTrack | undefined;
|
|
35
36
|
export {};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Milliseconds } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
export declare const createTimeRanges: (buffered: TimeRanges) => Milliseconds[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Seconds, IRange } from
|
|
2
|
-
declare const _default: (timeRanges: TimeRanges, position: Seconds, gapTolerance?:
|
|
1
|
+
import type { Seconds, IRange } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
declare const _default: (timeRanges: TimeRanges, position: Seconds, gapTolerance?: Seconds) => IRange<Seconds>;
|
|
3
3
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Nullable } from
|
|
1
|
+
import type { Nullable } from "@vkontakte/videoplayer-shared";
|
|
2
2
|
export declare const changePlaybackRate: (element: Nullable<HTMLVideoElement>, targetPlaybackRate: number) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const collectDecodingInfo: () => () => void;
|
|
1
|
+
export declare const collectDecodingInfo: () => (() => void);
|