@vkontakte/videoplayer-core 2.0.154-dev.bdbbdd48.0 → 2.0.154-dev.c0f690bfb.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.154-dev.bdbbdd48.0",
3
+ "version": "2.0.154-dev.c0f690bfb.0",
4
4
  "author": "vk.com",
5
5
  "description": "Videoplayer core library based on the vk.com platform",
6
6
  "homepage": "https://vk.com",
@@ -11,7 +11,6 @@
11
11
  "type": "module",
12
12
  "exports": {
13
13
  ".": {
14
- "bun": "./../src/index.ts",
15
14
  "types": "./types/index.d.ts",
16
15
  "import": "./esnext.esm.js",
17
16
  "require": "./esnext.cjs"
@@ -55,6 +54,6 @@
55
54
  "**/*.d.ts"
56
55
  ],
57
56
  "dependencies": {
58
- "@vkontakte/videoplayer-shared": "1.0.83-dev.bdbbdd48.0"
57
+ "@vkontakte/videoplayer-shared": "1.0.83-dev.c0f690bfb.0"
59
58
  }
60
59
  }
@@ -2,7 +2,7 @@ import { dump } from "../utils/playbackTelemetry";
2
2
  import type { IOptionalTuningConfig } from "../utils/tuningConfig";
3
3
  import type { IError, ILogEntry, Kbps, Milliseconds, Seconds, QualityLimits, VideoQuality, ITracer } from "@vkontakte/videoplayer-shared";
4
4
  import { Subject, ValueSubject } from "@vkontakte/videoplayer-shared";
5
- import { ChromecastState, type FpsByQuality, type HttpConnectionType, type HttpConnectionMetrics, type HttpDownloadMetrics, type IAudioStream, type IAudioTrack, type IConfig, type ICueSettings, type IExternalTextTrack, type IPlayer, type ISeekRequest, type ISources, type ITextTrack, type IVideoStream, type PlaybackRate, PlaybackState, PredefinedQualityLimits, type StartEnd, Surface, type VideoFormat } from "./types";
5
+ import { ChromecastState, type FpsByQuality, type HttpConnectionType, type HttpConnectionMetrics, type HttpDownloadMetrics, type IAudioStream, type IAudioTrack, type IConfig, type ICueSettings, type IExternalTextTrack, type IPlayer, type ISeekRequest, type ISources, type ITextTrack, type IVideoStream, type IVideoTrack, type PlaybackRate, PlaybackState, PredefinedQualityLimits, type StartEnd, Surface, type VideoFormat } from "./types";
6
6
  import type { IPlayerOptions } from "../utils/playerOptions";
7
7
  /** Конкретный тип для Player.info с ValueSubject вместо IValueObservable */
