@vkontakte/videoplayer-core 2.0.124-dev.d0d82c74.0 → 2.0.124-dev.d93f994c.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 +22 -22
- package/es2015.esm.js +21 -21
- package/es2018.cjs.js +22 -22
- package/es2018.esm.js +21 -21
- package/esnext.cjs.js +17 -17
- package/esnext.esm.js +17 -17
- package/evergreen.esm.js +15 -15
- package/package.json +2 -2
- package/types/index.d.ts +2 -2
- package/types/player/Player.d.ts +3 -1
- package/types/player/types.d.ts +13 -0
- package/types/providers/DashProvider/lib/buffer.d.ts +2 -2
- package/types/providers/DashProvider/lib/player.d.ts +1 -0
- package/types/utils/qualityLimits.d.ts +9 -0
- package/types/utils/tuningConfig.d.ts +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer-core",
|
|
3
|
-
"version": "2.0.124-dev.
|
|
3
|
+
"version": "2.0.124-dev.d93f994c.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.53-dev.
|
|
52
|
+
"@vkontakte/videoplayer-shared": "1.0.53-dev.72066147.0",
|
|
53
53
|
"hls.js": "~1.4.7"
|
|
54
54
|
}
|
|
55
55
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VERSION } from './env';
|
|
2
|
-
import { VideoFormat, IMpegSource, IDashSource, IHLSSource, IDashURLSource, IHLSLiveSource, ISeekRequest, URLSource, RawSource, URLSourceWithSeek, Surface } from './player/types';
|
|
2
|
+
import { VideoFormat, IMpegSource, IDashSource, IHLSSource, IDashURLSource, IHLSLiveSource, ISeekRequest, URLSource, RawSource, URLSourceWithSeek, Surface, PredefinedQualityLimits } from './player/types';
|
|
3
3
|
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';
|
|
@@ -9,4 +9,4 @@ import { Subscription, Observable, Subject, ValueSubject, VideoQuality } from '@
|
|
|
9
9
|
* @deprecated
|
|
10
10
|
*/
|
|
11
11
|
declare const SDK_VERSION: string;
|
|
12
|
-
export { Player, IPlayer, PlaybackState, IPlayerInfo, IPlayerEvents, IConfig, IOptionalTuningConfig, ILogEntry, ISources, IExternalTextTrack, ITextTrack, ChromecastState, HttpConnectionType, Surface, Subscription, ISubscription, IUnsubscriber, IObservable, IEmitter, IValueObservable, IValue, IOperator, IListener, VideoFormat, IMpegSource, IDashSource, IDashURLSource, IHLSSource, IHLSLiveSource, URLSource, RawSource, URLSourceWithSeek, VideoQuality, ExactVideoQuality, Observable, Subject, ValueSubject, IRange, ISeekRequest, ICueSettings, VERSION, SDK_VERSION, PlaybackRate, IVideoStream, IAudioStream, };
|
|
12
|
+
export { Player, IPlayer, PlaybackState, IPlayerInfo, IPlayerEvents, IConfig, IOptionalTuningConfig, ILogEntry, ISources, IExternalTextTrack, ITextTrack, ChromecastState, HttpConnectionType, Surface, Subscription, ISubscription, IUnsubscriber, IObservable, IEmitter, IValueObservable, IValue, IOperator, IListener, VideoFormat, IMpegSource, IDashSource, IDashURLSource, IHLSSource, IHLSLiveSource, URLSource, RawSource, URLSourceWithSeek, VideoQuality, ExactVideoQuality, Observable, Subject, ValueSubject, IRange, ISeekRequest, ICueSettings, VERSION, SDK_VERSION, PlaybackRate, IVideoStream, IAudioStream, PredefinedQualityLimits, };
|
package/types/player/Player.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IOptionalTuningConfig } from '../utils/tuningConfig';
|
|
2
2
|
import { IError, ILogEntry, Seconds, Subject, ValueSubject, QualityLimits, VideoQuality, ITracer } from '@vkontakte/videoplayer-shared';
|
|
3
|
-
import { ChromecastState, HttpConnectionType, IAudioStream, IConfig, ICueSettings, IExternalTextTrack, IPlayer, ISeekRequest, ISources, ITextTrack, IVideoStream, PlaybackRate, PlaybackState, StartEnd, Surface, VideoFormat } from './types';
|
|
3
|
+
import { ChromecastState, HttpConnectionType, IAudioStream, IConfig, ICueSettings, IExternalTextTrack, IPlayer, ISeekRequest, ISources, ITextTrack, IVideoStream, PlaybackRate, PlaybackState, PredefinedQualityLimits, StartEnd, Surface, VideoFormat } from './types';
|
|
4
4
|
export default class Player implements IPlayer {
|
|
5
5
|
private subscription;
|
|
6
6
|
private domContainer;
|
|
@@ -34,6 +34,7 @@ export default class Player implements IPlayer {
|
|
|
34
34
|
isAutoQualityEnabled$: ValueSubject<boolean>;
|
|
35
35
|
autoQualityLimitingAvailable$: ValueSubject<boolean>;
|
|
36
36
|
autoQualityLimits$: ValueSubject<QualityLimits>;
|
|
37
|
+
predefinedQualityLimitType$: ValueSubject<PredefinedQualityLimits>;
|
|
37
38
|
availableAudioStreams$: ValueSubject<IAudioStream[]>;
|
|
38
39
|
currentAudioStream$: ValueSubject<IVideoStream | undefined>;
|
|
39
40
|
availableAudioTracks$: ValueSubject<import("./types").IBaseTrack[]>;
|
|
@@ -126,6 +127,7 @@ export default class Player implements IPlayer {
|
|
|
126
127
|
setQuality(quality: VideoQuality): IPlayer;
|
|
127
128
|
setAutoQuality(enable: boolean): IPlayer;
|
|
128
129
|
setAutoQualityLimits(limits: QualityLimits): IPlayer;
|
|
130
|
+
setPredefinedQualityLimits(type: PredefinedQualityLimits): this;
|
|
129
131
|
setPlaybackRate(playbackRate: PlaybackRate): IPlayer;
|
|
130
132
|
setExternalTextTracks(tracks: Omit<IExternalTextTrack, 'type'>[]): IPlayer;
|
|
131
133
|
selectTextTrack(id: ITextTrack['id'] | undefined): IPlayer;
|
package/types/player/types.d.ts
CHANGED
|
@@ -38,6 +38,10 @@ export interface IPlayer {
|
|
|
38
38
|
setQuality(quality: VideoQuality): IPlayer;
|
|
39
39
|
setAutoQuality(enable: boolean): IPlayer;
|
|
40
40
|
setAutoQualityLimits(limit: QualityLimits): IPlayer;
|
|
41
|
+
/**
|
|
42
|
+
* Установить предопределенные настройки лимитов.
|
|
43
|
+
*/
|
|
44
|
+
setPredefinedQualityLimits(type: PredefinedQualityLimits): IPlayer;
|
|
41
45
|
startCameraManualRotation(mx: number, my: number): IPlayer;
|
|
42
46
|
stopCameraManualRotation(immediate: boolean): IPlayer;
|
|
43
47
|
moveCameraFocusPX(mx: Pixel, my: Pixel, dt: number): IPlayer;
|
|
@@ -262,6 +266,10 @@ export interface IPlayerInfo {
|
|
|
262
266
|
* Текущие лимиты авто-качества
|
|
263
267
|
*/
|
|
264
268
|
autoQualityLimits$: IValueObservable<QualityLimits>;
|
|
269
|
+
/**
|
|
270
|
+
* Показывает, подходят ли текущие лимиты качества под.
|
|
271
|
+
*/
|
|
272
|
+
predefinedQualityLimitType$: IValueObservable<PredefinedQualityLimits>;
|
|
265
273
|
/**
|
|
266
274
|
* Текущая скорость воспроизведения
|
|
267
275
|
*/
|
|
@@ -570,4 +578,9 @@ export declare enum Surface {
|
|
|
570
578
|
PIP = "pip",
|
|
571
579
|
INVISIBLE = "invisible"
|
|
572
580
|
}
|
|
581
|
+
export declare enum PredefinedQualityLimits {
|
|
582
|
+
TRAFFIC_SAVING = "traffic_saving",
|
|
583
|
+
HIGH_QUALITY = "high_quality",
|
|
584
|
+
UNKNOWN = "unknown"
|
|
585
|
+
}
|
|
573
586
|
export {};
|
|
@@ -62,8 +62,8 @@ export declare class BufferManager {
|
|
|
62
62
|
private loadByteRangeSegmentsTimeoutId;
|
|
63
63
|
constructor(kind: StreamKind, mediaSource: MediaSource, representations: Representation[], { fetcher, tuning, getCurrentPosition, isActiveLowLatency, compatibilityMode, manifest }: Dependencies);
|
|
64
64
|
startWith: (param_0: string) => Promise<void | undefined>;
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
switchToWithPreviousAbort(newRepresentationId: Representation['id'], dropBuffer?: boolean): void;
|
|
66
|
+
switchTo: (param_0: string, param_1: boolean | undefined) => Promise<void | undefined>;
|
|
67
67
|
switchToOld: (param_0: string, param_1: boolean | undefined) => Promise<void | undefined>;
|
|
68
68
|
warmUpMediaSource(): void;
|
|
69
69
|
abort(): Promise<boolean>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PredefinedQualityLimits } from '../player/types';
|
|
2
|
+
import { ExactVideoQuality, QualityLimits } from '@vkontakte/videoplayer-shared';
|
|
3
|
+
type Params = {
|
|
4
|
+
limits: QualityLimits;
|
|
5
|
+
highQualityLimit: ExactVideoQuality;
|
|
6
|
+
trafficSavingLimit: ExactVideoQuality;
|
|
7
|
+
};
|
|
8
|
+
export declare function getQualityLimitsPredefinedType({ limits, highQualityLimit, trafficSavingLimit }: Params): PredefinedQualityLimits;
|
|
9
|
+
export {};
|
|
@@ -43,6 +43,8 @@ export type ITuningConfig = {
|
|
|
43
43
|
trackCooldownDecreaseQuality: Milliseconds;
|
|
44
44
|
backgroundVideoQualityLimit: VideoQuality;
|
|
45
45
|
activeVideoAreaThreshold: number;
|
|
46
|
+
trafficSavingLimit: ExactVideoQuality;
|
|
47
|
+
highQualityLimit: ExactVideoQuality;
|
|
46
48
|
};
|
|
47
49
|
droppedFramesChecker: {
|
|
48
50
|
enabled: boolean;
|
|
@@ -150,6 +152,7 @@ export type ITuningConfig = {
|
|
|
150
152
|
useManagedMediaSource: boolean;
|
|
151
153
|
useNewSwitchTo: boolean;
|
|
152
154
|
useSafariEndlessRequestBugfix: boolean;
|
|
155
|
+
useRefactoredSearchGap: boolean;
|
|
153
156
|
isAudioDisabled: boolean;
|
|
154
157
|
autoplayOnlyInActiveTab: boolean;
|
|
155
158
|
dynamicImportTimeout: Milliseconds;
|