@vkontakte/videoplayer-core 2.0.116-dev.48c29cc5.0 → 2.0.116-dev.68a2c5fb.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 +21 -21
- package/es2015.esm.js +21 -21
- package/es2018.cjs.js +24 -24
- package/es2018.esm.js +23 -23
- package/esnext.cjs.js +17 -17
- package/esnext.esm.js +14 -14
- package/evergreen.esm.js +19 -19
- package/package.json +2 -2
- package/types/player/Player.d.ts +2 -0
- package/types/providers/DashProvider/lib/buffer.d.ts +0 -4
- 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/DashProvider/lib/utils.d.ts +0 -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 +8 -4
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.68a2c5fb.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": "1.0.48-dev.
|
|
52
|
+
"@vkontakte/videoplayer-shared": "1.0.48-dev.282f4648.0",
|
|
53
53
|
"hls.js": "~1.4.7"
|
|
54
54
|
}
|
|
55
55
|
}
|
package/types/player/Player.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ export default class Player implements IPlayer {
|
|
|
16
16
|
private initedAt;
|
|
17
17
|
private hasLiveOffsetByPaused;
|
|
18
18
|
private hasLiveOffsetByPausedTimer;
|
|
19
|
+
private explicitInitialQuality;
|
|
20
|
+
private wasSetStartedQuality;
|
|
19
21
|
private desiredState;
|
|
20
22
|
info: {
|
|
21
23
|
playbackState$: ValueSubject<PlaybackState>;
|
|
@@ -100,16 +100,12 @@ export declare class BufferManager {
|
|
|
100
100
|
* @private
|
|
101
101
|
*/
|
|
102
102
|
private onSomeByteRangesDataLoaded;
|
|
103
|
-
private onSomeByteRangesDataLoadedOld;
|
|
104
|
-
private onSomeByteRangesDataLoadedNew;
|
|
105
103
|
private onSegmentFullyAppended;
|
|
106
104
|
private abortSegment;
|
|
107
105
|
private loadNextInit;
|
|
108
106
|
private loadInit;
|
|
109
107
|
private dropBuffer;
|
|
110
108
|
private pruneBuffer;
|
|
111
|
-
private pruneBufferNew;
|
|
112
|
-
private pruneBufferOld;
|
|
113
109
|
private abortBuffer;
|
|
114
110
|
getDebugBufferState(): IRange<Milliseconds> | undefined;
|
|
115
111
|
getForwardBufferDuration(): Milliseconds;
|
|
@@ -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;
|
|
@@ -2,7 +2,6 @@ import { Representation, Segment, SegmentReference, Stream, TemplateSegment, Tem
|
|
|
2
2
|
import { IAudioStream, IAudioTrack, IInternalTextTrack, IVideoStream, IVideoTrack } from '../../../player/types';
|
|
3
3
|
export declare const representationToVideoTrack: ({ id, width, height, bitrate, fps, quality: qualityString }: Representation) => IVideoTrack | undefined;
|
|
4
4
|
export declare const representationToAudioTrack: ({ id, bitrate }: Representation) => IAudioTrack;
|
|
5
|
-
export declare const selectAudioForVideo: (videoTrack: IVideoTrack, videoTracks: IVideoTrack[], audioTracks: IAudioTrack[]) => IAudioTrack | undefined;
|
|
6
5
|
export declare const representationToTextTrack: ({ language, label }: Stream, { id, url, isAuto }: Representation & {
|
|
7
6
|
url: string;
|
|
8
7
|
isAuto: boolean;
|
|
@@ -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,21 +140,18 @@ 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
|
-
useNewPartialSegmentFeeding: boolean;
|
|
145
148
|
useNewSwitchTo: boolean;
|
|
146
|
-
|
|
149
|
+
useSafariEndlessRequestBugfix: boolean;
|
|
147
150
|
isAudioDisabled: boolean;
|
|
148
151
|
autoplayOnlyInActiveTab: boolean;
|
|
149
152
|
dynamicImportTimeout: Milliseconds;
|
|
150
153
|
maxPlaybackTransitionInterval: Milliseconds;
|
|
151
154
|
providerErrorLimit: number;
|
|
152
|
-
useNewProviderReinitLogic: boolean;
|
|
153
155
|
manifestRetryInterval: number;
|
|
154
156
|
manifestRetryMaxInterval: number;
|
|
155
157
|
manifestRetryMaxCount: number;
|
|
@@ -177,6 +179,8 @@ export type ITuningConfig = {
|
|
|
177
179
|
};
|
|
178
180
|
useVolumeMultiplier: boolean;
|
|
179
181
|
ignoreAudioRendererError: boolean;
|
|
182
|
+
useEnableSubtitlesParam: boolean;
|
|
183
|
+
initialPlaybackRate?: number;
|
|
180
184
|
};
|
|
181
185
|
export type IOptionalTuningConfig = RecursivePartial<ITuningConfig> & {
|
|
182
186
|
configName: ITuningConfig['configName'];
|