@therealtinhtute/baroiplayer 1.0.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.
Files changed (244) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +384 -0
  3. package/dist/context/media.js +2 -0
  4. package/dist/context/media.js.map +1 -0
  5. package/dist/context/media.mjs +15 -0
  6. package/dist/context/media.mjs.map +1 -0
  7. package/dist/context/store.js +2 -0
  8. package/dist/context/store.js.map +1 -0
  9. package/dist/context/store.mjs +5 -0
  10. package/dist/context/store.mjs.map +1 -0
  11. package/dist/context-BMteAJDN.js +1140 -0
  12. package/dist/context-BMteAJDN.js.map +1 -0
  13. package/dist/context-DCJ_scmO.cjs +23 -0
  14. package/dist/context-DCJ_scmO.cjs.map +1 -0
  15. package/dist/core-events-B5W_j8yU.js +480 -0
  16. package/dist/core-events-B5W_j8yU.js.map +1 -0
  17. package/dist/core-events-CN0-Vhhq.cjs +2 -0
  18. package/dist/core-events-CN0-Vhhq.cjs.map +1 -0
  19. package/dist/core-plugins-Bq9KLany.js +696 -0
  20. package/dist/core-plugins-Bq9KLany.js.map +1 -0
  21. package/dist/core-plugins-CPDSHMiQ.cjs +2 -0
  22. package/dist/core-plugins-CPDSHMiQ.cjs.map +1 -0
  23. package/dist/core.js +37 -0
  24. package/dist/core.js.map +1 -0
  25. package/dist/core.mjs +1217 -0
  26. package/dist/core.mjs.map +1 -0
  27. package/dist/enhanced-components-DHv0MFvG.js +1073 -0
  28. package/dist/enhanced-components-DHv0MFvG.js.map +1 -0
  29. package/dist/enhanced-components-DTIObgB7.cjs +2 -0
  30. package/dist/enhanced-components-DTIObgB7.cjs.map +1 -0
  31. package/dist/hooks-C_r8wexn.cjs +4 -0
  32. package/dist/hooks-C_r8wexn.cjs.map +1 -0
  33. package/dist/hooks-Da2wVXlF.js +1630 -0
  34. package/dist/hooks-Da2wVXlF.js.map +1 -0
  35. package/dist/index.css +1 -0
  36. package/dist/index.js +112 -0
  37. package/dist/index.js.map +1 -0
  38. package/dist/index.mjs +6126 -0
  39. package/dist/index.mjs.map +1 -0
  40. package/dist/minimal-components-DSq5sQpy.js +2002 -0
  41. package/dist/minimal-components-DSq5sQpy.js.map +1 -0
  42. package/dist/minimal-components-DflWiihN.cjs +2 -0
  43. package/dist/minimal-components-DflWiihN.cjs.map +1 -0
  44. package/dist/minimal-components.css +1 -0
  45. package/dist/mona-loading.gif +0 -0
  46. package/dist/performance-monitor-CUW6f5ll.cjs +2 -0
  47. package/dist/performance-monitor-CUW6f5ll.cjs.map +1 -0
  48. package/dist/performance-monitor-rMW1RgV3.js +302 -0
  49. package/dist/performance-monitor-rMW1RgV3.js.map +1 -0
  50. package/dist/utils-BnscpYYd.js +2798 -0
  51. package/dist/utils-BnscpYYd.js.map +1 -0
  52. package/dist/utils-D_czS_0K.cjs +9 -0
  53. package/dist/utils-D_czS_0K.cjs.map +1 -0
  54. package/dist/utils.js +2 -0
  55. package/dist/utils.js.map +1 -0
  56. package/dist/utils.mjs +7 -0
  57. package/dist/utils.mjs.map +1 -0
  58. package/package.json +114 -0
  59. package/src/adapters/videojs-adapter.tsx +470 -0
  60. package/src/assets/mona-loading.gif +0 -0
  61. package/src/components/AnimateLoading.tsx +115 -0
  62. package/src/components/LoadingState.tsx +248 -0
  63. package/src/components/accessibility/keyboard-help-overlay.tsx +213 -0
  64. package/src/components/audio-player.tsx +85 -0
  65. package/src/components/basic/index.ts +37 -0
  66. package/src/components/enhanced/advanced-features.tsx +316 -0
  67. package/src/components/enhanced/debug-panel.tsx +422 -0
  68. package/src/components/enhanced/enhanced-controls.tsx +600 -0
  69. package/src/components/enhanced/enhanced-media-player.tsx +509 -0
  70. package/src/components/enhanced/error-handling.tsx +345 -0
  71. package/src/components/enhanced/index.ts +39 -0
  72. package/src/components/enhanced/media-player-enhanced.tsx +349 -0
  73. package/src/components/examples/basic-video-player.tsx +55 -0
  74. package/src/components/examples/custom-controls-example.tsx +63 -0
  75. package/src/components/examples/enhanced-controls-example.tsx +114 -0
  76. package/src/components/examples/enhanced-media-player-example.tsx +293 -0
  77. package/src/components/examples/loading-states-demo.tsx +142 -0
  78. package/src/components/examples/react-19-demo.tsx +381 -0
  79. package/src/components/examples/volume-orientation-demo.tsx +114 -0
  80. package/src/components/icon-demo.tsx +209 -0
  81. package/src/components/icons/index.tsx +166 -0
  82. package/src/components/icons/svg-icons/ArrowLeftIcon.tsx +18 -0
  83. package/src/components/icons/svg-icons/ArrowRightIcon.tsx +18 -0
  84. package/src/components/icons/svg-icons/AudioIcon.tsx +22 -0
  85. package/src/components/icons/svg-icons/BackwardIcon.tsx +12 -0
  86. package/src/components/icons/svg-icons/CameraIcon.tsx +19 -0
  87. package/src/components/icons/svg-icons/CheckIcon.tsx +19 -0
  88. package/src/components/icons/svg-icons/EnablePiPIcon.tsx +17 -0
  89. package/src/components/icons/svg-icons/ForwardIcon.tsx +12 -0
  90. package/src/components/icons/svg-icons/FullscreenEnterIcon.tsx +23 -0
  91. package/src/components/icons/svg-icons/FullscreenExitIcon.tsx +23 -0
  92. package/src/components/icons/svg-icons/LoadingIcon.tsx +32 -0
  93. package/src/components/icons/svg-icons/PauseIcon.tsx +23 -0
  94. package/src/components/icons/svg-icons/PlayIcon.tsx +21 -0
  95. package/src/components/icons/svg-icons/PlaybackSpeedIcon.tsx +23 -0
  96. package/src/components/icons/svg-icons/QualityIcon.tsx +21 -0
  97. package/src/components/icons/svg-icons/SettingsIcon.tsx +12 -0
  98. package/src/components/icons/svg-icons/SliderIcon.tsx +21 -0
  99. package/src/components/icons/svg-icons/SubtitleIcon.tsx +21 -0
  100. package/src/components/icons/svg-icons/SubtitleOffIcon.tsx +25 -0
  101. package/src/components/icons/svg-icons/UnPiPIcon.tsx +17 -0
  102. package/src/components/icons/svg-icons/VolumeMutedIcon.tsx +16 -0
  103. package/src/components/icons/svg-icons/VolumeOneIcon.tsx +22 -0
  104. package/src/components/icons/svg-icons/VolumeThreeIcon.tsx +16 -0
  105. package/src/components/icons/svg-icons/VolumeTwoIcon.tsx +16 -0
  106. package/src/components/legacy.tsx +93 -0
  107. package/src/components/media-metadata-display.tsx +100 -0
  108. package/src/components/media-player-audio.tsx +39 -0
  109. package/src/components/media-player-controls.tsx +226 -0
  110. package/src/components/media-player-error.tsx +163 -0
  111. package/src/components/media-player-fullscreen.tsx +109 -0
  112. package/src/components/media-player-hls.tsx +111 -0
  113. package/src/components/media-player-loading.tsx +76 -0
  114. package/src/components/media-player-play.tsx +75 -0
  115. package/src/components/media-player-root.tsx +340 -0
  116. package/src/components/media-player-seek.tsx +168 -0
  117. package/src/components/media-player-time.tsx +99 -0
  118. package/src/components/media-player-tooltip.tsx +58 -0
  119. package/src/components/media-player-video.tsx +39 -0
  120. package/src/components/media-player-volume.tsx +155 -0
  121. package/src/components/media-player.tsx +257 -0
  122. package/src/components/media-suspense.tsx +362 -0
  123. package/src/components/player-settings-form.tsx +163 -0
  124. package/src/components/react-player-wrapper.tsx +651 -0
  125. package/src/components/simple-video-player.tsx +60 -0
  126. package/src/components/ui/enhanced-seek-bar.tsx +235 -0
  127. package/src/components/ui/fullscreen-button.tsx +60 -0
  128. package/src/components/ui/media-resource-preloader.tsx +395 -0
  129. package/src/components/ui/play-button.tsx +107 -0
  130. package/src/components/ui/seek-bar.tsx +161 -0
  131. package/src/components/ui/time-display.tsx +40 -0
  132. package/src/components/ui/volume-control.tsx +143 -0
  133. package/src/components/unified/base-media-player.tsx +246 -0
  134. package/src/components/unified/media-player.tsx +75 -0
  135. package/src/components/variants/minimal/AccessibleMinimalPlayer.tsx +561 -0
  136. package/src/components/variants/minimal/EnhancedMinimalMediaPlayer.tsx +552 -0
  137. package/src/components/variants/minimal/MinimalControls.tsx +142 -0
  138. package/src/components/variants/minimal/MinimalLoading.tsx +32 -0
  139. package/src/components/variants/minimal/MinimalMediaPlayer.tsx +315 -0
  140. package/src/components/variants/minimal/MinimalOverlay.tsx +64 -0
  141. package/src/components/variants/minimal/MinimalPlayButton.tsx +65 -0
  142. package/src/components/variants/minimal/MinimalSeekBar.tsx +150 -0
  143. package/src/components/variants/minimal/MinimalVolumeControl.tsx +80 -0
  144. package/src/components/variants/minimal/SimpleMinimalPlayer.tsx +210 -0
  145. package/src/components/variants/minimal/components/CenterPlayButton.tsx +22 -0
  146. package/src/components/variants/minimal/components/ControlBar.tsx +146 -0
  147. package/src/components/variants/minimal/components/EnhancedSettingsMenu.tsx +361 -0
  148. package/src/components/variants/minimal/components/PlaybackControls.tsx +51 -0
  149. package/src/components/variants/minimal/components/RightControls.tsx +173 -0
  150. package/src/components/variants/minimal/components/SeekBar.tsx +131 -0
  151. package/src/components/variants/minimal/components/SettingsDropdown.tsx +70 -0
  152. package/src/components/variants/minimal/components/SubtitleDisplay.tsx +21 -0
  153. package/src/components/variants/minimal/components/TimeDisplay.tsx +18 -0
  154. package/src/components/variants/minimal/components/VideoElement.tsx +40 -0
  155. package/src/components/variants/minimal/components/VolumeControl.tsx +217 -0
  156. package/src/components/variants/minimal/index.ts +23 -0
  157. package/src/components/video-player.tsx +100 -0
  158. package/src/context/error-handling.ts +394 -0
  159. package/src/context/media-context.tsx +208 -0
  160. package/src/context/media-provider.tsx +265 -0
  161. package/src/context/media-store.ts +379 -0
  162. package/src/context/persistence.ts +453 -0
  163. package/src/core/events/event-system.ts +442 -0
  164. package/src/core/events/hooks.ts +302 -0
  165. package/src/core/events/index.ts +22 -0
  166. package/src/core/events/middleware.ts +269 -0
  167. package/src/core/index.ts +22 -0
  168. package/src/core/optimization/bundle-optimizer.tsx +308 -0
  169. package/src/core/performance/cicd.ts +96 -0
  170. package/src/core/performance/index.ts +38 -0
  171. package/src/core/performance/media-loading-optimizer.ts +538 -0
  172. package/src/core/performance/performance-budgets.ts +432 -0
  173. package/src/core/performance/performance-monitor.tsx +476 -0
  174. package/src/core/performance/performance-testing.ts +459 -0
  175. package/src/core/plugins/base-plugin.ts +224 -0
  176. package/src/core/plugins/enhanced-plugin-system.ts +411 -0
  177. package/src/core/plugins/examples/analytics-plugin.ts +242 -0
  178. package/src/core/plugins/index.ts +39 -0
  179. package/src/core/plugins/registry.ts +327 -0
  180. package/src/core/plugins/types.ts +159 -0
  181. package/src/core/plugins/utils.ts +316 -0
  182. package/src/core/progressive-loading.tsx +322 -0
  183. package/src/core/providers/enhanced-hls-provider.ts +339 -0
  184. package/src/core/providers/service-provider.tsx +168 -0
  185. package/src/core/utils.tsx +38 -0
  186. package/src/features/media-session/media-session-manager.ts +429 -0
  187. package/src/features/picture-in-picture/pip-manager.ts +429 -0
  188. package/src/features/playlist/playlist-manager.ts +606 -0
  189. package/src/features/subtitles/subtitle-manager.ts +441 -0
  190. package/src/features/subtitles/subtitle-parser.ts +280 -0
  191. package/src/features/thumbnails/thumbnail-generator.ts +519 -0
  192. package/src/hooks/accessibility/index.ts +27 -0
  193. package/src/hooks/accessibility/use-accessibility-preferences.ts +188 -0
  194. package/src/hooks/accessibility/use-focus-management.ts +176 -0
  195. package/src/hooks/accessibility/use-keyboard-shortcuts.ts +144 -0
  196. package/src/hooks/accessibility/use-screen-reader.ts +182 -0
  197. package/src/hooks/core/index.ts +47 -0
  198. package/src/hooks/legacy.ts +27 -0
  199. package/src/hooks/use-enhanced-media-player.ts +468 -0
  200. package/src/hooks/use-intelligent-preloading.ts +358 -0
  201. package/src/hooks/use-keyboard-controls.ts +115 -0
  202. package/src/hooks/use-media-actions.ts +175 -0
  203. package/src/hooks/use-media-metadata.ts +89 -0
  204. package/src/hooks/use-media-optimistic.ts +270 -0
  205. package/src/hooks/use-media-player.ts +312 -0
  206. package/src/hooks/use-media-state.ts +190 -0
  207. package/src/hooks/use-memory-optimization.ts +358 -0
  208. package/src/hooks/use-optimistic-controls.ts +92 -0
  209. package/src/hooks/use-optimized-media.ts +263 -0
  210. package/src/hooks/use-touch-gestures.ts +417 -0
  211. package/src/hooks/useEnhancedSubtitles.ts +258 -0
  212. package/src/hooks/useKeyboardShortcuts.ts +74 -0
  213. package/src/hooks/useMediaControls.ts +52 -0
  214. package/src/hooks/useScreenshot.ts +57 -0
  215. package/src/hooks/useSubtitles.ts +91 -0
  216. package/src/hooks/useVideoPlayer.ts +232 -0
  217. package/src/icons/components/FullscreenIcon.tsx +37 -0
  218. package/src/icons/components/SettingsIcon.tsx +38 -0
  219. package/src/icons/components/animated/LoadingIcon.tsx +43 -0
  220. package/src/icons/components/animated/PlayPauseIcon.tsx +50 -0
  221. package/src/icons/components/media/PauseIcon.tsx +39 -0
  222. package/src/icons/components/media/PlayIcon.tsx +38 -0
  223. package/src/icons/components/volume/VolumeIcon.tsx +39 -0
  224. package/src/icons/components/volume/VolumeOffIcon.tsx +39 -0
  225. package/src/icons/index.ts +56 -0
  226. package/src/icons/provider.tsx +64 -0
  227. package/src/icons/types.ts +40 -0
  228. package/src/index-enhanced.ts +35 -0
  229. package/src/index-legacy.ts +326 -0
  230. package/src/index.css +102 -0
  231. package/src/index.ts +216 -0
  232. package/src/lib/deprecation.ts +51 -0
  233. package/src/lib/format-time.ts +37 -0
  234. package/src/lib/index.ts +3 -0
  235. package/src/lib/utils.ts +6 -0
  236. package/src/styles/globals.css +462 -0
  237. package/src/styles/minimal-player.css +589 -0
  238. package/src/styles/pixel-art.css +46 -0
  239. package/src/styles/videojs.css +100 -0
  240. package/src/test/setup.ts +79 -0
  241. package/src/types/events.ts +47 -0
  242. package/src/types/formats.ts +95 -0
  243. package/src/types/index.ts +190 -0
  244. package/src/types/videojs-plugins.d.ts +14 -0
