@vkontakte/videoplayer-core 2.0.115-beta.0 → 2.0.115-dev.2251eeb9.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/videoplayer-core",
3
- "version": "2.0.115-beta.0",
3
+ "version": "2.0.115-dev.2251eeb9.0",
4
4
  "author": "vk.com",
5
5
  "description": "Videoplayer core library based on the vk.com platform",
6
6
  "homepage": "https://vk.com",
@@ -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;
@@ -4,6 +4,7 @@
4
4
  export declare enum BoxTypeEnum {
5
5
  FtypBox = "ftyp",
6
6
  MoovBox = "moov",
7
+ MvhdBox = "mvhd",
7
8
  MoofBox = "moof",
8
9
  MdatBox = "mdat",
9
10
  SidxBox = "sidx",
@@ -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
+ }
@@ -162,6 +162,7 @@ export type IParams = IProviderParams<IDashURLSource>;
162
162
  export type MpegInit = CommonInit;
163
163
  export type WebmParser = GenericContainerParser<WebmInit>;
164
164
  export type MpegParser = GenericContainerParser<MpegInit> & {
165
- getSegmentEndTime(data: DataView, timescale: number): Milliseconds;
165
+ getChunkEndTime(data: DataView, timescale: number): Milliseconds;
166
+ getTimescaleFromIndex(view: DataView): number | undefined;
166
167
  };
167
168
  export type ContainerParser = WebmParser | MpegParser;
@@ -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
  };
70
75
  dashCmafLive: {
71
76
  maxActiveLiveOffset: Milliseconds;
@@ -133,7 +138,6 @@ export type ITuningConfig = {
133
138
  endGapTolerance: Milliseconds;
134
139
  stallIgnoreThreshold: Milliseconds;
135
140
  gapWatchdogInterval: Milliseconds;
136
- accumulationBufferStallSizeMs: Milliseconds;
137
141
  requestQuick: boolean;
138
142
  useHlsJs: boolean;
139
143
  useNativeHLSTextTracks: boolean;