8
8
  interface PlayerInfoImpl {
@@ -13,6 +13,7 @@ interface PlayerInfoImpl {
13
13
  volume$: ValueSubject<number>;
14
14
  availableVideoStreams$: ValueSubject<IVideoStream[]>;
15
15
  currentVideoStream$: ValueSubject<IVideoStream | undefined>;
16
+ availableVideoTracks$: ValueSubject<IVideoTrack[]>;
16
17
  availableQualities$: ValueSubject<VideoQuality[]>;
17
18
  availableQualitiesFps$: ValueSubject<FpsByQuality>;
18
19
  currentQuality$: ValueSubject<VideoQuality | undefined>;
@@ -263,6 +263,7 @@ export interface IPlayerInfo {
263
263
  volume$: IValueObservable<number>;
264
264
  currentVideoStream$: IValueObservable<IVideoStream | undefined>;
265
265
  availableVideoStreams$: IValueObservable<IVideoStream[]>;
266
+ availableVideoTracks$: IValueObservable<IVideoTrack[]>;
266
267
  currentAudioStream$: IValueObservable<IAudioStream | undefined>;
267
268
  availableAudioStreams$: IValueObservable<IAudioStream[]>;
268
269
  /**
@@ -575,6 +576,7 @@ export interface IVideoTrack extends IBaseTrack {
575
576
  size?: IRectangle;
576
577
  fps?: number;
577
578
  streamId?: IVideoStream["id"];
579
+ tvDisabled?: boolean;
578
580
  }
579
581
  export interface IAudioStream {
580
582
  id: string;
@@ -1,6 +1,6 @@
1
1
  import type { Representation, Segment, SegmentReference, Stream, TemplateSegment, TemplateSegmentReference, TextRepresentation } from "../../utils/parsers/types";
2
2
  import type { IAudioStream, IAudioTrack, IInternalTextTrack, IVideoStream, IVideoTrack } from "../../../player/types";
3
- export declare const representationToVideoTrack: ({ id, width, height, bitrate, fps, quality: qualityString, streamId }: Representation) => IVideoTrack | undefined;
3
+ export declare const representationToVideoTrack: ({ id, width, height, bitrate, fps, quality: qualityString, streamId, tvDisabled }: Representation) => IVideoTrack | undefined;
4
4
  export declare const representationToAudioTrack: ({ id, bitrate }: Representation) => IAudioTrack;
5
5
  export declare const representationToTextTrack: ({ language, label }: Stream, { id, url, isAuto }: Representation & {
6
6
  url: string;
@@ -1 +1 @@
1
- export declare const destroy: (video: HTMLVideoElement) => void;
1
+ export declare const destroy: (video: HTMLVideoElement, clearVideoElementInnerHTML: boolean) => void;
@@ -1,5 +1,5 @@
1
1
  import type { ITuningConfig } from "../../../utils/tuningConfig";
2
- type Constraints = Pick<ITuningConfig, "audioVideoSyncRate" | "disableYandexPiP">;
3
- export declare const allocate: (container: HTMLElement, { audioVideoSyncRate, disableYandexPiP }: Constraints) => HTMLVideoElement;
4
- export declare const dispose: (element: HTMLVideoElement) => void;
2
+ type Constraints = Pick<ITuningConfig, "audioVideoSyncRate" | "disableYandexPiP" | "clearVideoElementInnerHTML">;
3
+ export declare const allocate: (container: HTMLElement, { audioVideoSyncRate, disableYandexPiP, clearVideoElementInnerHTML }: Constraints) => HTMLVideoElement;
4
+ export declare const dispose: (element: HTMLVideoElement, keepElement?: boolean, clearVideoElementInnerHTML?: boolean) => void;
5
5
  export {};
@@ -23,6 +23,12 @@ export interface Representation {
23
23
  fps?: number;
24
24
  quality?: string;
25
25
  streamId?: IVideoStream["id"];
26
+ /**
27
+ * @see https://jira.vk.team/browse/UVP-9492
28
+ *
29
+ * помечает видео дорожку как неиспользуемую для телевизоров
30
+ */
31
+ tvDisabled?: boolean;
26
32
  }
27
33
  export interface TextRepresentation extends Representation {
28
34
  language: string;
@@ -1,4 +1,4 @@
1
1
  import type { ITuningConfig } from "../../utils/tuningConfig";
2
2
  import type { Manifest } from "./parsers/types";
3
3
  /** @mutates streams.video */
4
- export declare const applyVideoStreamRepresentaionsFilter: (streams: Manifest["streams"], videoStreamRepresentaionsFilter: ITuningConfig["dash"]["videoStreamRepresentaionsFilter"]) => void;
4
+ export declare const markVideoStreamRepresentaionsFilter: (streams: Manifest["streams"], videoStreamRepresentaionsFilter: ITuningConfig["dash"]["videoStreamRepresentaionsFilter"]) => void;
@@ -7,6 +7,18 @@ import { type ExactVideoQuality, VideoQuality } from "@vkontakte/videoplayer-sha
7
7
  export type ITuningConfig = {
8
8
  /** @deprecated */
9
9
  configName?: string[];
10
+ /**
11
+ * Если true, внутренний video элемент не будет уничтожаться при реините провайдера
12
+ * и при создании нового экземляра Player.
13
+ * Будет веcти себя аналогично элементу переданному снаружи
14
+ */
15
+ keepVideoElement: boolean;
16
+ /**
17
+ * Временный флаг для тестирования очистки video элемента
18
+ * Если true, при очистке будет вызван innerHTML = '' для очистки дочерних элементов трэков
19
+ * В противном случае они размножаются
20
+ */
21
+ clearVideoElementInnerHTML: boolean;
10
22
  throughputEstimator: {
11
23
  type: "TwoEma" | "EmaAndMa";
12
24
  emaAlphaSlow: number;