@vkontakte/videoplayer-core 2.0.136-dev.3c83a8ac.0 → 2.0.136-dev.47a35d10.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 +36 -36
- package/es2015.esm.js +36 -36
- package/es2018.cjs.js +44 -44
- package/es2018.esm.js +44 -44
- package/es2024.cjs.js +43 -43
- package/es2024.esm.js +45 -45
- package/esnext.cjs.js +43 -43
- package/esnext.esm.js +45 -45
- package/evergreen.esm.js +44 -44
- package/package.json +2 -2
- package/types/index.d.ts +1 -0
- package/types/player/Player.d.ts +1 -0
- package/types/player/types.d.ts +4 -0
- package/types/providers/DashProvider/lib/fetcher.d.ts +1 -0
- package/types/providers/DashProvider/lib/player.d.ts +1 -1
- package/types/providers/DashProviderNew/lib/fetcher.d.ts +1 -0
- package/types/providers/ProviderContainer/utils/formatsSupport.d.ts +0 -2
- package/types/providers/types.d.ts +1 -0
- package/types/providers/utils/parsers/mpeg/BoxModel.d.ts +4 -4
- package/types/providers/utils/parsers/mpeg/box.d.ts +7 -7
- package/types/providers/utils/parsers/mpeg/boxes/index.d.ts +25 -25
- package/types/providers/utils/parsers/mpeg/boxes/uuid.d.ts +13 -6
- package/types/utils/tuningConfig.d.ts +2 -0
- package/types/utils/videoFormat.d.ts +6 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer-core",
|
|
3
|
-
"version": "2.0.136-dev.
|
|
3
|
+
"version": "2.0.136-dev.47a35d10.0",
|
|
4
4
|
"author": "vk.com",
|
|
5
5
|
"description": "Videoplayer core library based on the vk.com platform",
|
|
6
6
|
"homepage": "https://vk.com",
|
|
@@ -54,6 +54,6 @@
|
|
|
54
54
|
"**/*.d.ts"
|
|
55
55
|
],
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@vkontakte/videoplayer-shared": "1.0.64-dev.
|
|
57
|
+
"@vkontakte/videoplayer-shared": "1.0.64-dev.ba1f4b34.0"
|
|
58
58
|
}
|
|
59
59
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import Player from './player/Player';
|
|
|
4
4
|
import { IPlayer, PlaybackState, IPlayerInfo, IPlayerEvents, IConfig, ISources, ICueSettings, ChromecastState, HttpConnectionType, IExternalTextTrack, ITextTrack, PlaybackRate, IVideoStream, IAudioStream } from './player/types';
|
|
5
5
|
import type { IOptionalTuningConfig } from './utils/tuningConfig';
|
|
6
6
|
export { clientChecker, isMobile } from './utils/ClientChecker';
|
|
7
|
+
export { areValidLiveRecordSources } from './utils/videoFormat';
|
|
7
8
|
import type { ISubscription, IUnsubscriber, IEmitter, IObservable, IValueObservable, IValue, IOperator, IListener, ILogEntry, IRange, ExactVideoQuality } from '@vkontakte/videoplayer-shared';
|
|
8
9
|
import { Subscription, Observable, Subject, ValueSubject, VideoQuality } from '@vkontakte/videoplayer-shared';
|
|
9
10
|
/**
|
package/types/player/Player.d.ts
CHANGED
|
@@ -49,6 +49,7 @@ export default class Player implements IPlayer {
|
|
|
49
49
|
isLooped$: ValueSubject<boolean>;
|
|
50
50
|
isLive$: ValueSubject<boolean | undefined>;
|
|
51
51
|
isLiveEnded$: ValueSubject<boolean | null>;
|
|
52
|
+
canPlayLiveTailBuffer$: ValueSubject<boolean>;
|
|
52
53
|
canChangePlaybackSpeed$: ValueSubject<boolean | undefined>;
|
|
53
54
|
atLiveEdge$: ValueSubject<boolean | undefined>;
|
|
54
55
|
atLiveDurationEdge$: ValueSubject<boolean | undefined>;
|
package/types/player/types.d.ts
CHANGED
|
@@ -331,6 +331,10 @@ export interface IPlayerInfo {
|
|
|
331
331
|
* Играем ли мы сейчас самый актуальный кадр лайва
|
|
332
332
|
*/
|
|
333
333
|
atLiveEdge$: IValueObservable<boolean | undefined>;
|
|
334
|
+
/**
|
|
335
|
+
* Может ли плеер доиграть буффер законченной трансляции при перемотке
|
|
336
|
+
*/
|
|
337
|
+
canPlayLiveTailBuffer$: IValueObservable<boolean>;
|
|
334
338
|
/**
|
|
335
339
|
* Играем ли мы сейчас самый старый кадр лайва
|
|
336
340
|
*/
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { VideoFormat } from '../../../player/types';
|
|
2
2
|
import { type ITuningConfig } from '../../../utils/tuningConfig';
|
|
3
|
-
type FilterConstraints = Pick<ITuningConfig, 'useManagedMediaSource' | 'useOldMSEDetection'>;
|
|
4
|
-
export declare const filterAvailableFormats: (formats: VideoFormat[], { useManagedMediaSource, useOldMSEDetection }: FilterConstraints) => VideoFormat[];
|
|
5
3
|
type VodFormat = VideoFormat.MPEG | VideoFormat.DASH_SEP | VideoFormat.DASH_WEBM | VideoFormat.DASH_WEBM_AV1 | VideoFormat.DASH_STREAMS | VideoFormat.DASH_ONDEMAND | VideoFormat.HLS | VideoFormat.HLS_ONDEMAND;
|
|
6
4
|
type Constraints = Pick<ITuningConfig, 'webmCodec' | 'androidPreferredFormat' | 'preferCMAF' | 'preferWebRTC' | 'preferMultiStream'>;
|
|
7
5
|
/**
|
|
@@ -69,6 +69,7 @@ export interface IProviderOutput {
|
|
|
69
69
|
isBuffering$: IValueSubject<boolean>;
|
|
70
70
|
isLive$: IValueSubject<boolean | undefined>;
|
|
71
71
|
isLiveEnded$: IValueSubject<boolean | null>;
|
|
72
|
+
canPlayLiveTailBuffer$: IValueSubject<boolean>;
|
|
72
73
|
isLowLatency$: IValueSubject<boolean | undefined>;
|
|
73
74
|
liveTime$: IValueSubject<Milliseconds | undefined>;
|
|
74
75
|
liveBufferTime$: IValueSubject<Milliseconds | undefined>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Box } from './box';
|
|
1
|
+
import { type Box, ValidBox } from './box';
|
|
2
2
|
/**
|
|
3
3
|
* Queryable object to get needed boxes from structure
|
|
4
4
|
*/
|
|
@@ -12,9 +12,9 @@ export declare class BoxModel {
|
|
|
12
12
|
/**
|
|
13
13
|
* Returns first box of given type
|
|
14
14
|
*/
|
|
15
|
-
find<T extends Box>(type: string): T | null;
|
|
15
|
+
find<T extends Box>(type: string): ValidBox<T> | null;
|
|
16
16
|
/**
|
|
17
|
-
* Returns all boxes of given
|
|
17
|
+
* Returns all boxes of given type
|
|
18
18
|
*/
|
|
19
|
-
findAll<T extends Box>(type: string): T[];
|
|
19
|
+
findAll<T extends Box>(type: string): ValidBox<T>[];
|
|
20
20
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { type BoxParser } from './BoxParser';
|
|
2
|
+
export type ValidBox<T extends Box> = T & {
|
|
3
|
+
valid: true;
|
|
4
|
+
size: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const isValid: <T extends Box>(box: T) => box is ValidBox<T>;
|
|
2
7
|
/**
|
|
3
8
|
* Generic boxes description
|
|
4
9
|
*
|
|
@@ -19,10 +24,9 @@ export declare class Box {
|
|
|
19
24
|
source: DataView;
|
|
20
25
|
boxParser: BoxParser;
|
|
21
26
|
type: string;
|
|
22
|
-
|
|
23
|
-
size64: number;
|
|
24
|
-
usertype: number;
|
|
27
|
+
size: number | undefined;
|
|
25
28
|
content: DataView;
|
|
29
|
+
valid: boolean;
|
|
26
30
|
children: Box[];
|
|
27
31
|
/**
|
|
28
32
|
* Next byte in source buffer to be read
|
|
@@ -32,10 +36,6 @@ export declare class Box {
|
|
|
32
36
|
* for compatibility with old Box type
|
|
33
37
|
*/
|
|
34
38
|
get id(): string;
|
|
35
|
-
/**
|
|
36
|
-
*
|
|
37
|
-
*/
|
|
38
|
-
get size(): number;
|
|
39
39
|
constructor(source: DataView, boxParser: BoxParser);
|
|
40
40
|
/**
|
|
41
41
|
* Internal method to scan for children
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
export { Box } from '../box';
|
|
2
|
-
export { UnknownBox } from '
|
|
3
|
-
export { UuidBox } from '
|
|
4
|
-
export { FtypBox } from '
|
|
5
|
-
export { MoovBox } from '
|
|
6
|
-
export { MvhdBox } from '
|
|
7
|
-
export { MoofBox } from '
|
|
8
|
-
export { MdatBox } from '
|
|
9
|
-
export { SidxBox, SidxBoxSegment } from '
|
|
10
|
-
export { TrakBox } from '
|
|
11
|
-
export { Sv3dBox } from '
|
|
12
|
-
export { St3dBox } from '
|
|
13
|
-
export { PrhdBox } from '
|
|
14
|
-
export { EquiBox } from '
|
|
15
|
-
export { MdiaBox } from '
|
|
16
|
-
export { TkhdBox } from '
|
|
17
|
-
export { MinfBox } from '
|
|
18
|
-
export { ProjBox } from '
|
|
19
|
-
export { MfhdBox } from '
|
|
20
|
-
export { TrafBox } from '
|
|
21
|
-
export { TfhdBox } from '
|
|
22
|
-
export { TfdtBox } from '
|
|
23
|
-
export { TrunBox } from '
|
|
24
|
-
export { StblBox } from '
|
|
25
|
-
export { StsdBox } from '
|
|
26
|
-
export { Avc1Box } from '
|
|
2
|
+
export { UnknownBox } from './unknown';
|
|
3
|
+
export { UuidBox } from './uuid';
|
|
4
|
+
export { FtypBox } from './ftyp';
|
|
5
|
+
export { MoovBox } from './moov';
|
|
6
|
+
export { MvhdBox } from './mvhd';
|
|
7
|
+
export { MoofBox } from './moof';
|
|
8
|
+
export { MdatBox } from './mdat';
|
|
9
|
+
export { SidxBox, SidxBoxSegment } from './sidx';
|
|
10
|
+
export { TrakBox } from './trak';
|
|
11
|
+
export { Sv3dBox } from './sv3d';
|
|
12
|
+
export { St3dBox } from './st3d';
|
|
13
|
+
export { PrhdBox } from './prhd';
|
|
14
|
+
export { EquiBox } from './equi';
|
|
15
|
+
export { MdiaBox } from './mdia';
|
|
16
|
+
export { TkhdBox } from './tkhd';
|
|
17
|
+
export { MinfBox } from './minf';
|
|
18
|
+
export { ProjBox } from './proj';
|
|
19
|
+
export { MfhdBox } from './mfhd';
|
|
20
|
+
export { TrafBox } from './traf';
|
|
21
|
+
export { TfhdBox } from './tfhd';
|
|
22
|
+
export { TfdtBox } from './tfdt';
|
|
23
|
+
export { TrunBox } from './trun';
|
|
24
|
+
export { StblBox } from './stbl';
|
|
25
|
+
export { StsdBox } from './stsd';
|
|
26
|
+
export { Avc1Box } from './avc1';
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import { Box } from '../box';
|
|
2
2
|
import { BoxParser } from '../BoxParser';
|
|
3
3
|
import { Milliseconds } from '@vkontakte/videoplayer-shared';
|
|
4
|
-
export declare
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
export declare const enum UserType {
|
|
5
|
+
ONDEMAND_LIVE_TIME = "ondemandlivejson"
|
|
6
|
+
}
|
|
7
|
+
export type ServerLiveProcessingTimes = {
|
|
8
|
+
received: Milliseconds;
|
|
9
|
+
prepared: Milliseconds;
|
|
10
|
+
};
|
|
11
|
+
export type KNOWN_UUID_BOXES = {
|
|
12
|
+
[UserType.ONDEMAND_LIVE_TIME]: ServerLiveProcessingTimes;
|
|
13
|
+
};
|
|
14
|
+
export declare class UuidBox<T extends UserType> extends Box {
|
|
15
|
+
userData: KNOWN_UUID_BOXES[T];
|
|
10
16
|
constructor(source: DataView, boxParser: BoxParser);
|
|
17
|
+
private parseData;
|
|
11
18
|
}
|
|
@@ -104,6 +104,7 @@ export type ITuningConfig = {
|
|
|
104
104
|
sourceOpenTimeout: number;
|
|
105
105
|
vktvAbrThrottle: number;
|
|
106
106
|
timeupdateEventTickThrottle: number;
|
|
107
|
+
fetcherBufferOptimisation: boolean;
|
|
107
108
|
};
|
|
108
109
|
dashCmafLive: {
|
|
109
110
|
maxActiveLiveOffset: Milliseconds;
|
|
@@ -112,6 +113,7 @@ export type ITuningConfig = {
|
|
|
112
113
|
normalizedActualBufferOffset: Milliseconds;
|
|
113
114
|
offsetCalculationError: Milliseconds;
|
|
114
115
|
maxLiveDuration: Seconds;
|
|
116
|
+
catchupLiveForMutedInactiveTab: boolean;
|
|
115
117
|
lowLatency: {
|
|
116
118
|
maxTargetOffset: Milliseconds;
|
|
117
119
|
maxTargetOffsetDeviation: Milliseconds;
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import { VideoFormat } from '../player/types';
|
|
1
|
+
import { type ISources, VideoFormat } from '../player/types';
|
|
2
|
+
import type { ITuningConfig } from '../utils/tuningConfig';
|
|
3
|
+
type FilterConstraints = Pick<ITuningConfig, 'useManagedMediaSource' | 'useOldMSEDetection'>;
|
|
4
|
+
export declare const filterAvailableFormats: (formats: VideoFormat[], { useManagedMediaSource, useOldMSEDetection }: FilterConstraints) => VideoFormat[];
|
|
2
5
|
export declare const isLiveFormat: (format: VideoFormat) => boolean;
|
|
6
|
+
export declare const areValidLiveRecordSources: (sources: ISources, constraints: FilterConstraints) => boolean;
|
|
7
|
+
export {};
|