@vplayer/react 0.2.2 → 0.2.4

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.
@@ -1,2 +1,6 @@
1
1
  import { type FC } from 'react';
2
- export declare const AutoResumeOverlay: FC;
2
+ export interface AutoResumeOverlayProps {
3
+ /** Milliseconds before dismissing the prompt. Use 0 to keep it visible. */
4
+ timeout?: number;
5
+ }
6
+ export declare const AutoResumeOverlay: FC<AutoResumeOverlayProps>;
@@ -0,0 +1,2 @@
1
+ import type { FC } from 'react';
2
+ export declare const CaptionOverlay: FC;
@@ -0,0 +1,4 @@
1
+ import { type FC } from 'react';
2
+ export declare const CaptionSettingsPanel: FC<{
3
+ onBack: () => void;
4
+ }>;
@@ -0,0 +1,6 @@
1
+ import { type FC } from 'react';
2
+ interface SubtitleSearchPanelProps {
3
+ onBack: () => void;
4
+ }
5
+ export declare const SubtitleSearchPanel: FC<SubtitleSearchPanelProps>;
6
+ export {};
@@ -16,8 +16,8 @@ export { createPluginAPIBuilder } from './plugin-api';
16
16
  export { createPluginAPI } from './plugin-api';
17
17
  export { createPlayer, createGestureEngine, EventBus, Storage, LocalPlaybackProgressStore, STORAGE_KEYS, I18n, HotkeyRegistry, defaultPlayerLabels, formatTime, } from '@vplayer/core';
18
18
  export { defaultPlayerIcons } from './icon';
19
- export { parseSRT, parseVTT, fetchSubtitles, getActiveCue, fetchThumbnails, parseThumbnailVTT, getThumbnailAtTime, } from '@vplayer/core';
20
- export type { PlaybackProgress, PlaybackProgressStore, PlaybackProgressOptions, PlayerOptions, TransformThumbnailVTT, 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';
19
+ export { parseSRT, parseVTT, parseSubtitles, fetchSubtitles, getActiveCue, fetchThumbnails, parseThumbnailVTT, getThumbnailAtTime, } from '@vplayer/core';
20
+ export type { PlaybackProgress, PlaybackProgressStore, PlaybackProgressOptions, PlayerOptions, TransformThumbnailVTT, PlayerInstance, PlayerSystems, PlayerError, PlayerEventName, PlayerEventHandler, SubtitleCue, CaptionSettings, SubtitleProvider, SubtitleProviderInfo, SubtitleProviderResult, SubtitleSearchItem, SubtitleSearchQuery, SubtitleSearchResult, SubtitleSource, SubtitleFormat, SubtitleParseError, SubtitleParseResult, SubtitleTrack, ThumbnailCue, LanguageDict, HotkeyBinding, ControlRegistration, SettingRegistration, LayerRegistration, SettingItem, ContextMenuItem, ContextMenuRegistration, PlayerPlugin, PluginAPI, RemoteRef, PlayerContextRef, FlipState, AspectRatioState, } from '@vplayer/core';
21
21
  export { PluginControlsLeft, PluginControlsRight, PluginControlsTop, PluginControlsCenter, PluginLayers, PluginSettings, NotificationOverlay, } from './plugin-renderer';
22
22
  export { MiniProgressBar } from './components/mini-progress-bar';
23
23
  export { ScreenshotButton } from './components/screenshot-button';
@@ -25,7 +25,9 @@ import { type PlayerIcons } from './icon';
25
25
  import type { PlayerSlots } from './types';
26
26
  import type { DeepPartial } from './utils/merge';
27
27
  export interface PlayerProviderProps {
28
- options: Parameters<typeof usePlayer>[0];
28
+ options: Parameters<typeof usePlayer>[0] & {
29
+ subtitleSearchDefaultQuery?: string;
30
+ };
29
31
  labels?: DeepPartial<PlayerLabels>;
30
32
  icons?: Partial<PlayerIcons>;
31
33
  slots?: PlayerSlots;
@@ -1,5 +1,5 @@
1
1
  import type { Store } from '@tanstack/store';
2
- import type { EventBus, HotkeyRegistry, I18n, MediaEngine, MediaRemote, MediaState, PlayerLabels, PlayerInstance, PlayerOptions, Storage, SubtitleTrack, ThumbnailCue } from '@vplayer/core';
2
+ import type { CaptionSettings, EventBus, HotkeyRegistry, I18n, MediaEngine, MediaRemote, MediaState, PlayerLabels, PlayerInstance, PlayerOptions, Storage, SubtitleProvider, SubtitleProviderInfo, SubtitleProviderResult, SubtitleSearchItem, SubtitleSearchQuery, SubtitleSearchResult, SubtitleSource, SubtitleTrack, ThumbnailCue } from '@vplayer/core';
3
3
  import type { AspectRatioState, ControlRegistration, ContextMenuItem, FlipState, LayerRegistration, PlayerPlugin, PluginAPI, SettingRegistration } from '@vplayer/core';
4
4
  import type { ReactNode, RefObject } from 'react';
5
5
  import type { PluginAPIBuilder } from './adapter-types';
@@ -7,7 +7,7 @@ import type { PlayerIcons } from './icon';
7
7
  export type { MediaState, MediaRemote, PlayerLabels, PlayerOptions };
8
8
  export type { IconComponent, PlayerIcons } from './icon';
9
9
  export type { AspectRatioState, ControlRegistration, ContextMenuItem, FlipState, LayerRegistration, PlayerPlugin, PluginAPI, SettingRegistration, };
10
- export type { EventBus, HotkeyRegistry, I18n, Storage, SubtitleTrack, ThumbnailCue };
10
+ export type { CaptionSettings, EventBus, HotkeyRegistry, I18n, Storage, SubtitleProvider, SubtitleProviderInfo, SubtitleProviderResult, SubtitleSearchItem, SubtitleSearchQuery, SubtitleSearchResult, SubtitleSource, SubtitleTrack, ThumbnailCue, };
11
11
  export interface PlayerSlots {
12
12
  playButton?: ReactNode;
13
13
  seekBar?: ReactNode;
@@ -68,6 +68,8 @@ export interface MiniPlayerState {
68
68
  export interface PlayerProps extends PlayerOptions {
69
69
  className?: string;
70
70
  children?: ReactNode;
71
+ /** Initial query shown and searched when the remote subtitle search panel opens. */
72
+ subtitleSearchDefaultQuery?: string;
71
73
  labels?: Partial<PlayerLabels>;
72
74
  icons?: Partial<PlayerIcons>;
73
75
  slots?: PlayerSlots;
@@ -78,6 +80,7 @@ export interface PlayerContextValue {
78
80
  containerRef: RefObject<HTMLDivElement | null>;
79
81
  videoRef: RefObject<HTMLVideoElement | null>;
80
82
  labels: PlayerLabels;
83
+ subtitleSearchDefaultQuery: string;
81
84
  icons: PlayerIcons;
82
85
  slots: PlayerSlots;
83
86
  mediaStore: Store<MediaState>;