@vplayer/react 0.1.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/dist/components/player/adapter-types.d.ts +31 -0
- package/dist/components/player/components/aspect-ratio-setting.d.ts +13 -0
- package/dist/components/player/components/auto-resume-overlay.d.ts +2 -0
- package/dist/components/player/components/context-menu.d.ts +2 -0
- package/dist/components/player/components/error-overlay.d.ts +2 -0
- package/dist/components/player/components/flip-setting.d.ts +13 -0
- package/dist/components/player/components/info-panel.d.ts +9 -0
- package/dist/components/player/components/mini-progress-bar.d.ts +2 -0
- package/dist/components/player/components/screenshot-button.d.ts +6 -0
- package/dist/components/player/context.d.ts +16 -0
- package/dist/components/player/controls.d.ts +14 -0
- package/dist/components/player/defaults.d.ts +8 -0
- package/dist/components/player/hooks/use-controls-visibility.d.ts +15 -0
- package/dist/components/player/hooks/use-mini-player-state.d.ts +4 -0
- package/dist/components/player/hooks/use-mobile-gestures.d.ts +3 -0
- package/dist/components/player/hooks/use-player.d.ts +35 -0
- package/dist/components/player/index.d.ts +25 -0
- package/dist/components/player/layout/compact-video-layout.d.ts +2 -0
- package/dist/components/player/layout/default-video-layout.d.ts +2 -0
- package/dist/components/player/layout/large-video-layout.d.ts +2 -0
- package/dist/components/player/layout/player-chrome.d.ts +7 -0
- package/dist/components/player/layout/slots.d.ts +1 -0
- package/dist/components/player/overlays.d.ts +5 -0
- package/dist/components/player/player-provider.d.ts +33 -0
- package/dist/components/player/player.d.ts +2 -0
- package/dist/components/player/plugin-api.d.ts +3 -0
- package/dist/components/player/plugin-renderer.d.ts +11 -0
- package/dist/components/player/types.d.ts +92 -0
- package/dist/components/player/utils/merge.d.ts +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +10830 -0
- package/dist/player.css +2 -0
- package/package.json +60 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Store } from '@tanstack/store';
|
|
2
|
+
import type { EventBus, HotkeyRegistry, I18n, MediaRemote, MediaState, PlayerInstance, PlayerLabels, PlayerOptions, PluginAPI, Storage } from '@vplayer/core';
|
|
3
|
+
export interface UsePlayerResult {
|
|
4
|
+
state: MediaState;
|
|
5
|
+
remote: MediaRemote;
|
|
6
|
+
attach(container: HTMLDivElement, video: HTMLVideoElement): void;
|
|
7
|
+
detach(): void;
|
|
8
|
+
use(plugin: import('@vplayer/core').PlayerPlugin): void;
|
|
9
|
+
updateOptions(opts: Partial<PlayerOptions>): void;
|
|
10
|
+
instance: PlayerInstance;
|
|
11
|
+
}
|
|
12
|
+
export interface PluginAPIContext {
|
|
13
|
+
store: Store<MediaState>;
|
|
14
|
+
remote: MediaRemote;
|
|
15
|
+
events: EventBus;
|
|
16
|
+
storage: Storage;
|
|
17
|
+
i18n: I18n;
|
|
18
|
+
hotkeys: HotkeyRegistry;
|
|
19
|
+
containerEl: HTMLDivElement | null;
|
|
20
|
+
videoEl: HTMLVideoElement | null;
|
|
21
|
+
}
|
|
22
|
+
export interface PluginAPIBuilder {
|
|
23
|
+
(name: string, ctx: PluginAPIContext): PluginAPI;
|
|
24
|
+
}
|
|
25
|
+
export interface AdapterContextValue {
|
|
26
|
+
instance: PlayerInstance;
|
|
27
|
+
containerEl: HTMLElement | null;
|
|
28
|
+
videoEl: HTMLVideoElement | null;
|
|
29
|
+
labels: PlayerLabels;
|
|
30
|
+
createPluginAPI: PluginAPIBuilder;
|
|
31
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PluginAPI } from '@vplayer/core';
|
|
2
|
+
import { type FC } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Settings panel item for video aspect ratio.
|
|
5
|
+
*
|
|
6
|
+
* Renders common VLC-style radio options (Default / 16:9 / 4:3 / 21:9 / cover / fill).
|
|
7
|
+
* and calls `api.remote.setAspectRatio()` on change.
|
|
8
|
+
*
|
|
9
|
+
* Designed to be registered via `api.addSetting()` from a plugin.
|
|
10
|
+
*/
|
|
11
|
+
export declare const AspectRatioSetting: FC<{
|
|
12
|
+
api: PluginAPI;
|
|
13
|
+
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PluginAPI } from '@vplayer/core';
|
|
2
|
+
import { type FC } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Settings panel item for video flip orientation.
|
|
5
|
+
*
|
|
6
|
+
* Renders three radio-style options (normal / horizontal / vertical)
|
|
7
|
+
* and calls `api.remote.setFlip()` on change.
|
|
8
|
+
*
|
|
9
|
+
* Designed to be registered via `api.addSetting()` from a plugin.
|
|
10
|
+
*/
|
|
11
|
+
export declare const FlipSetting: FC<{
|
|
12
|
+
api: PluginAPI;
|
|
13
|
+
}>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Debug overlay panel rendered in the top-right corner of the player.
|
|
4
|
+
*
|
|
5
|
+
* Displays version, duration, resolution, current time, volume,
|
|
6
|
+
* playback rate, dropped frames, and network state in a compact
|
|
7
|
+
* monospace grid.
|
|
8
|
+
*/
|
|
9
|
+
export declare const InfoPanel: FC;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { PluginAPI } from '@vplayer/core';
|
|
2
|
+
import type { MediaRemote, MediaState, MiniPlayerState, PlayerContextValue } from './types';
|
|
3
|
+
export declare const PlayerContext: import("react").Context<PlayerContextValue | null>;
|
|
4
|
+
export declare function usePlayerContext(): PlayerContextValue;
|
|
5
|
+
export declare function usePlayerState(): MediaState;
|
|
6
|
+
export declare function usePlayerState<K extends keyof MediaState>(key: K): MediaState[K];
|
|
7
|
+
export declare function usePlayerState<TSelected>(selector: (state: MediaState) => TSelected): TSelected;
|
|
8
|
+
export declare function usePlayerRemote(): MediaRemote;
|
|
9
|
+
export declare function useMiniPlayer(): MiniPlayerState;
|
|
10
|
+
/**
|
|
11
|
+
* Hook for components that need access to the PluginAPI.
|
|
12
|
+
* Note: addControl/addSetting/addLayer/addHotkey will log warnings
|
|
13
|
+
* when called outside plugin setup — plugins should only register
|
|
14
|
+
* during their setup() callback.
|
|
15
|
+
*/
|
|
16
|
+
export declare function usePluginAPI(): PluginAPI;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
export declare const SeekBar: FC;
|
|
3
|
+
export declare const PlayButton: FC<{
|
|
4
|
+
size?: number;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const SkipButton: FC<{
|
|
7
|
+
seconds: number;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const TimeDisplay: FC;
|
|
10
|
+
export declare const VolumeControl: FC;
|
|
11
|
+
export declare const SettingsTrigger: FC;
|
|
12
|
+
export declare const MiniPlayerButton: FC;
|
|
13
|
+
export declare const PiPButton: FC;
|
|
14
|
+
export declare const FullscreenButton: FC;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React-specific defaults.
|
|
3
|
+
*
|
|
4
|
+
* Note: defaultPlayerLabels and defaultPlayerIcons live in @vplayer/core
|
|
5
|
+
* as framework-agnostic plain data (strings + Iconify icon IDs).
|
|
6
|
+
* Re-export them here so consumers can import from @vplayer/react.
|
|
7
|
+
*/
|
|
8
|
+
export { defaultPlayerLabels, defaultPlayerIcons } from '@vplayer/core';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Store } from '@tanstack/store';
|
|
2
|
+
import type { MediaState } from '../types';
|
|
3
|
+
export declare function useControlsVisibility(mediaStore: Store<MediaState>): {
|
|
4
|
+
clearHideTimer: () => void;
|
|
5
|
+
hideControls: () => void;
|
|
6
|
+
rootHandlers: {
|
|
7
|
+
onMouseMove: () => void;
|
|
8
|
+
onMouseEnter: () => void;
|
|
9
|
+
onMouseLeave: () => void;
|
|
10
|
+
onFocus: () => void;
|
|
11
|
+
onBlur: () => void;
|
|
12
|
+
};
|
|
13
|
+
scheduleHide: (delay?: number) => void;
|
|
14
|
+
showControls: (delay?: number) => void;
|
|
15
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
import type { MiniPlayerOptions, MiniPlayerState } from '../types';
|
|
3
|
+
export declare function useMiniPlayerState(anchorRef: RefObject<HTMLElement | null>, miniPlayer?: boolean | MiniPlayerOptions): MiniPlayerState;
|
|
4
|
+
export declare function createDisabledMiniPlayerState(): MiniPlayerState;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* usePlayer — Low-level hook per @vplayer/react adapter contract.
|
|
3
|
+
*
|
|
4
|
+
* Creates a PlayerInstance and subscribes to state via
|
|
5
|
+
* @tanstack/react-store's useStore. Returns a UsePlayerResult.
|
|
6
|
+
*
|
|
7
|
+
* Unlike the <VideoPlayer> component, this hook gives you full control
|
|
8
|
+
* over rendering. Use it when building custom player UIs.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* function MyPlayer({ src }: { src: string }) {
|
|
13
|
+
* const { attach, detach, remote, state } = usePlayer({ src })
|
|
14
|
+
* const containerRef = useRef<HTMLDivElement>(null)
|
|
15
|
+
* const videoRef = useRef<HTMLVideoElement>(null)
|
|
16
|
+
*
|
|
17
|
+
* useEffect(() => {
|
|
18
|
+
* attach(containerRef.current!, videoRef.current!)
|
|
19
|
+
* return () => detach()
|
|
20
|
+
* }, [attach, detach])
|
|
21
|
+
*
|
|
22
|
+
* return (
|
|
23
|
+
* <div ref={containerRef}>
|
|
24
|
+
* <video ref={videoRef} />
|
|
25
|
+
* <button onClick={() => remote.togglePlay()}>
|
|
26
|
+
* {state.isPlaying ? 'Pause' : 'Play'}
|
|
27
|
+
* </button>
|
|
28
|
+
* </div>
|
|
29
|
+
* )
|
|
30
|
+
* }
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
import type { PlayerOptions } from '@vplayer/core';
|
|
34
|
+
import type { UsePlayerResult } from '../adapter-types';
|
|
35
|
+
export declare function usePlayer(options: PlayerOptions): UsePlayerResult;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export { VideoPlayer } from './player';
|
|
2
|
+
export { ControlsBar, PlayerChrome } from './layout/player-chrome';
|
|
3
|
+
export { DefaultVideoLayout } from './layout/default-video-layout';
|
|
4
|
+
export { CompactVideoLayout } from './layout/compact-video-layout';
|
|
5
|
+
export { LargeVideoLayout } from './layout/large-video-layout';
|
|
6
|
+
export { SeekBar, PlayButton, SkipButton, TimeDisplay, VolumeControl, SettingsTrigger, PiPButton, FullscreenButton, MiniPlayerButton, } from './controls';
|
|
7
|
+
export { TopGradient, PauseOverlay, BufferingOverlay, EndOverlay } from './overlays';
|
|
8
|
+
export { usePlayerContext, usePlayerState, usePlayerRemote, useMiniPlayer, usePluginAPI } from './context';
|
|
9
|
+
export { usePlayerGestures } from './hooks/use-mobile-gestures';
|
|
10
|
+
export { usePlayer } from './hooks/use-player';
|
|
11
|
+
export { PlayerProvider } from './player-provider';
|
|
12
|
+
export type { PlayerProviderProps } from './player-provider';
|
|
13
|
+
export type { PlayerProps, PlayerSlots, PlayerLabels, PlayerIcons, MediaState, MediaRemote, PlayerContextValue, MiniPlayerOptions, MiniPlayerPosition, MiniPlayerState, ThumbnailPreviewOptions, NormalizedThumbnailPreviewOptions, } from './types';
|
|
14
|
+
export type { UsePlayerResult, PluginAPIBuilder, PluginAPIContext } from './adapter-types';
|
|
15
|
+
export { createPluginAPIBuilder } from './plugin-api';
|
|
16
|
+
export { createPluginAPI } from './plugin-api';
|
|
17
|
+
export { createPlayer, createGestureEngine, EventBus, Storage, STORAGE_KEYS, I18n, HotkeyRegistry, defaultPlayerLabels, defaultPlayerIcons, formatTime, } from '@vplayer/core';
|
|
18
|
+
export { parseSRT, parseVTT, fetchSubtitles, getActiveCue, fetchThumbnails, parseThumbnailVTT, getThumbnailAtTime, } from '@vplayer/core';
|
|
19
|
+
export type { PlayerOptions, PlayerInstance, PlayerSystems, PlayerError, PlayerEventName, PlayerEventHandler, SubtitleCue, SubtitleTrack, ThumbnailCue, LanguageDict, HotkeyBinding, ControlRegistration, SettingRegistration, LayerRegistration, SettingItem, ContextMenuItem, ContextMenuRegistration, PlayerPlugin, PluginAPI, RemoteRef, PlayerContextRef, FlipState, AspectRatioState, } from '@vplayer/core';
|
|
20
|
+
export { PluginControlsLeft, PluginControlsRight, PluginControlsTop, PluginControlsCenter, PluginLayers, PluginSettings, NotificationOverlay, } from './plugin-renderer';
|
|
21
|
+
export { MiniProgressBar } from './components/mini-progress-bar';
|
|
22
|
+
export { ScreenshotButton } from './components/screenshot-button';
|
|
23
|
+
export { ErrorOverlay } from './components/error-overlay';
|
|
24
|
+
export { AutoResumeOverlay } from './components/auto-resume-overlay';
|
|
25
|
+
export { ContextMenu } from './components/context-menu';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type PlayerSlotName = 'playButton' | 'seekBar' | 'volumeControl' | 'timeDisplay' | 'settingsButton' | 'settingsMenu' | 'fullscreenButton' | 'pipButton' | 'bufferingOverlay' | 'pauseOverlay' | 'endOverlay';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PlayerProvider — Standalone context provider per @vplayer/react contract.
|
|
3
|
+
*
|
|
4
|
+
* Creates a PlayerInstance via usePlayer() and makes it available
|
|
5
|
+
* to all descendant components via PlayerContext.
|
|
6
|
+
*
|
|
7
|
+
* Handles mount/unmount lifecycle, reactive option syncing (subtitles,
|
|
8
|
+
* qualities, thumbnails), and plugin initialization — giving you a
|
|
9
|
+
* complete player context without opinionated UI.
|
|
10
|
+
*
|
|
11
|
+
* Use this when you want <VideoPlayer>'s component tree but need
|
|
12
|
+
* to control the player instance lifecycle yourself.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <PlayerProvider options={{ src: 'video.mp4' }}>
|
|
17
|
+
* <DefaultVideoLayout />
|
|
18
|
+
* </PlayerProvider>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
import type { PlayerIcons, PlayerLabels } from '@vplayer/core';
|
|
22
|
+
import { type FC, type ReactNode } from 'react';
|
|
23
|
+
import { usePlayer } from './hooks/use-player';
|
|
24
|
+
import type { PlayerSlots } from './types';
|
|
25
|
+
import type { DeepPartial } from './utils/merge';
|
|
26
|
+
export interface PlayerProviderProps {
|
|
27
|
+
options: Parameters<typeof usePlayer>[0];
|
|
28
|
+
labels?: DeepPartial<PlayerLabels>;
|
|
29
|
+
icons?: DeepPartial<PlayerIcons>;
|
|
30
|
+
slots?: PlayerSlots;
|
|
31
|
+
children?: ReactNode;
|
|
32
|
+
}
|
|
33
|
+
export declare const PlayerProvider: FC<PlayerProviderProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renders plugin-registered controls, settings, and layers.
|
|
3
|
+
*/
|
|
4
|
+
import { type FC } from 'react';
|
|
5
|
+
export declare const PluginControlsLeft: FC;
|
|
6
|
+
export declare const PluginControlsRight: FC;
|
|
7
|
+
export declare const PluginControlsTop: FC;
|
|
8
|
+
export declare const PluginControlsCenter: FC;
|
|
9
|
+
export declare const PluginLayers: FC;
|
|
10
|
+
export declare const PluginSettings: FC;
|
|
11
|
+
export declare const NotificationOverlay: FC;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { Store } from '@tanstack/store';
|
|
2
|
+
import type { EventBus, HotkeyRegistry, I18n, MediaEngine, MediaRemote, MediaState, PlayerIcons, PlayerLabels, PlayerInstance, PlayerOptions, SvgIcon, Storage, SubtitleTrack, ThumbnailCue } from '@vplayer/core';
|
|
3
|
+
import type { AspectRatioState, ControlRegistration, ContextMenuItem, FlipState, LayerRegistration, PlayerPlugin, PluginAPI, SettingRegistration } from '@vplayer/core';
|
|
4
|
+
import type { ReactNode, RefObject } from 'react';
|
|
5
|
+
import type { PluginAPIBuilder } from './adapter-types';
|
|
6
|
+
export type { MediaState, MediaRemote, PlayerIcons, PlayerLabels, PlayerOptions, SvgIcon };
|
|
7
|
+
export type { AspectRatioState, ControlRegistration, ContextMenuItem, FlipState, LayerRegistration, PlayerPlugin, PluginAPI, SettingRegistration, };
|
|
8
|
+
export type { EventBus, HotkeyRegistry, I18n, Storage, SubtitleTrack, ThumbnailCue };
|
|
9
|
+
export interface PlayerSlots {
|
|
10
|
+
playButton?: ReactNode;
|
|
11
|
+
seekBar?: ReactNode;
|
|
12
|
+
volumeControl?: ReactNode;
|
|
13
|
+
timeDisplay?: ReactNode;
|
|
14
|
+
settingsButton?: ReactNode;
|
|
15
|
+
miniPlayerButton?: ReactNode;
|
|
16
|
+
settingsMenu?: ReactNode;
|
|
17
|
+
fullscreenButton?: ReactNode;
|
|
18
|
+
pipButton?: ReactNode;
|
|
19
|
+
bufferingOverlay?: ReactNode;
|
|
20
|
+
pauseOverlay?: ReactNode;
|
|
21
|
+
endOverlay?: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export type MiniPlayerPosition = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
24
|
+
export interface MiniPlayerOptions {
|
|
25
|
+
/** Enables YouTube-like floating mini-player mode. */
|
|
26
|
+
enabled?: boolean;
|
|
27
|
+
/** Automatically enter mini-player when the player leaves the viewport. Defaults to false. */
|
|
28
|
+
auto?: boolean;
|
|
29
|
+
/** Floating corner. Defaults to bottom-right. */
|
|
30
|
+
position?: MiniPlayerPosition;
|
|
31
|
+
/** CSS width for the mini player. Defaults to 360px. */
|
|
32
|
+
width?: number | string;
|
|
33
|
+
}
|
|
34
|
+
export interface ThumbnailPreviewOptions {
|
|
35
|
+
/** Enables seekbar thumbnail previews. Defaults to true when thumbnails are configured. */
|
|
36
|
+
enabled?: boolean;
|
|
37
|
+
/** Preview viewport width in pixels. Defaults to 180. */
|
|
38
|
+
width?: number;
|
|
39
|
+
/** Preview viewport height in pixels. Defaults to 101. */
|
|
40
|
+
height?: number;
|
|
41
|
+
/** Gap from the seekbar in pixels. Defaults to 10. */
|
|
42
|
+
gap?: number;
|
|
43
|
+
/** Show the time pill under the preview. Defaults to true. */
|
|
44
|
+
showTime?: boolean;
|
|
45
|
+
/** How scaled sprite regions should fit the preview viewport. Defaults to cover. */
|
|
46
|
+
fit?: 'cover' | 'contain';
|
|
47
|
+
}
|
|
48
|
+
export interface NormalizedThumbnailPreviewOptions {
|
|
49
|
+
enabled: boolean;
|
|
50
|
+
width: number;
|
|
51
|
+
height: number;
|
|
52
|
+
gap: number;
|
|
53
|
+
showTime: boolean;
|
|
54
|
+
fit: 'cover' | 'contain';
|
|
55
|
+
}
|
|
56
|
+
export interface MiniPlayerState {
|
|
57
|
+
enabled: boolean;
|
|
58
|
+
active: boolean;
|
|
59
|
+
auto: boolean;
|
|
60
|
+
position: MiniPlayerPosition;
|
|
61
|
+
width: number | string;
|
|
62
|
+
enter: () => void;
|
|
63
|
+
exit: () => void;
|
|
64
|
+
toggle: () => void;
|
|
65
|
+
}
|
|
66
|
+
export interface PlayerProps extends PlayerOptions {
|
|
67
|
+
className?: string;
|
|
68
|
+
children?: ReactNode;
|
|
69
|
+
labels?: Partial<PlayerLabels>;
|
|
70
|
+
icons?: Partial<PlayerIcons>;
|
|
71
|
+
slots?: PlayerSlots;
|
|
72
|
+
miniPlayer?: boolean | MiniPlayerOptions;
|
|
73
|
+
thumbnailPreview?: boolean | ThumbnailPreviewOptions;
|
|
74
|
+
}
|
|
75
|
+
export interface PlayerContextValue {
|
|
76
|
+
containerRef: RefObject<HTMLDivElement | null>;
|
|
77
|
+
videoRef: RefObject<HTMLVideoElement | null>;
|
|
78
|
+
labels: PlayerLabels;
|
|
79
|
+
icons: PlayerIcons;
|
|
80
|
+
slots: PlayerSlots;
|
|
81
|
+
mediaStore: Store<MediaState>;
|
|
82
|
+
mediaRemote: MediaRemote;
|
|
83
|
+
events: EventBus;
|
|
84
|
+
storage: Storage;
|
|
85
|
+
i18n: I18n;
|
|
86
|
+
hotkeys: HotkeyRegistry;
|
|
87
|
+
engine: MediaEngine | null;
|
|
88
|
+
instance: PlayerInstance;
|
|
89
|
+
createPluginAPI: PluginAPIBuilder;
|
|
90
|
+
miniPlayer: MiniPlayerState;
|
|
91
|
+
thumbnailPreview: NormalizedThumbnailPreviewOptions;
|
|
92
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PlayerIcons, PlayerLabels } from '@vplayer/core';
|
|
2
|
+
export type DeepPartial<T> = {
|
|
3
|
+
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
4
|
+
};
|
|
5
|
+
export declare function mergeLabels(defaults: PlayerLabels, overrides?: DeepPartial<PlayerLabels>): PlayerLabels;
|
|
6
|
+
export declare function mergeIcons(defaults: PlayerIcons, overrides?: DeepPartial<PlayerIcons>): PlayerIcons;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/player';
|