@vkontakte/videoplayer-tv 1.0.23-dev.ebda080eb.0 → 1.0.24-dev.477cdf9b9.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-tv",
3
- "version": "1.0.23-dev.ebda080eb.0",
3
+ "version": "1.0.24-dev.477cdf9b9.0",
4
4
  "author": "vk.ru",
5
5
  "description": "Videoplayer for smart TV based on the vk.ru platform",
6
6
  "homepage": "https://vk.ru",
@@ -42,8 +42,8 @@
42
42
  "**/*.d.ts"
43
43
  ],
44
44
  "dependencies": {
45
- "@vkontakte/videoplayer-core": "2.0.173-dev.ebda080eb.0",
46
- "@vkontakte/videoplayer-shared": "1.0.102-dev.ebda080eb.0",
47
- "@vkontakte/videoplayer-statistics": "1.0.119-dev.ebda080eb.0"
45
+ "@vkontakte/videoplayer-core": "2.0.174-dev.477cdf9b9.0",
46
+ "@vkontakte/videoplayer-shared": "1.0.103-dev.477cdf9b9.0",
47
+ "@vkontakte/videoplayer-statistics": "1.0.120-dev.477cdf9b9.0"
48
48
  }
49
49
  }
@@ -1,8 +1,27 @@
1
+ import type { Component } from "svelte";
2
+ import type { IconSize } from "../Icons/constants";
1
3
  import type { VideoQualityUI } from "../../types";
2
- export type QualityListItemData = {
3
- id: VideoQualityUI;
4
+ type BaseListItemData = {
5
+ id: string;
4
6
  text: string;
7
+ };
8
+ type InteractiveListItemData = BaseListItemData & {
5
9
  isSelected: boolean;
6
10
  isFocused: boolean;
7
11
  disabled?: boolean;
8
12
  };
13
+ export type QualityListItemData = Omit<InteractiveListItemData, "id"> & {
14
+ id: VideoQualityUI;
15
+ };
16
+ export type MainMenuListItemData = BaseListItemData & {
17
+ icon: Component<{
18
+ size: IconSize;
19
+ shadow?: boolean;
20
+ }>;
21
+ extraText: string;
22
+ };
23
+ export type AudioTrackListItemData = InteractiveListItemData & {
24
+ extraText: string;
25
+ };
26
+ export type SubtitleListItemData = InteractiveListItemData;
27
+ export {};
@@ -167,6 +167,7 @@ export type SubtitlesStore = {
167
167
  }>;
168
168
  availableSubtitlesList$: Readable<VideoSubtitle[]>;
169
169
  currentSubtitleCaptions$: Readable<VideoSubtitleParsed["texts"]>;
170
+ currentSubtitle$: Readable<Omit<VideoSubtitle, "selected">>;
170
171
  };
171
172
  action: {
172
173
  subtitlesDestroy(): void;
@@ -269,6 +270,7 @@ export interface IStore {
269
270
  subtitles: {
270
271
  availableSubtitlesList$: Readable<VideoSubtitle[]>;
271
272
  currentSubtitleCaptions$: Readable<VideoSubtitleParsed["texts"]>;
273
+ currentSubtitle$: Readable<Omit<VideoSubtitle, "selected">>;
272
274
  };
273
275
  ads: IAdsState;
274
276
  actions: {
@@ -481,4 +481,8 @@ export type Position = {
481
481
  bottom?: number;
482
482
  right?: number;
483
483
  };
484
+ export interface Caption {
485
+ timeAppeared?: number | null;
486
+ value: string;
487
+ }
484
488
  export {};
@@ -0,0 +1,17 @@
1
+ import { type IValueSubject } from "@vkontakte/videoplayer-shared";
2
+ import type { Caption, VideoSubtitleParsed } from "../types";
3
+ export declare class CaptionsPrepared {
4
+ private readonly flickeringTimeout;
5
+ private readonly subscriptions;
6
+ private isAuto;
7
+ private isLive;
8
+ private readonly captions$;
9
+ readonly captionsPrepared$: IValueSubject<Caption[][]>;
10
+ subscribe(): this;
11
+ setIsAuto(value: boolean): void;
12
+ setIsLive(value: boolean): void;
13
+ setCaptions(value: VideoSubtitleParsed["texts"]): void;
14
+ destroy(): void;
15
+ private isEnabled;
16
+ private processCaptions;
17
+ }
@@ -1,2 +1,3 @@
1
1
  import type { VideoSubtitle, VideoSubtitleParsed, VideoSubtitlesParsed } from "../types";
2
+ export declare const resetSubtitlePhraseState: () => void;
2
3
  export declare const findCurrentSubtitlePhrase: (position: number, currentSubtitle: Omit<VideoSubtitle, "selected">, availableSubtitlesParsed: VideoSubtitlesParsed, isLive?: boolean) => VideoSubtitleParsed | undefined;