@vkontakte/videoplayer 1.1.96-dev.dc17075f7.0 → 1.1.97-dev.2d0cf8810.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 +11 -11
- 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/config.d.ts +10 -0
- package/types/index.d.ts +3 -3
- 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 +1 -0
- package/types/store/types.d.ts +1 -0
- package/types/types/index.d.ts +1 -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.97-dev.2d0cf8810.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.166-dev.2d0cf8810.0",
|
|
47
|
+
"@vkontakte/videoplayer-interactive": "1.0.72-dev.2d0cf8810.0",
|
|
48
|
+
"@vkontakte/videoplayer-shared": "1.0.95-dev.2d0cf8810.0",
|
|
49
|
+
"@vkontakte/videoplayer-statistics": "1.0.112-dev.2d0cf8810.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";
|
|
@@ -159,6 +159,7 @@ export declare class VKVideoPlayer extends HTMLElement {
|
|
|
159
159
|
*/
|
|
160
160
|
toggleHighQuality(value: boolean): void;
|
|
161
161
|
changeAudioStream(id: string): void;
|
|
162
|
+
setHighlightedMenuItems(items: Partial<Record<RootMenuId, MenuItemHighlight>> | undefined): void;
|
|
162
163
|
addLanguage(config: LanguageConfig): void;
|
|
163
164
|
setLanguage(language: InterfaceLanguage | string): Promise<void>;
|
|
164
165
|
private replaceVideoDataInConfig;
|
|
@@ -194,6 +195,11 @@ export declare class VKVideoPlayer extends HTMLElement {
|
|
|
194
195
|
updateStatContext(statContext: Partial<IStatContext | ThinOneStat.IStatContext>): void;
|
|
195
196
|
handleTimerNextVideo(state: boolean): void;
|
|
196
197
|
togglePictureInPicture(): void;
|
|
198
|
+
/**
|
|
199
|
+
* Переключает видимость меню настроек.
|
|
200
|
+
* @param force Если true — открыть, если false — закрыть, если не указано — toggle.
|
|
201
|
+
*/
|
|
202
|
+
toggleSettingsMenu(force?: boolean): void;
|
|
197
203
|
focus(): void;
|
|
198
204
|
/**
|
|
199
205
|
* Восстанавливает фокус на последнем сфокусированном элементе в плеере.
|
|
@@ -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/config.d.ts
CHANGED
|
@@ -62,6 +62,16 @@ export interface IAdsConfig {
|
|
|
62
62
|
export interface IUIConfig {
|
|
63
63
|
isMobile: ForceOrRelay;
|
|
64
64
|
keepPlayerElement: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* не будет использовано если keepPlayerElement: false
|
|
67
|
+
* @default true
|
|
68
|
+
*/
|
|
69
|
+
keepPlayerElementOnMobile: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* не будет использовано если keepPlayerElement: false
|
|
72
|
+
* @default true
|
|
73
|
+
*/
|
|
74
|
+
keepPlayerElementOnSafari: boolean;
|
|
65
75
|
disableInvisibleComponentsTimeout: Milliseconds;
|
|
66
76
|
debugLog: boolean | {
|
|
67
77
|
tag?: string;
|
package/types/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { VKVideoPlayer } from "./VKVideoPlayer/index.svelte";
|
|
2
|
-
import type { AdsParams, IAdmanInitParamsExternalApi, IVKVideoPlayerConfig, IUpdatableVKVideoPlayerConfig, IControlInfo, ITimelinePreviewThumbsData, IUpcomingLiveViewControlInfo, IVKVideoPlayerCallbacks, IVideoData, HotKeyMapData, HotKeyMapItem, HotKeyMapGroup, IVideoLive, IInteractiveData, AdditionalButtonDeprecated, IVideoEpisode, IQoeConfig, IQoePoll, IQoeResult, IQoeQuestion, IQoeCallbacks, QoePollTranslations, VideoPlayerView } from "./types";
|
|
2
|
+
import type { AdsParams, IAdmanInitParamsExternalApi, IVKVideoPlayerConfig, IUpdatableVKVideoPlayerConfig, IControlInfo, ITimelinePreviewThumbsData, IUpcomingLiveViewControlInfo, IVKVideoPlayerCallbacks, IVideoData, HotKeyMapData, HotKeyMapItem, HotKeyMapGroup, IVideoLive, IInteractiveData, AdditionalButtonDeprecated, IVideoEpisode, IQoeConfig, IQoeButtonOnlyConfig, IQoePoll, IQoeResult, IQoeQuestion, IQoeCallbacks, QoePollTranslations, VideoPlayerView } from "./types";
|
|
3
3
|
import type { LanguagePack, LanguageConfig } from "./translation/types";
|
|
4
4
|
import type { LogoType as VKLogoType, IAdsConfig, ISDKConfig, IDpipConfig } from "./config";
|
|
5
5
|
import type { ISources, IDashSource, URLSource, RawSource, URLSourceWithSeek } from "@vkontakte/videoplayer-core";
|
|
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
|
-
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 };
|
|
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, IQoeButtonOnlyConfig, IQoePoll, IQoeResult, IQoeQuestion, IQoeCallbacks, QoePollTranslations, ISDKConfig, VideoPlayerView, IAdmanInitParamsExternalApi, VKLogoType };
|
|
12
12
|
export { GridTypes } from "./constans";
|
|
13
13
|
export { PlayerPhase } from "./types";
|
|
14
14
|
export { isPiPSupported, isDpipSupported } from "./utils/webAPI/pictureInPictureApi";
|
|
@@ -2,7 +2,7 @@ import type { IUIConfig } from "../config";
|
|
|
2
2
|
import type { IVKVideoPlayerConfig } from "../types";
|
|
3
3
|
import type { IUIStatistics } from "../services/statistics";
|
|
4
4
|
import type { IStore } from "./index";
|
|
5
|
-
import type { FakeIsPlayingStore, GraphIsOpenedStore, InteractiveControlsOpacityStore, LanguageStore, NotificationsStore, PictureInPictureStore, IQoeStore, SeekToInteractiveDisabledTooltipStore, ShowInteractiveTimeIndicatorTooltipStore, SubtitlesStore, QualityStore, PlaybackRateStore } from "./modules";
|
|
5
|
+
import type { FakeIsPlayingStore, GraphIsOpenedStore, HighlightedMenuItemsStore, InteractiveControlsOpacityStore, LanguageStore, NotificationsStore, PictureInPictureStore, IQoeStore, SeekToInteractiveDisabledTooltipStore, ShowInteractiveTimeIndicatorTooltipStore, SubtitlesStore, QualityStore, PlaybackRateStore } from "./modules";
|
|
6
6
|
import type { AppTracer, ITracer } from "@vkontakte/videoplayer-shared";
|
|
7
7
|
import type { Interactives } from "@vkontakte/videoplayer-interactive";
|
|
8
8
|
export interface ICompositionParams {
|
|
@@ -19,6 +19,7 @@ export interface ICompositionResult {
|
|
|
19
19
|
fakeIsPlayingStore: FakeIsPlayingStore;
|
|
20
20
|
graphIsOpenedStore: GraphIsOpenedStore;
|
|
21
21
|
interactiveControlsOpacityStore: InteractiveControlsOpacityStore;
|
|
22
|
+
highlightedMenuItemsStore: HighlightedMenuItemsStore;
|
|
22
23
|
notificationsStore: NotificationsStore;
|
|
23
24
|
pictureInPictureStore: PictureInPictureStore;
|
|
24
25
|
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";
|
|
@@ -20,6 +20,7 @@ export type { SeekToInteractiveDisabledTooltipStoreState, SeekToInteractiveDisab
|
|
|
20
20
|
export { seekToInteractiveDisabledTooltipModule, SEEK_TO_INTERACTIVE_DISABLED_TOOLTIP_STORE_TOKEN } from "./seekToInteractiveDisabledTooltipStore";
|
|
21
21
|
export type { ShowInteractiveTimeIndicatorTooltipStoreState, ShowInteractiveTimeIndicatorTooltipStore, ShowInteractiveTimeIndicatorTooltipStoreActions, ShowInteractiveTimeIndicatorTooltipStoreDeps } from "./showInteractiveTimeIndicatorTooltipStore";
|
|
22
22
|
export { showInteractiveTimeIndicatorTooltipModule, SHOW_INTERACTIVE_TIME_INDICATOR_TOOLTIP_STORE_TOKEN } from "./showInteractiveTimeIndicatorTooltipStore";
|
|
23
|
+
export { type HighlightedMenuItemsStoreState, type HighlightedMenuItemsStore, type HighlightedMenuItemsStoreActions, highlightedMenuItemsModule, HIGHLIGHTED_MENU_ITEMS_STORE_TOKEN } from "./highlightedMenuItemsStore";
|
|
23
24
|
export type { SubtitlesStoreState, SubtitlesStoreInternalActions, SubtitlesStoreExternalActions, SubtitlesStore, SubtitlesStoreDeps } from "./subtitlesStore";
|
|
24
25
|
export { subtitlesModule, SUBTITLES_STORE_TOKEN } from "./subtitlesStore";
|
|
25
26
|
export type { QualityStoreDeps, QualityStoreState, QualityStore } from "./qualityStore";
|
package/types/store/types.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ export interface IUIState {
|
|
|
62
62
|
fullscreen: Writable<IControlInfo | undefined>;
|
|
63
63
|
chromecast: Writable<IControlInfo | undefined>;
|
|
64
64
|
pip: Writable<IControlInfo | undefined>;
|
|
65
|
+
qoe: Writable<IControlInfo | undefined>;
|
|
65
66
|
"theater-mode-button": Writable<IControlInfo | undefined>;
|
|
66
67
|
vkLogo: Writable<IControlInfo | undefined>;
|
|
67
68
|
interactiveTimeIndicator: Writable<IControlInfo | undefined>;
|
package/types/types/index.d.ts
CHANGED
|
@@ -381,6 +381,7 @@ export interface IPlayerControlsRef {
|
|
|
381
381
|
interactiveTimeIndicator?: HTMLElement;
|
|
382
382
|
timeline?: HTMLElement;
|
|
383
383
|
autoplayNextToggle?: HTMLButtonElement;
|
|
384
|
+
qoe?: HTMLElement;
|
|
384
385
|
}
|
|
385
386
|
export interface IPlayerDesktopControlsWidth {
|
|
386
387
|
prevButton: number;
|