@vkontakte/videoplayer-core 2.0.153-dev.44065e09.0 → 2.0.153-dev.5183c3ef8.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/esnext.esm.js +70 -124
- package/package.json +3 -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 +217 -209
- package/types/player/types.d.ts +589 -589
- 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 +106 -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 +6 -6
- package/types/providers/ChromecastProvider/utils.d.ts +1 -1
- package/types/providers/DashLiveProvider/DashLiveProvider.d.ts +32 -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 +56 -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 -70
- 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 +57 -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 -68
- 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 +28 -28
- package/types/providers/HlsLiveProvider/seekBackTimeExtractor.d.ts +1 -1
- package/types/providers/HlsProvider/index.d.ts +18 -19
- package/types/providers/HlsProvider/manifestDataExtractor.d.ts +13 -13
- package/types/providers/MpegProvider/index.d.ts +16 -17
- package/types/providers/ProviderContainer/index.d.ts +45 -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 +57 -57
- package/types/providers/WebRTCLiveProvider/interface/WebRTCLiveClientOptions.d.ts +6 -6
- package/types/providers/types.d.ts +102 -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 +2 -2
- 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 +131 -133
- 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 +7 -9
- 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 +276 -275
- package/types/utils/videoFormat.d.ts +1 -1
- package/es2015.cjs +0 -184
- package/es2015.esm.js +0 -184
- package/es2018.cjs +0 -184
- package/es2018.esm.js +0 -184
- package/es2024.cjs +0 -184
- package/es2024.esm.js +0 -184
- package/esnext.cjs +0 -184
- package/evergreen.esm.js +0 -183
- package/types/providers/utils/error.d.ts +0 -1
|
@@ -1,184 +1,182 @@
|
|
|
1
|
-
import { Byte, IRange, Kbps, Milliseconds, Nullable } from
|
|
2
|
-
import { IVideoStream, VideoCodec, AudioCodec } from
|
|
1
|
+
import type { Byte, IRange, Kbps, Milliseconds, Nullable } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import type { IVideoStream, VideoCodec, AudioCodec } from "../../../player/types";
|
|
3
3
|
export declare enum StreamKind {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
VIDEO = "video",
|
|
5
|
+
AUDIO = "audio",
|
|
6
|
+
TEXT = "text"
|
|
7
7
|
}
|
|
8
8
|
export declare enum Profile {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
WEBM_AS_IN_SPEC = "urn:mpeg:dash:profile:webm-on-demand:2012",
|
|
10
|
+
WEBM_AS_IN_FFMPEG = "urn:webm:dash:profile:webm-on-demand:2012"
|
|
11
11
|
}
|
|
12
12
|
export interface Representation {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
id: string;
|
|
14
|
+
kind: StreamKind;
|
|
15
|
+
segmentReference: SegmentReference;
|
|
16
|
+
profiles: Array<Profile | string>;
|
|
17
|
+
duration?: Milliseconds;
|
|
18
|
+
bitrate: Kbps;
|
|
19
|
+
mime: string;
|
|
20
|
+
codecs: string;
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
fps?: number;
|
|
24
|
+
quality?: string;
|
|
25
|
+
streamId?: IVideoStream["id"];
|
|
26
26
|
}
|
|
27
27
|
export interface TextRepresentation extends Representation {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
language: string;
|
|
29
|
+
label: string;
|
|
30
|
+
url: string;
|
|
31
|
+
isAuto: boolean;
|
|
32
32
|
}
|
|
33
33
|
export interface ServerLatencyTimestamps {
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
serverDataReceivedTimestamp?: Milliseconds;
|
|
35
|
+
serverDataPreparedTime?: Milliseconds;
|
|
36
36
|
}
|
|
37
37
|
export declare enum SegmentReferencingType {
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
BYTE_RANGE = "byteRange",
|
|
39
|
+
TEMPLATE = "template"
|
|
40
40
|
}
|
|
41
41
|
export type ByteRangeSegmentReference = {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
type: SegmentReferencingType.BYTE_RANGE;
|
|
43
|
+
url: string;
|
|
44
|
+
initRange: IRange<Byte>;
|
|
45
|
+
indexRange?: IRange<Byte>;
|
|
46
46
|
};
|
|
47
47
|
export type TemplateSegmentReference = {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
48
|
+
type: SegmentReferencingType.TEMPLATE;
|
|
49
|
+
baseUrl: string;
|
|
50
|
+
initUrl: string;
|
|
51
|
+
segmentTemplateUrl: string;
|
|
52
|
+
totalSegmentsDurationMs: Milliseconds;
|
|
53
|
+
segments: {
|
|
54
|
+
url: string;
|
|
55
|
+
time: IRange<Milliseconds>;
|
|
56
|
+
}[];
|
|
57
|
+
nextSegmentBeyondManifest: {
|
|
58
|
+
url: string;
|
|
59
|
+
time: IRange<Milliseconds>;
|
|
60
|
+
};
|
|
61
|
+
timescale: number;
|
|
62
62
|
};
|
|
63
63
|
export type SegmentReference = ByteRangeSegmentReference | TemplateSegmentReference;
|
|
64
64
|
export interface SegmentInfo {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
65
|
+
/**
|
|
66
|
+
* @deprecated После перехода на VirtualBuffer будет бесполезно. Можно будет удалить. Нужно для старого DashProvider
|
|
67
|
+
*/
|
|
68
|
+
status: SegmentStatus;
|
|
69
|
+
networkStatus: Nullable<SegmentNetworkStatus>;
|
|
70
|
+
bufferStatus: Nullable<SegmentBufferStatus>;
|
|
71
|
+
data: Nullable<BufferSource>;
|
|
72
|
+
size: Nullable<Byte>;
|
|
73
|
+
loadedBytes: Nullable<Byte>;
|
|
74
|
+
feedingBytes: Nullable<Byte>;
|
|
75
|
+
fedBytes: Nullable<Byte>;
|
|
76
76
|
}
|
|
77
77
|
export type ByteRangeSegment = SegmentInfo & {
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
time: IRange<Milliseconds>;
|
|
79
|
+
byte: IRange<Byte>;
|
|
80
80
|
};
|
|
81
81
|
export type TemplateSegment = SegmentInfo & {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
time: IRange<Milliseconds>;
|
|
83
|
+
url: string;
|
|
84
|
+
isCurrentLowLatency?: boolean;
|
|
85
85
|
};
|
|
86
86
|
export type Segment = ByteRangeSegment | TemplateSegment;
|
|
87
87
|
export declare enum SegmentNetworkStatus {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
NONE = "none",
|
|
89
|
+
DOWNLOADING = "downloading",
|
|
90
|
+
DOWNLOADED = "downloaded"
|
|
91
91
|
}
|
|
92
92
|
export declare enum SegmentBufferStatus {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
NONE = "none",
|
|
94
|
+
PARTIALLY_FED = "partially_fed",
|
|
95
|
+
FED = "fed"
|
|
96
96
|
}
|
|
97
97
|
export declare enum SegmentStatus {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
98
|
+
NONE = "none",
|
|
99
|
+
DOWNLOADING = "downloading",
|
|
100
|
+
DOWNLOADED = "downloaded",
|
|
101
|
+
PARTIALLY_FED = "partially_fed",
|
|
102
|
+
PARTIALLY_EJECTED = "partially_ejected",
|
|
103
|
+
FED = "fed"
|
|
104
104
|
}
|
|
105
105
|
export interface Stream {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
106
|
+
id: string;
|
|
107
|
+
hdr?: boolean;
|
|
108
|
+
language?: string;
|
|
109
|
+
isDefault?: boolean;
|
|
110
|
+
label?: string;
|
|
111
|
+
codecs: string;
|
|
112
|
+
mime: string;
|
|
113
|
+
representations: Representation[];
|
|
114
114
|
}
|
|
115
115
|
export interface Manifest {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
};
|
|
125
|
-
live?: LiveMetadata;
|
|
116
|
+
duration: Milliseconds | undefined;
|
|
117
|
+
streams: { [key in StreamKind] : Stream[] };
|
|
118
|
+
baseUrls: string[];
|
|
119
|
+
codecs?: {
|
|
120
|
+
video?: VideoCodec[];
|
|
121
|
+
audio?: AudioCodec[];
|
|
122
|
+
};
|
|
123
|
+
live?: LiveMetadata;
|
|
126
124
|
}
|
|
127
125
|
export declare enum ProjectionType {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
126
|
+
RECTANGULAR = 0,
|
|
127
|
+
EQUIRECTANGULAR = 1,
|
|
128
|
+
CUBEMAP = 2,
|
|
129
|
+
MESH = 3
|
|
132
130
|
}
|
|
133
131
|
export interface BoxLike {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
132
|
+
id: string;
|
|
133
|
+
size: Byte;
|
|
134
|
+
contents: DataView;
|
|
137
135
|
}
|
|
138
136
|
export interface GenericContainerParser<InitData> {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
137
|
+
validateData(data: DataView): boolean;
|
|
138
|
+
getIndexRange(init: InitData): IRange<Byte> | undefined;
|
|
139
|
+
parseInit(data: DataView): InitData;
|
|
140
|
+
parseSegments(data: DataView, init: InitData, indexRange?: IRange<Byte>): Segment[];
|
|
141
|
+
parseFeedableSegmentChunk(data: DataView, isLive?: boolean): DataView | null;
|
|
144
142
|
}
|
|
145
143
|
export interface CommonInit {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
144
|
+
is3dVideo: boolean;
|
|
145
|
+
stereoMode?: number;
|
|
146
|
+
projectionType?: ProjectionType;
|
|
147
|
+
projectionData?: {
|
|
148
|
+
pose: {
|
|
149
|
+
yaw: number;
|
|
150
|
+
pitch: number;
|
|
151
|
+
roll: number;
|
|
152
|
+
};
|
|
153
|
+
bounds: {
|
|
154
|
+
top: number;
|
|
155
|
+
bottom: number;
|
|
156
|
+
left: number;
|
|
157
|
+
right: number;
|
|
158
|
+
};
|
|
159
|
+
};
|
|
162
160
|
}
|
|
163
161
|
export interface WebmInit extends CommonInit {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
162
|
+
segmentStart: Byte;
|
|
163
|
+
segmentEnd: Byte;
|
|
164
|
+
timeScale: number;
|
|
165
|
+
segmentDuration: number;
|
|
166
|
+
cuesSeekPosition?: Byte;
|
|
169
167
|
}
|
|
170
168
|
export type MpegInit = CommonInit;
|
|
171
169
|
export type WebmParser = GenericContainerParser<WebmInit>;
|
|
172
170
|
export type MpegParser = GenericContainerParser<MpegInit> & {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
171
|
+
getChunkEndTime(data: DataView, timescale: number): Milliseconds;
|
|
172
|
+
getServerLatencyTimestamps(view: DataView): ServerLatencyTimestamps;
|
|
173
|
+
getTimescaleFromIndex(view: DataView): number | undefined;
|
|
176
174
|
};
|
|
177
175
|
export type ContainerParser = WebmParser | MpegParser;
|
|
178
176
|
export interface LiveMetadata {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
177
|
+
availabilityStartTime: Milliseconds;
|
|
178
|
+
publishTime: Milliseconds;
|
|
179
|
+
latestSegmentPublishTime: Milliseconds;
|
|
180
|
+
streamIsAlive: boolean;
|
|
181
|
+
streamIsUnpublished: boolean;
|
|
184
182
|
}
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
import { Byte, Milliseconds } from
|
|
1
|
+
import type { Byte, Milliseconds } from "@vkontakte/videoplayer-shared";
|
|
2
2
|
export declare enum Tag {
|
|
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
|
-
|
|
3
|
+
EBML = 440786851,
|
|
4
|
+
EBMLVersion = 17030,
|
|
5
|
+
EBMLReadVersion = 17143,
|
|
6
|
+
EBMLMaxIDLength = 17138,
|
|
7
|
+
EBMLMaxSizeLength = 17139,
|
|
8
|
+
DocType = 17026,
|
|
9
|
+
DocTypeVersion = 17031,
|
|
10
|
+
DocTypeReadVersion = 17029,
|
|
11
|
+
Void = 236,
|
|
12
|
+
Segment = 408125543,
|
|
13
|
+
SeekHead = 290298740,
|
|
14
|
+
Seek = 19899,
|
|
15
|
+
SeekID = 21419,
|
|
16
|
+
SeekPosition = 21420,
|
|
17
|
+
Info = 357149030,
|
|
18
|
+
TimestampScale = 2807729,
|
|
19
|
+
Duration = 17545,
|
|
20
|
+
Tracks = 374648427,
|
|
21
|
+
TrackEntry = 174,
|
|
22
|
+
Video = 224,
|
|
23
|
+
Projection = 30320,
|
|
24
|
+
ProjectionType = 30321,
|
|
25
|
+
ProjectionPrivate = 30322,
|
|
26
|
+
Chapters = 272869232,
|
|
27
|
+
Cluster = 524531317,
|
|
28
|
+
Timestamp = 231,
|
|
29
|
+
SilentTracks = 22612,
|
|
30
|
+
SilentTrackNumber = 22743,
|
|
31
|
+
Position = 167,
|
|
32
|
+
PrevSize = 171,
|
|
33
|
+
SimpleBlock = 163,
|
|
34
|
+
BlockGroup = 160,
|
|
35
|
+
EncryptedBlock = 175,
|
|
36
|
+
Attachments = 423732329,
|
|
37
|
+
Tags = 307544935,
|
|
38
|
+
Cues = 475249515,
|
|
39
|
+
CuePoint = 187,
|
|
40
|
+
CueTime = 179,
|
|
41
|
+
CueTrackPositions = 183,
|
|
42
|
+
CueTrack = 247,
|
|
43
|
+
CueClusterPosition = 241,
|
|
44
|
+
CueRelativePosition = 240,
|
|
45
|
+
CueDuration = 178,
|
|
46
|
+
CueBlockNumber = 21368,
|
|
47
|
+
CueCodecState = 234,
|
|
48
|
+
CueReference = 219,
|
|
49
|
+
CueRefTime = 150
|
|
50
50
|
}
|
|
51
51
|
export type UnknownTag = string;
|
|
52
52
|
export declare enum Type {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
53
|
+
SignedInteger = "int",
|
|
54
|
+
UnsignedInteger = "uint",
|
|
55
|
+
Float = "float",
|
|
56
|
+
String = "string",
|
|
57
|
+
UTF8 = "utf8",
|
|
58
|
+
Date = "date",
|
|
59
|
+
Master = "master",
|
|
60
|
+
Binary = "binary"
|
|
61
61
|
}
|
|
62
62
|
type TagValue<ExactType extends Type> = ExactType extends Type.SignedInteger ? number : ExactType extends Type.UnsignedInteger ? number : ExactType extends Type.Float ? number : ExactType extends Type.String ? string : ExactType extends Type.UTF8 ? string : ExactType extends Type.Date ? Milliseconds : ExactType extends Type.Master ? DataView : ExactType extends Type.Binary ? DataView : never;
|
|
63
63
|
export type ParsedTag = {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
64
|
+
tag: Tag | UnknownTag;
|
|
65
|
+
type: Type;
|
|
66
|
+
tagHeaderSize: Byte;
|
|
67
|
+
tagSize: Byte;
|
|
68
|
+
value: DataView;
|
|
69
|
+
valueSize: Byte;
|
|
70
70
|
};
|
|
71
71
|
export declare const parseTag: (view: DataView) => ParsedTag;
|
|
72
72
|
export declare const parseUint: (view: DataView, size?: Byte) => number;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { ISubscription, IValueSubject } from
|
|
2
|
-
import { IDesiredState } from
|
|
3
|
-
import { IObservableVideo } from
|
|
1
|
+
import type { ISubscription, IValueSubject } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import type { IDesiredState } from "../types";
|
|
3
|
+
import type { IObservableVideo } from "./HTMLVideoElement/observable";
|
|
4
4
|
type Params = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
subscription: ISubscription;
|
|
6
|
+
desiredState: IDesiredState;
|
|
7
|
+
videoElement$: IValueSubject<HTMLVideoElement | undefined>;
|
|
8
|
+
observableVideo: IObservableVideo;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
* Когда сафари из за медиа политик отключает звук у видео, и пользователь возвращает звук
|
|
12
|
+
* то сафари расценивает это как сброс внутреннего состояния плеера и может сбросить так же скорость воспроизведения.
|
|
13
|
+
*
|
|
14
|
+
* Ключевые моменты:
|
|
15
|
+
* - Когда сафари форсом делает mute, то у нас разъезжается desiredState.volume;
|
|
16
|
+
* - Когда сафари форсом переводит в дефолт скорость произведения, у нас разъезжается desiredState.playbackRate.
|
|
17
|
+
*
|
|
18
|
+
* Нужно поймать следующую цепочку событий:
|
|
19
|
+
* Пользователь сделал unmute -> Изменился playbackRate -> Считаем, что это Сафари поведение, сверяем desiredState.playbackRate.
|
|
20
|
+
*/
|
|
21
21
|
export declare const restorePlaybackRateInSafari: ({ subscription, desiredState, videoElement$, observableVideo }: Params) => void;
|
|
22
22
|
export {};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { IListener, IObservable, ISubscription } from
|
|
2
|
-
import { IVolumeState, PlaybackRate } from
|
|
3
|
-
import { IStateMachine } from
|
|
4
|
-
declare const syncDesiredState: <Value>(desiredState: IStateMachine<Value | undefined>, get: () => Value | undefined,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
changed$?: IObservable<Value | undefined>;
|
|
9
|
-
onError?: IListener<Error | unknown>;
|
|
1
|
+
import type { IListener, IObservable, ISubscription } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
import type { IVolumeState, PlaybackRate } from "../../player/types";
|
|
3
|
+
import type { IStateMachine } from "../../utils/StateMachine/types";
|
|
4
|
+
declare const syncDesiredState: <Value>(desiredState: IStateMachine<Value | undefined>, get: () => Value | undefined, set: (value: Value | undefined) => void, { equal, changed$, onError }?: {
|
|
5
|
+
equal?: (a: Value | undefined, b: Value | undefined) => boolean;
|
|
6
|
+
changed$?: IObservable<Value | undefined>;
|
|
7
|
+
onError?: IListener<Error | unknown>;
|
|
10
8
|
}) => ISubscription;
|
|
11
9
|
export declare const syncVideoLooped: (video: HTMLVideoElement, desiredState: IStateMachine<boolean>, onError?: IListener<Error | unknown>) => ISubscription;
|
|
12
10
|
export declare const syncVideoVolumeState: (video: HTMLVideoElement, desiredState: IStateMachine<IVolumeState>, changed$: IObservable<IVolumeState>, onError?: IListener<Error | unknown>) => ISubscription;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IStateMachine } from
|
|
2
|
-
import { PlaybackState } from
|
|
1
|
+
import type { IStateMachine } from "../../utils/StateMachine/types";
|
|
2
|
+
import type { PlaybackState } from "../../player/types";
|
|
3
3
|
declare const _default: (playbackState: IStateMachine<PlaybackState>, value: PlaybackState, ignoreCurrentTransition?: boolean) => void;
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ITuningConfig } from
|
|
2
|
-
import { Manifest } from
|
|
1
|
+
import type { ITuningConfig } from "../../utils/tuningConfig";
|
|
2
|
+
import type { Manifest } from "./parsers/types";
|
|
3
3
|
/** @mutates streams.video */
|
|
4
4
|
export declare const applyVideoStreamRepresentaionsFilter: (streams: Manifest["streams"], videoStreamRepresentaionsFilter: ITuningConfig["dash"]["videoStreamRepresentaionsFilter"]) => void;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Degree, Vector2D, Vector3D } from
|
|
1
|
+
import type { Degree, Vector2D, Vector3D } from "./types";
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
* Модель камеры трехмерной сцены
|
|
4
|
+
*/
|
|
5
5
|
export declare class Camera3D {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
fov: Vector2D<Degree>;
|
|
7
|
+
/**
|
|
8
|
+
* x: Degree; // yaw (around vertical Y axis)
|
|
9
|
+
* y: Degree; // pitch (around horizontal X axis)
|
|
10
|
+
* z: Degree; // roll (around normal Z axis)
|
|
11
|
+
*/
|
|
12
|
+
orientation: Vector3D<Degree>;
|
|
13
|
+
constructor(fov: Vector2D<Degree>, orientation: Vector3D<Degree>);
|
|
14
14
|
}
|