@vkontakte/videoplayer 1.1.95 → 1.1.96-dev.cd28586c7.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 +10 -10
- package/es2015.esm.js +10 -10
- package/esnext.cjs +10 -10
- package/esnext.esm.js +9 -9
- package/evergreen.esm.js +9 -9
- package/package.json +5 -5
- package/types/VKVideoPlayer/index.svelte.d.ts +7 -1
- package/types/components/Menus/subMenuTabs/types.d.ts +7 -0
- package/types/components/Menus/utils/getSubMenusStack.svelte.d.ts +1 -0
- package/types/index.d.ts +1 -1
- package/types/store/composition.d.ts +2 -1
- package/types/store/modules/highlightedMenuItemsStore/highlightedMenuItems.module.d.ts +3 -0
- package/types/store/modules/highlightedMenuItemsStore/highlightedMenuItems.store.d.ts +21 -0
- package/types/store/modules/highlightedMenuItemsStore/highlightedMenuItems.token.d.ts +5 -0
- package/types/store/modules/highlightedMenuItemsStore/index.d.ts +3 -0
- package/types/store/modules/index.d.ts +2 -0
- package/types/utils/sanitizeSvg.d.ts +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.96-dev.cd28586c7.0",
|
|
4
4
|
"author": "vk.com",
|
|
5
5
|
"description": "Videoplayer based on the vk.com platform",
|
|
6
6
|
"homepage": "https://vk.com",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@adtech/rbadman": "2.2.57",
|
|
46
|
-
"@vkontakte/videoplayer-core": "2.0.
|
|
47
|
-
"@vkontakte/videoplayer-interactive": "1.0.
|
|
48
|
-
"@vkontakte/videoplayer-shared": "1.0.
|
|
49
|
-
"@vkontakte/videoplayer-statistics": "1.0.
|
|
46
|
+
"@vkontakte/videoplayer-core": "2.0.165-dev.cd28586c7.0",
|
|
47
|
+
"@vkontakte/videoplayer-interactive": "1.0.71-dev.cd28586c7.0",
|
|
48
|
+
"@vkontakte/videoplayer-shared": "1.0.94-dev.cd28586c7.0",
|
|
49
|
+
"@vkontakte/videoplayer-statistics": "1.0.111-dev.cd28586c7.0"
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -7,7 +7,7 @@ import type { PlaybackRate } from "@vkontakte/videoplayer-core";
|
|
|
7
7
|
import { type IStatContext } from "@vkontakte/videoplayer-statistics";
|
|
8
8
|
import { ThinOneStat } from "@vkontakte/videoplayer-statistics";
|
|
9
9
|
import { AnnotationsApi } from "../utils/webAPI/annotationsApi/annotationsApi";
|
|
10
|
-
import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem } from "../components/Menus/subMenuTabs/types";
|
|
10
|
+
import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem, MenuItemHighlight, RootMenuId } from "../components/Menus/subMenuTabs/types";
|
|
11
11
|
import type { AdditionalButton } from "../components/Controls/types";
|
|
12
12
|
import { SlotsApi } from "../utils/webAPI/slotsApi";
|
|
13
13
|
import { HTMLElement } from "./HTMLElement";
|
|
@@ -158,6 +158,7 @@ export declare class VKVideoPlayer extends HTMLElement {
|
|
|
158
158
|
*/
|
|
159
159
|
toggleHighQuality(value: boolean): void;
|
|
160
160
|
changeAudioStream(id: string): void;
|
|
161
|
+
setHighlightedMenuItems(items: Partial<Record<RootMenuId, MenuItemHighlight>> | undefined): void;
|
|
161
162
|
addLanguage(config: LanguageConfig): void;
|
|
162
163
|
setLanguage(language: InterfaceLanguage | string): Promise<void>;
|
|
163
164
|
private replaceVideoDataInConfig;
|
|
@@ -193,6 +194,11 @@ export declare class VKVideoPlayer extends HTMLElement {
|
|
|
193
194
|
updateStatContext(statContext: Partial<IStatContext | ThinOneStat.IStatContext>): void;
|
|
194
195
|
handleTimerNextVideo(state: boolean): void;
|
|
195
196
|
togglePictureInPicture(): void;
|
|
197
|
+
/**
|
|
198
|
+
* Переключает видимость меню настроек.
|
|
199
|
+
* @param force Если true — открыть, если false — закрыть, если не указано — toggle.
|
|
200
|
+
*/
|
|
201
|
+
toggleSettingsMenu(force?: boolean): void;
|
|
196
202
|
focus(): void;
|
|
197
203
|
/**
|
|
198
204
|
* Восстанавливает фокус на последнем сфокусированном элементе в плеере.
|
|
@@ -28,6 +28,7 @@ export declare enum RootMenuId {
|
|
|
28
28
|
COPY_DATA = "copy-data",
|
|
29
29
|
DEBUG_INFO = "debug-info"
|
|
30
30
|
}
|
|
31
|
+
export declare const SETTINGS_MENU_ID: "settings";
|
|
31
32
|
export type Context = {
|
|
32
33
|
closeSettingsMenu: () => void;
|
|
33
34
|
isMobile: boolean;
|
|
@@ -111,6 +112,12 @@ export declare enum MenuItemType {
|
|
|
111
112
|
CLICK = "CLICK",
|
|
112
113
|
SWITCH = "SWITCH"
|
|
113
114
|
}
|
|
115
|
+
export interface MenuItemHighlight {
|
|
116
|
+
/** SVG как строка или URL на SVG-файл */
|
|
117
|
+
svg: string;
|
|
118
|
+
/** CSS стили для контейнера с SVG */
|
|
119
|
+
styleSvgContainer?: string;
|
|
120
|
+
}
|
|
114
121
|
export declare enum SubMenuItemType {
|
|
115
122
|
OPEN_SUB_MENU = "OPEN_SUB_MENU",
|
|
116
123
|
SELECT_VALUE = "SELECT_VALUE"
|
package/types/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { ISources, IDashSource, URLSource, RawSource, URLSourceWithSeek } f
|
|
|
6
6
|
import type { Milliseconds, QualityLimits } from "@vkontakte/videoplayer-shared";
|
|
7
7
|
export { VERSION } from "./env";
|
|
8
8
|
export declare const registerPlayerWebComponent: () => void;
|
|
9
|
-
export { type AdditionalSettingsMenuItem, MenuItemType, type AdditionalClickSettingsMenuItem, type AdditionalSwitchSettingsMenuItem, type AdditionalContextMenuItem } from "./components/Menus/subMenuTabs/types";
|
|
9
|
+
export { type AdditionalSettingsMenuItem, MenuItemType, type AdditionalClickSettingsMenuItem, type AdditionalSwitchSettingsMenuItem, type AdditionalContextMenuItem, RootMenuId, SubMenuId, SETTINGS_MENU_ID } from "./components/Menus/subMenuTabs/types";
|
|
10
10
|
export { type AdditionalButton, ControlButtonType } from "./components/Controls/types";
|
|
11
11
|
export type { VKVideoPlayer, IVKVideoPlayerConfig, IUpdatableVKVideoPlayerConfig, IControlInfo, ITimelinePreviewThumbsData, IUpcomingLiveViewControlInfo, IVKVideoPlayerCallbacks, IVideoData, AdsParams, HotKeyMapData, HotKeyMapItem, HotKeyMapGroup, ISources, IDashSource, URLSource, RawSource, URLSourceWithSeek, LanguagePack, LanguageConfig, Milliseconds, IVideoLive, IInteractiveData, AdditionalButtonDeprecated, QualityLimits, IAdsConfig, IVideoEpisode, IDpipConfig, IQoeConfig, IQoePoll, IQoeResult, IQoeQuestion, IQoeCallbacks, QoePollTranslations, ISDKConfig, VideoPlayerView, IAdmanInitParamsExternalApi, VKLogoType };
|
|
12
12
|
export { GridTypes } from "./constans";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IUIConfig } from "../config";
|
|
2
2
|
import type { IVKVideoPlayerConfig } from "../types";
|
|
3
3
|
import type { IStore } from "./index";
|
|
4
|
-
import type { FakeIsPlayingStore, GraphIsOpenedStore, InteractiveControlsOpacityStore, NotificationsStore, PictureInPictureStore, IQoeStore, SeekToInteractiveDisabledTooltipStore, ShowInteractiveTimeIndicatorTooltipStore } from "./modules";
|
|
4
|
+
import type { FakeIsPlayingStore, GraphIsOpenedStore, HighlightedMenuItemsStore, InteractiveControlsOpacityStore, NotificationsStore, PictureInPictureStore, IQoeStore, SeekToInteractiveDisabledTooltipStore, ShowInteractiveTimeIndicatorTooltipStore } from "./modules";
|
|
5
5
|
import type { Interactives } from "@vkontakte/videoplayer-interactive";
|
|
6
6
|
export interface ICompositionParams {
|
|
7
7
|
legacyStore: IStore;
|
|
@@ -14,6 +14,7 @@ export interface ICompositionResult {
|
|
|
14
14
|
fakeIsPlayingStore: FakeIsPlayingStore;
|
|
15
15
|
graphIsOpenedStore: GraphIsOpenedStore;
|
|
16
16
|
interactiveControlsOpacityStore: InteractiveControlsOpacityStore;
|
|
17
|
+
highlightedMenuItemsStore: HighlightedMenuItemsStore;
|
|
17
18
|
notificationsStore: NotificationsStore;
|
|
18
19
|
pictureInPictureStore: PictureInPictureStore;
|
|
19
20
|
qoeStore: IQoeStore;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HighlightedMenuItems Store
|
|
3
|
+
*
|
|
4
|
+
* Управляет подсветкой пунктов меню настроек.
|
|
5
|
+
*/
|
|
6
|
+
import type { Writable } from "svelte/store";
|
|
7
|
+
import type { MenuItemHighlight, RootMenuId } from "../../../components/Menus/subMenuTabs/types";
|
|
8
|
+
export interface HighlightedMenuItemsStoreState {
|
|
9
|
+
items$: Writable<Partial<Record<RootMenuId, MenuItemHighlight>> | undefined>;
|
|
10
|
+
}
|
|
11
|
+
export interface HighlightedMenuItemsStoreActions {
|
|
12
|
+
/** Установить подсвеченные пункты меню */
|
|
13
|
+
setHighlightedMenuItems(items: Partial<Record<RootMenuId, MenuItemHighlight>> | undefined): void;
|
|
14
|
+
/** Очистить подсветку */
|
|
15
|
+
clear(): void;
|
|
16
|
+
}
|
|
17
|
+
export interface HighlightedMenuItemsStore {
|
|
18
|
+
state: HighlightedMenuItemsStoreState;
|
|
19
|
+
actions: HighlightedMenuItemsStoreActions;
|
|
20
|
+
}
|
|
21
|
+
export declare const createHighlightedMenuItemsStore: () => HighlightedMenuItemsStore;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { InjectionToken } from "@vkontakte/videoplayer-shared";
|
|
2
|
+
export declare const HIGHLIGHTED_MENU_ITEMS_STORE_TOKEN: InjectionToken<HIGHLIGHTED_MENU_ITEMS_STORE_STORE>;
|
|
3
|
+
import type { HighlightedMenuItemsStore } from "./highlightedMenuItems.store";
|
|
4
|
+
type HIGHLIGHTED_MENU_ITEMS_STORE_STORE = HighlightedMenuItemsStore;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type { HighlightedMenuItemsStoreState, HighlightedMenuItemsStore, HighlightedMenuItemsStoreActions } from "./highlightedMenuItems.store";
|
|
2
|
+
export { highlightedMenuItemsModule } from "./highlightedMenuItems.module";
|
|
3
|
+
export { HIGHLIGHTED_MENU_ITEMS_STORE_TOKEN } from "./highlightedMenuItems.token";
|
|
@@ -18,3 +18,5 @@ export type { SeekToInteractiveDisabledTooltipStoreState, SeekToInteractiveDisab
|
|
|
18
18
|
export { seekToInteractiveDisabledTooltipModule, SEEK_TO_INTERACTIVE_DISABLED_TOOLTIP_STORE_TOKEN } from "./seekToInteractiveDisabledTooltipStore";
|
|
19
19
|
export type { ShowInteractiveTimeIndicatorTooltipStoreState, ShowInteractiveTimeIndicatorTooltipStore, ShowInteractiveTimeIndicatorTooltipStoreActions, ShowInteractiveTimeIndicatorTooltipStoreDeps } from "./showInteractiveTimeIndicatorTooltipStore";
|
|
20
20
|
export { showInteractiveTimeIndicatorTooltipModule, SHOW_INTERACTIVE_TIME_INDICATOR_TOOLTIP_STORE_TOKEN } from "./showInteractiveTimeIndicatorTooltipStore";
|
|
21
|
+
export type { HighlightedMenuItemsStoreState, HighlightedMenuItemsStore, HighlightedMenuItemsStoreActions } from "./highlightedMenuItemsStore";
|
|
22
|
+
export { highlightedMenuItemsModule, HIGHLIGHTED_MENU_ITEMS_STORE_TOKEN } from "./highlightedMenuItemsStore";
|