@vkontakte/videoplayer-core 2.0.105-dev.17a808f4.0 → 2.0.105-dev.330f23f2.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 +24 -24
- package/es2015.esm.js +23 -23
- package/es2018.cjs.js +24 -24
- package/es2018.esm.js +23 -23
- package/esnext.cjs.js +23 -23
- package/esnext.esm.js +23 -23
- package/evergreen.esm.js +14 -14
- package/package.json +2 -2
- package/types/player/types.d.ts +3 -0
- package/types/providers/DashProvider/baseDashProvider.d.ts +1 -1
- package/types/providers/DashProvider/consts.d.ts +1 -0
- package/types/providers/DashProvider/lib/buffer.d.ts +6 -1
- package/types/providers/DashProvider/lib/player.d.ts +1 -1
- package/types/providers/DashProvider/lib/types.d.ts +4 -4
- package/types/providers/DashProvider/lib/utils.d.ts +3 -1
- package/types/providers/ProviderContainer/index.d.ts +3 -0
- package/types/providers/ProviderContainer/types.d.ts +1 -0
- package/types/providers/types.d.ts +1 -0
- package/types/utils/VolumeMultiplierManager/VolumeMultiplierManager.d.ts +17 -0
- package/types/utils/VolumeMultiplierManager/audioContext.d.ts +9 -0
- package/types/utils/VolumeMultiplierManager/index.d.ts +1 -0
- package/types/utils/hdr.d.ts +2 -0
- package/types/utils/tuningConfig.d.ts +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer-core",
|
|
3
|
-
"version": "2.0.105-dev.
|
|
3
|
+
"version": "2.0.105-dev.330f23f2.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.37-dev.
|
|
52
|
+
"@vkontakte/videoplayer-shared": "1.0.37-dev.83782ae3.0",
|
|
53
53
|
"hls.js": "~1.4.7"
|
|
54
54
|
}
|
|
55
55
|
}
|
package/types/player/types.d.ts
CHANGED
|
@@ -394,6 +394,7 @@ export interface IConfig {
|
|
|
394
394
|
sources: ISources;
|
|
395
395
|
meta?: IMetadata;
|
|
396
396
|
failoverHosts?: string[];
|
|
397
|
+
volumeMultiplier?: number;
|
|
397
398
|
}
|
|
398
399
|
export interface ISources {
|
|
399
400
|
[VideoFormat.MPEG]?: IMpegSource;
|
|
@@ -467,6 +468,7 @@ export interface IVideoStream {
|
|
|
467
468
|
id: string;
|
|
468
469
|
language?: string;
|
|
469
470
|
hdr?: boolean;
|
|
471
|
+
codec?: string;
|
|
470
472
|
label?: string;
|
|
471
473
|
}
|
|
472
474
|
export interface IVideoTrack {
|
|
@@ -480,6 +482,7 @@ export interface IAudioStream {
|
|
|
480
482
|
id: string;
|
|
481
483
|
language?: string;
|
|
482
484
|
label?: string;
|
|
485
|
+
codec?: string;
|
|
483
486
|
isDefault?: boolean;
|
|
484
487
|
}
|
|
485
488
|
export interface IAudioTrack {
|
|
@@ -46,7 +46,7 @@ export default abstract class BaseDashProvider implements IProvider {
|
|
|
46
46
|
protected abstract seek(position: Milliseconds, forcePrecise: boolean): void;
|
|
47
47
|
protected getProviderSubscriptionInfo(): IProviderSubscriptionInfo;
|
|
48
48
|
protected subscribe(): void;
|
|
49
|
-
protected selectVideoAudioRepresentations(): [Representation, Representation] | undefined;
|
|
49
|
+
protected selectVideoAudioRepresentations(): [Representation, Representation | undefined] | undefined;
|
|
50
50
|
protected prepare(manifestOffset?: number): void;
|
|
51
51
|
protected syncPlayback: () => undefined;
|
|
52
52
|
protected init3DScene: (init: CommonInit) => void;
|
|
@@ -64,7 +64,8 @@ export declare class BufferManager {
|
|
|
64
64
|
getLiveSegmentsToLoadState(manifest: Manifest | null): IRange<Milliseconds> | undefined;
|
|
65
65
|
seekLive: (param_0: Stream[] | undefined) => Promise<void | undefined>;
|
|
66
66
|
updateLive(manifest: Manifest | null): void;
|
|
67
|
-
|
|
67
|
+
proceedLowLatencyLive(): void;
|
|
68
|
+
private updateLowLatencyLiveIfNeeded;
|
|
68
69
|
findSegmentStartTime(position: Milliseconds): Milliseconds | undefined;
|
|
69
70
|
setTarget(time: Milliseconds): void;
|
|
70
71
|
setPreloadOnly(preloadOnly: boolean): void;
|
|
@@ -88,11 +89,15 @@ export declare class BufferManager {
|
|
|
88
89
|
* @private
|
|
89
90
|
*/
|
|
90
91
|
private onSomeByteRangesDataLoaded;
|
|
92
|
+
private onSomeByteRangesDataLoadedOld;
|
|
93
|
+
private onSomeByteRangesDataLoadedNew;
|
|
91
94
|
private onSegmentFullyAppended;
|
|
92
95
|
private abortSegment;
|
|
93
96
|
private loadNextInit;
|
|
94
97
|
private loadInit;
|
|
95
98
|
private pruneBuffer;
|
|
99
|
+
private pruneBufferNew;
|
|
100
|
+
private pruneBufferOld;
|
|
96
101
|
private abortBuffer;
|
|
97
102
|
getDebugBufferState(): IRange<Milliseconds> | undefined;
|
|
98
103
|
private detectGaps;
|
|
@@ -47,7 +47,7 @@ export declare class Player {
|
|
|
47
47
|
livePositionFromPlayer$: IValueSubject<number>;
|
|
48
48
|
liveEstimatedDelay: ISmoothedValue;
|
|
49
49
|
timeInWaiting: number;
|
|
50
|
-
isActiveLowLatency
|
|
50
|
+
isActiveLowLatency$: IValueSubject<boolean>;
|
|
51
51
|
private isUpdatingLive;
|
|
52
52
|
private isJumpGapAfterSeekLive;
|
|
53
53
|
private liveLastSeekOffset;
|
|
@@ -8,10 +8,10 @@ export declare enum StreamKind {
|
|
|
8
8
|
TEXT = "text"
|
|
9
9
|
}
|
|
10
10
|
export declare enum LiveStatus {
|
|
11
|
-
ActiveLowLatency =
|
|
12
|
-
LiveWithTargetOffset =
|
|
13
|
-
LiveForwardBuffering =
|
|
14
|
-
None =
|
|
11
|
+
ActiveLowLatency = "active_low_latency",
|
|
12
|
+
LiveWithTargetOffset = "live_with_target_offset",
|
|
13
|
+
LiveForwardBuffering = "live_forward_buffering",
|
|
14
|
+
None = "none"
|
|
15
15
|
}
|
|
16
16
|
export declare enum Profile {
|
|
17
17
|
WEBM_AS_IN_SPEC = "urn:mpeg:dash:profile:webm-on-demand:2012",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Representation, Segment, SegmentReference, Stream, TemplateSegment, TemplateSegmentReference } from '../../../providers/DashProvider/lib/types';
|
|
2
|
-
import { IAudioTrack, IInternalTextTrack, IVideoTrack } from '../../../player/types';
|
|
2
|
+
import { IAudioStream, IAudioTrack, IInternalTextTrack, IVideoStream, IVideoTrack } from '../../../player/types';
|
|
3
3
|
export declare const representationToVideoTrack: ({ id, width, height, bitrate, fps, quality: qualityString }: Representation) => IVideoTrack | undefined;
|
|
4
4
|
export declare const representationToAudioTrack: ({ id, bitrate }: Representation) => IAudioTrack;
|
|
5
5
|
export declare const selectAudioForVideo: (videoTrack: IVideoTrack, videoTracks: IVideoTrack[], audioTracks: IAudioTrack[]) => IAudioTrack | undefined;
|
|
@@ -7,6 +7,8 @@ export declare const representationToTextTrack: ({ language, label }: Stream, {
|
|
|
7
7
|
url: string;
|
|
8
8
|
isAuto: boolean;
|
|
9
9
|
}) => IInternalTextTrack;
|
|
10
|
+
export declare const streamToIAudioStream: ({ id, language, label, codecs }: Stream) => IAudioStream;
|
|
11
|
+
export declare const streamToIVideoStream: ({ id, language, label, hdr, codecs }: Stream) => IVideoStream;
|
|
10
12
|
export declare const isTemplateSegment: (segment: Segment) => segment is TemplateSegment;
|
|
11
13
|
export declare const isTemplateSegmentReference: (segmentReference: SegmentReference) => segmentReference is TemplateSegmentReference;
|
|
12
14
|
export declare const isAbortError: (e: Error | unknown) => boolean;
|
|
@@ -10,11 +10,13 @@ interface IParams extends IProviderDependencies {
|
|
|
10
10
|
failoverHosts: string[];
|
|
11
11
|
desiredState: IDesiredState;
|
|
12
12
|
tuning: ITuningConfig;
|
|
13
|
+
volumeMultiplier?: number;
|
|
13
14
|
}
|
|
14
15
|
export default class ProviderContainer implements IProviderContainer {
|
|
15
16
|
current$: IValueSubject<IProviderEntry>;
|
|
16
17
|
providerError$: ISubject<IError>;
|
|
17
18
|
noAvailableProvidersError$: ISubject<VideoFormat | undefined>;
|
|
19
|
+
volumeMultiplierError$: ISubject<IError>;
|
|
18
20
|
providerOutput: IProviderOutput;
|
|
19
21
|
private subscription;
|
|
20
22
|
private screenFormatsIterator;
|
|
@@ -22,6 +24,7 @@ export default class ProviderContainer implements IProviderContainer {
|
|
|
22
24
|
private log;
|
|
23
25
|
private params;
|
|
24
26
|
private failoverIndex;
|
|
27
|
+
private volumeMultiplierManager;
|
|
25
28
|
constructor(params: IParams);
|
|
26
29
|
init(): void;
|
|
27
30
|
destroy(): void;
|
|
@@ -5,6 +5,7 @@ export interface IProviderContainer {
|
|
|
5
5
|
current$: IValueObservable<IProviderEntry>;
|
|
6
6
|
providerError$: ISubject<IError>;
|
|
7
7
|
noAvailableProvidersError$: ISubject<VideoFormat | undefined>;
|
|
8
|
+
volumeMultiplierError$: ISubject<IError>;
|
|
8
9
|
providerOutput: IProviderOutput;
|
|
9
10
|
init(): void;
|
|
10
11
|
destroy(): void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IError, ISubject, IValueSubject } from '@vkontakte/videoplayer-shared';
|
|
2
|
+
import { IProviderOutput } from '../../providers/types';
|
|
3
|
+
import { IProviderEntry } from '../../providers/ProviderContainer/types';
|
|
4
|
+
export declare class VolumeMultiplierManager {
|
|
5
|
+
private providerOutput;
|
|
6
|
+
private provider$;
|
|
7
|
+
private volumeMultiplierError$;
|
|
8
|
+
private volumeMultiplier;
|
|
9
|
+
private static errorId;
|
|
10
|
+
private subscriptions;
|
|
11
|
+
private lastAudioContextResumeId;
|
|
12
|
+
constructor(providerOutput: IProviderOutput, provider$: IValueSubject<IProviderEntry>, volumeMultiplierError$: ISubject<IError>, volumeMultiplier: number, enabled: boolean);
|
|
13
|
+
private subscribe;
|
|
14
|
+
private isSupported;
|
|
15
|
+
private initAudioContextOnce;
|
|
16
|
+
destroy(): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { VolumeMultiplierManager } from './VolumeMultiplierManager';
|
|
@@ -19,6 +19,7 @@ export type ITuningConfig = {
|
|
|
19
19
|
deviationFactor: number;
|
|
20
20
|
lowLatency: {
|
|
21
21
|
continuesByteSequenceInterval: Milliseconds;
|
|
22
|
+
maxLastEvaluationTimeout: Milliseconds;
|
|
22
23
|
};
|
|
23
24
|
};
|
|
24
25
|
autoTrackSelection: {
|
|
@@ -130,6 +131,8 @@ export type ITuningConfig = {
|
|
|
130
131
|
useDashAbortPartiallyFedSegment: boolean;
|
|
131
132
|
useNativeHLSTextTracks: boolean;
|
|
132
133
|
useManagedMediaSource: boolean;
|
|
134
|
+
useNewPruneBufferStrategy: boolean;
|
|
135
|
+
useNewPartialSegmentFeeding: boolean;
|
|
133
136
|
isAudioDisabled: boolean;
|
|
134
137
|
autoplayOnlyInActiveTab: boolean;
|
|
135
138
|
dynamicImportTimeout: Milliseconds;
|
|
@@ -159,6 +162,7 @@ export type ITuningConfig = {
|
|
|
159
162
|
speedFadeTime: Milliseconds;
|
|
160
163
|
speedFadeThreshold: Milliseconds;
|
|
161
164
|
};
|
|
165
|
+
useVolumeMultiplier: boolean;
|
|
162
166
|
};
|
|
163
167
|
export type IOptionalTuningConfig = RecursivePartial<ITuningConfig> & {
|
|
164
168
|
configName: ITuningConfig['configName'];
|