@@ -0,0 +1,209 @@
1
+ import { useState } from 'react'
2
+ import {
3
+ IconProvider,
4
+ PlayIcon,
5
+ PauseIcon,
6
+ VolumeIcon,
7
+ VolumeOffIcon,
8
+ SettingsIcon,
9
+ FullscreenIcon,
10
+ LoadingIcon,
11
+ PlayPauseIcon
12
+ } from '../icons'
13
+
14
+ export function IconSystemDemo() {
15
+ const [isPlaying, setIsPlaying] = useState(false)
16
+ const [volume, setVolume] = useState(0.8)
17
+ const [theme, setTheme] = useState({
18
+ size: 24,
19
+ strokeWidth: 2,
20
+ color: 'currentColor'
21
+ })
22
+
23
+ const customPlayIcon = ({ className, ...props }: any) => (
24
+ <svg
25
+ className={className}
26
+ width="24"
27
+ height="24"
28
+ viewBox="0 0 24 24"
29
+ fill="none"
30
+ {...props}
31
+ >
32
+ <circle cx="12" cy="12" r="10" fill="#ff6b6b" />
33
+ <polygon points="10 8 16 12 10 16 10 8" fill="white" />
34
+ </svg>
35
+ )
36
+
37
+ return (
38
+ <div className="min-h-screen bg-gray-950 p-8">
39
+ <div className="mx-auto max-w-4xl">
40
+ <h1 className="mb-8 text-center font-bold text-3xl text-white">
41
+ Icon System Demo
42
+ </h1>
43
+
44
+ {/* Theme Controls */}
45
+ <div className="mb-8 rounded-lg bg-gray-800 p-6">
46
+ <h2 className="mb-4 font-semibold text-white text-xl">Theme Configuration</h2>
47
+ <div className="grid grid-cols-1 gap-4 md:grid-cols-3">
48
+ <div>
49
+ <label className="mb-2 block font-medium text-sm text-white">
50
+ Size: {theme.size}
51
+ </label>
52
+ <input
53
+ type="range"
54
+ min="16"
55
+ max="48"
56
+ value={theme.size}
57
+ onChange={(e) => setTheme(prev => ({ ...prev, size: Number(e.target.value) }))}
58
+ className="h-2 w-full cursor-pointer appearance-none rounded-lg bg-gray-700"
59
+ />
60
+ </div>
61
+ <div>
62
+ <label className="mb-2 block font-medium text-sm text-white">
63
+ Stroke Width: {theme.strokeWidth}
64
+ </label>
65
+ <input
66
+ type="range"
67
+ min="1"
68
+ max="4"
69
+ step="0.5"
70
+ value={theme.strokeWidth}
71
+ onChange={(e) => setTheme(prev => ({ ...prev, strokeWidth: Number(e.target.value) }))}
72
+ className="h-2 w-full cursor-pointer appearance-none rounded-lg bg-gray-700"
73
+ />
74
+ </div>
75
+ <div>
76
+ <label className="mb-2 block font-medium text-sm text-white">Color</label>
77
+ <select
78
+ value={theme.color}
79
+ onChange={(e) => setTheme(prev => ({ ...prev, color: e.target.value }))}
80
+ className="w-full rounded-lg border border-gray-600 bg-gray-700 p-2 text-white"
81
+ >
82
+ <option value="currentColor">Current Color</option>
83
+ <option value="#ffffff">White</option>
84
+ <option value="#06b6d4">Cyan</option>
85
+ <option value="#f59e0b">Amber</option>
86
+ <option value="#ef4444">Red</option>
87
+ </select>
88
+ </div>
89
+ </div>
90
+ </div>
91
+
92
+ <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
93
+ {/* Default Icons */}
94
+ <div className="rounded-lg bg-gray-800 p-6">
95
+ <h2 className="mb-4 font-semibold text-white text-xl">Default Icons</h2>
96
+ <IconProvider theme={theme}>
97
+ <div className="grid grid-cols-4 gap-4 text-white">
98
+ <div className="flex flex-col items-center space-y-2">
99
+ <PlayIcon />
100
+ <span className="text-xs">Play</span>
101
+ </div>
102
+ <div className="flex flex-col items-center space-y-2">
103
+ <PauseIcon />
104
+ <span className="text-xs">Pause</span>
105
+ </div>
106
+ <div className="flex flex-col items-center space-y-2">
107
+ <VolumeIcon />
108
+ <span className="text-xs">Volume</span>
109
+ </div>
110
+ <div className="flex flex-col items-center space-y-2">
111
+ <VolumeOffIcon />
112
+ <span className="text-xs">Mute</span>
113
+ </div>
114
+ <div className="flex flex-col items-center space-y-2">
115
+ <SettingsIcon />
116
+ <span className="text-xs">Settings</span>
117
+ </div>
118
+ <div className="flex flex-col items-center space-y-2">
119
+ <FullscreenIcon />
120
+ <span className="text-xs">Fullscreen</span>
121
+ </div>
122
+ <div className="flex flex-col items-center space-y-2">
123
+ <LoadingIcon />
124
+ <span className="text-xs">Loading</span>
125
+ </div>
126
+ <div className="flex flex-col items-center space-y-2">
127
+ <PlayPauseIcon isPlaying={isPlaying} />
128
+ <span className="text-xs">Play/Pause</span>
129
+ </div>
130
+ </div>
131
+ </IconProvider>
132
+ </div>
133
+
134
+ {/* Custom Icons */}
135
+ <div className="rounded-lg bg-gray-800 p-6">
136
+ <h2 className="mb-4 font-semibold text-white text-xl">Custom Icons</h2>
137
+ <IconProvider
138
+ theme={theme}
139
+ icons={{
140
+ play: customPlayIcon
141
+ }}
142
+ >
143
+ <div className="grid grid-cols-4 gap-4 text-white">
144
+ <div className="flex flex-col items-center space-y-2">
145
+ <PlayIcon />
146
+ <span className="text-xs">Custom Play</span>
147
+ </div>
148
+ <div className="flex flex-col items-center space-y-2">
149
+ <PauseIcon />
150
+ <span className="text-xs">Default Pause</span>
151
+ </div>
152
+ <div className="flex flex-col items-center space-y-2">
153
+ <VolumeIcon />
154
+ <span className="text-xs">Default Volume</span>
155
+ </div>
156
+ <div className="flex flex-col items-center space-y-2">
157
+ <SettingsIcon />
158
+ <span className="text-xs">Default Settings</span>
159
+ </div>
160
+ </div>
161
+ </IconProvider>
162
+ </div>
163
+ </div>
164
+
165
+ {/* Interactive Demo */}
166
+ <div className="mt-8 rounded-lg bg-gray-800 p-6">
167
+ <h2 className="mb-4 font-semibold text-white text-xl">Interactive Media Player Demo</h2>
168
+ <IconProvider theme={{ ...theme, size: 32 }}>
169
+ <div className="flex items-center justify-center space-x-6 text-white">
170
+ <button
171
+ onClick={() => setIsPlaying(!isPlaying)}
172
+ className="rounded-full bg-blue-600 p-3 transition-colors hover:bg-blue-700"
173
+ aria-label={isPlaying ? 'Pause' : 'Play'}
174
+ >
175
+ <PlayPauseIcon isPlaying={isPlaying} />
176
+ </button>
177
+
178
+ <button
179
+ onClick={() => setVolume(volume > 0 ? 0 : 0.8)}
180
+ className="rounded-full bg-gray-600 p-3 transition-colors hover:bg-gray-700"
181
+ aria-label={volume > 0 ? 'Mute' : 'Unmute'}
182
+ >
183
+ {volume > 0 ? <VolumeIcon /> : <VolumeOffIcon />}
184
+ </button>
185
+
186
+ <button
187
+ className="rounded-full bg-gray-600 p-3 transition-colors hover:bg-gray-700"
188
+ aria-label="Settings"
189
+ >
190
+ <SettingsIcon />
191
+ </button>
192
+
193
+ <button
194
+ className="rounded-full bg-gray-600 p-3 transition-colors hover:bg-gray-700"
195
+ aria-label="Fullscreen"
196
+ >
197
+ <FullscreenIcon />
198
+ </button>
199
+ </div>
200
+ </IconProvider>
201
+
202
+ <div className="mt-4 text-center text-gray-400 text-sm">
203
+ Status: {isPlaying ? 'Playing' : 'Paused'} | Volume: {volume > 0 ? 'On' : 'Muted'}
204
+ </div>
205
+ </div>
206
+ </div>
207
+ </div>
208
+ )
209
+ }
@@ -0,0 +1,166 @@
1
+ "use client"
2
+
3
+ import React from "react"
4
+ import BackwardIcon from "./svg-icons/BackwardIcon"
5
+ import CameraIcon from "./svg-icons/CameraIcon"
6
+ import ForwardIcon from "./svg-icons/ForwardIcon"
7
+ import FullscreenEnterIcon from "./svg-icons/FullscreenEnterIcon"
8
+ import FullscreenExitIcon from "./svg-icons/FullscreenExitIcon"
9
+ import LoadingIcon from "./svg-icons/LoadingIcon"
10
+ import PauseIcon from "./svg-icons/PauseIcon"
11
+ import PlayIcon from "./svg-icons/PlayIcon"
12
+ import PlaybackSpeedIcon from "./svg-icons/PlaybackSpeedIcon"
13
+ import SettingsIcon from "./svg-icons/SettingsIcon"
14
+ import SubtitleIconSVG from "./svg-icons/SubtitleIcon"
15
+ import VolumeMutedIcon from "./svg-icons/VolumeMutedIcon"
16
+ import VolumeOneIcon from "./svg-icons/VolumeOneIcon"
17
+ import VolumeThreeIcon from "./svg-icons/VolumeThreeIcon"
18
+ import VolumeTwoIcon from "./svg-icons/VolumeTwoIcon"
19
+
20
+ export interface IconProps {
21
+ size?: number
22
+ className?: string
23
+ color?: string
24
+ }
25
+
26
+ // Minimal Play Icon
27
+ export const MinimalPlayIcon: React.FC<IconProps> = ({
28
+ size = 24,
29
+ className = "",
30
+ color = "currentColor"
31
+ }) => <PlayIcon width={size} height={size} className={className} style={{ color }} />
32
+
33
+ // Minimal Pause Icon
34
+ export const MinimalPauseIcon: React.FC<IconProps> = ({
35
+ size = 24,
36
+ className = "",
37
+ color = "currentColor"
38
+ }) => <PauseIcon width={size} height={size} className={className} style={{ color }} />
39
+
40
+ // Minimal Volume Icon
41
+ export const MinimalVolumeIcon: React.FC<IconProps> = ({
42
+ size = 24,
43
+ className = "",
44
+ color = "currentColor"
45
+ }) => <VolumeTwoIcon width={size} height={size} className={className} style={{ color }} />
46
+
47
+ // Minimal Volume Muted Icon
48
+ export const MinimalVolumeMutedIcon: React.FC<IconProps> = ({
49
+ size = 24,
50
+ className = "",
51
+ color = "currentColor"
52
+ }) => <VolumeMutedIcon width={size} height={size} className={className} style={{ color }} />
53
+
54
+ // Minimal Fullscreen Icon
55
+ export const MinimalFullscreenIcon: React.FC<IconProps> = ({
56
+ size = 24,
57
+ className = "",
58
+ color = "currentColor"
59
+ }) => <FullscreenEnterIcon width={size} height={size} className={className} style={{ color }} />
60
+
61
+ // Minimal Exit Fullscreen Icon
62
+ export const MinimalExitFullscreenIcon: React.FC<IconProps> = ({
63
+ size = 24,
64
+ className = "",
65
+ color = "currentColor"
66
+ }) => <FullscreenExitIcon width={size} height={size} className={className} style={{ color }} />
67
+
68
+ // Minimal Settings Icon
69
+ export const MinimalSettingsIcon: React.FC<IconProps> = ({
70
+ size = 24,
71
+ className = "",
72
+ color = "currentColor"
73
+ }) => <SettingsIcon width={size} height={size} className={className} style={{ color }} />
74
+
75
+ // Minimal Loading Spinner
76
+ export const MinimalSpinner: React.FC<IconProps> = ({
77
+ size = 24,
78
+ className = "",
79
+ color = "currentColor"
80
+ }) => (
81
+ <LoadingIcon
82
+ width={size}
83
+ height={size}
84
+ className={`animate-spin ${className}`}
85
+ style={{ color }}
86
+ />
87
+ )
88
+
89
+ // Minimal Forward Icon (using backward design)
90
+ export const MinimalForwardIcon: React.FC<IconProps> = ({
91
+ size = 24,
92
+ className = "",
93
+ color = "currentColor"
94
+ }) => <BackwardIcon width={size} height={size} className={className} style={{ color }} />
95
+
96
+ // Minimal Backward Icon
97
+ export const MinimalBackwardIcon: React.FC<IconProps> = ({
98
+ size = 24,
99
+ className = "",
100
+ color = "currentColor"
101
+ }) => <ForwardIcon width={size} height={size} className={className} style={{ color }} />
102
+
103
+ // Forward 10 seconds icon
104
+ export const MinimalForward10Icon: React.FC<IconProps> = ({
105
+ size = 24,
106
+ className = "",
107
+ color = "currentColor"
108
+ }) => <ForwardIcon width={size} height={size} className={className} style={{ color }} />
109
+
110
+ // Backward 10 seconds icon
111
+ export const MinimalBackward10Icon: React.FC<IconProps> = ({
112
+ size = 24,
113
+ className = "",
114
+ color = "currentColor"
115
+ }) => <BackwardIcon width={size} height={size} className={className} style={{ color }} />
116
+
117
+ // Subtitle/Caption icon
118
+ export const MinimalSubtitleIcon: React.FC<IconProps> = ({
119
+ size = 24,
120
+ className = "",
121
+ color = "currentColor"
122
+ }) => <SubtitleIconSVG width={size} height={size} className={className} style={{ color }} />
123
+
124
+ // Screenshot/Camera icon
125
+ export const MinimalScreenshotIcon: React.FC<IconProps> = ({
126
+ size = 24,
127
+ className = "",
128
+ color = "currentColor"
129
+ }) => <CameraIcon width={size} height={size} className={className} style={{ color }} />
130
+
131
+ // Speed icon
132
+ export const MinimalSpeedIcon: React.FC<IconProps> = ({
133
+ size = 24,
134
+ className = "",
135
+ color = "currentColor"
136
+ }) => <PlaybackSpeedIcon width={size} height={size} className={className} style={{ color }} />
137
+
138
+ // Icon Set Type
139
+ export interface IconSet {
140
+ play?: React.FC<IconProps>
141
+ pause?: React.FC<IconProps>
142
+ volume?: React.FC<IconProps>
143
+ volumeMuted?: React.FC<IconProps>
144
+ fullscreen?: React.FC<IconProps>
145
+ exitFullscreen?: React.FC<IconProps>
146
+ settings?: React.FC<IconProps>
147
+ forward?: React.FC<IconProps>
148
+ backward?: React.FC<IconProps>
149
+ spinner?: React.FC<IconProps>
150
+ subtitle?: React.FC<IconProps>
151
+ }
152
+
153
+ // Default Icon Set
154
+ export const defaultMinimalIcons: IconSet = {
155
+ play: MinimalPlayIcon,
156
+ pause: MinimalPauseIcon,
157
+ volume: MinimalVolumeIcon,
158
+ volumeMuted: MinimalVolumeMutedIcon,
159
+ fullscreen: MinimalFullscreenIcon,
160
+ exitFullscreen: MinimalExitFullscreenIcon,
161
+ settings: MinimalSettingsIcon,
162
+ forward: MinimalForwardIcon,
163
+ backward: MinimalBackwardIcon,
164
+ spinner: MinimalSpinner,
165
+ subtitle: MinimalSubtitleIcon
166
+ }
@@ -0,0 +1,18 @@
1
+ import React from 'react'
2
+ import { SVGProps } from 'react'
3
+
4
+ const ArrowLeftIcon = (props: SVGProps<SVGSVGElement>) => (
5
+ <svg
6
+ xmlns='http://www.w3.org/2000/svg'
7
+ aria-hidden='true'
8
+ className='iconify iconify--ic'
9
+ width='24'
10
+ height='24'
11
+ viewBox='0 0 24 24'
12
+ style={{ width: '100%', height: '100%' }}
13
+ {...props}>
14
+ <path fill='currentColor' d='M17.77 3.77 16 2 6 12l10 10 1.77-1.77L9.54 12z' />
15
+ </svg>
16
+ )
17
+
18
+ export default ArrowLeftIcon
@@ -0,0 +1,18 @@
1
+ import * as React from 'react'
2
+ import { SVGProps, memo } from 'react'
3
+
4
+ const ArrowRightIcon = (props: SVGProps<SVGSVGElement>) => (
5
+ <svg
6
+ xmlns='http://www.w3.org/2000/svg'
7
+ aria-hidden='true'
8
+ className='iconify iconify--ic'
9
+ width='24'
10
+ height='24'
11
+ viewBox='0 0 24 24'
12
+ style={{ width: '100%', height: '100%' }}
13
+ {...props}>
14
+ <path fill='currentColor' d='M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z' />
15
+ </svg>
16
+ )
17
+
18
+ export default ArrowRightIcon
@@ -0,0 +1,22 @@
1
+ import * as React from 'react'
2
+ import { SVGProps, memo } from 'react'
3
+
4
+ const AudioIcon = (props: SVGProps<SVGSVGElement>) => (
5
+ <svg
6
+ xmlns='http://www.w3.org/2000/svg'
7
+ aria-hidden='true'
8
+ className='iconify iconify--ic'
9
+ width='1em'
10
+ height='1em'
11
+ viewBox='0 0 24 24'
12
+ style={{ width: '100%', height: '100%' }}
13
+ {...props}>
14
+ <path
15
+ fill='currentColor'
16
+ d='M12 5v8.55c-.94-.54-2.1-.75-3.33-.32-1.34.48-2.37 1.67-2.61 3.07a4.007 4.007 0 0 0 4.59 4.65c1.96-.31 3.35-2.11 3.35-4.1V7h2c1.1 0 2-.9 2-2s-.9-2-2-2h-2c-1.1 0-2 .9-2 2z'
17
+ />
18
+ </svg>
19
+ )
20
+
21
+ const Memo = AudioIcon
22
+ export default Memo
@@ -0,0 +1,12 @@
1
+ import * as React from 'react'
2
+ import { SVGProps, memo } from 'react'
3
+
4
+ const BackwardIcon = (props: SVGProps<SVGSVGElement>) => (
5
+ <svg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24' {...props}>
6
+ <path
7
+ fill='currentColor'
8
+ d='M3 2.25a1 1 0 0 0-1 1V9a1 1 0 0 0 1 1h5.25a1 1 0 0 0 0-2H4.863c.985-1.179 2.208-2.113 3.682-2.57a9.435 9.435 0 0 1 6.106.16c1.981.738 3.81 2.232 4.722 3.894a1 1 0 1 0 1.754-.961c-1.175-2.143-3.415-3.927-5.778-4.807a11.435 11.435 0 0 0-7.395-.196C6.378 4.008 5.068 4.9 4 5.979V3.25a1 1 0 0 0-1-1ZM9.75 12a1 1 0 0 0-1.762-.647l-.222.265c-.515.623-1.078 1.303-2.28 2.024a1 1 0 1 0 1.029 1.716c.483-.29.889-.582 1.235-.865V20a1 1 0 0 0 2 0v-8Zm6.5-1c-1.386 0-2.4.635-3.008 1.661c-.564.95-.742 2.161-.742 3.339s.178 2.39.742 3.339C13.85 20.365 14.864 21 16.25 21s2.4-.635 3.008-1.661c.564-.95.742-2.161.742-3.339s-.178-2.39-.742-3.339C18.65 11.635 17.636 11 16.25 11Zm-1.75 5c0-1.031.166-1.82.461-2.318c.251-.422.613-.682 1.289-.682c.676 0 1.038.26 1.288.682c.296.498.462 1.287.462 2.318c0 1.031-.166 1.82-.462 2.318c-.25.422-.612.682-1.288.682s-1.038-.26-1.289-.682c-.295-.498-.461-1.287-.461-2.318Z'></path>
9
+ </svg>
10
+ )
11
+
12
+ export default BackwardIcon
@@ -0,0 +1,19 @@
1
+ import * as React from 'react'
2
+ import { SVGProps, memo } from 'react'
3
+
4
+ const CameraIcon = (props: SVGProps<SVGSVGElement>) => (
5
+ <svg
6
+ width={32}
7
+ height={32}
8
+ viewBox='0 0 24 24'
9
+ style={{ width: '100%', height: '100%' }}
10
+ {...props}>
11
+ <path
12
+ fill='currentColor'
13
+ d='M12 18q2.075 0 3.538-1.462Q17 15.075 17 13q0-2.075-1.462-3.538Q14.075 8 12 8 9.925 8 8.463 9.462 7 10.925 7 13q0 2.075 1.463 3.538Q9.925 18 12 18Zm0-2q-1.25 0-2.125-.875T9 13q0-1.25.875-2.125T12 10q1.25 0 2.125.875T15 13q0 1.25-.875 2.125T12 16Zm6-6q.425 0 .712-.288Q19 9.425 19 9t-.288-.713Q18.425 8 18 8t-.712.287Q17 8.575 17 9t.288.712Q17.575 10 18 10ZM4 21q-.825 0-1.412-.587Q2 19.825 2 19V7q0-.825.588-1.412Q3.175 5 4 5h3.15L8.7 3.325q.15-.15.337-.238Q9.225 3 9.425 3h5.15q.2 0 .388.087.187.088.337.238L16.85 5H20q.825 0 1.413.588Q22 6.175 22 7v12q0 .825-.587 1.413Q20.825 21 20 21Zm16-2V7h-4.05l-1.825-2h-4.25L8.05 7H4v12Zm-8-6Z'
14
+ />
15
+ </svg>
16
+ )
17
+
18
+ const Memo = CameraIcon
19
+ export default Memo
@@ -0,0 +1,19 @@
1
+ import * as React from 'react'
2
+ import { SVGProps, memo } from 'react'
3
+
4
+ const CheckIcon = (props: SVGProps<SVGSVGElement>) => (
5
+ <svg
6
+ xmlns='http://www.w3.org/2000/svg'
7
+ aria-hidden='true'
8
+ className='iconify iconify--mdi'
9
+ width='24'
10
+ height='24'
11
+ viewBox='0 0 24 24'
12
+ style={{ width: '100%', height: '100%' }}
13
+ {...props}>
14
+ <path fill='currentColor' d='M21 7 9 19l-5.5-5.5 1.41-1.41L9 16.17 19.59 5.59 21 7Z' />
15
+ </svg>
16
+ )
17
+
18
+ const Memo = CheckIcon
19
+ export default Memo
@@ -0,0 +1,17 @@
1
+ import React from 'react'
2
+ import { memo, SVGProps } from 'react'
3
+
4
+ function EnablePiPIcon(props: SVGProps<SVGSVGElement>) {
5
+ return (
6
+ <svg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24' {...props}>
7
+ <g fill='currentColor'>
8
+ <path d='M13 17c0-1.886 0-2.828.586-3.414C14.172 13 15.114 13 17 13h1c1.886 0 2.828 0 3.414.586C22 14.172 22 15.114 22 17c0 1.886 0 2.828-.586 3.414C20.828 21 19.886 21 18 21h-1c-1.886 0-2.828 0-3.414-.586C13 19.828 13 18.886 13 17Z'></path>
9
+ <path
10
+ fillRule='evenodd'
11
+ d='M10 3h4c3.771 0 5.657 0 6.828 1.172c.95.949 1.13 2.694 1.164 5.328c.012.937.018 1.405-.275 1.703c-.294.297-.768.297-1.717.297h-2.5c-2.828 0-4.243 0-5.121.879c-.879.878-.879 2.293-.879 5.121v2c0 .466 0 .699-.076.883a1 1 0 0 1-.541.54C10.699 21 10.466 21 10 21c-3.771 0-5.657 0-6.828-1.172C2 18.657 2 16.771 2 13v-2c0-3.771 0-5.657 1.172-6.828C4.343 3 6.229 3 10 3ZM8.03 6.97a.75.75 0 0 0-1.06 1.06l2.72 2.72H8.5a.75.75 0 0 0 0 1.5h3a.75.75 0 0 0 .75-.75v-3a.75.75 0 0 0-1.5 0v1.19L8.03 6.97Z'
12
+ clipRule='evenodd'></path>
13
+ </g>
14
+ </svg>
15
+ )
16
+ }
17
+ export default EnablePiPIcon
@@ -0,0 +1,12 @@
1
+ import * as React from 'react'
2
+ import { SVGProps, memo } from 'react'
3
+
4
+ const ForwardIcon = (props: SVGProps<SVGSVGElement>) => (
5
+ <svg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24' {...props}>
6
+ <path
7
+ fill='currentColor'
8
+ d='M21 2.25a1 1 0 0 1 1 1V9a1 1 0 0 1-1 1h-5.25a1 1 0 0 1 0-2h3.387c-.985-1.179-2.208-2.113-3.682-2.57a9.435 9.435 0 0 0-6.106.16c-1.981.738-3.81 2.232-4.722 3.894a1 1 0 0 1-1.754-.961C4.048 6.38 6.288 4.596 8.652 3.716a11.435 11.435 0 0 1 7.394-.196c1.576.488 2.886 1.38 3.954 2.459V3.25a1 1 0 0 1 1-1ZM9.095 11.061A1 1 0 0 1 9.75 12v8a1 1 0 0 1-2 0v-5.507c-.346.283-.752.575-1.235.864a1 1 0 1 1-1.03-1.715c1.203-.721 1.766-1.4 2.281-2.024c.074-.09.148-.178.222-.265a1 1 0 0 1 1.107-.292Zm4.147 1.6C13.85 11.635 14.864 11 16.25 11s2.4.635 3.008 1.661c.564.95.742 2.161.742 3.339s-.178 2.39-.742 3.339C18.65 20.365 17.636 21 16.25 21s-2.4-.636-3.008-1.661c-.564-.95-.742-2.161-.742-3.339s.178-2.39.742-3.339Zm1.72 1.021c-.296.498-.462 1.287-.462 2.318c0 1.031.166 1.82.461 2.318c.251.422.613.682 1.289.682c.676 0 1.038-.26 1.288-.682c.296-.498.462-1.287.462-2.318c0-1.031-.166-1.82-.462-2.318c-.25-.422-.612-.682-1.288-.682s-1.038.26-1.289.682Z'></path>
9
+ </svg>
10
+ )
11
+
12
+ export default ForwardIcon
@@ -0,0 +1,23 @@
1
+ import * as React from 'react'
2
+ import { SVGProps, memo } from 'react'
3
+
4
+ const FullscreenEnterIcon = (props: SVGProps<SVGSVGElement>) => (
5
+ <svg
6
+ width='24'
7
+ height='24'
8
+ viewBox='0 0 24 24'
9
+ fill='none'
10
+ xmlns='http://www.w3.org/2000/svg'
11
+ data-uia='control-fullscreen-enter'
12
+ style={{ width: '100%', height: '100%' }}
13
+ {...props}>
14
+ <path
15
+ fillRule='evenodd'
16
+ clipRule='evenodd'
17
+ d='M0 5a2 2 0 0 1 2-2h7v2H2v4H0V5Zm22 0h-7V3h7a2 2 0 0 1 2 2v4h-2V5ZM2 15v4h7v2H2a2 2 0 0 1-2-2v-4h2Zm20 4v-4h2v4a2 2 0 0 1-2 2h-7v-2h7Z'
18
+ fill='currentColor'
19
+ />
20
+ </svg>
21
+ )
22
+
23
+ export default FullscreenEnterIcon
@@ -0,0 +1,23 @@
1
+ import * as React from 'react'
2
+ import { SVGProps, memo } from 'react'
3
+
4
+ const FullscreenExitIcon = (props: SVGProps<SVGSVGElement>) => (
5
+ <svg
6
+ width='24'
7
+ height='24'
8
+ viewBox='0 0 24 24'
9
+ fill='none'
10
+ xmlns='http://www.w3.org/2000/svg'
11
+ data-uia='control-fullscreen-exit'
12
+ style={{ width: '100%', height: '100%' }}
13
+ {...props}>
14
+ <path
15
+ fillRule='evenodd'
16
+ clipRule='evenodd'
17
+ d='M24 8h-5V3h-2v7h7V8ZM0 16h5v5h2v-7H0v2Zm7-6H0V8h5V3h2v7Zm12 11v-5h5v-2h-7v7h2Z'
18
+ fill='currentColor'
19
+ />
20
+ </svg>
21
+ )
22
+
23
+ export default FullscreenExitIcon
@@ -0,0 +1,32 @@
1
+ import * as React from 'react'
2
+ import { SVGProps, memo } from 'react'
3
+
4
+ const LoadingIcon = (props: SVGProps<SVGSVGElement>) => (
5
+ <svg
6
+ width='24'
7
+ height='24'
8
+ viewBox='0 0 24 24'
9
+ fill='none'
10
+ xmlns='http://www.w3.org/2000/svg'
11
+ className='svg-icon-nfplayerPlay'
12
+ style={{ width: '100%', height: '100%' }}
13
+ {...props}>
14
+ <path
15
+ fill='currentColor'
16
+ d='M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z'
17
+ opacity='.5'
18
+ />
19
+ <path fill='currentColor' d='M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z'>
20
+ <animateTransform
21
+ attributeName='transform'
22
+ dur='1s'
23
+ from='0 12 12'
24
+ repeatCount='indefinite'
25
+ to='360 12 12'
26
+ type='rotate'
27
+ />
28
+ </path>
29
+ </svg>
30
+ )
31
+
32
+ export default LoadingIcon
@@ -0,0 +1,23 @@
1
+ import * as React from 'react'
2
+ import { SVGProps, memo } from 'react'
3
+
4
+ const PauseIcon = (props: SVGProps<SVGSVGElement>) => (
5
+ <svg
6
+ width='24'
7
+ height='24'
8
+ viewBox='0 0 24 24'
9
+ fill='none'
10
+ xmlns='http://www.w3.org/2000/svg'
11
+ className='svg-icon-nfplayerPause'
12
+ style={{ width: '100%', height: '100%' }}
13
+ {...props}>
14
+ <path
15
+ fillRule='evenodd'
16
+ clipRule='evenodd'
17
+ d='M4.5 3a.5.5 0 0 0-.5.5v17a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5v-17a.5.5 0 0 0-.5-.5h-5Zm10 0a.5.5 0 0 0-.5.5v17a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5v-17a.5.5 0 0 0-.5-.5h-5Z'
18
+ fill='currentColor'
19
+ />
20
+ </svg>
21
+ )
22
+
23
+ export default PauseIcon
@@ -0,0 +1,21 @@
1
+ import * as React from 'react'
2
+ import { SVGProps, memo } from 'react'
3
+
4
+ const PlayIcon = (props: SVGProps<SVGSVGElement>) => (
5
+ <svg
6
+ width='24'
7
+ height='24'
8
+ viewBox='0 0 24 24'
9
+ fill='none'
10
+ xmlns='http://www.w3.org/2000/svg'
11
+ className='svg-icon-nfplayerPlay'
12
+ style={{ width: '100%', height: '100%' }}
13
+ {...props}>
14
+ <path
15
+ d='M4 2.691a1 1 0 0 1 1.482-.876l16.925 9.309a1 1 0 0 1 0 1.752L5.482 22.185A1 1 0 0 1 4 21.309V2.69Z'
16
+ fill='currentColor'
17
+ />
18
+ </svg>
19
+ )
20
+
21
+ export default PlayIcon