stormcloud-video-player 0.1.11 → 0.1.13

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/README.md CHANGED
@@ -7,6 +7,8 @@ A professional HLS video player with advanced ad integration for web application
7
7
  - **Precision Ad Alignment**: Tight synchronization with SCTE-35 CUE-OUT signals
8
8
  - **Smart Mid-Roll Handling**: Automatic detection and playback of remaining ad portions when joining late
9
9
  - **Flexible Ad Scheduling**: Support for both SCTE-35 markers and external ad schedules
10
+ - **Enhanced UI Controls**: Beautiful, adaptive video controls that work on any background color
11
+ - **Live Mode Support**: Specialized controls for live streaming with volume adjustment
10
12
  - **Cross-Platform**: Works on desktop, mobile, tablets, and smart TVs
11
13
  - **React Ready**: Includes React component for easy integration
12
14
  - **TypeScript Support**: Full type definitions included
@@ -32,11 +34,20 @@ function MyVideoApp() {
32
34
  autoplay={true}
33
35
  muted={true}
34
36
  controls={true}
37
+ showCustomControls={true} // Enable enhanced UI controls
38
+ allowNativeHls={true} // Allow native HLS for better performance
35
39
  licenseKey="your_license_key_here"
36
40
  style={{ width: "100%", aspectRatio: "16/9" }}
41
+ wrapperStyle={{ borderRadius: "12px", overflow: "hidden" }}
37
42
  onReady={(player) => {
38
43
  console.log("Player is ready!", player);
39
44
  }}
45
+ onVolumeToggle={() => {
46
+ console.log("Volume toggled");
47
+ }}
48
+ onFullscreenToggle={() => {
49
+ console.log("Fullscreen toggled");
50
+ }}
40
51
  />
41
52
  );
42
53
  }
@@ -54,8 +65,13 @@ const player = new StormcloudVideoPlayer({
54
65
  src: "https://your-stream.com/playlist.m3u8",
55
66
  autoplay: true,
56
67
  muted: true,
57
- allowNativeHls: false,
68
+ allowNativeHls: true, // Enable native HLS when supported
69
+ showCustomControls: true, // Enable enhanced UI controls
70
+ lowLatencyMode: false, // Set to true for live streams
71
+ driftToleranceMs: 3000, // Drift tolerance for live streams
58
72
  licenseKey: "your_license_key_here",
73
+ onVolumeToggle: () => console.log("Volume toggled"),
74
+ onFullscreenToggle: () => console.log("Fullscreen toggled"),
59
75
  });
60
76
 
61
77
  await player.load();
@@ -112,12 +128,70 @@ interface StormcloudVideoPlayerConfig {
112
128
  autoplay?: boolean; // Auto-start playback (default: false)
113
129
  muted?: boolean; // Start muted (default: false)
114
130
  allowNativeHls?: boolean; // Use native HLS when available (default: true)
131
+ showCustomControls?: boolean; // Enable enhanced UI controls (default: false)
132
+ lowLatencyMode?: boolean; // Enable low-latency mode for live streams (default: false)
133
+ driftToleranceMs?: number; // Drift tolerance for live streams (default: 3000)
134
+ immediateManifestAds?: boolean; // Load ads immediately from manifest (default: false)
115
135
  licenseKey?: string; // API authentication key
116
136
  debugAdTiming?: boolean; // Enable debug logging (default: false)
117
137
  adFailsafeTimeoutMs?: number; // Ad timeout in milliseconds (default: 10000)
138
+ onVolumeToggle?: () => void; // Callback for volume toggle
139
+ onFullscreenToggle?: () => void; // Callback for fullscreen toggle
140
+ onControlClick?: () => void; // Callback for control area clicks
118
141
  }
119
142
  ```
120
143
 
144
+ ## 🎨 Enhanced UI Controls
145
+
146
+ The player includes beautiful, adaptive video controls that ensure visibility on any video background:
147
+
148
+ ### Features
149
+
150
+ - **Adaptive Visibility**: High-contrast design that works on both light and dark video backgrounds
151
+ - **Live Mode Support**: Specialized controls for live streaming with hover-activated volume slider
152
+ - **Modern Design**: Glassmorphism effects with smooth animations and transitions
153
+ - **Touch-Friendly**: Large, accessible buttons optimized for mobile and desktop
154
+ - **Customizable**: Full control over appearance and behavior through props
155
+
156
+ ### Control Types
157
+
158
+ #### Full Controls (HLS Streams)
159
+
160
+ When `showCustomControls={true}` and `allowNativeHls={true}` for HLS streams:
161
+
162
+ - Progress timeline with seek functionality
163
+ - Play/pause button with smooth animations
164
+ - Volume control with hover-activated vertical slider
165
+ - Playback speed menu (0.25x to 2x)
166
+ - Fullscreen toggle
167
+ - Time display (current/duration)
168
+
169
+ #### Live Mode Controls (Non-HLS or Native HLS disabled)
170
+
171
+ When `showCustomControls={true}` for live streams or when native HLS is disabled:
172
+
173
+ - Volume control with hover-activated slider
174
+ - Fullscreen toggle
175
+ - Compact, overlay-style positioning
176
+
177
+ ### Styling
178
+
179
+ All controls use a consistent high-contrast design:
180
+
181
+ - **Dark backgrounds** with gradient overlays
182
+ - **White borders** for clear definition
183
+ - **Enhanced shadows** for depth and separation
184
+ - **Smooth transitions** for professional feel
185
+
186
+ ```jsx
187
+ <StormcloudVideoPlayerComponent
188
+ showCustomControls={true}
189
+ wrapperStyle={{ borderRadius: "12px", overflow: "hidden" }}
190
+ onVolumeToggle={() => console.log("Volume toggled")}
191
+ onFullscreenToggle={() => console.log("Fullscreen toggled")}
192
+ />
193
+ ```
194
+
121
195
  ## 🎬 Ad Integration
122
196
 
123
197
  ### SCTE-35 Support
@@ -252,7 +326,8 @@ src/
252
326
  - **Advanced Late Join**: Improved partial pod handling
253
327
  - **LL-HLS Support**: Low-latency streaming optimizations
254
328
  - **Rich Analytics**: Comprehensive event tracking and reporting
255
- - **UI Components**: Built-in countdown timers and ad indicators
329
+ - **UI Themes**: Multiple control themes and color schemes
330
+ - **Accessibility**: Enhanced ARIA support and keyboard navigation
256
331
  - **Error Recovery**: Advanced retry logic and failover handling
257
332
 
258
333
  ### Performance Improvements
@@ -266,26 +341,10 @@ src/
266
341
 
267
342
  We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
268
343
 
269
- ### Development Setup
270
-
271
- ```bash
272
- git clone https://github.com/your-org/stormcloud-video-player.git
273
- cd stormcloud-video-player
274
- npm install
275
- npm run dev
276
- ```
277
-
278
344
  ## 📄 License
279
345
 
280
346
  MIT License - see [LICENSE](LICENSE) file for details.
281
347
 
282
- ## 🆘 Support
283
-
284
- - **Documentation**: [Full API Docs](https://docs.stormcloud.tv)
285
- - **Issues**: [GitHub Issues](https://github.com/your-org/stormcloud-video-player/issues)
286
- - **Discord**: [Community Chat](https://discord.gg/stormcloud)
287
- - **Email**: support@stormcloud.tv
288
-
289
348
  ---
290
349
 
291
350
  Built with ❤️ by the Stormcloud team