@vkontakte/videoplayer-core 2.0.163-dev.c64982d44.0 → 2.0.163-dev.c8b4dec46.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/videoplayer-core",
3
- "version": "2.0.163-dev.c64982d44.0",
3
+ "version": "2.0.163-dev.c8b4dec46.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.92-dev.c64982d44.0"
45
+ "@vkontakte/videoplayer-shared": "1.0.92-dev.c8b4dec46.0"
46
46
  }
47
47
  }
@@ -457,8 +457,8 @@ export interface PlayerInfoValues {
457
457
  */
458
458
  currentAudioSegmentLength$: number;
459
459
  }
460
- export type IPlayerInfo = { [K in keyof PlayerInfoValues] : IValueObservable<PlayerInfoValues[K]> };
461
- export type PlayerInfoImpl = { [K in keyof PlayerInfoValues] : ValueSubject<PlayerInfoValues[K]> };
460
+ export type IPlayerInfo = { [K in keyof PlayerInfoValues]: IValueObservable<PlayerInfoValues[K]> };
461
+ export type PlayerInfoImpl = { [K in keyof PlayerInfoValues]: ValueSubject<PlayerInfoValues[K]> };
462
462
  export interface PlayerEventsImpl {
463
463
  inited$: Subject<void>;
464
464
  ready$: Subject<void>;
@@ -3,6 +3,6 @@ import type { IParams } from "./lib/types";
3
3
  import BaseDashProvider from "./baseDashProvider";
4
4
  export default class DashCmafLiveProvider extends BaseDashProvider {
5
5
  constructor(params: IParams);
6
- protected subscribe(): void;
7
- protected seek(position: Milliseconds): void;
6
+ protected override subscribe(): void;
7
+ protected override seek(position: Milliseconds): void;
8
8
  }
@@ -1,6 +1,6 @@
1
1
  import type { Milliseconds } from "@vkontakte/videoplayer-shared";
2
2
  import BaseDashProvider from "./baseDashProvider";
3
3
  export default class DashProvider extends BaseDashProvider {
4
- protected subscribe(): void;
5
- protected seek(position: Milliseconds, forcePrecise: boolean): void;
4
+ protected override subscribe(): void;
5
+ protected override seek(position: Milliseconds, forcePrecise: boolean): void;
6
6
  }
@@ -4,7 +4,7 @@ import BaseDashProvider from "./baseDashProvider";
4
4
  import { LivePlayer } from "./lib/player/livePlayer";
5
5
  export default class DashCmafLiveProvider extends BaseDashProvider {
6
6
  constructor(params: IParams);
7
- protected getPlayer(): LivePlayer;
8
- protected subscribe(): void;
9
- protected seek(position: Milliseconds): void;
7
+ protected override getPlayer(): LivePlayer;
8
+ protected override subscribe(): void;
9
+ protected override seek(position: Milliseconds): void;
10
10
  }
@@ -2,7 +2,7 @@ import type { Milliseconds } from "@vkontakte/videoplayer-shared";
2
2
  import BaseDashProvider from "./baseDashProvider";
3
3
  import { Player } from "./lib/player/player";
4
4
  export default class DashProvider extends BaseDashProvider {
5
- protected subscribe(): void;
6
- protected getPlayer(): Player;
7
- protected seek(position: Milliseconds, forcePrecise: boolean): void;
5
+ protected override subscribe(): void;
6
+ protected override getPlayer(): Player;
7
+ protected override seek(position: Milliseconds, forcePrecise: boolean): void;
8
8
  }
@@ -5,9 +5,9 @@ import type { NativeBufferManager } from "../nativeBufferManager";
5
5
  import type { FetchParamsWithUrl, Priority } from "../../fetcher";
6
6
  export declare class ByteRangeVirtualBufferManager extends BaseVirtualBufferManager<ByteRangeSegment> implements IVirtualBufferManager<ByteRangeSegment> {
7
7
  constructor(kind: StreamKind, nativeBufferManager: NativeBufferManager, representations: Representation[], dependencies: Dependencies);
8
- protected loadItems(itemsToLoad: IBufferPlaybackQueueItem<ByteRangeSegment>[], representation: Representation, priority?: Priority): Promise<void>;
9
- protected selectItemsToLoad(): IBufferPlaybackQueueItem<ByteRangeSegment>[];
10
- protected prepareFetchParams(items: IBufferPlaybackQueueItem<ByteRangeSegment>[], representation: Representation): FetchParamsWithUrl;
8
+ protected override loadItems(itemsToLoad: IBufferPlaybackQueueItem<ByteRangeSegment>[], representation: Representation, priority?: Priority): Promise<void>;
9
+ protected override selectItemsToLoad(): IBufferPlaybackQueueItem<ByteRangeSegment>[];
10
+ protected override prepareFetchParams(items: IBufferPlaybackQueueItem<ByteRangeSegment>[], representation: Representation): FetchParamsWithUrl;
11
11
  /**
12
12
  * Закидываем в буфер сегменты атомарнее чем сегмент целиком. Например, по боксам в мпеге и по блокам в вебме.
13
13
  * Таким образом не ждём его полной загрузки и готовы играть его намного быстрее
@@ -16,6 +16,6 @@ export declare class ByteRangeVirtualBufferManager extends BaseVirtualBufferMana
16
16
  * @param loaded – Объём загруженных в dataView данных (всё что больше – пока нули)
17
17
  * @private
18
18
  */
19
- protected onSomeDataLoaded({ downloadingItems, dataView, representationId, globalFrom, loaded, signal }: ISomeDataLoadedCallbackParams<ByteRangeSegment>): Promise<void>;
20
- protected updateRepresentationBaseUrl(representation: Representation, newBaseUrl: string): void;
19
+ protected override onSomeDataLoaded({ downloadingItems, dataView, representationId, globalFrom, loaded, signal }: ISomeDataLoadedCallbackParams<ByteRangeSegment>): Promise<void>;
20
+ protected override updateRepresentationBaseUrl(representation: Representation, newBaseUrl: string): void;
21
21
  }
@@ -15,13 +15,13 @@ export declare class LiveVirtualBuffer extends TemplateVirtualBufferManager {
15
15
  proceedLowLatencyLive(): void;
16
16
  getLiveSegmentsToLoadState(manifest: Manifest | null): IRange<Milliseconds> | undefined;
17
17
  getRepresentationInitialTime(): Milliseconds;
18
- protected prepareFetchParams(items: IBufferPlaybackQueueItem<TemplateSegment>[], representation: Representation): FetchParamsWithUrl;
19
- protected onSomeDataLoaded({ downloadingItems, ...params }: ISomeDataLoadedCallbackParams<TemplateSegment>): Promise<void>;
20
- protected onItemFullyDownloaded(downloadedItem: IBufferPlaybackQueueItem<TemplateSegment>): void;
18
+ protected override prepareFetchParams(items: IBufferPlaybackQueueItem<TemplateSegment>[], representation: Representation): FetchParamsWithUrl;
19
+ protected override onSomeDataLoaded({ downloadingItems, ...params }: ISomeDataLoadedCallbackParams<TemplateSegment>): Promise<void>;
20
+ protected override onItemFullyDownloaded(downloadedItem: IBufferPlaybackQueueItem<TemplateSegment>): void;
21
21
  protected updateLowLatencyItemTime(item: IBufferPlaybackQueueItem<TemplateSegment>): void;
22
22
  protected updateLowLatencyLive(latestItem: IBufferPlaybackQueueItem<TemplateSegment>): void;
23
23
  protected parseFeedableSegmentChunk(chunk: DataView): DataView | null;
24
24
  protected getFetchUrl(items: IBufferPlaybackQueueItem<TemplateSegment>[], representation: Representation): URL;
25
- protected loadInit(representation: Representation, requestedPriority?: Priority, critical?: boolean): Promise<void>;
25
+ protected override loadInit(representation: Representation, requestedPriority?: Priority, critical?: boolean): Promise<void>;
26
26
  protected getActualLiveStartingSegments(templateSegmentReference: TemplateSegmentReference): TemplateSegment[];
27
27
  }
@@ -5,9 +5,9 @@ import type { NativeBufferManager } from "../nativeBufferManager";
5
5
  import type { FetchParamsWithUrl, Priority } from "../../fetcher";
6
6
  export declare class TemplateVirtualBufferManager extends BaseVirtualBufferManager<TemplateSegment> implements IVirtualBufferManager<TemplateSegment> {
7
7
  constructor(kind: StreamKind, nativeBufferManager: NativeBufferManager, representations: Representation[], dependencies: Dependencies);
8
- protected loadItems(itemsToLoad: IBufferPlaybackQueueItem<TemplateSegment>[], representation: Representation, priority?: Priority): Promise<void>;
9
- protected selectItemsToLoad(): IBufferPlaybackQueueItem<TemplateSegment>[];
10
- protected prepareFetchParams(items: IBufferPlaybackQueueItem<TemplateSegment>[], representation: Representation): FetchParamsWithUrl;
8
+ protected override loadItems(itemsToLoad: IBufferPlaybackQueueItem<TemplateSegment>[], representation: Representation, priority?: Priority): Promise<void>;
9
+ protected override selectItemsToLoad(): IBufferPlaybackQueueItem<TemplateSegment>[];
10
+ protected override prepareFetchParams(items: IBufferPlaybackQueueItem<TemplateSegment>[], representation: Representation): FetchParamsWithUrl;
11
11
  protected getFetchUrl(items: IBufferPlaybackQueueItem<TemplateSegment>[], representation: Representation): URL;
12
12
  /**
13
13
  * Закидываем в буфер сегменты атомарнее чем сегмент целиком. Например, по боксам в мпеге и по блокам в вебме.
@@ -16,6 +16,6 @@ export declare class TemplateVirtualBufferManager extends BaseVirtualBufferManag
16
16
  * @param loaded – Объём загруженных в dataView данных (всё что больше – пока нули)
17
17
  * @private
18
18
  */
19
- protected onSomeDataLoaded({ downloadingItems, dataView, representationId, loaded, signal }: ISomeDataLoadedCallbackParams<TemplateSegment>): Promise<void>;
20
- protected updateRepresentationBaseUrl(representation: Representation, newBaseUrl: string): void;
19
+ protected override onSomeDataLoaded({ downloadingItems, dataView, representationId, loaded, signal }: ISomeDataLoadedCallbackParams<TemplateSegment>): Promise<void>;
20
+ protected override updateRepresentationBaseUrl(representation: Representation, newBaseUrl: string): void;
21
21
  }
@@ -14,18 +14,18 @@ export declare class LivePlayer extends BasePlayer {
14
14
  protected livePauseWatchdogSubscription: ISubscription | undefined;
15
15
  protected liveWasInterrupted: boolean;
16
16
  constructor(params: Params);
17
- seek(nextOffset: Milliseconds): Promise<void>;
18
- initBuffer(): void;
17
+ override seek(nextOffset: Milliseconds): Promise<void>;
18
+ override initBuffer(): void;
19
19
  protected forcePositionToRepresentationInitialTime(): Promise<void>;
20
20
  protected tick(): Promise<void>;
21
- protected setSourceInitDuration(): void;
22
- protected isStallExceeded(timeInWaiting: Milliseconds): boolean;
23
- protected restoreAfterDeepStall(): Promise<void>;
24
- protected updateManifest(): Promise<Manifest | null>;
25
- protected prepareManifestUrlString(manifestBaseUrlString: string, offset: number): string;
21
+ protected override setSourceInitDuration(): void;
22
+ protected override isStallExceeded(timeInWaiting: Milliseconds): boolean;
23
+ protected override restoreAfterDeepStall(): Promise<void>;
24
+ protected override updateManifest(): Promise<Manifest | null>;
25
+ protected override prepareManifestUrlString(manifestBaseUrlString: string, offset: number): string;
26
26
  protected updateManifestUrlWithTimeOffset(nextOffset: Milliseconds): void;
27
- protected createBuffers(dependencies: Dependencies, initialVideo: Representation["id"], initialAudio?: Representation["id"], sourceHls?: IHLSSource): void;
28
- protected initRepresentationSubscriptions(): void;
27
+ protected override createBuffers(dependencies: Dependencies, initialVideo: Representation["id"], initialAudio?: Representation["id"], sourceHls?: IHLSSource): void;
28
+ protected override initRepresentationSubscriptions(): void;
29
29
  protected initStreamDurationOnPauseSubscription(): void;
30
30
  protected initLiveDurationSubscriptions(videoBufferManager: LiveVirtualBuffer): void;
31
31
  protected initLiveChangePlaybackRateSubscriptions(): void;
@@ -2,10 +2,10 @@ import { BasePlayer } from "./basePlayer";
2
2
  import type { Params } from "./types";
3
3
  export declare class Player extends BasePlayer {
4
4
  constructor(params: Params);
5
- protected prepareManifestUrlString(manifestBaseUrlString: string, _offset: number): string;
6
- protected initRepresentationSubscriptions(): void;
7
- protected setSourceInitDuration(): void;
8
- protected restoreAfterDeepStall(): Promise<void>;
5
+ protected override prepareManifestUrlString(manifestBaseUrlString: string, _offset: number): string;
6
+ protected override initRepresentationSubscriptions(): void;
7
+ protected override setSourceInitDuration(): void;
8
+ protected override restoreAfterDeepStall(): Promise<void>;
9
9
  protected initDisableStallWatchdogSubscription(): void;
10
10
  protected initEndOfVideoSubscription(): void;
11
11
  }
@@ -62,7 +62,7 @@ export interface DesiredStateValues {
62
62
  videoTrack: IVideoTrack | undefined;
63
63
  volume: IVolumeState;
64
64
  }
65
- export type IDesiredState = { [K in keyof DesiredStateValues] : IStateMachine<DesiredStateValues[K]> };
65
+ export type IDesiredState = { [K in keyof DesiredStateValues]: IStateMachine<DesiredStateValues[K]> };
66
66
  export interface IProviderOutput {
67
67
  position$: IValueSubject<Seconds>;
68
68
  duration$: IValueSubject<Seconds>;
@@ -7,7 +7,7 @@ type LogsArgs = [forwardBufferDuration: Milliseconds | undefined, thresholdMs: M
7
7
  export declare class InsufficientBufferRule extends LimitAboveRule<IVideoTrack, IVideoAbrContext, LogsArgs> implements IAbrRule<IVideoTrack, IVideoAbrContext> {
8
8
  private lastPlaybackResetAtMs;
9
9
  constructor(phaseConfig: RulePhaseConfig);
10
- init(initContext: IRuleInitContext): void;
10
+ override init(initContext: IRuleInitContext): void;
11
11
  execute(context: IVideoAbrContext): IAbrRuleResolution<IVideoTrack>;
12
12
  private selectThroughputAwareFallback;
13
13
  protected createLogMessage(selectedTrack: IVideoTrack, forwardBufferDuration: Milliseconds | undefined, thresholdMs: Milliseconds, triggered: boolean, suppressedByGrace: boolean): string;
@@ -121,7 +121,7 @@ export interface Stream {
121
121
  }
122
122
  export interface Manifest {
123
123
  duration: Milliseconds | undefined;
124
- streams: { [key in StreamKind] : Stream[] };
124
+ streams: { [key in StreamKind]: Stream[] };
125
125
  baseUrls: string[];
126
126
  codecs?: {
127
127
  video?: VideoCodec[];