@therealtinhtute/baroiplayer 1.0.5 → 1.0.7

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 (611) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/package.json +1 -1
  3. package/dist/src/components/media-player-error.tsx +2 -2
  4. package/dist/src/components/media-player-fullscreen.tsx +2 -2
  5. package/dist/src/components/media-player-play.tsx +2 -2
  6. package/dist/src/components/media-player-seek.tsx +1 -1
  7. package/dist/src/components/media-player-tooltip.tsx +1 -1
  8. package/dist/src/components/media-player-volume.tsx +3 -3
  9. package/dist/src/components/react-player-wrapper.tsx +5 -5
  10. package/dist/src/hooks/use-touch-gestures.ts +1 -1
  11. package/package.json +1 -1
  12. package/src/components/media-player-error.tsx +2 -2
  13. package/src/components/media-player-fullscreen.tsx +2 -2
  14. package/src/components/media-player-play.tsx +2 -2
  15. package/src/components/media-player-seek.tsx +1 -1
  16. package/src/components/media-player-tooltip.tsx +1 -1
  17. package/src/components/media-player-volume.tsx +3 -3
  18. package/src/components/react-player-wrapper.tsx +5 -5
  19. package/src/hooks/use-touch-gestures.ts +1 -1
  20. package/dist/context/media.js +0 -2
  21. package/dist/context/media.js.map +0 -1
  22. package/dist/context/media.mjs +0 -15
  23. package/dist/context/media.mjs.map +0 -1
  24. package/dist/context/store.js +0 -2
  25. package/dist/context/store.js.map +0 -1
  26. package/dist/context/store.mjs +0 -5
  27. package/dist/context/store.mjs.map +0 -1
  28. package/dist/context-Af84FynT.js +0 -1179
  29. package/dist/context-Af84FynT.js.map +0 -1
  30. package/dist/context-CwZnPdz0.cjs +0 -23
  31. package/dist/context-CwZnPdz0.cjs.map +0 -1
  32. package/dist/core-events-B5W_j8yU.js +0 -480
  33. package/dist/core-events-B5W_j8yU.js.map +0 -1
  34. package/dist/core-events-CN0-Vhhq.cjs +0 -2
  35. package/dist/core-events-CN0-Vhhq.cjs.map +0 -1
  36. package/dist/core-plugins-Bq9KLany.js +0 -696
  37. package/dist/core-plugins-Bq9KLany.js.map +0 -1
  38. package/dist/core-plugins-CPDSHMiQ.cjs +0 -2
  39. package/dist/core-plugins-CPDSHMiQ.cjs.map +0 -1
  40. package/dist/core.js +0 -37
  41. package/dist/core.js.map +0 -1
  42. package/dist/core.mjs +0 -1217
  43. package/dist/core.mjs.map +0 -1
  44. package/dist/enhanced-components-CXnYiOt6.cjs +0 -2
  45. package/dist/enhanced-components-CXnYiOt6.cjs.map +0 -1
  46. package/dist/enhanced-components-Da0TSvKe.js +0 -1073
  47. package/dist/enhanced-components-Da0TSvKe.js.map +0 -1
  48. package/dist/hooks-BCMilGRf.cjs +0 -4
  49. package/dist/hooks-BCMilGRf.cjs.map +0 -1
  50. package/dist/hooks-BPtHV1ZT.js +0 -2042
  51. package/dist/hooks-BPtHV1ZT.js.map +0 -1
  52. package/dist/index.js.map +0 -1
  53. package/dist/index.mjs.map +0 -1
  54. package/dist/minimal-components-BHJMuaL7.cjs +0 -2
  55. package/dist/minimal-components-BHJMuaL7.cjs.map +0 -1
  56. package/dist/minimal-components-BmqRefl1.js +0 -2002
  57. package/dist/minimal-components-BmqRefl1.js.map +0 -1
  58. package/dist/mona-loading.gif +0 -0
  59. package/dist/performance-monitor--rzKTlbj.js +0 -302
  60. package/dist/performance-monitor--rzKTlbj.js.map +0 -1
  61. package/dist/performance-monitor-cjIvZE2D.cjs +0 -2
  62. package/dist/performance-monitor-cjIvZE2D.cjs.map +0 -1
  63. package/dist/src/adapters/videojs-adapter.d.ts.map +0 -1
  64. package/dist/src/adapters/videojs-adapter.js +0 -350
  65. package/dist/src/assets/mona-loading.gif +0 -0
  66. package/dist/src/components/AnimateLoading.d.ts.map +0 -1
  67. package/dist/src/components/AnimateLoading.js +0 -41
  68. package/dist/src/components/LoadingState.d.ts.map +0 -1
  69. package/dist/src/components/LoadingState.js +0 -111
  70. package/dist/src/components/accessibility/keyboard-help-overlay.d.ts.map +0 -1
  71. package/dist/src/components/accessibility/keyboard-help-overlay.js +0 -90
  72. package/dist/src/components/audio-player.d.ts.map +0 -1
  73. package/dist/src/components/audio-player.js +0 -31
  74. package/dist/src/components/basic/index.d.ts.map +0 -1
  75. package/dist/src/components/basic/index.js +0 -29
  76. package/dist/src/components/enhanced/advanced-features.d.ts.map +0 -1
  77. package/dist/src/components/enhanced/advanced-features.js +0 -64
  78. package/dist/src/components/enhanced/debug-panel.d.ts.map +0 -1
  79. package/dist/src/components/enhanced/debug-panel.js +0 -94
  80. package/dist/src/components/enhanced/enhanced-controls.d.ts.map +0 -1
  81. package/dist/src/components/enhanced/enhanced-controls.js +0 -233
  82. package/dist/src/components/enhanced/enhanced-media-player.d.ts.map +0 -1
  83. package/dist/src/components/enhanced/enhanced-media-player.js +0 -316
  84. package/dist/src/components/enhanced/error-handling.d.ts.map +0 -1
  85. package/dist/src/components/enhanced/error-handling.js +0 -153
  86. package/dist/src/components/enhanced/index.d.ts.map +0 -1
  87. package/dist/src/components/enhanced/index.js +0 -10
  88. package/dist/src/components/enhanced/media-player-enhanced.d.ts.map +0 -1
  89. package/dist/src/components/enhanced/media-player-enhanced.js +0 -250
  90. package/dist/src/components/examples/basic-video-player.d.ts.map +0 -1
  91. package/dist/src/components/examples/basic-video-player.js +0 -16
  92. package/dist/src/components/examples/custom-controls-example.d.ts.map +0 -1
  93. package/dist/src/components/examples/custom-controls-example.js +0 -12
  94. package/dist/src/components/examples/enhanced-controls-example.d.ts.map +0 -1
  95. package/dist/src/components/examples/enhanced-controls-example.js +0 -18
  96. package/dist/src/components/examples/enhanced-media-player-example.d.ts.map +0 -1
  97. package/dist/src/components/examples/enhanced-media-player-example.js +0 -13
  98. package/dist/src/components/examples/loading-states-demo.d.ts.map +0 -1
  99. package/dist/src/components/examples/loading-states-demo.js +0 -41
  100. package/dist/src/components/examples/react-19-demo.d.ts.map +0 -1
  101. package/dist/src/components/examples/react-19-demo.js +0 -104
  102. package/dist/src/components/examples/volume-orientation-demo.d.ts.map +0 -1
  103. package/dist/src/components/examples/volume-orientation-demo.js +0 -31
  104. package/dist/src/components/icon-demo.d.ts.map +0 -1
  105. package/dist/src/components/icon-demo.js +0 -16
  106. package/dist/src/components/icons/index.d.ts.map +0 -1
  107. package/dist/src/components/icons/index.js +0 -59
  108. package/dist/src/components/icons/svg-icons/ArrowLeftIcon.d.ts.map +0 -1
  109. package/dist/src/components/icons/svg-icons/ArrowLeftIcon.js +0 -3
  110. package/dist/src/components/icons/svg-icons/ArrowRightIcon.d.ts.map +0 -1
  111. package/dist/src/components/icons/svg-icons/ArrowRightIcon.js +0 -3
  112. package/dist/src/components/icons/svg-icons/AudioIcon.d.ts.map +0 -1
  113. package/dist/src/components/icons/svg-icons/AudioIcon.js +0 -4
  114. package/dist/src/components/icons/svg-icons/BackwardIcon.d.ts.map +0 -1
  115. package/dist/src/components/icons/svg-icons/BackwardIcon.js +0 -3
  116. package/dist/src/components/icons/svg-icons/CameraIcon.d.ts.map +0 -1
  117. package/dist/src/components/icons/svg-icons/CameraIcon.js +0 -4
  118. package/dist/src/components/icons/svg-icons/CheckIcon.d.ts.map +0 -1
  119. package/dist/src/components/icons/svg-icons/CheckIcon.js +0 -4
  120. package/dist/src/components/icons/svg-icons/EnablePiPIcon.d.ts.map +0 -1
  121. package/dist/src/components/icons/svg-icons/EnablePiPIcon.js +0 -5
  122. package/dist/src/components/icons/svg-icons/ForwardIcon.d.ts.map +0 -1
  123. package/dist/src/components/icons/svg-icons/ForwardIcon.js +0 -3
  124. package/dist/src/components/icons/svg-icons/FullscreenEnterIcon.d.ts.map +0 -1
  125. package/dist/src/components/icons/svg-icons/FullscreenEnterIcon.js +0 -3
  126. package/dist/src/components/icons/svg-icons/FullscreenExitIcon.d.ts.map +0 -1
  127. package/dist/src/components/icons/svg-icons/FullscreenExitIcon.js +0 -3
  128. package/dist/src/components/icons/svg-icons/LoadingIcon.d.ts.map +0 -1
  129. package/dist/src/components/icons/svg-icons/LoadingIcon.js +0 -3
  130. package/dist/src/components/icons/svg-icons/PauseIcon.d.ts.map +0 -1
  131. package/dist/src/components/icons/svg-icons/PauseIcon.js +0 -3
  132. package/dist/src/components/icons/svg-icons/PlayIcon.d.ts.map +0 -1
  133. package/dist/src/components/icons/svg-icons/PlayIcon.js +0 -3
  134. package/dist/src/components/icons/svg-icons/PlaybackSpeedIcon.d.ts.map +0 -1
  135. package/dist/src/components/icons/svg-icons/PlaybackSpeedIcon.js +0 -3
  136. package/dist/src/components/icons/svg-icons/QualityIcon.d.ts.map +0 -1
  137. package/dist/src/components/icons/svg-icons/QualityIcon.js +0 -3
  138. package/dist/src/components/icons/svg-icons/SettingsIcon.d.ts.map +0 -1
  139. package/dist/src/components/icons/svg-icons/SettingsIcon.js +0 -3
  140. package/dist/src/components/icons/svg-icons/SliderIcon.d.ts.map +0 -1
  141. package/dist/src/components/icons/svg-icons/SliderIcon.js +0 -3
  142. package/dist/src/components/icons/svg-icons/SubtitleIcon.d.ts.map +0 -1
  143. package/dist/src/components/icons/svg-icons/SubtitleIcon.js +0 -3
  144. package/dist/src/components/icons/svg-icons/SubtitleOffIcon.d.ts.map +0 -1
  145. package/dist/src/components/icons/svg-icons/SubtitleOffIcon.js +0 -3
  146. package/dist/src/components/icons/svg-icons/UnPiPIcon.d.ts.map +0 -1
  147. package/dist/src/components/icons/svg-icons/UnPiPIcon.js +0 -5
  148. package/dist/src/components/icons/svg-icons/VolumeMutedIcon.d.ts.map +0 -1
  149. package/dist/src/components/icons/svg-icons/VolumeMutedIcon.js +0 -3
  150. package/dist/src/components/icons/svg-icons/VolumeOneIcon.d.ts.map +0 -1
  151. package/dist/src/components/icons/svg-icons/VolumeOneIcon.js +0 -3
  152. package/dist/src/components/icons/svg-icons/VolumeThreeIcon.d.ts.map +0 -1
  153. package/dist/src/components/icons/svg-icons/VolumeThreeIcon.js +0 -3
  154. package/dist/src/components/icons/svg-icons/VolumeTwoIcon.d.ts.map +0 -1
  155. package/dist/src/components/icons/svg-icons/VolumeTwoIcon.js +0 -3
  156. package/dist/src/components/legacy.d.ts.map +0 -1
  157. package/dist/src/components/legacy.js +0 -52
  158. package/dist/src/components/media-metadata-display.d.ts.map +0 -1
  159. package/dist/src/components/media-metadata-display.js +0 -20
  160. package/dist/src/components/media-player-audio.d.ts.map +0 -1
  161. package/dist/src/components/media-player-audio.js +0 -18
  162. package/dist/src/components/media-player-controls.d.ts.map +0 -1
  163. package/dist/src/components/media-player-controls.js +0 -150
  164. package/dist/src/components/media-player-error.d.ts.map +0 -1
  165. package/dist/src/components/media-player-error.js +0 -85
  166. package/dist/src/components/media-player-fullscreen.d.ts.map +0 -1
  167. package/dist/src/components/media-player-fullscreen.js +0 -68
  168. package/dist/src/components/media-player-hls.d.ts.map +0 -1
  169. package/dist/src/components/media-player-hls.js +0 -20
  170. package/dist/src/components/media-player-loading.d.ts.map +0 -1
  171. package/dist/src/components/media-player-loading.js +0 -53
  172. package/dist/src/components/media-player-play.d.ts.map +0 -1
  173. package/dist/src/components/media-player-play.js +0 -44
  174. package/dist/src/components/media-player-root.d.ts.map +0 -1
  175. package/dist/src/components/media-player-root.js +0 -243
  176. package/dist/src/components/media-player-seek.d.ts.map +0 -1
  177. package/dist/src/components/media-player-seek.js +0 -92
  178. package/dist/src/components/media-player-time.d.ts.map +0 -1
  179. package/dist/src/components/media-player-time.js +0 -57
  180. package/dist/src/components/media-player-tooltip.d.ts.map +0 -1
  181. package/dist/src/components/media-player-tooltip.js +0 -14
  182. package/dist/src/components/media-player-video.d.ts.map +0 -1
  183. package/dist/src/components/media-player-video.js +0 -18
  184. package/dist/src/components/media-player-volume.d.ts.map +0 -1
  185. package/dist/src/components/media-player-volume.js +0 -88
  186. package/dist/src/components/media-player.d.ts.map +0 -1
  187. package/dist/src/components/media-player.js +0 -67
  188. package/dist/src/components/media-suspense.d.ts.map +0 -1
  189. package/dist/src/components/media-suspense.js +0 -173
  190. package/dist/src/components/player-settings-form.d.ts.map +0 -1
  191. package/dist/src/components/player-settings-form.js +0 -46
  192. package/dist/src/components/react-player-wrapper.d.ts.map +0 -1
  193. package/dist/src/components/react-player-wrapper.js +0 -163
  194. package/dist/src/components/simple-video-player.d.ts.map +0 -1
  195. package/dist/src/components/simple-video-player.js +0 -41
  196. package/dist/src/components/ui/enhanced-seek-bar.d.ts.map +0 -1
  197. package/dist/src/components/ui/enhanced-seek-bar.js +0 -112
  198. package/dist/src/components/ui/fullscreen-button.d.ts.map +0 -1
  199. package/dist/src/components/ui/fullscreen-button.js +0 -21
  200. package/dist/src/components/ui/media-resource-preloader.d.ts.map +0 -1
  201. package/dist/src/components/ui/media-resource-preloader.js +0 -295
  202. package/dist/src/components/ui/play-button.d.ts.map +0 -1
  203. package/dist/src/components/ui/play-button.js +0 -26
  204. package/dist/src/components/ui/seek-bar.d.ts.map +0 -1
  205. package/dist/src/components/ui/seek-bar.js +0 -54
  206. package/dist/src/components/ui/time-display.d.ts.map +0 -1
  207. package/dist/src/components/ui/time-display.js +0 -18
  208. package/dist/src/components/ui/volume-control.d.ts.map +0 -1
  209. package/dist/src/components/ui/volume-control.js +0 -71
  210. package/dist/src/components/unified/base-media-player.d.ts.map +0 -1
  211. package/dist/src/components/unified/base-media-player.js +0 -104
  212. package/dist/src/components/unified/media-player.d.ts.map +0 -1
  213. package/dist/src/components/unified/media-player.js +0 -41
  214. package/dist/src/components/variants/minimal/AccessibleMinimalPlayer.d.ts.map +0 -1
  215. package/dist/src/components/variants/minimal/AccessibleMinimalPlayer.js +0 -322
  216. package/dist/src/components/variants/minimal/EnhancedMinimalMediaPlayer.d.ts.map +0 -1
  217. package/dist/src/components/variants/minimal/EnhancedMinimalMediaPlayer.js +0 -280
  218. package/dist/src/components/variants/minimal/MinimalControls.d.ts.map +0 -1
  219. package/dist/src/components/variants/minimal/MinimalControls.js +0 -19
  220. package/dist/src/components/variants/minimal/MinimalLoading.d.ts.map +0 -1
  221. package/dist/src/components/variants/minimal/MinimalLoading.js +0 -6
  222. package/dist/src/components/variants/minimal/MinimalMediaPlayer.d.ts.map +0 -1
  223. package/dist/src/components/variants/minimal/MinimalMediaPlayer.js +0 -135
  224. package/dist/src/components/variants/minimal/MinimalOverlay.d.ts.map +0 -1
  225. package/dist/src/components/variants/minimal/MinimalOverlay.js +0 -15
  226. package/dist/src/components/variants/minimal/MinimalPlayButton.d.ts.map +0 -1
  227. package/dist/src/components/variants/minimal/MinimalPlayButton.js +0 -29
  228. package/dist/src/components/variants/minimal/MinimalSeekBar.d.ts.map +0 -1
  229. package/dist/src/components/variants/minimal/MinimalSeekBar.js +0 -73
  230. package/dist/src/components/variants/minimal/MinimalVolumeControl.d.ts.map +0 -1
  231. package/dist/src/components/variants/minimal/MinimalVolumeControl.js +0 -29
  232. package/dist/src/components/variants/minimal/SimpleMinimalPlayer.d.ts.map +0 -1
  233. package/dist/src/components/variants/minimal/SimpleMinimalPlayer.js +0 -51
  234. package/dist/src/components/variants/minimal/components/CenterPlayButton.d.ts.map +0 -1
  235. package/dist/src/components/variants/minimal/components/CenterPlayButton.js +0 -8
  236. package/dist/src/components/variants/minimal/components/ControlBar.d.ts.map +0 -1
  237. package/dist/src/components/variants/minimal/components/ControlBar.js +0 -10
  238. package/dist/src/components/variants/minimal/components/EnhancedSettingsMenu.d.ts.map +0 -1
  239. package/dist/src/components/variants/minimal/components/EnhancedSettingsMenu.js +0 -68
  240. package/dist/src/components/variants/minimal/components/PlaybackControls.d.ts.map +0 -1
  241. package/dist/src/components/variants/minimal/components/PlaybackControls.js +0 -9
  242. package/dist/src/components/variants/minimal/components/RightControls.d.ts.map +0 -1
  243. package/dist/src/components/variants/minimal/components/RightControls.js +0 -40
  244. package/dist/src/components/variants/minimal/components/SeekBar.d.ts.map +0 -1
  245. package/dist/src/components/variants/minimal/components/SeekBar.js +0 -43
  246. package/dist/src/components/variants/minimal/components/SettingsDropdown.d.ts.map +0 -1
  247. package/dist/src/components/variants/minimal/components/SettingsDropdown.js +0 -18
  248. package/dist/src/components/variants/minimal/components/SubtitleDisplay.d.ts.map +0 -1
  249. package/dist/src/components/variants/minimal/components/SubtitleDisplay.js +0 -6
  250. package/dist/src/components/variants/minimal/components/TimeDisplay.d.ts.map +0 -1
  251. package/dist/src/components/variants/minimal/components/TimeDisplay.js +0 -5
  252. package/dist/src/components/variants/minimal/components/VideoElement.d.ts.map +0 -1
  253. package/dist/src/components/variants/minimal/components/VideoElement.js +0 -4
  254. package/dist/src/components/variants/minimal/components/VolumeControl.d.ts.map +0 -1
  255. package/dist/src/components/variants/minimal/components/VolumeControl.js +0 -99
  256. package/dist/src/components/variants/minimal/index.d.ts.map +0 -1
  257. package/dist/src/components/variants/minimal/index.js +0 -8
  258. package/dist/src/components/video-player.d.ts.map +0 -1
  259. package/dist/src/components/video-player.js +0 -38
  260. package/dist/src/context/error-handling.d.ts.map +0 -1
  261. package/dist/src/context/error-handling.js +0 -300
  262. package/dist/src/context/media-context.d.ts.map +0 -1
  263. package/dist/src/context/media-context.js +0 -121
  264. package/dist/src/context/media-provider.d.ts.map +0 -1
  265. package/dist/src/context/media-provider.js +0 -164
  266. package/dist/src/context/media-store.d.ts.map +0 -1
  267. package/dist/src/context/media-store.js +0 -273
  268. package/dist/src/context/persistence.d.ts.map +0 -1
  269. package/dist/src/context/persistence.js +0 -356
  270. package/dist/src/core/events/event-system.d.ts.map +0 -1
  271. package/dist/src/core/events/event-system.js +0 -288
  272. package/dist/src/core/events/hooks.d.ts.map +0 -1
  273. package/dist/src/core/events/hooks.js +0 -198
  274. package/dist/src/core/events/index.d.ts.map +0 -1
  275. package/dist/src/core/events/index.js +0 -7
  276. package/dist/src/core/events/middleware.d.ts.map +0 -1
  277. package/dist/src/core/events/middleware.js +0 -219
  278. package/dist/src/core/index.d.ts.map +0 -1
  279. package/dist/src/core/index.js +0 -15
  280. package/dist/src/core/optimization/bundle-optimizer.d.ts.map +0 -1
  281. package/dist/src/core/optimization/bundle-optimizer.js +0 -217
  282. package/dist/src/core/performance/cicd.d.ts.map +0 -1
  283. package/dist/src/core/performance/cicd.js +0 -83
  284. package/dist/src/core/performance/index.d.ts.map +0 -1
  285. package/dist/src/core/performance/index.js +0 -14
  286. package/dist/src/core/performance/media-loading-optimizer.d.ts.map +0 -1
  287. package/dist/src/core/performance/media-loading-optimizer.js +0 -404
  288. package/dist/src/core/performance/performance-budgets.d.ts.map +0 -1
  289. package/dist/src/core/performance/performance-budgets.js +0 -326
  290. package/dist/src/core/performance/performance-monitor.d.ts.map +0 -1
  291. package/dist/src/core/performance/performance-monitor.js +0 -297
  292. package/dist/src/core/performance/performance-testing.d.ts.map +0 -1
  293. package/dist/src/core/performance/performance-testing.js +0 -314
  294. package/dist/src/core/plugins/base-plugin.d.ts.map +0 -1
  295. package/dist/src/core/plugins/base-plugin.js +0 -151
  296. package/dist/src/core/plugins/enhanced-plugin-system.d.ts.map +0 -1
  297. package/dist/src/core/plugins/enhanced-plugin-system.js +0 -305
  298. package/dist/src/core/plugins/examples/analytics-plugin.d.ts.map +0 -1
  299. package/dist/src/core/plugins/examples/analytics-plugin.js +0 -191
  300. package/dist/src/core/plugins/index.d.ts.map +0 -1
  301. package/dist/src/core/plugins/index.js +0 -9
  302. package/dist/src/core/plugins/registry.d.ts.map +0 -1
  303. package/dist/src/core/plugins/registry.js +0 -261
  304. package/dist/src/core/plugins/types.d.ts.map +0 -1
  305. package/dist/src/core/plugins/types.js +0 -31
  306. package/dist/src/core/plugins/utils.d.ts.map +0 -1
  307. package/dist/src/core/plugins/utils.js +0 -274
  308. package/dist/src/core/progressive-loading.d.ts.map +0 -1
  309. package/dist/src/core/progressive-loading.js +0 -239
  310. package/dist/src/core/providers/enhanced-hls-provider.d.ts.map +0 -1
  311. package/dist/src/core/providers/enhanced-hls-provider.js +0 -273
  312. package/dist/src/core/providers/service-provider.d.ts.map +0 -1
  313. package/dist/src/core/providers/service-provider.js +0 -105
  314. package/dist/src/core/utils.d.ts.map +0 -1
  315. package/dist/src/core/utils.js +0 -21
  316. package/dist/src/features/media-session/media-session-manager.d.ts.map +0 -1
  317. package/dist/src/features/media-session/media-session-manager.js +0 -331
  318. package/dist/src/features/picture-in-picture/pip-manager.d.ts.map +0 -1
  319. package/dist/src/features/picture-in-picture/pip-manager.js +0 -353
  320. package/dist/src/features/playlist/playlist-manager.d.ts.map +0 -1
  321. package/dist/src/features/playlist/playlist-manager.js +0 -475
  322. package/dist/src/features/subtitles/subtitle-manager.d.ts.map +0 -1
  323. package/dist/src/features/subtitles/subtitle-manager.js +0 -335
  324. package/dist/src/features/subtitles/subtitle-parser.d.ts.map +0 -1
  325. package/dist/src/features/subtitles/subtitle-parser.js +0 -217
  326. package/dist/src/features/thumbnails/thumbnail-generator.d.ts.map +0 -1
  327. package/dist/src/features/thumbnails/thumbnail-generator.js +0 -388
  328. package/dist/src/hooks/accessibility/index.d.ts.map +0 -1
  329. package/dist/src/hooks/accessibility/index.js +0 -4
  330. package/dist/src/hooks/accessibility/use-accessibility-preferences.d.ts.map +0 -1
  331. package/dist/src/hooks/accessibility/use-accessibility-preferences.js +0 -156
  332. package/dist/src/hooks/accessibility/use-focus-management.d.ts.map +0 -1
  333. package/dist/src/hooks/accessibility/use-focus-management.js +0 -142
  334. package/dist/src/hooks/accessibility/use-keyboard-shortcuts.d.ts.map +0 -1
  335. package/dist/src/hooks/accessibility/use-keyboard-shortcuts.js +0 -101
  336. package/dist/src/hooks/accessibility/use-screen-reader.d.ts.map +0 -1
  337. package/dist/src/hooks/accessibility/use-screen-reader.js +0 -148
  338. package/dist/src/hooks/core/index.d.ts.map +0 -1
  339. package/dist/src/hooks/core/index.js +0 -19
  340. package/dist/src/hooks/legacy.d.ts.map +0 -1
  341. package/dist/src/hooks/legacy.js +0 -17
  342. package/dist/src/hooks/use-enhanced-media-player.d.ts.map +0 -1
  343. package/dist/src/hooks/use-enhanced-media-player.js +0 -395
  344. package/dist/src/hooks/use-intelligent-preloading.d.ts.map +0 -1
  345. package/dist/src/hooks/use-intelligent-preloading.js +0 -258
  346. package/dist/src/hooks/use-keyboard-controls.d.ts.map +0 -1
  347. package/dist/src/hooks/use-keyboard-controls.js +0 -83
  348. package/dist/src/hooks/use-media-actions.d.ts.map +0 -1
  349. package/dist/src/hooks/use-media-actions.js +0 -121
  350. package/dist/src/hooks/use-media-metadata.d.ts.map +0 -1
  351. package/dist/src/hooks/use-media-metadata.js +0 -74
  352. package/dist/src/hooks/use-media-optimistic.d.ts.map +0 -1
  353. package/dist/src/hooks/use-media-optimistic.js +0 -205
  354. package/dist/src/hooks/use-media-player.d.ts.map +0 -1
  355. package/dist/src/hooks/use-media-player.js +0 -251
  356. package/dist/src/hooks/use-media-state.d.ts.map +0 -1
  357. package/dist/src/hooks/use-media-state.js +0 -162
  358. package/dist/src/hooks/use-memory-optimization.d.ts.map +0 -1
  359. package/dist/src/hooks/use-memory-optimization.js +0 -288
  360. package/dist/src/hooks/use-optimistic-controls.d.ts.map +0 -1
  361. package/dist/src/hooks/use-optimistic-controls.js +0 -60
  362. package/dist/src/hooks/use-optimized-media.d.ts.map +0 -1
  363. package/dist/src/hooks/use-optimized-media.js +0 -211
  364. package/dist/src/hooks/use-touch-gestures.d.ts.map +0 -1
  365. package/dist/src/hooks/use-touch-gestures.js +0 -289
  366. package/dist/src/hooks/useEnhancedSubtitles.d.ts.map +0 -1
  367. package/dist/src/hooks/useEnhancedSubtitles.js +0 -205
  368. package/dist/src/hooks/useKeyboardShortcuts.d.ts.map +0 -1
  369. package/dist/src/hooks/useKeyboardShortcuts.js +0 -59
  370. package/dist/src/hooks/useMediaControls.d.ts.map +0 -1
  371. package/dist/src/hooks/useMediaControls.js +0 -44
  372. package/dist/src/hooks/useScreenshot.d.ts.map +0 -1
  373. package/dist/src/hooks/useScreenshot.js +0 -56
  374. package/dist/src/hooks/useSubtitles.d.ts.map +0 -1
  375. package/dist/src/hooks/useSubtitles.js +0 -73
  376. package/dist/src/hooks/useVideoPlayer.d.ts.map +0 -1
  377. package/dist/src/hooks/useVideoPlayer.js +0 -184
  378. package/dist/src/icons/components/FullscreenIcon.d.ts.map +0 -1
  379. package/dist/src/icons/components/FullscreenIcon.js +0 -11
  380. package/dist/src/icons/components/SettingsIcon.d.ts.map +0 -1
  381. package/dist/src/icons/components/SettingsIcon.js +0 -11
  382. package/dist/src/icons/components/animated/LoadingIcon.d.ts.map +0 -1
  383. package/dist/src/icons/components/animated/LoadingIcon.js +0 -11
  384. package/dist/src/icons/components/animated/PlayPauseIcon.d.ts.map +0 -1
  385. package/dist/src/icons/components/animated/PlayPauseIcon.js +0 -9
  386. package/dist/src/icons/components/media/PauseIcon.d.ts.map +0 -1
  387. package/dist/src/icons/components/media/PauseIcon.js +0 -12
  388. package/dist/src/icons/components/media/PlayIcon.d.ts.map +0 -1
  389. package/dist/src/icons/components/media/PlayIcon.js +0 -12
  390. package/dist/src/icons/components/volume/VolumeIcon.d.ts.map +0 -1
  391. package/dist/src/icons/components/volume/VolumeIcon.js +0 -11
  392. package/dist/src/icons/components/volume/VolumeOffIcon.d.ts.map +0 -1
  393. package/dist/src/icons/components/volume/VolumeOffIcon.js +0 -11
  394. package/dist/src/icons/index.d.ts.map +0 -1
  395. package/dist/src/icons/index.js +0 -45
  396. package/dist/src/icons/provider.d.ts.map +0 -1
  397. package/dist/src/icons/provider.js +0 -37
  398. package/dist/src/icons/types.d.ts.map +0 -1
  399. package/dist/src/icons/types.js +0 -1
  400. package/dist/src/index-enhanced.d.ts.map +0 -1
  401. package/dist/src/index-enhanced.js +0 -16
  402. package/dist/src/index-legacy.d.ts.map +0 -1
  403. package/dist/src/index-legacy.js +0 -97
  404. package/dist/src/index.d.ts.map +0 -1
  405. package/dist/src/index.js +0 -90
  406. package/dist/src/index.minimal.d.ts.map +0 -1
  407. package/dist/src/index.minimal.js +0 -3
  408. package/dist/src/lib/deprecation.d.ts.map +0 -1
  409. package/dist/src/lib/deprecation.js +0 -31
  410. package/dist/src/lib/format-time.d.ts.map +0 -1
  411. package/dist/src/lib/format-time.js +0 -32
  412. package/dist/src/lib/index.d.ts.map +0 -1
  413. package/dist/src/lib/index.js +0 -3
  414. package/dist/src/lib/utils.d.ts.map +0 -1
  415. package/dist/src/lib/utils.js +0 -5
  416. package/dist/src/test/setup.d.ts.map +0 -1
  417. package/dist/src/test/setup.js +0 -65
  418. package/dist/src/types/events.d.ts.map +0 -1
  419. package/dist/src/types/events.js +0 -2
  420. package/dist/src/types/formats.d.ts.map +0 -1
  421. package/dist/src/types/formats.js +0 -63
  422. package/dist/src/types/index.d.ts.map +0 -1
  423. package/dist/src/types/index.js +0 -4
  424. package/dist/utils-Db13763z.cjs +0 -9
  425. package/dist/utils-Db13763z.cjs.map +0 -1
  426. package/dist/utils-nTO4AnHo.js +0 -2809
  427. package/dist/utils-nTO4AnHo.js.map +0 -1
  428. package/dist/utils.js +0 -2
  429. package/dist/utils.js.map +0 -1
  430. package/dist/utils.mjs +0 -7
  431. package/dist/utils.mjs.map +0 -1
  432. package/src/adapters/videojs-adapter.js +0 -350
  433. package/src/components/AnimateLoading.js +0 -41
  434. package/src/components/LoadingState.js +0 -111
  435. package/src/components/accessibility/keyboard-help-overlay.js +0 -90
  436. package/src/components/audio-player.js +0 -31
  437. package/src/components/basic/index.js +0 -29
  438. package/src/components/enhanced/advanced-features.js +0 -64
  439. package/src/components/enhanced/debug-panel.js +0 -94
  440. package/src/components/enhanced/enhanced-controls.js +0 -233
  441. package/src/components/enhanced/enhanced-media-player.js +0 -316
  442. package/src/components/enhanced/error-handling.js +0 -153
  443. package/src/components/enhanced/index.js +0 -10
  444. package/src/components/enhanced/media-player-enhanced.js +0 -250
  445. package/src/components/examples/basic-video-player.js +0 -16
  446. package/src/components/examples/custom-controls-example.js +0 -12
  447. package/src/components/examples/enhanced-controls-example.js +0 -18
  448. package/src/components/examples/enhanced-media-player-example.js +0 -13
  449. package/src/components/examples/loading-states-demo.js +0 -41
  450. package/src/components/examples/react-19-demo.js +0 -104
  451. package/src/components/examples/volume-orientation-demo.js +0 -31
  452. package/src/components/icon-demo.js +0 -16
  453. package/src/components/icons/index.js +0 -59
  454. package/src/components/icons/svg-icons/ArrowLeftIcon.js +0 -3
  455. package/src/components/icons/svg-icons/ArrowRightIcon.js +0 -3
  456. package/src/components/icons/svg-icons/AudioIcon.js +0 -4
  457. package/src/components/icons/svg-icons/BackwardIcon.js +0 -3
  458. package/src/components/icons/svg-icons/CameraIcon.js +0 -4
  459. package/src/components/icons/svg-icons/CheckIcon.js +0 -4
  460. package/src/components/icons/svg-icons/EnablePiPIcon.js +0 -5
  461. package/src/components/icons/svg-icons/ForwardIcon.js +0 -3
  462. package/src/components/icons/svg-icons/FullscreenEnterIcon.js +0 -3
  463. package/src/components/icons/svg-icons/FullscreenExitIcon.js +0 -3
  464. package/src/components/icons/svg-icons/LoadingIcon.js +0 -3
  465. package/src/components/icons/svg-icons/PauseIcon.js +0 -3
  466. package/src/components/icons/svg-icons/PlayIcon.js +0 -3
  467. package/src/components/icons/svg-icons/PlaybackSpeedIcon.js +0 -3
  468. package/src/components/icons/svg-icons/QualityIcon.js +0 -3
  469. package/src/components/icons/svg-icons/SettingsIcon.js +0 -3
  470. package/src/components/icons/svg-icons/SliderIcon.js +0 -3
  471. package/src/components/icons/svg-icons/SubtitleIcon.js +0 -3
  472. package/src/components/icons/svg-icons/SubtitleOffIcon.js +0 -3
  473. package/src/components/icons/svg-icons/UnPiPIcon.js +0 -5
  474. package/src/components/icons/svg-icons/VolumeMutedIcon.js +0 -3
  475. package/src/components/icons/svg-icons/VolumeOneIcon.js +0 -3
  476. package/src/components/icons/svg-icons/VolumeThreeIcon.js +0 -3
  477. package/src/components/icons/svg-icons/VolumeTwoIcon.js +0 -3
  478. package/src/components/legacy.js +0 -52
  479. package/src/components/media-metadata-display.js +0 -20
  480. package/src/components/media-player-audio.js +0 -18
  481. package/src/components/media-player-controls.js +0 -150
  482. package/src/components/media-player-error.js +0 -85
  483. package/src/components/media-player-fullscreen.js +0 -68
  484. package/src/components/media-player-hls.js +0 -20
  485. package/src/components/media-player-loading.js +0 -53
  486. package/src/components/media-player-play.js +0 -44
  487. package/src/components/media-player-root.js +0 -243
  488. package/src/components/media-player-seek.js +0 -92
  489. package/src/components/media-player-time.js +0 -57
  490. package/src/components/media-player-tooltip.js +0 -14
  491. package/src/components/media-player-video.js +0 -18
  492. package/src/components/media-player-volume.js +0 -88
  493. package/src/components/media-player.js +0 -67
  494. package/src/components/media-suspense.js +0 -173
  495. package/src/components/player-settings-form.js +0 -46
  496. package/src/components/react-player-wrapper.js +0 -163
  497. package/src/components/simple-video-player.js +0 -41
  498. package/src/components/ui/enhanced-seek-bar.js +0 -112
  499. package/src/components/ui/fullscreen-button.js +0 -21
  500. package/src/components/ui/media-resource-preloader.js +0 -295
  501. package/src/components/ui/play-button.js +0 -26
  502. package/src/components/ui/seek-bar.js +0 -54
  503. package/src/components/ui/time-display.js +0 -18
  504. package/src/components/ui/volume-control.js +0 -71
  505. package/src/components/unified/base-media-player.js +0 -104
  506. package/src/components/unified/media-player.js +0 -41
  507. package/src/components/variants/minimal/AccessibleMinimalPlayer.js +0 -322
  508. package/src/components/variants/minimal/EnhancedMinimalMediaPlayer.js +0 -280
  509. package/src/components/variants/minimal/MinimalControls.js +0 -19
  510. package/src/components/variants/minimal/MinimalLoading.js +0 -6
  511. package/src/components/variants/minimal/MinimalMediaPlayer.js +0 -135
  512. package/src/components/variants/minimal/MinimalOverlay.js +0 -15
  513. package/src/components/variants/minimal/MinimalPlayButton.js +0 -29
  514. package/src/components/variants/minimal/MinimalSeekBar.js +0 -73
  515. package/src/components/variants/minimal/MinimalVolumeControl.js +0 -29
  516. package/src/components/variants/minimal/SimpleMinimalPlayer.js +0 -51
  517. package/src/components/variants/minimal/components/CenterPlayButton.js +0 -8
  518. package/src/components/variants/minimal/components/ControlBar.js +0 -10
  519. package/src/components/variants/minimal/components/EnhancedSettingsMenu.js +0 -68
  520. package/src/components/variants/minimal/components/PlaybackControls.js +0 -9
  521. package/src/components/variants/minimal/components/RightControls.js +0 -40
  522. package/src/components/variants/minimal/components/SeekBar.js +0 -43
  523. package/src/components/variants/minimal/components/SettingsDropdown.js +0 -18
  524. package/src/components/variants/minimal/components/SubtitleDisplay.js +0 -6
  525. package/src/components/variants/minimal/components/TimeDisplay.js +0 -5
  526. package/src/components/variants/minimal/components/VideoElement.js +0 -4
  527. package/src/components/variants/minimal/components/VolumeControl.js +0 -99
  528. package/src/components/variants/minimal/index.js +0 -8
  529. package/src/components/video-player.js +0 -38
  530. package/src/context/error-handling.js +0 -300
  531. package/src/context/media-context.js +0 -121
  532. package/src/context/media-provider.js +0 -164
  533. package/src/context/media-store.js +0 -273
  534. package/src/context/persistence.js +0 -356
  535. package/src/core/events/event-system.js +0 -288
  536. package/src/core/events/hooks.js +0 -198
  537. package/src/core/events/index.js +0 -7
  538. package/src/core/events/middleware.js +0 -219
  539. package/src/core/index.js +0 -15
  540. package/src/core/optimization/bundle-optimizer.js +0 -217
  541. package/src/core/performance/cicd.js +0 -83
  542. package/src/core/performance/index.js +0 -14
  543. package/src/core/performance/media-loading-optimizer.js +0 -404
  544. package/src/core/performance/performance-budgets.js +0 -326
  545. package/src/core/performance/performance-monitor.js +0 -297
  546. package/src/core/performance/performance-testing.js +0 -314
  547. package/src/core/plugins/base-plugin.js +0 -151
  548. package/src/core/plugins/enhanced-plugin-system.js +0 -305
  549. package/src/core/plugins/examples/analytics-plugin.js +0 -191
  550. package/src/core/plugins/index.js +0 -9
  551. package/src/core/plugins/registry.js +0 -261
  552. package/src/core/plugins/types.js +0 -31
  553. package/src/core/plugins/utils.js +0 -274
  554. package/src/core/progressive-loading.js +0 -239
  555. package/src/core/providers/enhanced-hls-provider.js +0 -273
  556. package/src/core/providers/service-provider.js +0 -105
  557. package/src/core/utils.js +0 -21
  558. package/src/features/media-session/media-session-manager.js +0 -331
  559. package/src/features/picture-in-picture/pip-manager.js +0 -353
  560. package/src/features/playlist/playlist-manager.js +0 -475
  561. package/src/features/subtitles/subtitle-manager.js +0 -335
  562. package/src/features/subtitles/subtitle-parser.js +0 -217
  563. package/src/features/thumbnails/thumbnail-generator.js +0 -388
  564. package/src/hooks/accessibility/index.js +0 -4
  565. package/src/hooks/accessibility/use-accessibility-preferences.js +0 -156
  566. package/src/hooks/accessibility/use-focus-management.js +0 -142
  567. package/src/hooks/accessibility/use-keyboard-shortcuts.js +0 -101
  568. package/src/hooks/accessibility/use-screen-reader.js +0 -148
  569. package/src/hooks/core/index.js +0 -19
  570. package/src/hooks/legacy.js +0 -17
  571. package/src/hooks/use-enhanced-media-player.js +0 -395
  572. package/src/hooks/use-intelligent-preloading.js +0 -258
  573. package/src/hooks/use-keyboard-controls.js +0 -83
  574. package/src/hooks/use-media-actions.js +0 -121
  575. package/src/hooks/use-media-metadata.js +0 -74
  576. package/src/hooks/use-media-optimistic.js +0 -205
  577. package/src/hooks/use-media-player.js +0 -251
  578. package/src/hooks/use-media-state.js +0 -162
  579. package/src/hooks/use-memory-optimization.js +0 -288
  580. package/src/hooks/use-optimistic-controls.js +0 -60
  581. package/src/hooks/use-optimized-media.js +0 -211
  582. package/src/hooks/use-touch-gestures.js +0 -289
  583. package/src/hooks/useEnhancedSubtitles.js +0 -205
  584. package/src/hooks/useKeyboardShortcuts.js +0 -59
  585. package/src/hooks/useMediaControls.js +0 -44
  586. package/src/hooks/useScreenshot.js +0 -56
  587. package/src/hooks/useSubtitles.js +0 -73
  588. package/src/hooks/useVideoPlayer.js +0 -184
  589. package/src/icons/components/FullscreenIcon.js +0 -11
  590. package/src/icons/components/SettingsIcon.js +0 -11
  591. package/src/icons/components/animated/LoadingIcon.js +0 -11
  592. package/src/icons/components/animated/PlayPauseIcon.js +0 -9
  593. package/src/icons/components/media/PauseIcon.js +0 -12
  594. package/src/icons/components/media/PlayIcon.js +0 -12
  595. package/src/icons/components/volume/VolumeIcon.js +0 -11
  596. package/src/icons/components/volume/VolumeOffIcon.js +0 -11
  597. package/src/icons/index.js +0 -45
  598. package/src/icons/provider.js +0 -37
  599. package/src/icons/types.js +0 -1
  600. package/src/index-enhanced.js +0 -16
  601. package/src/index-legacy.js +0 -97
  602. package/src/index.js +0 -90
  603. package/src/index.minimal.js +0 -3
  604. package/src/lib/deprecation.js +0 -31
  605. package/src/lib/format-time.js +0 -32
  606. package/src/lib/index.js +0 -3
  607. package/src/lib/utils.js +0 -5
  608. package/src/test/setup.js +0 -65
  609. package/src/types/events.js +0 -2
  610. package/src/types/formats.js +0 -63
  611. package/src/types/index.js +0 -4
