@vkontakte/videoplayer-core 2.0.116-dev.32c949ec.0 → 2.0.116-dev.d1ccc575.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.js +12 -12
- package/es2015.esm.js +11 -11
- package/es2018.cjs.js +14 -14
- package/es2018.esm.js +14 -14
- package/esnext.cjs.js +18 -18
- package/esnext.esm.js +17 -17
- package/evergreen.esm.js +14 -14
- package/package.json +2 -2
- package/types/providers/DashProvider/lib/fetcher.d.ts +3 -1
- package/types/providers/DashProvider/lib/parsers/index.d.ts +2 -1
- package/types/providers/DashProvider/lib/parsers/mpeg/BoxTypeEnum.d.ts +1 -0
- package/types/providers/DashProvider/lib/parsers/mpeg/boxes/index.d.ts +1 -0
- package/types/providers/DashProvider/lib/parsers/mpeg/boxes/mvhd.d.ts +35 -0
- package/types/providers/DashProvider/lib/types.d.ts +2 -1
- package/types/providers/utils/addSubtitlesParam.d.ts +2 -0
- package/types/utils/VolumeMultiplierManager/VolumeMultiplierManager.d.ts +6 -3
- package/types/utils/VolumeMultiplierManager/audioContext.d.ts +1 -9
- package/types/utils/buffer/isPositionBuffered.d.ts +1 -1
- package/types/utils/tuningConfig.d.ts +7 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer-core",
|
|
3
|
-
"version": "2.0.116-dev.
|
|
3
|
+
"version": "2.0.116-dev.d1ccc575.0",
|
|
4
4
|
"author": "vk.com",
|
|
5
5
|
"description": "Videoplayer core library based on the vk.com platform",
|
|
6
6
|
"homepage": "https://vk.com",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"**/*.d.ts"
|
|
50
50
|
],
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@vkontakte/videoplayer-shared": "
|
|
52
|
+
"@vkontakte/videoplayer-shared": "1.0.48-dev.694b5b17.0",
|
|
53
53
|
"hls.js": "~1.4.7"
|
|
54
54
|
}
|
|
55
55
|
}
|
|
@@ -11,6 +11,7 @@ export interface IParams {
|
|
|
11
11
|
requestQuic: boolean;
|
|
12
12
|
compatibilityMode?: boolean;
|
|
13
13
|
tracer: ITracer;
|
|
14
|
+
useEnableSubtitlesParam?: boolean;
|
|
14
15
|
}
|
|
15
16
|
export type Priority = 'high' | 'low' | 'auto';
|
|
16
17
|
export interface FetchParamsWithUrl extends FetchParams {
|
|
@@ -41,7 +42,8 @@ export declare class Fetcher {
|
|
|
41
42
|
private abortAllController;
|
|
42
43
|
private subscription;
|
|
43
44
|
private compatibilityMode;
|
|
44
|
-
|
|
45
|
+
private useEnableSubtitlesParam;
|
|
46
|
+
constructor({ throughputEstimator, requestQuic, tracer, compatibilityMode, useEnableSubtitlesParam }: IParams);
|
|
45
47
|
private onHeadersReceived;
|
|
46
48
|
fetchManifest: (param_0: string) => Promise<string | null | undefined>;
|
|
47
49
|
fetch: (param_0: string, param_1: FetchParams) => Promise<ArrayBuffer | null | undefined>;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { ContainerParser } from '../../../../providers/DashProvider/lib/types';
|
|
1
|
+
import { ContainerParser, MpegParser } from '../../../../providers/DashProvider/lib/types';
|
|
2
2
|
export declare const getContainerParser: (mime: string) => ContainerParser;
|
|
3
|
+
export declare const isMp4Parser: (parser: ContainerParser) => parser is MpegParser;
|
|
@@ -3,6 +3,7 @@ export { UnknownBox } from '../../../../../../providers/DashProvider/lib/parsers
|
|
|
3
3
|
export { UuidBox } from '../../../../../../providers/DashProvider/lib/parsers/mpeg/boxes/uuid';
|
|
4
4
|
export { FtypBox } from '../../../../../../providers/DashProvider/lib/parsers/mpeg/boxes/ftyp';
|
|
5
5
|
export { MoovBox } from '../../../../../../providers/DashProvider/lib/parsers/mpeg/boxes/moov';
|
|
6
|
+
export { MvhdBox } from '../../../../../../providers/DashProvider/lib/parsers/mpeg/boxes/mvhd';
|
|
6
7
|
export { MoofBox } from '../../../../../../providers/DashProvider/lib/parsers/mpeg/boxes/moof';
|
|
7
8
|
export { MdatBox } from '../../../../../../providers/DashProvider/lib/parsers/mpeg/boxes/mdat';
|
|
8
9
|
export { SidxBox, SidxBoxSegment } from '../../../../../../providers/DashProvider/lib/parsers/mpeg/boxes/sidx';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { FullBox } from '../../../../../../providers/DashProvider/lib/parsers/mpeg/fullBox';
|
|
2
|
+
import { type BoxParser } from '../../../../../../providers/DashProvider/lib/parsers/mpeg/BoxParser';
|
|
3
|
+
/**
|
|
4
|
+
* aligned(8) class MovieHeaderBox extends FullBox(‘mvhd’, version, 0) {
|
|
5
|
+
* if (version==1) {
|
|
6
|
+
* unsigned int(64) creation_time;
|
|
7
|
+
* unsigned int(64) modification_time;
|
|
8
|
+
* unsigned int(32) timescale;
|
|
9
|
+
* unsigned int(64) duration;
|
|
10
|
+
* } else { // version==0
|
|
11
|
+
* unsigned int(32) creation_time;
|
|
12
|
+
* unsigned int(32) modification_time;
|
|
13
|
+
* unsigned int(32) timescale;
|
|
14
|
+
* unsigned int(32) duration;
|
|
15
|
+
* }
|
|
16
|
+
* template int(32) rate = 0x00010000; // typically 1.0
|
|
17
|
+
* template int(16) volume = 0x0100; // typically, full volume
|
|
18
|
+
* const bit(16) reserved = 0;
|
|
19
|
+
* const unsigned int(32)[2] reserved = 0;
|
|
20
|
+
* template int(32)[9] matrix =
|
|
21
|
+
* { 0x00010000,0,0,0,0x00010000,0,0,0,0x40000000 };
|
|
22
|
+
* // Unity matrix
|
|
23
|
+
* bit(32)[6] pre_defined = 0;
|
|
24
|
+
* unsigned int(32) next_track_ID;
|
|
25
|
+
* }
|
|
26
|
+
*/
|
|
27
|
+
export declare class MvhdBox extends FullBox {
|
|
28
|
+
creationTime: number;
|
|
29
|
+
modificationTime: number;
|
|
30
|
+
timescale: number;
|
|
31
|
+
duration: number;
|
|
32
|
+
rate: number;
|
|
33
|
+
volume: number;
|
|
34
|
+
constructor(source: DataView, boxParser: BoxParser);
|
|
35
|
+
}
|
|
@@ -163,6 +163,7 @@ export type IParams = IProviderParams<IDashURLSource>;
|
|
|
163
163
|
export type MpegInit = CommonInit;
|
|
164
164
|
export type WebmParser = GenericContainerParser<WebmInit>;
|
|
165
165
|
export type MpegParser = GenericContainerParser<MpegInit> & {
|
|
166
|
-
|
|
166
|
+
getChunkEndTime(data: DataView, timescale: number): Milliseconds;
|
|
167
|
+
getTimescaleFromIndex(view: DataView): number | undefined;
|
|
167
168
|
};
|
|
168
169
|
export type ContainerParser = WebmParser | MpegParser;
|
|
@@ -6,14 +6,17 @@ export declare class VolumeMultiplierManager {
|
|
|
6
6
|
private provider$;
|
|
7
7
|
private volumeMultiplierError$;
|
|
8
8
|
private volumeMultiplier;
|
|
9
|
-
/** флаг, подтверждающий, что мы смогли активировать аудио контекс */
|
|
10
|
-
private audioContextInit;
|
|
11
9
|
private static errorId;
|
|
10
|
+
private destroyController;
|
|
12
11
|
private subscriptions;
|
|
13
|
-
private
|
|
12
|
+
private audioContext;
|
|
13
|
+
private gainNode;
|
|
14
|
+
private mediaElementSource;
|
|
14
15
|
constructor(providerOutput: IProviderOutput, provider$: IValueSubject<IProviderEntry>, volumeMultiplierError$: ISubject<IError>, volumeMultiplier: number);
|
|
15
16
|
private subscribe;
|
|
16
17
|
static isSupported(): boolean;
|
|
17
18
|
private initAudioContextOnce;
|
|
19
|
+
private cleanup;
|
|
18
20
|
destroy(): void;
|
|
21
|
+
private handleError;
|
|
19
22
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Milliseconds } from '@vkontakte/videoplayer-shared';
|
|
2
|
-
declare const _default: (timeRanges: TimeRanges, position: Milliseconds) => boolean;
|
|
2
|
+
declare const _default: (timeRanges: TimeRanges, position: Milliseconds, tolerance?: number) => boolean;
|
|
3
3
|
export default _default;
|
|
@@ -66,6 +66,11 @@ export type ITuningConfig = {
|
|
|
66
66
|
enableSubSegmentBufferFeeding: boolean;
|
|
67
67
|
bufferEmptinessTolerance: Milliseconds;
|
|
68
68
|
useFetchPriorityHints: boolean;
|
|
69
|
+
accumulationBufferStallSize: {
|
|
70
|
+
shortVideoDuration: Milliseconds;
|
|
71
|
+
shortVideoBufferStallSizeMs: Milliseconds;
|
|
72
|
+
longVideoBufferStallSizeMs: Milliseconds;
|
|
73
|
+
};
|
|
69
74
|
enableBaseUrlSupport: boolean;
|
|
70
75
|
maxSegmentRetryCount: number;
|
|
71
76
|
};
|
|
@@ -135,13 +140,13 @@ export type ITuningConfig = {
|
|
|
135
140
|
endGapTolerance: Milliseconds;
|
|
136
141
|
stallIgnoreThreshold: Milliseconds;
|
|
137
142
|
gapWatchdogInterval: Milliseconds;
|
|
138
|
-
accumulationBufferStallSizeMs: Milliseconds;
|
|
139
143
|
requestQuick: boolean;
|
|
140
144
|
useHlsJs: boolean;
|
|
141
145
|
useNativeHLSTextTracks: boolean;
|
|
142
146
|
useManagedMediaSource: boolean;
|
|
143
147
|
useNewPruneBufferStrategy: boolean;
|
|
144
148
|
useNewSwitchTo: boolean;
|
|
149
|
+
useSafariEndlessRequestBugfix: boolean;
|
|
145
150
|
isAudioDisabled: boolean;
|
|
146
151
|
autoplayOnlyInActiveTab: boolean;
|
|
147
152
|
dynamicImportTimeout: Milliseconds;
|
|
@@ -174,6 +179,7 @@ export type ITuningConfig = {
|
|
|
174
179
|
};
|
|
175
180
|
useVolumeMultiplier: boolean;
|
|
176
181
|
ignoreAudioRendererError: boolean;
|
|
182
|
+
useEnableSubtitlesParam: boolean;
|
|
177
183
|
};
|
|
178
184
|
export type IOptionalTuningConfig = RecursivePartial<ITuningConfig> & {
|
|
179
185
|
configName: ITuningConfig['configName'];
|