@glitchlab/react-video-player 1.1.0 → 1.2.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/index.d.ts CHANGED
@@ -3,6 +3,19 @@ import { HlsConfig } from 'hls.js';
3
3
 
4
4
  declare type AspectRatio = `${number}/${number}`;
5
5
 
6
+ /**
7
+ * A normalized audio-track descriptor, independent of whether the source plays
8
+ * through hls.js or the native `<video>` element.
9
+ */
10
+ export declare interface AudioTrackInfo {
11
+ /** Stable index into the player's track list. */
12
+ index: number;
13
+ /** Human-readable label, e.g. "English", "Español", or a fallback. */
14
+ label: string;
15
+ /** BCP-47-ish language code if the source provides one. */
16
+ lang?: string;
17
+ }
18
+
6
19
  declare type DeviceMode = "desktop" | "mobile";
7
20
 
8
21
  /**
@@ -47,8 +60,14 @@ export declare interface ReactVideoPlayerProps {
47
60
  muted?: boolean;
48
61
  /** Loop playback. Defaults to `false`. */
49
62
  loop?: boolean;
50
- /** Show native browser controls. Defaults to `false`. */
51
- controls?: boolean;
63
+ /**
64
+ * Controls mode.
65
+ * - `false` (default): no controls — just the centered play overlay.
66
+ * - `true`: native browser controls (look varies by browser/OS).
67
+ * - `"custom"`: branded custom control bar at the bottom of the frame,
68
+ * consistent across browsers/OS. Auto-hides during playback.
69
+ */
70
+ controls?: boolean | "custom";
52
71
  /**
53
72
  * Start playback as soon as the source loads. Defaults to `false`.
54
73
  * Browsers block sound-on autoplay, so this only autoplays when `muted`
@@ -100,3 +119,23 @@ declare interface YouTubeEmbedOptions {
100
119
  export declare function youTubeEmbedUrl(id: string, opts?: YouTubeEmbedOptions): string;
101
120
 
102
121
  export { }
122
+
123
+
124
+ declare global {
125
+ interface HTMLMediaElement {
126
+ readonly audioTracks?: AudioTrackListLike;
127
+ }
128
+ interface HTMLVideoElement {
129
+ /** iOS Safari only — opens Apple's native fullscreen player. */
130
+ webkitEnterFullscreen?(): void;
131
+ }
132
+ interface Document {
133
+ readonly webkitFullscreenElement?: Element | null;
134
+ readonly webkitFullscreenEnabled?: boolean;
135
+ webkitExitFullscreen?(): Promise<void>;
136
+ }
137
+ interface HTMLElement {
138
+ webkitRequestFullscreen?(): Promise<void>;
139
+ }
140
+ }
141
+