@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/es2015.cjs +11 -11
- package/es2015.esm.js +11 -11
- package/esnext.cjs +11 -11
- package/esnext.esm.js +11 -11
- package/evergreen.esm.js +11 -11
- package/package.json +4 -4
- package/types/components/List/types.d.ts +21 -2
- package/types/store/types.d.ts +2 -0
- package/types/types/index.d.ts +4 -0
- package/types/utils/CaptionsPrepared.d.ts +17 -0
- package/types/utils/findCurrentSubtltlePhrase.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer-tv",
|
|
3
|
-
"version": "1.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.
|
|
46
|
-
"@vkontakte/videoplayer-shared": "1.0.
|
|
47
|
-
"@vkontakte/videoplayer-statistics": "1.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
|
-
|
|
3
|
-
id:
|
|
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 {};
|
package/types/store/types.d.ts
CHANGED
|
@@ -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: {
|
package/types/types/index.d.ts
CHANGED
|
@@ -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;
|