@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,190 +1,188 @@
|
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
+
/**
|
|
27
|
+
* @see https://jira.vk.team/browse/UVP-9492
|
|
28
|
+
*
|
|
29
|
+
* помечает видео дорожку как неиспользуемую для телевизоров
|
|
30
|
+
*/
|
|
31
|
+
tvDisabled?: boolean;
|
|
32
32
|
}
|
|
33
33
|
export interface TextRepresentation extends Representation {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
language: string;
|
|
35
|
+
label: string;
|
|
36
|
+
url: string;
|
|
37
|
+
isAuto: boolean;
|
|
38
38
|
}
|
|
39
39
|
export interface ServerLatencyTimestamps {
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
serverDataReceivedTimestamp?: Milliseconds;
|
|
41
|
+
serverDataPreparedTime?: Milliseconds;
|
|
42
42
|
}
|
|
43
43
|
export declare enum SegmentReferencingType {
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
BYTE_RANGE = "byteRange",
|
|
45
|
+
TEMPLATE = "template"
|
|
46
46
|
}
|
|
47
47
|
export type ByteRangeSegmentReference = {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
type: SegmentReferencingType.BYTE_RANGE;
|
|
49
|
+
url: string;
|
|
50
|
+
initRange: IRange<Byte>;
|
|
51
|
+
indexRange?: IRange<Byte>;
|
|
52
52
|
};
|
|
53
53
|
export type TemplateSegmentReference = {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
54
|
+
type: SegmentReferencingType.TEMPLATE;
|
|
55
|
+
baseUrl: string;
|
|
56
|
+
initUrl: string;
|
|
57
|
+
segmentTemplateUrl: string;
|
|
58
|
+
totalSegmentsDurationMs: Milliseconds;
|
|
59
|
+
segments: {
|
|
60
|
+
url: string;
|
|
61
|
+
time: IRange<Milliseconds>;
|
|
62
|
+
}[];
|
|
63
|
+
nextSegmentBeyondManifest: {
|
|
64
|
+
url: string;
|
|
65
|
+
time: IRange<Milliseconds>;
|
|
66
|
+
};
|
|
67
|
+
timescale: number;
|
|
68
68
|
};
|
|
69
69
|
export type SegmentReference = ByteRangeSegmentReference | TemplateSegmentReference;
|
|
70
70
|
export interface SegmentInfo {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
71
|
+
/**
|
|
72
|
+
* @deprecated После перехода на VirtualBuffer будет бесполезно. Можно будет удалить. Нужно для старого DashProvider
|
|
73
|
+
*/
|
|
74
|
+
status: SegmentStatus;
|
|
75
|
+
networkStatus: Nullable<SegmentNetworkStatus>;
|
|
76
|
+
bufferStatus: Nullable<SegmentBufferStatus>;
|
|
77
|
+
data: Nullable<BufferSource>;
|
|
78
|
+
size: Nullable<Byte>;
|
|
79
|
+
loadedBytes: Nullable<Byte>;
|
|
80
|
+
feedingBytes: Nullable<Byte>;
|
|
81
|
+
fedBytes: Nullable<Byte>;
|
|
82
82
|
}
|
|
83
83
|
export type ByteRangeSegment = SegmentInfo & {
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
time: IRange<Milliseconds>;
|
|
85
|
+
byte: IRange<Byte>;
|
|
86
86
|
};
|
|
87
87
|
export type TemplateSegment = SegmentInfo & {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
time: IRange<Milliseconds>;
|
|
89
|
+
url: string;
|
|
90
|
+
isCurrentLowLatency?: boolean;
|
|
91
91
|
};
|
|
92
92
|
export type Segment = ByteRangeSegment | TemplateSegment;
|
|
93
93
|
export declare enum SegmentNetworkStatus {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
NONE = "none",
|
|
95
|
+
DOWNLOADING = "downloading",
|
|
96
|
+
DOWNLOADED = "downloaded"
|
|
97
97
|
}
|
|
98
98
|
export declare enum SegmentBufferStatus {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
NONE = "none",
|
|
100
|
+
PARTIALLY_FED = "partially_fed",
|
|
101
|
+
FED = "fed"
|
|
102
102
|
}
|
|
103
103
|
export declare enum SegmentStatus {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
104
|
+
NONE = "none",
|
|
105
|
+
DOWNLOADING = "downloading",
|
|
106
|
+
DOWNLOADED = "downloaded",
|
|
107
|
+
PARTIALLY_FED = "partially_fed",
|
|
108
|
+
PARTIALLY_EJECTED = "partially_ejected",
|
|
109
|
+
FED = "fed"
|
|
110
110
|
}
|
|
111
111
|
export interface Stream {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
112
|
+
id: string;
|
|
113
|
+
hdr?: boolean;
|
|
114
|
+
language?: string;
|
|
115
|
+
isDefault?: boolean;
|
|
116
|
+
label?: string;
|
|
117
|
+
codecs: string;
|
|
118
|
+
mime: string;
|
|
119
|
+
representations: Representation[];
|
|
120
120
|
}
|
|
121
121
|
export interface Manifest {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
};
|
|
131
|
-
live?: LiveMetadata;
|
|
122
|
+
duration: Milliseconds | undefined;
|
|
123
|
+
streams: { [key in StreamKind] : Stream[] };
|
|
124
|
+
baseUrls: string[];
|
|
125
|
+
codecs?: {
|
|
126
|
+
video?: VideoCodec[];
|
|
127
|
+
audio?: AudioCodec[];
|
|
128
|
+
};
|
|
129
|
+
live?: LiveMetadata;
|
|
132
130
|
}
|
|
133
131
|
export declare enum ProjectionType {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
132
|
+
RECTANGULAR = 0,
|
|
133
|
+
EQUIRECTANGULAR = 1,
|
|
134
|
+
CUBEMAP = 2,
|
|
135
|
+
MESH = 3
|
|
138
136
|
}
|
|
139
137
|
export interface BoxLike {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
138
|
+
id: string;
|
|
139
|
+
size: Byte;
|
|
140
|
+
contents: DataView;
|
|
143
141
|
}
|
|
144
142
|
export interface GenericContainerParser<InitData> {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
143
|
+
validateData(data: DataView): boolean;
|
|
144
|
+
getIndexRange(init: InitData): IRange<Byte> | undefined;
|
|
145
|
+
parseInit(data: DataView): InitData;
|
|
146
|
+
parseSegments(data: DataView, init: InitData, indexRange?: IRange<Byte>): Segment[];
|
|
147
|
+
parseFeedableSegmentChunk(data: DataView, isLive?: boolean): DataView | null;
|
|
150
148
|
}
|
|
151
149
|
export interface CommonInit {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
150
|
+
is3dVideo: boolean;
|
|
151
|
+
stereoMode?: number;
|
|
152
|
+
projectionType?: ProjectionType;
|
|
153
|
+
projectionData?: {
|
|
154
|
+
pose: {
|
|
155
|
+
yaw: number;
|
|
156
|
+
pitch: number;
|
|
157
|
+
roll: number;
|
|
158
|
+
};
|
|
159
|
+
bounds: {
|
|
160
|
+
top: number;
|
|
161
|
+
bottom: number;
|
|
162
|
+
left: number;
|
|
163
|
+
right: number;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
168
166
|
}
|
|
169
167
|
export interface WebmInit extends CommonInit {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
168
|
+
segmentStart: Byte;
|
|
169
|
+
segmentEnd: Byte;
|
|
170
|
+
timeScale: number;
|
|
171
|
+
segmentDuration: number;
|
|
172
|
+
cuesSeekPosition?: Byte;
|
|
175
173
|
}
|
|
176
174
|
export type MpegInit = CommonInit;
|
|
177
175
|
export type WebmParser = GenericContainerParser<WebmInit>;
|
|
178
176
|
export type MpegParser = GenericContainerParser<MpegInit> & {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
177
|
+
getChunkEndTime(data: DataView, timescale: number): Milliseconds;
|
|
178
|
+
getServerLatencyTimestamps(view: DataView): ServerLatencyTimestamps;
|
|
179
|
+
getTimescaleFromIndex(view: DataView): number | undefined;
|
|
182
180
|
};
|
|
183
181
|
export type ContainerParser = WebmParser | MpegParser;
|
|
184
182
|
export interface LiveMetadata {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
183
|
+
availabilityStartTime: Milliseconds;
|
|
184
|
+
publishTime: Milliseconds;
|
|
185
|
+
latestSegmentPublishTime: Milliseconds;
|
|
186
|
+
streamIsAlive: boolean;
|
|
187
|
+
streamIsUnpublished: boolean;
|
|
190
188
|
}
|
|
@@ -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,14 +1,14 @@
|
|
|
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, IValueSubject } 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
|
-
export declare const syncVideoVolumeState: (video: HTMLVideoElement, desiredState: IStateMachine<IVolumeState>, changed$: IObservable<IVolumeState>, onError?: IListener<Error | unknown
|
|
10
|
+
export declare const syncVideoVolumeState: (video: HTMLVideoElement, desiredState: IStateMachine<IVolumeState>, changed$: IObservable<IVolumeState>, onError?: IListener<Error | unknown>, params?: {
|
|
11
|
+
skipVideoElVolumeSync$: IValueSubject<boolean>;
|
|
12
|
+
}) => ISubscription;
|
|
13
13
|
export declare const syncVideoPlaybackRate: (video: HTMLVideoElement, desiredState: IStateMachine<PlaybackRate>, changed$: IObservable<PlaybackRate>, onError?: IListener<Error | unknown>) => ISubscription;
|
|
14
14
|
export default syncDesiredState;
|
|
@@ -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 markVideoStreamRepresentaionsFilter: (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
|
}
|