@vkontakte/videoplayer-core 2.0.161-dev.524dbd943.0 → 2.0.161-dev.55a45bc45.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 +5 -5
- package/es2015.esm.js +7 -7
- package/esnext.cjs +5 -5
- package/esnext.esm.js +7 -7
- package/evergreen.esm.js +7 -7
- package/package.json +2 -2
- package/types/providers/DashProvider/lib/buffer.d.ts +1 -0
- package/types/providers/DashProvider/lib/player.d.ts +2 -0
- package/types/providers/DashProviderVirtual/lib/buffer/nativeBufferManager.d.ts +2 -1
- package/types/providers/DashProviderVirtual/lib/buffer/types.d.ts +1 -1
- package/types/providers/DashProviderVirtual/lib/buffer/virtualBuffer/baseVirtualBufferManager.d.ts +1 -1
- package/types/providers/DashProviderVirtual/lib/player/basePlayer.d.ts +4 -2
- package/types/providers/DashProviderVirtual/lib/player/livePlayer.d.ts +1 -1
- package/types/providers/DashProviderVirtual/lib/player/player.d.ts +1 -1
- 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.161-dev.
|
|
3
|
+
"version": "2.0.161-dev.55a45bc45.0",
|
|
4
4
|
"author": "vk.com",
|
|
5
5
|
"description": "Videoplayer core library based on the vk.com platform",
|
|
6
6
|
"homepage": "https://vk.com",
|
|
@@ -42,6 +42,6 @@
|
|
|
42
42
|
"**/*.d.ts"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@vkontakte/videoplayer-shared": "1.0.90-dev.
|
|
45
|
+
"@vkontakte/videoplayer-shared": "1.0.90-dev.55a45bc45.0"
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { IError, IRange, ISubject, Milliseconds } from "@vkontakte/videoplayer-shared";
|
|
1
|
+
import type { IError, IRange, ISubject, IValueSubject, Milliseconds } from "@vkontakte/videoplayer-shared";
|
|
2
2
|
export declare class NativeBufferManager {
|
|
3
3
|
error$: ISubject<IError>;
|
|
4
|
+
updateEnd$: IValueSubject<void>;
|
|
4
5
|
private mediaSource;
|
|
5
6
|
private sourceBuffer;
|
|
6
7
|
private sourceBufferTaskQueue;
|
|
@@ -36,7 +36,7 @@ export interface IVirtualBufferManager<T extends Segment = Segment> {
|
|
|
36
36
|
setTarget(time: Milliseconds): void;
|
|
37
37
|
setPreloadOnly(preloadOnly: boolean): void;
|
|
38
38
|
findSegmentStartTime(position: Milliseconds): Milliseconds | undefined;
|
|
39
|
-
calculateDurationFromSegments(
|
|
39
|
+
calculateDurationFromSegments(): Milliseconds;
|
|
40
40
|
destroy(): void;
|
|
41
41
|
get lastDataObtainedTimestamp(): Milliseconds;
|
|
42
42
|
}
|
package/types/providers/DashProviderVirtual/lib/buffer/virtualBuffer/baseVirtualBufferManager.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ export declare abstract class BaseVirtualBufferManager<T extends Segment> implem
|
|
|
69
69
|
findSegmentStartTime(position: Milliseconds): Milliseconds | undefined;
|
|
70
70
|
getRepresentationInitialTime(): Seconds;
|
|
71
71
|
getMutexInfo(): string;
|
|
72
|
-
calculateDurationFromSegments(
|
|
72
|
+
calculateDurationFromSegments(): Milliseconds;
|
|
73
73
|
get lastDataObtainedTimestamp(): Milliseconds;
|
|
74
74
|
setTarget(time: Milliseconds): void;
|
|
75
75
|
setPreloadOnly(preloadOnly: boolean): void;
|
|
@@ -73,7 +73,7 @@ export declare abstract class BasePlayer {
|
|
|
73
73
|
private isOnDemand;
|
|
74
74
|
protected constructor(params: Params);
|
|
75
75
|
protected abstract prepareManifestUrlString(manifestBaseUrlString: string, offset: number): string;
|
|
76
|
-
protected abstract
|
|
76
|
+
protected abstract setSourceInitDuration(): void;
|
|
77
77
|
protected abstract restoreAfterDeepStall(stallTraceAttributes: Record<string, number>): Promise<void>;
|
|
78
78
|
initRepresentations: ReturnType<typeof abortable<[Representation["id"], Representation["id"] | undefined, IHLSSource | undefined]>>;
|
|
79
79
|
initManifest(element: HTMLVideoElement, manifestBaseUrlString: string, offset: number): Promise<void>;
|
|
@@ -82,7 +82,6 @@ export declare abstract class BasePlayer {
|
|
|
82
82
|
seek(requestedPosition: Milliseconds, forcePrecise?: boolean): Promise<void>;
|
|
83
83
|
warmUpMediaSourceIfNeeded(position?: Milliseconds | undefined): void;
|
|
84
84
|
getForwardBufferRepresentations(kind: Exclude<StreamKind, StreamKind.TEXT>): Map<Representation["id"], Segment[]> | undefined;
|
|
85
|
-
calculateDurationFromSegments(representationId: Representation["id"]): Milliseconds;
|
|
86
85
|
get isStreamEnded(): boolean;
|
|
87
86
|
getStreams(): Manifest["streams"] | undefined;
|
|
88
87
|
getCodecs(): Manifest["codecs"] | undefined;
|
|
@@ -90,6 +89,9 @@ export declare abstract class BasePlayer {
|
|
|
90
89
|
setPreloadOnly(preloadOnly: boolean): void;
|
|
91
90
|
stop(): void;
|
|
92
91
|
destroy(): void;
|
|
92
|
+
updateSourceDurationFromSegments(): void;
|
|
93
|
+
calculateDurationFromBuffersSegments(): Milliseconds;
|
|
94
|
+
private isAnyBufferUpdating;
|
|
93
95
|
protected get isStreamNotOpen(): boolean;
|
|
94
96
|
protected reinitDecoderIfNeeded(force?: boolean): Promise<void>;
|
|
95
97
|
protected stallWatchdogIntervalCallback(): Promise<void>;
|
|
@@ -18,7 +18,7 @@ export declare class LivePlayer extends BasePlayer {
|
|
|
18
18
|
initBuffer(): void;
|
|
19
19
|
protected forcePositionToRepresentationInitialTime(): Promise<void>;
|
|
20
20
|
protected tick(): Promise<void>;
|
|
21
|
-
protected
|
|
21
|
+
protected setSourceInitDuration(): void;
|
|
22
22
|
protected isStallExceeded(timeInWaiting: Milliseconds): boolean;
|
|
23
23
|
protected restoreAfterDeepStall(stallTraceAttributes: Record<string, number>): Promise<void>;
|
|
24
24
|
protected updateManifest(): Promise<Manifest | null>;
|
|
@@ -4,7 +4,7 @@ export declare class Player extends BasePlayer {
|
|
|
4
4
|
constructor(params: Params);
|
|
5
5
|
protected prepareManifestUrlString(manifestBaseUrlString: string, _offset: number): string;
|
|
6
6
|
protected initRepresentationSubscriptions(): void;
|
|
7
|
-
protected
|
|
7
|
+
protected setSourceInitDuration(): void;
|
|
8
8
|
protected restoreAfterDeepStall(stallTraceAttributes: Record<string, number>): Promise<void>;
|
|
9
9
|
protected initDisableStallWatchdogSubscription(): void;
|
|
10
10
|
protected initEndOfVideoSubscription(): void;
|
|
@@ -370,6 +370,10 @@ export type ITuningConfig = {
|
|
|
370
370
|
hls: {
|
|
371
371
|
filterOnDemandQualityList: boolean;
|
|
372
372
|
};
|
|
373
|
+
/**
|
|
374
|
+
* Устанавливаем длительность видео на основе последнего сегмента.
|
|
375
|
+
*/
|
|
376
|
+
useDurationFromSegments: boolean;
|
|
373
377
|
};
|
|
374
378
|
export type IOptionalTuningConfig = RecursivePartial<ITuningConfig>;
|
|
375
379
|
export declare const fillDefault: (partial: IOptionalTuningConfig) => ITuningConfig;
|