@vkontakte/videoplayer-core 2.0.162-dev.ec26b2599.0 → 2.0.162

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.162-dev.ec26b2599.0",
3
+ "version": "2.0.162",
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.91-dev.ec26b2599.0"
45
+ "@vkontakte/videoplayer-shared": "1.0.91"
46
46
  }
47
47
  }
@@ -66,7 +66,6 @@ export default class Player implements IPlayer {
66
66
  selectTextTrack(id: ITextTrack["id"] | undefined): IPlayer;
67
67
  setTextTrackCueSettings(settings: ICueSettings): IPlayer;
68
68
  setLiveLowLatency(isLowLatency: boolean): IPlayer;
69
- setAdPreloadMode(enabled: boolean): IPlayer;
70
69
  setLooped(isLooped: boolean): IPlayer;
71
70
  toggleChromecast(): void;
72
71
  /**
@@ -64,11 +64,6 @@ export interface IPlayer {
64
64
  setTextTrackCueSettings(settings: ICueSettings): IPlayer;
65
65
  setLiveLowLatency(isLowLatency: boolean): IPlayer;
66
66
  /**
67
- * Включает или выключает режим предзагрузки видео во время воспроизведения рекламы.
68
- * Виртуальный буфер скачивает сегменты, но не добавляет их в нативный буфер
69
- */
70
- setAdPreloadMode(enabled: boolean): IPlayer;
71
- /**
72
67
  * Включает или отключает Chromecast
73
68
  */
74
69
  toggleChromecast(): void;
@@ -63,6 +63,5 @@ export default abstract class BaseDashProvider implements IProvider {
63
63
  protected init3DScene: (init: CommonInit) => void;
64
64
  protected destroy3DScene: () => void;
65
65
  protected playIfAllowed(): void;
66
- setAdPreloadMode(enabled: boolean): void;
67
66
  destroy(): void;
68
67
  }
@@ -1,4 +1,4 @@
1
- import type { Byte, IError, IRange, ISubject, IValueSubject, Milliseconds } from "@vkontakte/videoplayer-shared";
1
+ import type { Byte, IError, IRange, ISubject, ITracer, IValueSubject, Milliseconds } from "@vkontakte/videoplayer-shared";
2
2
  import type { CommonInit, Manifest, Representation, Segment } from "../../../utils/parsers/types";
3
3
  import type { Fetcher } from "../fetcher";
4
4
  import type { ITuningConfig } from "../../../../utils/tuningConfig";
@@ -11,6 +11,7 @@ export declare enum SwithRepresentationMode {
11
11
  }
12
12
  export interface Dependencies {
13
13
  fetcher: Fetcher;
14
+ tracer: ITracer;
14
15
  tuning: ITuningConfig;
15
16
  compatibilityMode?: boolean;
16
17
  manifest: Manifest | null;
@@ -36,7 +37,6 @@ export interface IVirtualBufferManager<T extends Segment = Segment> {
36
37
  getMutexInfo(): string;
37
38
  setTarget(time: Milliseconds): void;
38
39
  setPreloadOnly(preloadOnly: boolean): void;
39
- setAdPreloadMode(enabled: boolean): void;
40
40
  findSegmentStartTime(position: Milliseconds): Milliseconds | undefined;
41
41
  calculateDurationFromSegments(): Milliseconds;
42
42
  getActiveSegmentProgress(): VideoSegmentLoadProgress | undefined;
@@ -2,7 +2,7 @@ import type { Fetcher, FetchParamsWithUrl, Priority, RepresentationFetchResult }
2
2
  import type { CommonInit, ContainerParser, Representation, Segment } from "../../../../utils/parsers/types";
3
3
  import { StreamKind } from "../../../../utils/parsers/types";
4
4
  import type { ITuningConfig } from "../../../../../utils/tuningConfig";
5
- import type { Byte, IError, IRange, ISubject, IValueSubject, Milliseconds, Seconds } from "@vkontakte/videoplayer-shared";
5
+ import type { Byte, IError, IRange, ISubject, ITracer, IValueSubject, Milliseconds, Seconds } from "@vkontakte/videoplayer-shared";
6
6
  import { abortable, Subscription } from "@vkontakte/videoplayer-shared";
7
7
  import type { NativeBufferManager } from "../nativeBufferManager";
8
8
  import { SwithRepresentationMode, type Dependencies, type IBufferPlaybackQueueItem, type ISomeDataLoadedCallbackParams, type IVirtualBufferManager } from "../types";
@@ -17,6 +17,7 @@ export declare abstract class BaseVirtualBufferManager<T extends Segment> implem
17
17
  protected readonly kind: StreamKind;
18
18
  protected readonly nativeBufferManager: NativeBufferManager;
19
19
  protected readonly fetcher: Fetcher;
20
+ protected readonly tracer: ITracer;
20
21
  protected readonly tuning: ITuningConfig;
21
22
  protected representations: Map<Representation["id"], Representation>;
22
23
  protected playingRepresentationId: Representation["id"] | undefined;
@@ -32,7 +33,6 @@ export declare abstract class BaseVirtualBufferManager<T extends Segment> implem
32
33
  protected bufferPlaybackQueue: IBufferPlaybackQueueItem<T>[];
33
34
  protected downloadingBufferItems: IBufferPlaybackQueueItem<T>[];
34
35
  protected preloadOnly: boolean;
35
- protected adPreloadMode: boolean;
36
36
  protected forwardBufferTarget: Milliseconds;
37
37
  protected failedDownloads: number;
38
38
  protected lastDataObtainedTimestampMs: Milliseconds;
@@ -52,7 +52,7 @@ export declare abstract class BaseVirtualBufferManager<T extends Segment> implem
52
52
  protected subscription: Subscription;
53
53
  protected readonly getCurrentPosition: () => Milliseconds | undefined;
54
54
  protected readonly getCurrentStallDuration: () => Milliseconds | undefined;
55
- protected constructor(kind: StreamKind, nativeBufferManager: NativeBufferManager, representations: Representation[], { fetcher, tuning, getCurrentPosition, getCurrentStallDuration, manifest }: Dependencies);
55
+ protected constructor(kind: StreamKind, nativeBufferManager: NativeBufferManager, representations: Representation[], { fetcher, tracer, tuning, getCurrentPosition, getCurrentStallDuration, manifest }: Dependencies);
56
56
  protected abstract loadItems(itemsToLoad: IBufferPlaybackQueueItem<T>[], representation: Representation, priority?: Priority): Promise<void>;
57
57
  protected abstract selectItemsToLoad(): IBufferPlaybackQueueItem<T>[];
58
58
  protected abstract prepareFetchParams(items: IBufferPlaybackQueueItem<T>[], representation: Representation): FetchParamsWithUrl;
@@ -60,7 +60,7 @@ export declare abstract class BaseVirtualBufferManager<T extends Segment> implem
60
60
  protected abstract updateRepresentationBaseUrl(representation: Representation, newBaseUrl: string): void;
61
61
  startWith: ReturnType<typeof abortable<[Representation["id"]]>>;
62
62
  switchTo(newRepresentationId: Representation["id"], mode?: SwithRepresentationMode): Promise<void>;
63
- protected getSwitchWithAbort(): ReturnType<typeof abortable<[Representation["id"], SwithRepresentationMode], void>>;
63
+ protected getSwitchWithAbort(switchToTracer: ITracer): ReturnType<typeof abortable<[Representation["id"], SwithRepresentationMode], void>>;
64
64
  prepareSeek(): Promise<void>;
65
65
  seek(position: Milliseconds | undefined): Promise<void>;
66
66
  maintain(currentPosition?: Milliseconds | undefined): Promise<void>;
@@ -77,7 +77,6 @@ export declare abstract class BaseVirtualBufferManager<T extends Segment> implem
77
77
  get lastDataObtainedTimestamp(): Milliseconds;
78
78
  setTarget(time: Milliseconds): void;
79
79
  setPreloadOnly(preloadOnly: boolean): void;
80
- setAdPreloadMode(enabled: boolean): void;
81
80
  destroy(): void;
82
81
  protected forceSwitchCondition(oldRepresentation: Representation, newRepresentation: Representation): boolean;
83
82
  protected clearBuffer(): Promise<void>;
@@ -20,6 +20,7 @@ export declare abstract class BasePlayer {
20
20
  protected manifest: Manifest | null;
21
21
  protected tuning: ITuningConfig;
22
22
  protected tracer: ITracer;
23
+ protected stallTracer: ITracer;
23
24
  protected forceVideoCodec?: VideoCodec;
24
25
  protected stallTimeInWaitingExitAttemptMade: Milliseconds;
25
26
  protected videoBufferManager: IVirtualBufferManager | null;
@@ -77,7 +78,7 @@ export declare abstract class BasePlayer {
77
78
  protected constructor(params: Params);
78
79
  protected abstract prepareManifestUrlString(manifestBaseUrlString: string, offset: number): string;
79
80
  protected abstract setSourceInitDuration(): void;
80
- protected abstract restoreAfterDeepStall(stallTraceAttributes: Record<string, number>): Promise<void>;
81
+ protected abstract restoreAfterDeepStall(): Promise<void>;
81
82
  initRepresentations: ReturnType<typeof abortable<[Representation["id"], Representation["id"] | undefined, IHLSSource | undefined]>>;
82
83
  initManifest(element: HTMLVideoElement, manifestBaseUrlString: string, offset: number): Promise<void>;
83
84
  initBuffer(): void;
@@ -92,7 +93,6 @@ export declare abstract class BasePlayer {
92
93
  getCodecs(): Manifest["codecs"] | undefined;
93
94
  setBufferTarget(time: Milliseconds): void;
94
95
  setPreloadOnly(preloadOnly: boolean): void;
95
- setAdPreloadMode(enabled: boolean): void;
96
96
  stop(): void;
97
97
  destroy(): void;
98
98
  updateSourceDurationFromSegments(): void;
@@ -20,7 +20,7 @@ export declare class LivePlayer extends BasePlayer {
20
20
  protected tick(): Promise<void>;
21
21
  protected setSourceInitDuration(): void;
22
22
  protected isStallExceeded(timeInWaiting: Milliseconds): boolean;
23
- protected restoreAfterDeepStall(stallTraceAttributes: Record<string, number>): Promise<void>;
23
+ protected restoreAfterDeepStall(): Promise<void>;
24
24
  protected updateManifest(): Promise<Manifest | null>;
25
25
  protected prepareManifestUrlString(manifestBaseUrlString: string, offset: number): string;
26
26
  protected updateManifestUrlWithTimeOffset(nextOffset: Milliseconds): void;
@@ -5,7 +5,7 @@ export declare class Player extends BasePlayer {
5
5
  protected prepareManifestUrlString(manifestBaseUrlString: string, _offset: number): string;
6
6
  protected initRepresentationSubscriptions(): void;
7
7
  protected setSourceInitDuration(): void;
8
- protected restoreAfterDeepStall(stallTraceAttributes: Record<string, number>): Promise<void>;
8
+ protected restoreAfterDeepStall(): Promise<void>;
9
9
  protected initDisableStallWatchdogSubscription(): void;
10
10
  protected initEndOfVideoSubscription(): void;
11
11
  }
@@ -41,7 +41,6 @@ export default class ProviderContainer implements IProviderContainer {
41
41
  constructor(params: IParams);
42
42
  init(): void;
43
43
  destroy(): void;
44
- setAdPreloadMode(enabled: boolean): void;
45
44
  private initProvider;
46
45
  private reinitProvider;
47
46
  private switchToNextProvider;
@@ -13,7 +13,6 @@ export interface IProviderContainer {
13
13
  providerOutput: IProviderOutput;
14
14
  init(): void;
15
15
  destroy(): void;
16
- setAdPreloadMode(enabled: boolean): void;
17
16
  }
18
17
  export type IProviderEntry = {
19
18
  type: VideoFormat;