@vkontakte/videoplayer-core 2.0.130-dev.e8012122.0 → 2.0.130-dev.fcd2b0a1.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 +28 -28
- package/es2015.esm.js +27 -27
- package/es2018.cjs.js +22 -22
- package/es2018.esm.js +22 -22
- package/es2024.cjs.js +126 -0
- package/es2024.esm.js +126 -0
- package/esnext.cjs.js +24 -24
- package/esnext.esm.js +24 -24
- package/evergreen.esm.js +23 -23
- package/package.json +17 -12
- package/types/player/types.d.ts +5 -8
- package/types/providers/ProviderContainer/index.d.ts +2 -1
- package/types/providers/types.d.ts +2 -1
- package/types/providers/utils/HTMLVideoElement/observable.d.ts +1 -0
- package/types/providers/utils/syncDesiredState.d.ts +3 -1
- package/types/utils/autoSelectTrack.d.ts +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer-core",
|
|
3
|
-
"version": "2.0.130-dev.
|
|
3
|
+
"version": "2.0.130-dev.fcd2b0a1.0",
|
|
4
4
|
"author": "vk.com",
|
|
5
5
|
"description": "Videoplayer core library based on the vk.com platform",
|
|
6
6
|
"homepage": "https://vk.com",
|
|
@@ -11,29 +11,34 @@
|
|
|
11
11
|
"type": "module",
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
14
|
+
"types": "./types/index.d.ts",
|
|
14
15
|
"import": "./esnext.esm.js",
|
|
15
|
-
"require": "./esnext.cjs.js"
|
|
16
|
-
"types": "./types/index.d.ts"
|
|
16
|
+
"require": "./esnext.cjs.js"
|
|
17
17
|
},
|
|
18
18
|
"./evergreen": {
|
|
19
|
+
"types": "./types/index.d.ts",
|
|
19
20
|
"import": "./evergreen.esm.js",
|
|
20
|
-
"require": "./evergreen.cjs.js"
|
|
21
|
-
"types": "./types/index.d.ts"
|
|
21
|
+
"require": "./evergreen.cjs.js"
|
|
22
22
|
},
|
|
23
23
|
"./esnext": {
|
|
24
|
+
"types": "./types/index.d.ts",
|
|
24
25
|
"import": "./esnext.esm.js",
|
|
25
|
-
"require": "./esnext.cjs.js"
|
|
26
|
-
|
|
26
|
+
"require": "./esnext.cjs.js"
|
|
27
|
+
},
|
|
28
|
+
"./es2024": {
|
|
29
|
+
"types": "./types/index.d.ts",
|
|
30
|
+
"import": "./es2024.esm.js",
|
|
31
|
+
"require": "./es2024.cjs.js"
|
|
27
32
|
},
|
|
28
33
|
"./es2018": {
|
|
34
|
+
"types": "./types/index.d.ts",
|
|
29
35
|
"import": "./es2018.esm.js",
|
|
30
|
-
"require": "./es2018.cjs.js"
|
|
31
|
-
"types": "./types/index.d.ts"
|
|
36
|
+
"require": "./es2018.cjs.js"
|
|
32
37
|
},
|
|
33
38
|
"./es2015": {
|
|
39
|
+
"types": "./types/index.d.ts",
|
|
34
40
|
"import": "./es2015.esm.js",
|
|
35
|
-
"require": "./es2015.cjs.js"
|
|
36
|
-
"types": "./types/index.d.ts"
|
|
41
|
+
"require": "./es2015.cjs.js"
|
|
37
42
|
},
|
|
38
43
|
"./evergreen.esm.js": "./evergeen.esm.js",
|
|
39
44
|
"./esnext.esm.js": "./esnext.esm.js",
|
|
@@ -49,7 +54,7 @@
|
|
|
49
54
|
"**/*.d.ts"
|
|
50
55
|
],
|
|
51
56
|
"dependencies": {
|
|
52
|
-
"@vkontakte/videoplayer-shared": "1.0.58-dev.
|
|
57
|
+
"@vkontakte/videoplayer-shared": "1.0.58-dev.0533aff8.0",
|
|
53
58
|
"hls.js": "~1.4.7"
|
|
54
59
|
}
|
|
55
60
|
}
|
package/types/player/types.d.ts
CHANGED
|
@@ -430,6 +430,7 @@ export interface IConfig {
|
|
|
430
430
|
meta?: IMetadata;
|
|
431
431
|
failoverHosts?: string[];
|
|
432
432
|
volumeMultiplier?: number;
|
|
433
|
+
panelSize?: IRectangle;
|
|
433
434
|
}
|
|
434
435
|
export interface ISources {
|
|
435
436
|
[VideoFormat.MPEG]?: IMpegSource;
|
|
@@ -477,24 +478,20 @@ export declare enum VideoFormat {
|
|
|
477
478
|
/** @deprecated Больше не транскодируется */
|
|
478
479
|
DASH = "DASH",// "Старый" h264 даш, слитный: Аудиодорожка слита с видео
|
|
479
480
|
DASH_SEP = "DASH_SEP",// h264, но аудиодорожка отделена
|
|
480
|
-
/** @deprecated Используйте DASH_SEP */
|
|
481
|
-
DASH_SEP_VK = "DASH_SEP",
|
|
481
|
+
/** @deprecated Используйте DASH_SEP */ DASH_SEP_VK = "DASH_SEP",
|
|
482
482
|
DASH_WEBM = "DASH_WEBM",// Видео закодировано в VP9, аудио в opus, контейнер webm
|
|
483
483
|
DASH_WEBM_AV1 = "DASH_WEBM_AV1",// Видео закодировано в AV1, остальное как _WEBM
|
|
484
484
|
DASH_STREAMS = "DASH_STREAMS",// AdaptationSet может быть несколько. На текущий момент различаются только языки аудио. Возможно позже и кодеки будут. Пока H.264/AAC
|
|
485
|
-
/** @deprecated Используйте DASH_WEBM */
|
|
486
|
-
DASH_WEBM_VK = "DASH_WEBM",
|
|
485
|
+
/** @deprecated Используйте DASH_WEBM */ DASH_WEBM_VK = "DASH_WEBM",
|
|
487
486
|
DASH_ONDEMAND = "DASH_ONDEMAND",// На бэке сегменты транскодируются на лету. Кодек H.264. Формат манифеста отличается, SegmentTemplate вместо SegmentBase
|
|
488
|
-
/** @deprecated Используйте DASH_ONDEMAND */
|
|
489
|
-
DASH_ONDEMAND_VK = "DASH_ONDEMAND",
|
|
487
|
+
/** @deprecated Используйте DASH_ONDEMAND */ DASH_ONDEMAND_VK = "DASH_ONDEMAND",
|
|
490
488
|
DASH_LIVE = "DASH_LIVE",
|
|
491
489
|
DASH_LIVE_CMAF = "DASH_LIVE_CMAF",
|
|
492
490
|
/** @deprecated */
|
|
493
491
|
DASH_LIVE_WEBM = "DASH_LIVE_WEBM",
|
|
494
492
|
HLS = "HLS",
|
|
495
493
|
HLS_ONDEMAND = "HLS_ONDEMAND",
|
|
496
|
-
/** @deprecated Используйте HLS */
|
|
497
|
-
HLS_JS = "HLS",
|
|
494
|
+
/** @deprecated Используйте HLS */ HLS_JS = "HLS",
|
|
498
495
|
HLS_LIVE = "HLS_LIVE",
|
|
499
496
|
HLS_LIVE_CMAF = "HLS_LIVE_CMAF",
|
|
500
497
|
WEB_RTC_LIVE = "WEB_RTC_LIVE"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IMetadata, ISources, VideoFormat } from '../../player/types';
|
|
2
2
|
import { ITuningConfig } from '../../utils/tuningConfig';
|
|
3
|
-
import { IError, ISubject, IValueSubject } from '@vkontakte/videoplayer-shared';
|
|
3
|
+
import { IError, ISubject, IValueSubject, IRectangle } from '@vkontakte/videoplayer-shared';
|
|
4
4
|
import { IDesiredState, IProviderDependencies, IProviderOutput } from '../types';
|
|
5
5
|
import { IProviderContainer, IProviderEntry } from './types';
|
|
6
6
|
interface IParams extends IProviderDependencies {
|
|
@@ -11,6 +11,7 @@ interface IParams extends IProviderDependencies {
|
|
|
11
11
|
desiredState: IDesiredState;
|
|
12
12
|
tuning: ITuningConfig;
|
|
13
13
|
volumeMultiplier?: number;
|
|
14
|
+
panelSize?: IRectangle;
|
|
14
15
|
}
|
|
15
16
|
export default class ProviderContainer implements IProviderContainer {
|
|
16
17
|
current$: IValueSubject<IProviderEntry>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ITuningConfig } from '../utils/tuningConfig';
|
|
2
|
-
import { ILogger, ISubject, IValueSubject, Milliseconds, Seconds, IRange, IError, QualityLimits, IWarning, IComponentLogger, ITracer } from '@vkontakte/videoplayer-shared';
|
|
2
|
+
import { ILogger, ISubject, IValueSubject, Milliseconds, Seconds, IRange, IError, QualityLimits, IWarning, IComponentLogger, ITracer, IRectangle } from '@vkontakte/videoplayer-shared';
|
|
3
3
|
import { IChromecastInitializer } from '../providers/ChromecastProvider/ChromecastInitializer/types';
|
|
4
4
|
import { HttpConnectionType, IAudioStream, IAudioTrack, ICueSettings, ISources, IVideoStream, SeekState } from '../player/types';
|
|
5
5
|
import { IExternalTextTrack, IInternalTextTrack, ITextTrack, IVideoTrack, IVolumeState, PlaybackState, PlaybackRate } from '../player/types';
|
|
@@ -26,6 +26,7 @@ export interface IProviderParams<TSourceType> extends IProviderDependencies {
|
|
|
26
26
|
desiredState: IDesiredState;
|
|
27
27
|
output: IProviderOutput;
|
|
28
28
|
tuning: ITuningConfig;
|
|
29
|
+
panelSize?: IRectangle;
|
|
29
30
|
}
|
|
30
31
|
export interface IDesiredState {
|
|
31
32
|
playbackState: IStateMachine<PlaybackState>;
|
|
@@ -24,5 +24,6 @@ export interface IObservableVideo {
|
|
|
24
24
|
inFullscreen$: IValueObservable<boolean>;
|
|
25
25
|
enterPip$: IObservable<PictureInPictureEvent>;
|
|
26
26
|
leavePip$: IObservable<PictureInPictureEvent>;
|
|
27
|
+
destroy: () => void;
|
|
27
28
|
}
|
|
28
29
|
export declare const observe: (video: HTMLVideoElement) => IObservableVideo;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { IListener, IObservable, ISubscription } from '@vkontakte/videoplayer-shared';
|
|
2
2
|
import { IVolumeState, PlaybackRate } from '../../player/types';
|
|
3
3
|
import { IStateMachine } from '../../utils/StateMachine/types';
|
|
4
|
-
declare const syncDesiredState: <Value>(desiredState: IStateMachine<Value | undefined>, get: () => Value | undefined,
|
|
4
|
+
declare const syncDesiredState: <Value>(desiredState: IStateMachine<Value | undefined>, get: () => Value | undefined, // Текущее значение состояние
|
|
5
|
+
set: (value: Value | undefined) => void, // Применение нового значения
|
|
6
|
+
{ equal, changed$, onError, }?: {
|
|
5
7
|
equal?: (a: Value | undefined, b: Value | undefined) => boolean;
|
|
6
8
|
changed$?: IObservable<Value | undefined>;
|
|
7
9
|
onError?: IListener<Error | unknown>;
|
|
@@ -16,6 +16,7 @@ interface IConstraints<T extends IBaseTrack> {
|
|
|
16
16
|
stallsVideoMaxQualityLimit?: ExactVideoQuality;
|
|
17
17
|
stallsPredictedThroughput?: Kbps;
|
|
18
18
|
abrLogger: IComponentLogger;
|
|
19
|
+
panelSize?: IRectangle;
|
|
19
20
|
}
|
|
20
21
|
export declare class TrackHistory<T extends IBaseTrack> {
|
|
21
22
|
last: T | undefined;
|
|
@@ -26,6 +27,6 @@ export declare class TrackHistory<T extends IBaseTrack> {
|
|
|
26
27
|
}
|
|
27
28
|
export declare const defaultEmptyArrayErrorMessage = "Assertion \"ABR Tracks is empty array\" failed";
|
|
28
29
|
export declare const getMinPossibleAudioForVideo: (videoTrack: IVideoTrack, videoTracks: IVideoTrack[], audioTracks: IAudioTrack[], minVideoAudioRatio: number) => IAudioTrack | undefined;
|
|
29
|
-
export declare const autoSelectVideoTrack: (videoTracks: IVideoTrack[], { container, estimatedThroughput, tuning, limits, reserve, forwardBufferHealth, playbackRate, current, history, visible, droppedVideoMaxQualityLimit, stallsVideoMaxQualityLimit, stallsPredictedThroughput, abrLogger, }: IConstraints<IVideoTrack>) => IVideoTrack;
|
|
30
|
+
export declare const autoSelectVideoTrack: (videoTracks: IVideoTrack[], { container, estimatedThroughput, tuning, limits, reserve, forwardBufferHealth, playbackRate, current, history, visible, droppedVideoMaxQualityLimit, stallsVideoMaxQualityLimit, stallsPredictedThroughput, abrLogger, panelSize, }: IConstraints<IVideoTrack>) => IVideoTrack;
|
|
30
31
|
export declare const autoSelectAudioTrackForVideo: (selectedVideoTrack: IVideoTrack, videoTracks: IVideoTrack[], audioTracks: IAudioTrack[], { estimatedThroughput, tuning, playbackRate, forwardBufferHealth, history, abrLogger, stallsPredictedThroughput, }: IConstraints<IAudioTrack>) => IAudioTrack | undefined;
|
|
31
32
|
export {};
|