@vkontakte/videoplayer-core 2.0.115-dev.2251eeb9.0 → 2.0.115-dev.48742ddd.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 +25 -18
- package/es2015.esm.js +25 -18
- package/es2018.cjs.js +25 -18
- package/es2018.esm.js +25 -18
- package/esnext.cjs.js +29 -22
- package/esnext.esm.js +27 -20
- package/evergreen.esm.js +26 -19
- package/package.json +2 -2
- package/types/player/Player.d.ts +1 -1
- package/types/player/types.d.ts +1 -1
- package/types/providers/DashProvider/baseDashProvider.d.ts +0 -4
- package/types/providers/DashProvider/lib/buffer.d.ts +3 -0
- package/types/providers/DashProvider/lib/parsers/ietf/index.d.ts +13 -0
- package/types/providers/DashProvider/lib/parsers/index.d.ts +1 -2
- package/types/providers/DashProvider/lib/parsers/mpeg/BoxTypeEnum.d.ts +0 -1
- package/types/providers/DashProvider/lib/parsers/mpeg/boxes/index.d.ts +0 -1
- package/types/providers/DashProvider/lib/types.d.ts +2 -2
- package/types/utils/tuningConfig.d.ts +4 -5
- package/types/providers/DashProvider/lib/parsers/mpeg/boxes/mvhd.d.ts +0 -35
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer-core",
|
|
3
|
-
"version": "2.0.115-dev.
|
|
3
|
+
"version": "2.0.115-dev.48742ddd.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.47-dev.536f9d94.0",
|
|
53
53
|
"hls.js": "~1.4.7"
|
|
54
54
|
}
|
|
55
55
|
}
|
package/types/player/Player.d.ts
CHANGED
|
@@ -96,7 +96,7 @@ export default class Player implements IPlayer {
|
|
|
96
96
|
log$: Subject<ILogEntry>;
|
|
97
97
|
};
|
|
98
98
|
experimental: {
|
|
99
|
-
element$: ValueSubject<
|
|
99
|
+
element$: ValueSubject<HTMLVideoElement | undefined>;
|
|
100
100
|
tuningConfigName$: ValueSubject<string[]>;
|
|
101
101
|
enableDebugTelemetry$: ValueSubject<boolean>;
|
|
102
102
|
dumpTelemetry: (receiver: (value: Record<string, any>) => void) => void;
|
package/types/player/types.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ export interface IPlayer {
|
|
|
66
66
|
* Элемент, который сейчас вставлен в container.
|
|
67
67
|
* Может быть видеоэлементом, iframe и вообще чем угодно в общем случае.
|
|
68
68
|
*/
|
|
69
|
-
element$: IValueObservable<
|
|
69
|
+
element$: IValueObservable<HTMLVideoElement | undefined>;
|
|
70
70
|
tuningConfigName$: IValueSubject<string[]>;
|
|
71
71
|
enableDebugTelemetry$: IValueSubject<boolean>;
|
|
72
72
|
dumpTelemetry: (receiver: (value: Record<string, any>) => void) => void;
|
|
@@ -39,10 +39,6 @@ export default abstract class BaseDashProvider implements IProvider {
|
|
|
39
39
|
protected audioStreamsMap: Map<Stream, IAudioTrack[]>;
|
|
40
40
|
protected videoTrackSwitchHistory: TrackHistory<IVideoTrack>;
|
|
41
41
|
protected audioTrackSwitchHistory: TrackHistory<import("../../player/types").IBaseTrack>;
|
|
42
|
-
protected textTracks: {
|
|
43
|
-
track: IInternalTextTrack;
|
|
44
|
-
representation: Representation;
|
|
45
|
-
}[];
|
|
46
42
|
protected liveOffset?: ILiveOffset;
|
|
47
43
|
constructor(params: IParams);
|
|
48
44
|
protected abstract seek(position: Milliseconds, forcePrecise: boolean): void;
|
|
@@ -47,6 +47,8 @@ export declare class BufferManager {
|
|
|
47
47
|
private gapDetectionIdleCallback;
|
|
48
48
|
private initLoadIdleCallback;
|
|
49
49
|
private failedDownloads;
|
|
50
|
+
private baseUrls;
|
|
51
|
+
private baseUrlsIndex;
|
|
50
52
|
private compatibilityMode;
|
|
51
53
|
private preloadOnly;
|
|
52
54
|
private bufferAccumulation;
|
|
@@ -83,6 +85,7 @@ export declare class BufferManager {
|
|
|
83
85
|
private selectForwardBufferSegmentsRecord;
|
|
84
86
|
private loadSegments;
|
|
85
87
|
private loadTemplateSegment;
|
|
88
|
+
private updateRepresentationsBaseUrlIfNeeded;
|
|
86
89
|
private loadByteRangeSegments;
|
|
87
90
|
private prepareByteRangeFetchSegmentParams;
|
|
88
91
|
private prepareTemplateFetchSegmentParams;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** @fork https://github.com/sozialhelden/ietf-language-tags */
|
|
2
|
+
export interface ILanguageSubtag {
|
|
3
|
+
langtag?: string;
|
|
4
|
+
language?: string;
|
|
5
|
+
extlang?: string;
|
|
6
|
+
script?: string;
|
|
7
|
+
region?: string;
|
|
8
|
+
variants?: string[];
|
|
9
|
+
extensions?: Record<string, string>;
|
|
10
|
+
privateuse?: string;
|
|
11
|
+
}
|
|
12
|
+
/** @fork https://github.com/sozialhelden/ietf-language-tags */
|
|
13
|
+
export declare const parseLangAttribute: (attr: string) => ILanguageSubtag | null;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { ContainerParser
|
|
1
|
+
import { ContainerParser } 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,7 +3,6 @@ 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';
|
|
7
6
|
export { MoofBox } from '../../../../../../providers/DashProvider/lib/parsers/mpeg/boxes/moof';
|
|
8
7
|
export { MdatBox } from '../../../../../../providers/DashProvider/lib/parsers/mpeg/boxes/mdat';
|
|
9
8
|
export { SidxBox, SidxBoxSegment } from '../../../../../../providers/DashProvider/lib/parsers/mpeg/boxes/sidx';
|
|
@@ -101,6 +101,7 @@ export interface Manifest {
|
|
|
101
101
|
streams: {
|
|
102
102
|
[key in StreamKind]: Stream[];
|
|
103
103
|
};
|
|
104
|
+
baseUrls: string[];
|
|
104
105
|
}
|
|
105
106
|
export declare enum ProjectionType {
|
|
106
107
|
RECTANGULAR = 0,
|
|
@@ -162,7 +163,6 @@ export type IParams = IProviderParams<IDashURLSource>;
|
|
|
162
163
|
export type MpegInit = CommonInit;
|
|
163
164
|
export type WebmParser = GenericContainerParser<WebmInit>;
|
|
164
165
|
export type MpegParser = GenericContainerParser<MpegInit> & {
|
|
165
|
-
|
|
166
|
-
getTimescaleFromIndex(view: DataView): number | undefined;
|
|
166
|
+
getSegmentEndTime(data: DataView, timescale: number): Milliseconds;
|
|
167
167
|
};
|
|
168
168
|
export type ContainerParser = WebmParser | MpegParser;
|
|
@@ -66,11 +66,8 @@ export type ITuningConfig = {
|
|
|
66
66
|
enableSubSegmentBufferFeeding: boolean;
|
|
67
67
|
bufferEmptinessTolerance: Milliseconds;
|
|
68
68
|
useFetchPriorityHints: boolean;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
shortVideoBufferStallSizeMs: Milliseconds;
|
|
72
|
-
longVideoBufferStallSizeMs: Milliseconds;
|
|
73
|
-
};
|
|
69
|
+
enableBaseUrlSupport: boolean;
|
|
70
|
+
maxSegmentRetryCount: number;
|
|
74
71
|
};
|
|
75
72
|
dashCmafLive: {
|
|
76
73
|
maxActiveLiveOffset: Milliseconds;
|
|
@@ -138,6 +135,7 @@ export type ITuningConfig = {
|
|
|
138
135
|
endGapTolerance: Milliseconds;
|
|
139
136
|
stallIgnoreThreshold: Milliseconds;
|
|
140
137
|
gapWatchdogInterval: Milliseconds;
|
|
138
|
+
accumulationBufferStallSizeMs: Milliseconds;
|
|
141
139
|
requestQuick: boolean;
|
|
142
140
|
useHlsJs: boolean;
|
|
143
141
|
useNativeHLSTextTracks: boolean;
|
|
@@ -178,6 +176,7 @@ export type ITuningConfig = {
|
|
|
178
176
|
speedFadeThreshold: Milliseconds;
|
|
179
177
|
};
|
|
180
178
|
useVolumeMultiplier: boolean;
|
|
179
|
+
ignoreAudioRendererError: boolean;
|
|
181
180
|
};
|
|
182
181
|
export type IOptionalTuningConfig = RecursivePartial<ITuningConfig> & {
|
|
183
182
|
configName: ITuningConfig['configName'];
|
|
@@ -1,35 +0,0 @@
|
|
|
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
|
-
}
|