@@ -1,1179 +0,0 @@
1
- var le = Object.defineProperty;
2
- var ue = (o, e, t) => e in o ? le(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
- var v = (o, e, t) => ue(o, typeof e != "symbol" ? e + "" : e, t);
4
- import S from "react";
5
- var W = { exports: {} }, K = {};
6
- /**
7
- * @license React
8
- * react-jsx-runtime.production.js
9
- *
10
- * Copyright (c) Meta Platforms, Inc. and affiliates.
11
- *
12
- * This source code is licensed under the MIT license found in the
13
- * LICENSE file in the root directory of this source tree.
14
- */
15
- var re;
16
- function Ee() {
17
- if (re) return K;
18
- re = 1;
19
- var o = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
20
- function t(s, n, a) {
21
- var d = null;
22
- if (a !== void 0 && (d = "" + a), n.key !== void 0 && (d = "" + n.key), "key" in n) {
23
- a = {};
24
- for (var c in n)
25
- c !== "key" && (a[c] = n[c]);
26
- } else a = n;
27
- return n = a.ref, {
28
- $$typeof: o,
29
- type: s,
30
- key: d,
31
- ref: n !== void 0 ? n : null,
32
- props: a
33
- };
34
- }
35
- return K.Fragment = e, K.jsx = t, K.jsxs = t, K;
36
- }
37
- var V = {};
38
- /**
39
- * @license React
40
- * react-jsx-runtime.development.js
41
- *
42
- * Copyright (c) Meta Platforms, Inc. and affiliates.
43
- *
44
- * This source code is licensed under the MIT license found in the
45
- * LICENSE file in the root directory of this source tree.
46
- */
47
- var se;
48
- function de() {
49
- return se || (se = 1, process.env.NODE_ENV !== "production" && (function() {
50
- function o(r) {
51
- if (r == null) return null;
52
- if (typeof r == "function")
53
- return r.$$typeof === l ? null : r.displayName || r.name || null;
54
- if (typeof r == "string") return r;
55
- switch (r) {
56
- case M:
57
- return "Fragment";
58
- case O:
59
- return "Profiler";
60
- case C:
61
- return "StrictMode";
62
- case k:
63
- return "Suspense";
64
- case h:
65
- return "SuspenseList";
66
- case H:
67
- return "Activity";
68
- }
69
- if (typeof r == "object")
70
- switch (typeof r.tag == "number" && console.error(
71
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
72
- ), r.$$typeof) {
73
- case D:
74
- return "Portal";
75
- case Y:
76
- return (r.displayName || "Context") + ".Provider";
77
- case j:
78
- return (r._context.displayName || "Context") + ".Consumer";
79
- case N:
80
- var E = r.render;
81
- return r = r.displayName, r || (r = E.displayName || E.name || "", r = r !== "" ? "ForwardRef(" + r + ")" : "ForwardRef"), r;
82
- case B:
83
- return E = r.displayName || null, E !== null ? E : o(r.type) || "Memo";
84
- case w:
85
- E = r._payload, r = r._init;
86
- try {
87
- return o(r(E));
88
- } catch {
89
- }
90
- }
91
- return null;
92
- }
93
- function e(r) {
94
- return "" + r;
95
- }
96
- function t(r) {
97
- try {
98
- var E = !1;
99
- } catch {
100
- E = !0;
101
- }
102
- if (E) {
103
- E = console;
104
- var T = E.error, y = typeof Symbol == "function" && Symbol.toStringTag && r[Symbol.toStringTag] || r.constructor.name || "Object";
105
- return T.call(
106
- E,
107
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
108
- y
109
- ), e(r);
110
- }
111
- }
112
- function s(r) {
113
- if (r === M) return "<>";
114
- if (typeof r == "object" && r !== null && r.$$typeof === w)
115
- return "<...>";
116
- try {
117
- var E = o(r);
118
- return E ? "<" + E + ">" : "<...>";
119
- } catch {
120
- return "<...>";
121
- }
122
- }
123
- function n() {
124
- var r = u.A;
125
- return r === null ? null : r.getOwner();
126
- }
127
- function a() {
128
- return Error("react-stack-top-frame");
129
- }
130
- function d(r) {
131
- if (R.call(r, "key")) {
132
- var E = Object.getOwnPropertyDescriptor(r, "key").get;
133
- if (E && E.isReactWarning) return !1;
134
- }
135
- return r.key !== void 0;
136
- }
137
- function c(r, E) {
138
- function T() {
139
- L || (L = !0, console.error(
140
- "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
141
- E
142
- ));
143
- }
144
- T.isReactWarning = !0, Object.defineProperty(r, "key", {
145
- get: T,
146
- configurable: !0
147
- });
148
- }
149
- function f() {
150
- var r = o(this.type);
151
- return z[r] || (z[r] = !0, console.error(
152
- "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
153
- )), r = this.props.ref, r !== void 0 ? r : null;
154
- }
155
- function g(r, E, T, y, U, P, J, X) {
156
- return T = P.ref, r = {
157
- $$typeof: A,
158
- type: r,
159
- key: E,
160
- props: P,
161
- _owner: U
162
- }, (T !== void 0 ? T : null) !== null ? Object.defineProperty(r, "ref", {
163
- enumerable: !1,
164
- get: f
165
- }) : Object.defineProperty(r, "ref", { enumerable: !1, value: null }), r._store = {}, Object.defineProperty(r._store, "validated", {
166
- configurable: !1,
167
- enumerable: !1,
168
- writable: !0,
169
- value: 0
170
- }), Object.defineProperty(r, "_debugInfo", {
171
- configurable: !1,
172
- enumerable: !1,
173
- writable: !0,
174
- value: null
175
- }), Object.defineProperty(r, "_debugStack", {
176
- configurable: !1,
177
- enumerable: !1,
178
- writable: !0,
179
- value: J
180
- }), Object.defineProperty(r, "_debugTask", {
181
- configurable: !1,
182
- enumerable: !1,
183
- writable: !0,
184
- value: X
185
- }), Object.freeze && (Object.freeze(r.props), Object.freeze(r)), r;
186
- }
187
- function _(r, E, T, y, U, P, J, X) {
188
- var m = E.children;
189
- if (m !== void 0)
190
- if (y)
191
- if (x(m)) {
192
- for (y = 0; y < m.length; y++)
193
- F(m[y]);
194
- Object.freeze && Object.freeze(m);
195
- } else
196
- console.error(
197
- "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
198
- );
199
- else F(m);
200
- if (R.call(E, "key")) {
201
- m = o(r);
202
- var G = Object.keys(E).filter(function(ce) {
203
- return ce !== "key";
204
- });
205
- y = 0 < G.length ? "{key: someKey, " + G.join(": ..., ") + ": ...}" : "{key: someKey}", te[m + y] || (G = 0 < G.length ? "{" + G.join(": ..., ") + ": ...}" : "{}", console.error(
206
- `A props object containing a "key" prop is being spread into JSX:
207
- let props = %s;
208
- <%s {...props} />
209
- React keys must be passed directly to JSX without using spread:
210
- let props = %s;
211
- <%s key={someKey} {...props} />`,
212
- y,
213
- m,
214
- G,
215
- m
216
- ), te[m + y] = !0);
217
- }
218
- if (m = null, T !== void 0 && (t(T), m = "" + T), d(E) && (t(E.key), m = "" + E.key), "key" in E) {
219
- T = {};
220
- for (var q in E)
221
- q !== "key" && (T[q] = E[q]);
222
- } else T = E;
223
- return m && c(
224
- T,
225
- typeof r == "function" ? r.displayName || r.name || "Unknown" : r
226
- ), g(
227
- r,
228
- m,
229
- P,
230
- U,
231
- n(),
232
- T,
233
- J,
234
- X
235
- );
236
- }
237
- function F(r) {
238
- typeof r == "object" && r !== null && r.$$typeof === A && r._store && (r._store.validated = 1);
239
- }
240
- var p = S, A = Symbol.for("react.transitional.element"), D = Symbol.for("react.portal"), M = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), O = Symbol.for("react.profiler"), j = Symbol.for("react.consumer"), Y = Symbol.for("react.context"), N = Symbol.for("react.forward_ref"), k = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), B = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), H = Symbol.for("react.activity"), l = Symbol.for("react.client.reference"), u = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, R = Object.prototype.hasOwnProperty, x = Array.isArray, I = console.createTask ? console.createTask : function() {
241
- return null;
242
- };
243
- p = {
244
- "react-stack-bottom-frame": function(r) {
245
- return r();
246
- }
247
- };
248
- var L, z = {}, Z = p["react-stack-bottom-frame"].bind(
249
- p,
250
- a
251
- )(), ee = I(s(a)), te = {};
252
- V.Fragment = M, V.jsx = function(r, E, T, y, U) {
253
- var P = 1e4 > u.recentlyCreatedOwnerStacks++;
254
- return _(
255
- r,
256
- E,
257
- T,
258
- !1,
259
- y,
260
- U,
261
- P ? Error("react-stack-top-frame") : Z,
262
- P ? I(s(r)) : ee
263
- );
264
- }, V.jsxs = function(r, E, T, y, U) {
265
- var P = 1e4 > u.recentlyCreatedOwnerStacks++;
266
- return _(
267
- r,
268
- E,
269
- T,
270
- !0,
271
- y,
272
- U,
273
- P ? Error("react-stack-top-frame") : Z,
274
- P ? I(s(r)) : ee
275
- );
276
- };
277
- })()), V;
278
- }
279
- var ne;
280
- function Te() {
281
- return ne || (ne = 1, process.env.NODE_ENV === "production" ? W.exports = /* @__PURE__ */ Ee() : W.exports = /* @__PURE__ */ de()), W.exports;
282
- }
283
- var ae = /* @__PURE__ */ Te();
284
- const ve = {
285
- PLAY: "PLAY",
286
- PAUSE: "PAUSE",
287
- SEEK: "SEEK",
288
- SET_VOLUME: "SET_VOLUME",
289
- MUTE: "MUTE",
290
- UNMUTE: "UNMUTE",
291
- TOGGLE_MUTE: "TOGGLE_MUTE",
292
- SET_DURATION: "SET_DURATION",
293
- SET_CURRENT_TIME: "SET_CURRENT_TIME",
294
- SET_BUFFERED: "SET_BUFFERED",
295
- SET_LOADING: "SET_LOADING",
296
- SET_ERROR: "SET_ERROR",
297
- ENTER_FULLSCREEN: "ENTER_FULLSCREEN",
298
- EXIT_FULLSCREEN: "EXIT_FULLSCREEN",
299
- ENTER_PIP: "ENTER_PIP",
300
- EXIT_PIP: "EXIT_PIP",
301
- SET_PLAYBACK_RATE: "SET_PLAYBACK_RATE",
302
- SET_SUBTITLE_TRACK: "SET_SUBTITLE_TRACK",
303
- SET_RENDITION: "SET_RENDITION",
304
- TOGGLE_SUBTITLES: "TOGGLE_SUBTITLES",
305
- PREVIEW_TIME: "PREVIEW_TIME",
306
- CLEAR_PREVIEW: "CLEAR_PREVIEW"
307
- };
308
- S.createContext(null);
309
- const fe = S.createContext(null);
310
- function Se() {
311
- const o = S.useContext(fe);
312
- if (!o)
313
- throw new Error("useMediaStore must be used within a MediaPlayer");
314
- return o;
315
- }
316
- function Me(o) {
317
- const e = Se(), t = () => o(e.getState());
318
- return S.useSyncExternalStore(e.subscribe, t, t);
319
- }
320
- const i = {
321
- PLAY: "PLAY",
322
- PAUSE: "PAUSE",
323
- SEEK: "SEEK",
324
- SET_VOLUME: "SET_VOLUME",
325
- MUTE: "MUTE",
326
- UNMUTE: "UNMUTE",
327
- TOGGLE_MUTE: "TOGGLE_MUTE",
328
- SET_DURATION: "SET_DURATION",
329
- SET_CURRENT_TIME: "SET_CURRENT_TIME",
330
- SET_BUFFERED: "SET_BUFFERED",
331
- SET_LOADING: "SET_LOADING",
332
- SET_ERROR: "SET_ERROR",
333
- ENTER_FULLSCREEN: "ENTER_FULLSCREEN",
334
- EXIT_FULLSCREEN: "EXIT_FULLSCREEN",
335
- ENTER_PIP: "ENTER_PIP",
336
- EXIT_PIP: "EXIT_PIP",
337
- SET_PLAYBACK_RATE: "SET_PLAYBACK_RATE",
338
- SET_SUBTITLE_TRACK: "SET_SUBTITLE_TRACK",
339
- SET_RENDITION: "SET_RENDITION",
340
- TOGGLE_SUBTITLES: "TOGGLE_SUBTITLES",
341
- PREVIEW_TIME: "PREVIEW_TIME",
342
- CLEAR_PREVIEW: "CLEAR_PREVIEW",
343
- // New actions for Video.js adapter
344
- SET_BUFFERING: "SET_BUFFERING",
345
- SET_QUALITY_LEVEL: "SET_QUALITY_LEVEL",
346
- SET_BANDWIDTH_ESTIMATE: "SET_BANDWIDTH_ESTIMATE",
347
- SET_ACTIVE_TEXT_TRACKS: "SET_ACTIVE_TEXT_TRACKS"
348
- }, oe = S.createContext(null);
349
- function Re() {
350
- const o = S.useContext(oe);
351
- if (!o)
352
- throw new Error("useMediaContext must be used within a MediaPlayer");
353
- return o;
354
- }
355
- const ie = S.createContext(null);
356
- function $() {
357
- const o = S.useContext(ie);
358
- if (!o)
359
- throw new Error("useMediaStore must be used within a MediaPlayer");
360
- return o;
361
- }
362
- function Ce(o) {
363
- const e = $(), t = () => o(e.getState());
364
- return S.useSyncExternalStore(e.subscribe, t, t);
365
- }
366
- function ke() {
367
- return $().dispatch;
368
- }
369
- function xe(o) {
370
- const e = $(), t = "getOptimisticState" in e, s = () => o(t ? e.getOptimisticState() : e.getState());
371
- return S.useSyncExternalStore(e.subscribe, s, s);
372
- }
373
- function Fe() {
374
- const o = $(), e = Re(), t = "getOptimisticState" in o, s = "errorHandler" in e ? e.errorHandler : null, n = "isRehydrated" in e ? e.isRehydrated : !0;
375
- return {
376
- isEnhanced: t,
377
- errorHandler: s,
378
- isRehydrated: n,
379
- actionsState: t ? o.getActionState() : null
380
- };
381
- }
382
- const Q = {
383
- isPlaying: !1,
384
- currentTime: 0,
385
- duration: 0,
386
- buffered: null,
387
- isLoading: !1,
388
- isBuffering: !1,
389
- error: null,
390
- volume: 1,
391
- isMuted: !1,
392
- isFullscreen: !1,
393
- isPictureInPicture: !1,
394
- playbackRate: 1,
395
- subtitlesShowing: !1,
396
- selectedSubtitleTrack: null,
397
- selectedRendition: null,
398
- qualityLevel: -1,
399
- bandwidthEstimate: 0,
400
- activeTextTracks: [],
401
- previewTime: null,
402
- previewImage: null,
403
- previewCoords: null,
404
- subtitlesList: [],
405
- renditionList: []
406
- }, ye = {
407
- enabled: !0,
408
- key: "baroi-player-state",
409
- persist: ["volume", "isMuted", "playbackRate", "subtitlesShowing"],
410
- debounceMs: 500
411
- };
412
- function me(o = Q, e = {}) {
413
- let t = { ...o }, s = { ...o }, n = {
414
- pending: !1,
415
- error: null,
416
- lastAction: null,
417
- retryCount: 0
418
- };
419
- const a = { ...ye, ...e }, d = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Map();
420
- let f = null;
421
- const g = (l) => (d.add(l), () => d.delete(l)), _ = () => {
422
- d.forEach((l) => l());
423
- }, F = () => t, p = () => s, A = () => n, D = async () => {
424
- if (!a.enabled || typeof window > "u") return;
425
- const l = a.persist.reduce((u, R) => (u[R] = t[R], u), {});
426
- try {
427
- localStorage.setItem(a.key, JSON.stringify({
428
- ...l,
429
- timestamp: Date.now()
430
- }));
431
- } catch (u) {
432
- console.warn("Failed to persist media state:", u);
433
- }
434
- }, M = () => {
435
- f && clearTimeout(f), f = setTimeout(D, a.debounceMs);
436
- }, C = async () => {
437
- if (!(!a.enabled || typeof window > "u"))
438
- try {
439
- const l = localStorage.getItem(a.key);
440
- if (!l) return;
441
- const u = JSON.parse(l), { timestamp: R, ...x } = u, I = 10080 * 60 * 1e3;
442
- if (R && Date.now() - R > I) {
443
- O();
444
- return;
445
- }
446
- const L = { ...t, ...x };
447
- JSON.stringify(L) !== JSON.stringify(t) && (t = L, s = { ...L }, _());
448
- } catch (l) {
449
- console.warn("Failed to rehydrate media state:", l);
450
- }
451
- }, O = () => {
452
- if (!(typeof window > "u"))
453
- try {
454
- localStorage.removeItem(a.key);
455
- } catch (l) {
456
- console.warn("Failed to clear persisted state:", l);
457
- }
458
- }, j = (l) => {
459
- Object.assign(a, l);
460
- }, Y = (l) => {
461
- const u = { ...t, ...l };
462
- JSON.stringify(u) !== JSON.stringify(t) && (t = u, s = { ...u }, M(), _());
463
- }, N = (l) => {
464
- const u = `${l.type}-${Date.now()}-${Math.random()}`;
465
- c.set(u, { ...l, timestamp: Date.now() });
466
- const R = h(s, l);
467
- return s = { ...s, ...R }, _(), u;
468
- }, k = (l) => {
469
- if (c.has(l)) {
470
- c.delete(l), s = { ...t };
471
- for (const [, u] of c) {
472
- const R = h(s, u);
473
- s = { ...s, ...R };
474
- }
475
- _();
476
- }
477
- }, h = (l, u) => {
478
- switch (u.type) {
479
- case i.PLAY:
480
- return { isPlaying: !0, error: null };
481
- case i.PAUSE:
482
- return { isPlaying: !1 };
483
- case i.SEEK:
484
- return { currentTime: u.detail };
485
- case i.SET_VOLUME:
486
- return { volume: Math.max(0, Math.min(1, u.detail)) };
487
- case i.MUTE:
488
- return { isMuted: !0 };
489
- case i.UNMUTE:
490
- return { isMuted: !1 };
491
- case i.TOGGLE_MUTE:
492
- return { isMuted: !l.isMuted };
493
- case i.SET_DURATION:
494
- return { duration: u.detail };
495
- case i.SET_CURRENT_TIME:
496
- return { currentTime: u.detail };
497
- case i.SET_BUFFERED:
498
- return { buffered: u.detail };
499
- case i.SET_LOADING:
500
- return { isLoading: u.detail };
501
- case i.SET_ERROR:
502
- return { error: u.detail, isLoading: !1 };
503
- case i.ENTER_FULLSCREEN:
504
- return { isFullscreen: !0 };
505
- case i.EXIT_FULLSCREEN:
506
- return { isFullscreen: !1 };
507
- case i.ENTER_PIP:
508
- return { isPictureInPicture: !0 };
509
- case i.EXIT_PIP:
510
- return { isPictureInPicture: !1 };
511
- case i.SET_PLAYBACK_RATE:
512
- return { playbackRate: u.detail };
513
- case i.SET_SUBTITLE_TRACK:
514
- return { selectedSubtitleTrack: u.detail };
515
- case i.SET_RENDITION:
516
- return { selectedRendition: u.detail };
517
- case i.TOGGLE_SUBTITLES:
518
- return { subtitlesShowing: !l.subtitlesShowing };
519
- case i.PREVIEW_TIME:
520
- return { previewTime: u.detail };
521
- case i.CLEAR_PREVIEW:
522
- return { previewTime: null, previewImage: null, previewCoords: null };
523
- default:
524
- return console.warn(`Unknown media action type: ${u.type}`), {};
525
- }
526
- }, B = (l) => {
527
- const u = h(t, l);
528
- Y(u);
529
- }, w = async (l) => {
530
- n = {
531
- pending: !0,
532
- error: null,
533
- lastAction: l,
534
- retryCount: l.retryCount || 0
535
- };
536
- const u = N(l);
537
- try {
538
- await new Promise((I) => setTimeout(I, 0));
539
- const R = h(t, l), x = { ...t, ...R };
540
- JSON.stringify(x) !== JSON.stringify(t) && (t = x, M()), c.delete(u), n = {
541
- pending: !1,
542
- error: null,
543
- lastAction: l,
544
- retryCount: 0
545
- }, s = { ...t };
546
- for (const [, I] of c) {
547
- const L = h(s, I);
548
- s = { ...s, ...L };
549
- }
550
- } catch (R) {
551
- k(u), n = {
552
- pending: !1,
553
- error: R instanceof Error ? R.message : "Unknown error occurred",
554
- lastAction: l,
555
- retryCount: (l.retryCount || 0) + 1
556
- }, n.retryCount < 3 && H(l.type) && setTimeout(() => {
557
- w({
558
- ...l,
559
- retryCount: n.retryCount
560
- });
561
- }, Math.pow(2, n.retryCount) * 1e3);
562
- }
563
- _();
564
- }, H = (l) => [
565
- i.PLAY,
566
- i.PAUSE,
567
- i.SEEK,
568
- i.SET_VOLUME,
569
- i.MUTE,
570
- i.UNMUTE,
571
- i.TOGGLE_MUTE
572
- ].includes(l);
573
- return C(), {
574
- subscribe: g,
575
- getState: F,
576
- setState: Y,
577
- dispatch: B,
578
- getOptimisticState: p,
579
- dispatchOptimistic: w,
580
- rollbackOptimistic: k,
581
- getActionState: A,
582
- setPersistenceConfig: j,
583
- rehydrateFromStorage: C,
584
- clearPersistedState: O
585
- };
586
- }
587
- const b = {
588
- USER_PREFERENCES: "baroi-player-preferences",
589
- SESSION_STATE: "baroi-player-session",
590
- PLAYBACK_HISTORY: "baroi-player-history",
591
- CACHE_TIMESTAMP: "baroi-player-cache-ts"
592
- };
593
- class _e {
594
- async getItem(e) {
595
- if (typeof window > "u") return null;
596
- try {
597
- return localStorage.getItem(e);
598
- } catch (t) {
599
- return console.warn("Failed to read from localStorage:", t), null;
600
- }
601
- }
602
- async setItem(e, t) {
603
- if (!(typeof window > "u"))
604
- try {
605
- localStorage.setItem(e, t);
606
- } catch (s) {
607
- console.warn("Failed to write to localStorage:", s);
608
- }
609
- }
610
- async removeItem(e) {
611
- if (!(typeof window > "u"))
612
- try {
613
- localStorage.removeItem(e);
614
- } catch (t) {
615
- console.warn("Failed to remove from localStorage:", t);
616
- }
617
- }
618
- async clear() {
619
- if (!(typeof window > "u"))
620
- try {
621
- Object.values(b).forEach((e) => {
622
- localStorage.removeItem(e);
623
- });
624
- } catch (e) {
625
- console.warn("Failed to clear localStorage:", e);
626
- }
627
- }
628
- }
629
- const pe = {
630
- userPreferences: !0,
631
- sessionState: !0,
632
- playbackHistory: !0,
633
- maxHistoryItems: 50,
634
- maxCacheAge: 10080 * 60 * 1e3,
635
- // 7 days
636
- debounceMs: 1e3,
637
- storage: new _e()
638
- };
639
- class ge {
640
- constructor(e = {}) {
641
- v(this, "config");
642
- v(this, "storage");
643
- v(this, "debounceTimeouts", /* @__PURE__ */ new Map());
644
- this.config = { ...pe, ...e }, this.storage = this.config.storage;
645
- }
646
- // User preferences methods
647
- async getUserPreferences() {
648
- if (!this.config.userPreferences) return null;
649
- try {
650
- const e = await this.storage.getItem(b.USER_PREFERENCES);
651
- if (!e) return null;
652
- const t = JSON.parse(e);
653
- return this.isCacheExpired(t.timestamp) ? (await this.clearUserPreferences(), null) : t.preferences;
654
- } catch (e) {
655
- return console.warn("Failed to get user preferences:", e), null;
656
- }
657
- }
658
- async saveUserPreferences(e) {
659
- this.config.userPreferences && this.debounce(b.USER_PREFERENCES, async () => {
660
- try {
661
- const s = { ...await this.getUserPreferences() || {}, ...e };
662
- await this.storage.setItem(b.USER_PREFERENCES, JSON.stringify({
663
- preferences: s,
664
- timestamp: Date.now()
665
- }));
666
- } catch (t) {
667
- console.warn("Failed to save user preferences:", t);
668
- }
669
- });
670
- }
671
- async clearUserPreferences() {
672
- try {
673
- await this.storage.removeItem(b.USER_PREFERENCES);
674
- } catch (e) {
675
- console.warn("Failed to clear user preferences:", e);
676
- }
677
- }
678
- // Session state methods
679
- async getSessionState() {
680
- if (!this.config.sessionState) return null;
681
- try {
682
- const e = await this.storage.getItem(b.SESSION_STATE);
683
- return e ? JSON.parse(e).state : null;
684
- } catch (e) {
685
- return console.warn("Failed to get session state:", e), null;
686
- }
687
- }
688
- async saveSessionState(e) {
689
- this.config.sessionState && this.debounce(b.SESSION_STATE, async () => {
690
- try {
691
- const s = { ...await this.getSessionState() || {
692
- currentTime: 0,
693
- playbackPosition: {}
694
- }, ...e };
695
- await this.storage.setItem(b.SESSION_STATE, JSON.stringify({
696
- state: s,
697
- timestamp: Date.now()
698
- }));
699
- } catch (t) {
700
- console.warn("Failed to save session state:", t);
701
- }
702
- });
703
- }
704
- async clearSessionState() {
705
- try {
706
- await this.storage.removeItem(b.SESSION_STATE);
707
- } catch (e) {
708
- console.warn("Failed to clear session state:", e);
709
- }
710
- }
711
- // Playback history methods
712
- async getPlaybackHistory() {
713
- if (!this.config.playbackHistory) return [];
714
- try {
715
- const e = await this.storage.getItem(b.PLAYBACK_HISTORY);
716
- if (!e) return [];
717
- const t = JSON.parse(e);
718
- return this.isCacheExpired(t.timestamp) ? (await this.clearPlaybackHistory(), []) : t.history || [];
719
- } catch (e) {
720
- return console.warn("Failed to get playback history:", e), [];
721
- }
722
- }
723
- async addToPlaybackHistory(e) {
724
- if (this.config.playbackHistory)
725
- try {
726
- const t = await this.getPlaybackHistory(), s = {
727
- ...e,
728
- timestamp: Date.now()
729
- }, n = t.filter((d) => d.mediaId !== e.mediaId), a = [s, ...n].slice(0, this.config.maxHistoryItems);
730
- await this.storage.setItem(b.PLAYBACK_HISTORY, JSON.stringify({
731
- history: a,
732
- timestamp: Date.now()
733
- }));
734
- } catch (t) {
735
- console.warn("Failed to add to playback history:", t);
736
- }
737
- }
738
- async clearPlaybackHistory() {
739
- try {
740
- await this.storage.removeItem(b.PLAYBACK_HISTORY);
741
- } catch (e) {
742
- console.warn("Failed to clear playback history:", e);
743
- }
744
- }
745
- // Utility methods
746
- async savePlaybackPosition(e, t) {
747
- const n = (await this.getSessionState())?.playbackPosition || {};
748
- await this.saveSessionState({
749
- playbackPosition: {
750
- ...n,
751
- [e]: t
752
- }
753
- });
754
- }
755
- async getPlaybackPosition(e) {
756
- return (await this.getSessionState())?.playbackPosition?.[e] || 0;
757
- }
758
- // Extract preferences from MediaState
759
- extractUserPreferences(e) {
760
- return {
761
- volume: e.volume,
762
- isMuted: e.isMuted,
763
- playbackRate: e.playbackRate,
764
- subtitlesShowing: e.subtitlesShowing,
765
- selectedSubtitleTrack: e.selectedSubtitleTrack?.id || null,
766
- preferredRendition: e.selectedRendition,
767
- autoplay: !1,
768
- // This would come from config
769
- keyboardShortcuts: !0
770
- // This would come from config
771
- };
772
- }
773
- // Extract session state from MediaState
774
- extractSessionState(e, t) {
775
- return {
776
- currentTime: e.currentTime,
777
- mediaId: t,
778
- playbackPosition: {}
779
- };
780
- }
781
- // Clear all persisted data
782
- async clearAll() {
783
- await this.storage.clear(), this.debounceTimeouts.clear();
784
- }
785
- // Private helper methods
786
- isCacheExpired(e) {
787
- return e ? Date.now() - e > this.config.maxCacheAge : !0;
788
- }
789
- debounce(e, t) {
790
- const s = this.debounceTimeouts.get(e);
791
- s && clearTimeout(s);
792
- const n = setTimeout(async () => {
793
- await t(), this.debounceTimeouts.delete(e);
794
- }, this.config.debounceMs);
795
- this.debounceTimeouts.set(e, n);
796
- }
797
- }
798
- function he(o) {
799
- const [e] = S.useState(() => new ge(o));
800
- return S.useEffect(() => () => {
801
- e.clearAll();
802
- }, [e]), e;
803
- }
804
- function be(o, e, t) {
805
- const s = he(t), [n, a] = S.useState(!1);
806
- return S.useEffect(() => {
807
- let d = !0;
808
- return (async () => {
809
- try {
810
- const [f, g] = await Promise.all([
811
- s.getUserPreferences(),
812
- s.getSessionState()
813
- ]);
814
- if (!d) return;
815
- const _ = {
816
- ...f && {
817
- volume: f.volume,
818
- isMuted: f.isMuted,
819
- playbackRate: f.playbackRate,
820
- subtitlesShowing: f.subtitlesShowing
821
- },
822
- ...g && e === g.mediaId && {
823
- currentTime: g.currentTime
824
- }
825
- };
826
- Object.keys(_).length > 0 && console.log("Rehydrated state:", _), a(!0);
827
- } catch (f) {
828
- console.warn("Failed to rehydrate state:", f), a(!0);
829
- }
830
- })(), () => {
831
- d = !1;
832
- };
833
- }, [s, e]), S.useEffect(() => {
834
- if (!n) return;
835
- const d = s.extractUserPreferences(o);
836
- if (s.saveUserPreferences(d), e) {
837
- const c = s.extractSessionState(o, e);
838
- s.saveSessionState(c), o.currentTime > 0 && o.duration > 0 && s.savePlaybackPosition(e, o.currentTime);
839
- }
840
- }, [s, o, e, n]), {
841
- manager: s,
842
- isRehydrated: n
843
- };
844
- }
845
- const we = {
846
- maxRetries: 3,
847
- baseDelay: 1e3,
848
- maxDelay: 1e4,
849
- exponentialBackoff: !0,
850
- retryableErrors: [
851
- "NETWORK_ERROR",
852
- "TIMEOUT_ERROR"
853
- /* TIMEOUT_ERROR */
854
- ],
855
- retryableActions: [
856
- "PLAY",
857
- "PAUSE",
858
- "SEEK",
859
- "SET_VOLUME",
860
- "ENTER_FULLSCREEN",
861
- "EXIT_FULLSCREEN"
862
- ]
863
- };
864
- class Pe {
865
- canRecover(e) {
866
- return e.type === "NETWORK_ERROR" && e.retryCount < 3;
867
- }
868
- async recover(e) {
869
- navigator.onLine === !1 && await new Promise((t) => {
870
- const s = () => {
871
- window.removeEventListener("online", s), t(void 0);
872
- };
873
- window.addEventListener("online", s);
874
- }), await new Promise((t) => setTimeout(t, 2e3));
875
- }
876
- }
877
- class Ie {
878
- canRecover(e) {
879
- return e.type === "PLAYBACK_ERROR" && e.retryCount < 2;
880
- }
881
- async recover(e) {
882
- const t = document.querySelector("video, audio");
883
- t && (t.load(), await new Promise((s) => {
884
- const n = () => {
885
- t.removeEventListener("canplay", n), s(void 0);
886
- };
887
- t.addEventListener("canplay", n);
888
- }));
889
- }
890
- }
891
- class Ae {
892
- canRecover(e) {
893
- return e.type === "PERMISSION_ERROR" && e.action?.type === "ENTER_FULLSCREEN";
894
- }
895
- async recover(e) {
896
- console.warn("Fullscreen requires user interaction");
897
- }
898
- }
899
- class Oe {
900
- constructor(e = {}, t = []) {
901
- v(this, "config");
902
- v(this, "recoveryStrategies");
903
- v(this, "errorQueue", /* @__PURE__ */ new Map());
904
- v(this, "listeners", /* @__PURE__ */ new Set());
905
- this.config = { ...we, ...e }, this.recoveryStrategies = [
906
- new Pe(),
907
- new Ie(),
908
- new Ae(),
909
- ...t
910
- ];
911
- }
912
- // Create a media error from a generic error
913
- createMediaError(e, t, s = 0) {
914
- const n = Date.now();
915
- if (e instanceof Error) {
916
- const a = this.categorizeError(e, t);
917
- return {
918
- type: a,
919
- message: e.message,
920
- action: t,
921
- timestamp: n,
922
- retryable: this.isRetryable(a, t),
923
- retryCount: s,
924
- originalError: e
925
- };
926
- }
927
- return {
928
- type: "UNKNOWN_ERROR",
929
- message: typeof e == "string" ? e : "Unknown error occurred",
930
- action: t,
931
- timestamp: n,
932
- retryable: this.isRetryable("UNKNOWN_ERROR", t),
933
- retryCount: s
934
- };
935
- }
936
- // Categorize errors based on error properties and action context
937
- categorizeError(e, t) {
938
- const s = e.message.toLowerCase();
939
- return s.includes("network") || s.includes("fetch") || s.includes("connection") || e.name === "NetworkError" ? "NETWORK_ERROR" : s.includes("permission") || s.includes("denied") || s.includes("fullscreen") || e.name === "NotAllowedError" ? "PERMISSION_ERROR" : s.includes("decode") || s.includes("format") || s.includes("codec") || t?.type === "PLAY" ? "PLAYBACK_ERROR" : s.includes("timeout") || e.name === "TimeoutError" ? "TIMEOUT_ERROR" : s.includes("not supported") || s.includes("unsupported") || e.name === "NotSupportedError" ? "NOT_SUPPORTED_ERROR" : "UNKNOWN_ERROR";
940
- }
941
- // Check if an error/action combination is retryable
942
- isRetryable(e, t) {
943
- const s = this.config.retryableErrors.includes(e), n = !t || this.config.retryableActions.includes(t.type);
944
- return s && n;
945
- }
946
- // Calculate retry delay with exponential backoff
947
- calculateRetryDelay(e) {
948
- if (!this.config.exponentialBackoff)
949
- return this.config.baseDelay;
950
- const t = this.config.baseDelay * Math.pow(2, e);
951
- return Math.min(t, this.config.maxDelay);
952
- }
953
- // Handle an error with automatic retry logic
954
- async handleError(e, t, s) {
955
- const n = this.createMediaError(e, t, t?.retryCount || 0), a = `${t?.type}-${n.timestamp}`;
956
- this.errorQueue.set(a, n), this.listeners.forEach((d) => d(n));
957
- for (const d of this.recoveryStrategies)
958
- if (d.canRecover(n))
959
- try {
960
- await d.recover(n);
961
- break;
962
- } catch (c) {
963
- console.warn("Recovery strategy failed:", c);
964
- }
965
- if (n.retryable && n.retryCount < this.config.maxRetries && s && t) {
966
- const d = this.calculateRetryDelay(n.retryCount);
967
- console.log(`Retrying action ${t.type} in ${d}ms (attempt ${n.retryCount + 1}/${this.config.maxRetries})`), setTimeout(async () => {
968
- try {
969
- await s({
970
- ...t,
971
- retryCount: n.retryCount + 1
972
- }), this.errorQueue.delete(a);
973
- } catch (c) {
974
- await this.handleError(c, {
975
- ...t,
976
- retryCount: n.retryCount + 1
977
- }, s);
978
- }
979
- }, d);
980
- }
981
- return n;
982
- }
983
- // Subscribe to error events
984
- subscribe(e) {
985
- return this.listeners.add(e), () => this.listeners.delete(e);
986
- }
987
- // Get current errors
988
- getErrors() {
989
- return Array.from(this.errorQueue.values());
990
- }
991
- // Clear specific error
992
- clearError(e) {
993
- this.errorQueue.delete(e);
994
- }
995
- // Clear all errors
996
- clearAllErrors() {
997
- this.errorQueue.clear();
998
- }
999
- // Get error statistics
1000
- getErrorStats() {
1001
- const e = this.getErrors(), t = Date.now(), s = 300 * 1e3, n = e.reduce((c, f) => (c[f.type] = (c[f.type] || 0) + 1, c), {}), a = e.filter((c) => c.retryable).length, d = e.filter((c) => t - c.timestamp < s);
1002
- return {
1003
- totalErrors: e.length,
1004
- errorsByType: n,
1005
- retryableErrors: a,
1006
- recentErrors: d
1007
- };
1008
- }
1009
- }
1010
- function Ne(o = Q) {
1011
- let e = { ...o };
1012
- const t = /* @__PURE__ */ new Set(), s = (c) => (t.add(c), () => t.delete(c)), n = () => e, a = (c) => {
1013
- const f = { ...e, ...c };
1014
- JSON.stringify(f) !== JSON.stringify(e) && (e = f, t.forEach((g) => g()));
1015
- };
1016
- return { subscribe: s, getState: n, setState: a, dispatch: (c) => {
1017
- switch (c.type) {
1018
- case i.PLAY:
1019
- a({ isPlaying: !0, error: null });
1020
- break;
1021
- case i.PAUSE:
1022
- a({ isPlaying: !1 });
1023
- break;
1024
- case i.SEEK:
1025
- a({ currentTime: c.detail });
1026
- break;
1027
- case i.SET_VOLUME:
1028
- a({ volume: Math.max(0, Math.min(1, c.detail)) });
1029
- break;
1030
- case i.MUTE:
1031
- a({ isMuted: !0 });
1032
- break;
1033
- case i.UNMUTE:
1034
- a({ isMuted: !1 });
1035
- break;
1036
- case i.TOGGLE_MUTE:
1037
- a({ isMuted: !e.isMuted });
1038
- break;
1039
- case i.SET_DURATION:
1040
- a({ duration: c.detail });
1041
- break;
1042
- case i.SET_CURRENT_TIME:
1043
- a({ currentTime: c.detail });
1044
- break;
1045
- case i.SET_BUFFERED:
1046
- a({ buffered: c.detail });
1047
- break;
1048
- case i.SET_LOADING:
1049
- a({ isLoading: c.detail });
1050
- break;
1051
- case i.SET_ERROR:
1052
- a({ error: c.detail, isLoading: !1 });
1053
- break;
1054
- case i.ENTER_FULLSCREEN:
1055
- a({ isFullscreen: !0 });
1056
- break;
1057
- case i.EXIT_FULLSCREEN:
1058
- a({ isFullscreen: !1 });
1059
- break;
1060
- case i.ENTER_PIP:
1061
- a({ isPictureInPicture: !0 });
1062
- break;
1063
- case i.EXIT_PIP:
1064
- a({ isPictureInPicture: !1 });
1065
- break;
1066
- case i.SET_PLAYBACK_RATE:
1067
- a({ playbackRate: c.detail });
1068
- break;
1069
- case i.SET_SUBTITLE_TRACK:
1070
- a({ selectedSubtitleTrack: c.detail });
1071
- break;
1072
- case i.SET_RENDITION:
1073
- a({ selectedRendition: c.detail });
1074
- break;
1075
- case i.TOGGLE_SUBTITLES:
1076
- a({ subtitlesShowing: !e.subtitlesShowing });
1077
- break;
1078
- case i.PREVIEW_TIME:
1079
- a({ previewTime: c.detail });
1080
- break;
1081
- case i.CLEAR_PREVIEW:
1082
- a({ previewTime: null, previewImage: null, previewCoords: null });
1083
- break;
1084
- default:
1085
- console.warn(`Unknown media action type: ${c.type}`);
1086
- }
1087
- } };
1088
- }
1089
- function De({
1090
- children: o,
1091
- mediaId: e = "media-player",
1092
- labelId: t = "media-player-label",
1093
- descriptionId: s = "media-player-description",
1094
- dir: n = "ltr",
1095
- portalContainer: a,
1096
- tooltipDelayDuration: d = 700,
1097
- tooltipSideOffset: c = 4,
1098
- disabled: f = !1,
1099
- isVideo: g = !0,
1100
- withoutTooltip: _ = !1,
1101
- initialState: F = {},
1102
- // React 19 enhancements
1103
- useEnhancedStore: p = !0,
1104
- persistenceConfig: A,
1105
- retryConfig: D,
1106
- enableOptimisticUpdates: M = !0,
1107
- enableErrorRecovery: C = !0,
1108
- onStateRehydrated: O
1109
- }) {
1110
- const j = S.useRef(null), Y = S.useRef(null), N = S.useMemo(() => {
1111
- const w = { ...Q, ...F };
1112
- return p ? me(w, A) : Ne(w);
1113
- }, [p, A]), k = S.useMemo(() => C && p ? new Oe(D) : null, [C, p, D]), h = p ? be(
1114
- N.getState(),
1115
- e,
1116
- A
1117
- ) : null;
1118
- S.useEffect(() => {
1119
- if (h?.isRehydrated && O) {
1120
- const w = N.getState();
1121
- O(w);
1122
- }
1123
- }, [h?.isRehydrated, O, N]);
1124
- const B = S.useMemo(
1125
- () => ({
1126
- mediaId: e,
1127
- labelId: t,
1128
- descriptionId: s,
1129
- dir: n,
1130
- rootRef: j,
1131
- mediaRef: Y,
1132
- portalContainer: a,
1133
- tooltipDelayDuration: d,
1134
- tooltipSideOffset: c,
1135
- disabled: f,
1136
- isVideo: g,
1137
- withoutTooltip: _,
1138
- // React 19 enhancements
1139
- errorHandler: k,
1140
- isEnhanced: p,
1141
- isRehydrated: h?.isRehydrated
1142
- }),
1143
- [
1144
- e,
1145
- t,
1146
- s,
1147
- n,
1148
- a,
1149
- d,
1150
- c,
1151
- f,
1152
- g,
1153
- _,
1154
- k,
1155
- p,
1156
- h?.isRehydrated
1157
- ]
1158
- );
1159
- return /* @__PURE__ */ ae.jsx(oe.Provider, { value: B, children: /* @__PURE__ */ ae.jsx(ie.Provider, { value: N, children: o }) });
1160
- }
1161
- export {
1162
- i as M,
1163
- ke as a,
1164
- Ce as b,
1165
- ve as c,
1166
- Se as d,
1167
- Me as e,
1168
- De as f,
1169
- xe as g,
1170
- me as h,
1171
- oe as i,
1172
- ae as j,
1173
- ie as k,
1174
- $ as l,
1175
- Fe as m,
1176
- Q as n,
1177
- Re as u
1178
- };
1179
- //# sourceMappingURL=context-Af84FynT.js.map