@zezosoft/zezo-ott-react-native-video-player 1.0.1 → 1.0.2

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 (338) hide show
  1. package/README.md +330 -71
  2. package/lib/module/AdsPlayer/AdsPlayer.js +248 -0
  3. package/lib/module/AdsPlayer/AdsPlayer.js.map +1 -0
  4. package/lib/module/AdsPlayer/MediaControls/AdBottomControls.js +174 -0
  5. package/lib/module/AdsPlayer/MediaControls/AdBottomControls.js.map +1 -0
  6. package/lib/module/AdsPlayer/MediaControls/AdMediaControls.js +91 -0
  7. package/lib/module/AdsPlayer/MediaControls/AdMediaControls.js.map +1 -0
  8. package/lib/module/AdsPlayer/MediaControls/AdMediaControlsProvider.js +34 -0
  9. package/lib/module/AdsPlayer/MediaControls/AdMediaControlsProvider.js.map +1 -0
  10. package/lib/module/AdsPlayer/MediaControls/AdMiddleControls.js +65 -0
  11. package/lib/module/AdsPlayer/MediaControls/AdMiddleControls.js.map +1 -0
  12. package/lib/module/AdsPlayer/MediaControls/AdTopControls.js +189 -0
  13. package/lib/module/AdsPlayer/MediaControls/AdTopControls.js.map +1 -0
  14. package/lib/module/AdsPlayer/MediaControls/index.js +8 -0
  15. package/lib/module/AdsPlayer/MediaControls/index.js.map +1 -0
  16. package/lib/module/AdsPlayer/components/RotatingLoader.js +55 -0
  17. package/lib/module/AdsPlayer/components/RotatingLoader.js.map +1 -0
  18. package/lib/module/AdsPlayer/index.js +6 -0
  19. package/lib/module/AdsPlayer/index.js.map +1 -0
  20. package/lib/module/AdsPlayer/store/adsPlayer.type.js +4 -0
  21. package/lib/module/AdsPlayer/store/adsPlayer.type.js.map +1 -0
  22. package/lib/module/AdsPlayer/store/adsPlayerStore.js +70 -0
  23. package/lib/module/AdsPlayer/store/adsPlayerStore.js.map +1 -0
  24. package/lib/module/AdsPlayer/store/index.js +5 -0
  25. package/lib/module/AdsPlayer/store/index.js.map +1 -0
  26. package/lib/module/AdsPlayer/utils/adStateReset.js +31 -0
  27. package/lib/module/AdsPlayer/utils/adStateReset.js.map +1 -0
  28. package/lib/module/AdsPlayer/utils/controls.js +63 -0
  29. package/lib/module/AdsPlayer/utils/controls.js.map +1 -0
  30. package/lib/module/AdsPlayer/utils/useAdControlsAutoHide.js +35 -0
  31. package/lib/module/AdsPlayer/utils/useAdControlsAutoHide.js.map +1 -0
  32. package/lib/module/AdsPlayer/utils/useAdInitialization.js +60 -0
  33. package/lib/module/AdsPlayer/utils/useAdInitialization.js.map +1 -0
  34. package/lib/module/AdsPlayer/utils/useAdTracking.js +50 -0
  35. package/lib/module/AdsPlayer/utils/useAdTracking.js.map +1 -0
  36. package/lib/module/AdsPlayer/utils/useAdsManager.js +165 -0
  37. package/lib/module/AdsPlayer/utils/useAdsManager.js.map +1 -0
  38. package/lib/module/VideoPlayer/MediaControls/BottomControls.js +17 -6
  39. package/lib/module/VideoPlayer/MediaControls/BottomControls.js.map +1 -1
  40. package/lib/module/VideoPlayer/MediaControls/MediaControls.js +3 -1
  41. package/lib/module/VideoPlayer/MediaControls/MediaControls.js.map +1 -1
  42. package/lib/module/VideoPlayer/MediaControls/MediaControlsProvider.js +28 -31
  43. package/lib/module/VideoPlayer/MediaControls/MediaControlsProvider.js.map +1 -1
  44. package/lib/module/VideoPlayer/MediaControls/MiddleControls.js +50 -40
  45. package/lib/module/VideoPlayer/MediaControls/MiddleControls.js.map +1 -1
  46. package/lib/module/VideoPlayer/MediaControls/TopControls.js +11 -9
  47. package/lib/module/VideoPlayer/MediaControls/TopControls.js.map +1 -1
  48. package/lib/module/VideoPlayer/{model → Settings}/AudioAndSubtitles.js +0 -14
  49. package/lib/module/VideoPlayer/Settings/AudioAndSubtitles.js.map +1 -0
  50. package/lib/module/VideoPlayer/{model → Settings}/Episodes.js +1 -1
  51. package/lib/module/VideoPlayer/Settings/Episodes.js.map +1 -0
  52. package/lib/module/VideoPlayer/{model → Settings}/SettingModal.js +0 -1
  53. package/lib/module/VideoPlayer/Settings/SettingModal.js.map +1 -0
  54. package/lib/module/VideoPlayer/{model → Settings}/SpeedControls.js +1 -9
  55. package/lib/module/VideoPlayer/Settings/SpeedControls.js.map +1 -0
  56. package/lib/module/VideoPlayer/{model → Settings}/VideoPlayerSettings.js +1 -1
  57. package/lib/module/VideoPlayer/Settings/VideoPlayerSettings.js.map +1 -0
  58. package/lib/module/VideoPlayer/VideoPlayerCore.js +244 -0
  59. package/lib/module/VideoPlayer/VideoPlayerCore.js.map +1 -0
  60. package/lib/module/VideoPlayer/components/ProgressBar.js +63 -23
  61. package/lib/module/VideoPlayer/components/ProgressBar.js.map +1 -1
  62. package/lib/module/VideoPlayer/components/SkipAndNextControls.js +1 -6
  63. package/lib/module/VideoPlayer/components/SkipAndNextControls.js.map +1 -1
  64. package/lib/module/VideoPlayer/components/SubtitleView.js +1 -1
  65. package/lib/module/VideoPlayer/components/SubtitleView.js.map +1 -1
  66. package/lib/module/VideoPlayer/components/Toast.js +57 -0
  67. package/lib/module/VideoPlayer/components/Toast.js.map +1 -0
  68. package/lib/module/VideoPlayer/index.js +1 -1
  69. package/lib/module/VideoPlayer/index.js.map +1 -1
  70. package/lib/module/VideoPlayer/store/videoPlayerStore.js +0 -4
  71. package/lib/module/VideoPlayer/store/videoPlayerStore.js.map +1 -1
  72. package/lib/module/VideoPlayer/{Styles → styles}/globalStyles.js +5 -6
  73. package/lib/module/VideoPlayer/styles/globalStyles.js.map +1 -0
  74. package/lib/module/VideoPlayer/utils/{Display.js → display/Display.js} +0 -4
  75. package/lib/module/VideoPlayer/utils/display/Display.js.map +1 -0
  76. package/lib/module/VideoPlayer/utils/display/index.js +4 -0
  77. package/lib/module/VideoPlayer/utils/display/index.js.map +1 -0
  78. package/lib/module/VideoPlayer/utils/format/index.js +4 -0
  79. package/lib/module/VideoPlayer/utils/format/index.js.map +1 -0
  80. package/lib/module/VideoPlayer/utils/{timeFormatter.js → format/timeFormatter.js} +0 -6
  81. package/lib/module/VideoPlayer/utils/format/timeFormatter.js.map +1 -0
  82. package/lib/module/VideoPlayer/utils/hooks/index.js +3 -0
  83. package/lib/module/VideoPlayer/utils/hooks/index.js.map +1 -1
  84. package/lib/module/VideoPlayer/utils/hooks/useAdEventHandler.js +56 -0
  85. package/lib/module/VideoPlayer/utils/hooks/useAdEventHandler.js.map +1 -0
  86. package/lib/module/VideoPlayer/utils/hooks/useOrientationLock.js +25 -0
  87. package/lib/module/VideoPlayer/utils/hooks/useOrientationLock.js.map +1 -0
  88. package/lib/module/VideoPlayer/utils/hooks/usePauseVideoOnAd.js +43 -0
  89. package/lib/module/VideoPlayer/utils/hooks/usePauseVideoOnAd.js.map +1 -0
  90. package/lib/module/VideoPlayer/utils/hooks/useVideoPlayerBack.js +3 -4
  91. package/lib/module/VideoPlayer/utils/hooks/useVideoPlayerBack.js.map +1 -1
  92. package/lib/module/VideoPlayer/utils/hooks/useVideoResolutions.js +1 -4
  93. package/lib/module/VideoPlayer/utils/hooks/useVideoResolutions.js.map +1 -1
  94. package/lib/module/VideoPlayer/utils/index.js +5 -6
  95. package/lib/module/VideoPlayer/utils/index.js.map +1 -1
  96. package/lib/module/VideoPlayer/utils/{PlatformSelector.js → platform/PlatformSelector.js} +0 -5
  97. package/lib/module/VideoPlayer/utils/platform/PlatformSelector.js.map +1 -0
  98. package/lib/module/VideoPlayer/utils/platform/index.js +5 -0
  99. package/lib/module/VideoPlayer/utils/platform/index.js.map +1 -0
  100. package/lib/module/VideoPlayer/utils/{lockOrientation.js → platform/lockOrientation.js} +13 -5
  101. package/lib/module/VideoPlayer/utils/platform/lockOrientation.js.map +1 -0
  102. package/lib/module/VideoPlayer/utils/player/index.js +5 -0
  103. package/lib/module/VideoPlayer/utils/player/index.js.map +1 -0
  104. package/lib/module/VideoPlayer/utils/{playerEvents.js → player/playerEvents.js} +3 -3
  105. package/lib/module/VideoPlayer/utils/player/playerEvents.js.map +1 -0
  106. package/lib/module/VideoPlayer/utils/{useWatchReporter.js → player/useWatchReporter.js} +3 -2
  107. package/lib/module/VideoPlayer/utils/player/useWatchReporter.js.map +1 -0
  108. package/lib/module/VideoPlayer/utils/video/index.js +8 -0
  109. package/lib/module/VideoPlayer/utils/video/index.js.map +1 -0
  110. package/lib/module/VideoPlayer/utils/{videoControl.js → video/videoControl.js} +1 -14
  111. package/lib/module/VideoPlayer/utils/video/videoControl.js.map +1 -0
  112. package/lib/module/VideoPlayer/utils/video/videoRef.js +20 -0
  113. package/lib/module/VideoPlayer/utils/video/videoRef.js.map +1 -0
  114. package/lib/module/VideoPlayer/utils/video/videoResume.js +29 -0
  115. package/lib/module/VideoPlayer/utils/video/videoResume.js.map +1 -0
  116. package/lib/module/VideoPlayer/utils/video/videoSource.js.map +1 -0
  117. package/lib/module/VideoPlayer.js +128 -0
  118. package/lib/module/VideoPlayer.js.map +1 -0
  119. package/lib/module/index.js +3 -1
  120. package/lib/module/index.js.map +1 -1
  121. package/lib/typescript/src/AdsPlayer/AdsPlayer.d.ts +22 -0
  122. package/lib/typescript/src/AdsPlayer/AdsPlayer.d.ts.map +1 -0
  123. package/lib/typescript/src/AdsPlayer/MediaControls/AdBottomControls.d.ts +4 -0
  124. package/lib/typescript/src/AdsPlayer/MediaControls/AdBottomControls.d.ts.map +1 -0
  125. package/lib/typescript/src/AdsPlayer/MediaControls/AdMediaControls.d.ts +8 -0
  126. package/lib/typescript/src/AdsPlayer/MediaControls/AdMediaControls.d.ts.map +1 -0
  127. package/lib/typescript/src/AdsPlayer/MediaControls/AdMediaControlsProvider.d.ts +26 -0
  128. package/lib/typescript/src/AdsPlayer/MediaControls/AdMediaControlsProvider.d.ts.map +1 -0
  129. package/lib/typescript/src/AdsPlayer/MediaControls/AdMiddleControls.d.ts +4 -0
  130. package/lib/typescript/src/AdsPlayer/MediaControls/AdMiddleControls.d.ts.map +1 -0
  131. package/lib/typescript/src/AdsPlayer/MediaControls/AdTopControls.d.ts +7 -0
  132. package/lib/typescript/src/AdsPlayer/MediaControls/AdTopControls.d.ts.map +1 -0
  133. package/lib/typescript/src/AdsPlayer/MediaControls/index.d.ts +6 -0
  134. package/lib/typescript/src/AdsPlayer/MediaControls/index.d.ts.map +1 -0
  135. package/lib/typescript/src/AdsPlayer/components/RotatingLoader.d.ts +12 -0
  136. package/lib/typescript/src/AdsPlayer/components/RotatingLoader.d.ts.map +1 -0
  137. package/lib/typescript/src/AdsPlayer/index.d.ts +5 -0
  138. package/lib/typescript/src/AdsPlayer/index.d.ts.map +1 -0
  139. package/lib/typescript/src/AdsPlayer/store/adsPlayer.type.d.ts +28 -0
  140. package/lib/typescript/src/AdsPlayer/store/adsPlayer.type.d.ts.map +1 -0
  141. package/lib/typescript/src/AdsPlayer/store/adsPlayerStore.d.ts +22 -0
  142. package/lib/typescript/src/AdsPlayer/store/adsPlayerStore.d.ts.map +1 -0
  143. package/lib/typescript/src/AdsPlayer/store/index.d.ts +3 -0
  144. package/lib/typescript/src/AdsPlayer/store/index.d.ts.map +1 -0
  145. package/lib/typescript/src/AdsPlayer/utils/adStateReset.d.ts +6 -0
  146. package/lib/typescript/src/AdsPlayer/utils/adStateReset.d.ts.map +1 -0
  147. package/lib/typescript/src/AdsPlayer/utils/controls.d.ts +13 -0
  148. package/lib/typescript/src/AdsPlayer/utils/controls.d.ts.map +1 -0
  149. package/lib/typescript/src/AdsPlayer/utils/useAdControlsAutoHide.d.ts +3 -0
  150. package/lib/typescript/src/AdsPlayer/utils/useAdControlsAutoHide.d.ts.map +1 -0
  151. package/lib/typescript/src/AdsPlayer/utils/useAdInitialization.d.ts +20 -0
  152. package/lib/typescript/src/AdsPlayer/utils/useAdInitialization.d.ts.map +1 -0
  153. package/lib/typescript/src/AdsPlayer/utils/useAdTracking.d.ts +23 -0
  154. package/lib/typescript/src/AdsPlayer/utils/useAdTracking.d.ts.map +1 -0
  155. package/lib/typescript/src/AdsPlayer/utils/useAdsManager.d.ts +9 -0
  156. package/lib/typescript/src/AdsPlayer/utils/useAdsManager.d.ts.map +1 -0
  157. package/lib/typescript/src/VideoPlayer/MediaControls/BottomControls.d.ts.map +1 -1
  158. package/lib/typescript/src/VideoPlayer/MediaControls/MediaControls.d.ts.map +1 -1
  159. package/lib/typescript/src/VideoPlayer/MediaControls/MediaControlsProvider.d.ts +3 -1
  160. package/lib/typescript/src/VideoPlayer/MediaControls/MediaControlsProvider.d.ts.map +1 -1
  161. package/lib/typescript/src/VideoPlayer/MediaControls/MiddleControls.d.ts +2 -1
  162. package/lib/typescript/src/VideoPlayer/MediaControls/MiddleControls.d.ts.map +1 -1
  163. package/lib/typescript/src/VideoPlayer/MediaControls/TopControls.d.ts.map +1 -1
  164. package/lib/typescript/src/VideoPlayer/Settings/AudioAndSubtitles.d.ts.map +1 -0
  165. package/lib/typescript/src/VideoPlayer/{model → Settings}/Episodes.d.ts +1 -1
  166. package/lib/typescript/src/VideoPlayer/Settings/Episodes.d.ts.map +1 -0
  167. package/lib/typescript/src/VideoPlayer/{model → Settings}/SettingModal.d.ts +1 -1
  168. package/lib/typescript/src/VideoPlayer/Settings/SettingModal.d.ts.map +1 -0
  169. package/lib/typescript/src/VideoPlayer/Settings/SpeedControls.d.ts.map +1 -0
  170. package/lib/typescript/src/VideoPlayer/Settings/VideoPlayerSettings.d.ts.map +1 -0
  171. package/lib/typescript/src/VideoPlayer/{VideoPlayer.d.ts → VideoPlayerCore.d.ts} +10 -7
  172. package/lib/typescript/src/VideoPlayer/VideoPlayerCore.d.ts.map +1 -0
  173. package/lib/typescript/src/VideoPlayer/components/ProgressBar.d.ts +3 -1
  174. package/lib/typescript/src/VideoPlayer/components/ProgressBar.d.ts.map +1 -1
  175. package/lib/typescript/src/VideoPlayer/components/SkipAndNextControls.d.ts +1 -1
  176. package/lib/typescript/src/VideoPlayer/components/SkipAndNextControls.d.ts.map +1 -1
  177. package/lib/typescript/src/VideoPlayer/components/Toast.d.ts +12 -0
  178. package/lib/typescript/src/VideoPlayer/components/Toast.d.ts.map +1 -0
  179. package/lib/typescript/src/VideoPlayer/index.d.ts +1 -1
  180. package/lib/typescript/src/VideoPlayer/index.d.ts.map +1 -1
  181. package/lib/typescript/src/VideoPlayer/store/videoPlayer.type.d.ts +25 -5
  182. package/lib/typescript/src/VideoPlayer/store/videoPlayer.type.d.ts.map +1 -1
  183. package/lib/typescript/src/VideoPlayer/store/videoPlayerStore.d.ts.map +1 -1
  184. package/lib/typescript/src/VideoPlayer/{Styles → styles}/globalStyles.d.ts +16 -9
  185. package/lib/typescript/src/VideoPlayer/styles/globalStyles.d.ts.map +1 -0
  186. package/lib/typescript/src/VideoPlayer/utils/display/Display.d.ts.map +1 -0
  187. package/lib/typescript/src/VideoPlayer/utils/display/index.d.ts +2 -0
  188. package/lib/typescript/src/VideoPlayer/utils/display/index.d.ts.map +1 -0
  189. package/lib/typescript/src/VideoPlayer/utils/format/index.d.ts +2 -0
  190. package/lib/typescript/src/VideoPlayer/utils/format/index.d.ts.map +1 -0
  191. package/lib/typescript/src/VideoPlayer/utils/{timeFormatter.d.ts → format/timeFormatter.d.ts} +0 -5
  192. package/lib/typescript/src/VideoPlayer/utils/format/timeFormatter.d.ts.map +1 -0
  193. package/lib/typescript/src/VideoPlayer/utils/hooks/index.d.ts +3 -0
  194. package/lib/typescript/src/VideoPlayer/utils/hooks/index.d.ts.map +1 -1
  195. package/lib/typescript/src/VideoPlayer/utils/hooks/useAdEventHandler.d.ts +34 -0
  196. package/lib/typescript/src/VideoPlayer/utils/hooks/useAdEventHandler.d.ts.map +1 -0
  197. package/lib/typescript/src/VideoPlayer/utils/hooks/useOrientationLock.d.ts +11 -0
  198. package/lib/typescript/src/VideoPlayer/utils/hooks/useOrientationLock.d.ts.map +1 -0
  199. package/lib/typescript/src/VideoPlayer/utils/hooks/usePauseVideoOnAd.d.ts +6 -0
  200. package/lib/typescript/src/VideoPlayer/utils/hooks/usePauseVideoOnAd.d.ts.map +1 -0
  201. package/lib/typescript/src/VideoPlayer/utils/hooks/useVideoResolutions.d.ts.map +1 -1
  202. package/lib/typescript/src/VideoPlayer/utils/index.d.ts +5 -6
  203. package/lib/typescript/src/VideoPlayer/utils/index.d.ts.map +1 -1
  204. package/lib/typescript/src/VideoPlayer/utils/{PlatformSelector.d.ts → platform/PlatformSelector.d.ts} +0 -4
  205. package/lib/typescript/src/VideoPlayer/utils/platform/PlatformSelector.d.ts.map +1 -0
  206. package/lib/typescript/src/VideoPlayer/utils/platform/index.d.ts +3 -0
  207. package/lib/typescript/src/VideoPlayer/utils/platform/index.d.ts.map +1 -0
  208. package/lib/typescript/src/VideoPlayer/utils/platform/lockOrientation.d.ts.map +1 -0
  209. package/lib/typescript/src/VideoPlayer/utils/player/index.d.ts +3 -0
  210. package/lib/typescript/src/VideoPlayer/utils/player/index.d.ts.map +1 -0
  211. package/lib/typescript/src/VideoPlayer/utils/{playerEvents.d.ts → player/playerEvents.d.ts} +1 -1
  212. package/lib/typescript/src/VideoPlayer/utils/player/playerEvents.d.ts.map +1 -0
  213. package/lib/typescript/src/VideoPlayer/utils/{useWatchReporter.d.ts → player/useWatchReporter.d.ts} +1 -6
  214. package/lib/typescript/src/VideoPlayer/utils/player/useWatchReporter.d.ts.map +1 -0
  215. package/lib/typescript/src/VideoPlayer/utils/video/index.d.ts +6 -0
  216. package/lib/typescript/src/VideoPlayer/utils/video/index.d.ts.map +1 -0
  217. package/lib/typescript/src/VideoPlayer/utils/{videoControl.d.ts → video/videoControl.d.ts} +1 -1
  218. package/lib/typescript/src/VideoPlayer/utils/video/videoControl.d.ts.map +1 -0
  219. package/lib/typescript/src/VideoPlayer/utils/video/videoRef.d.ts +19 -0
  220. package/lib/typescript/src/VideoPlayer/utils/video/videoRef.d.ts.map +1 -0
  221. package/lib/typescript/src/VideoPlayer/utils/video/videoResume.d.ts +6 -0
  222. package/lib/typescript/src/VideoPlayer/utils/video/videoResume.d.ts.map +1 -0
  223. package/lib/typescript/src/VideoPlayer/utils/{videoSource.d.ts → video/videoSource.d.ts} +1 -1
  224. package/lib/typescript/src/VideoPlayer/utils/video/videoSource.d.ts.map +1 -0
  225. package/lib/typescript/src/VideoPlayer.d.ts +31 -0
  226. package/lib/typescript/src/VideoPlayer.d.ts.map +1 -0
  227. package/lib/typescript/src/index.d.ts +3 -1
  228. package/lib/typescript/src/index.d.ts.map +1 -1
  229. package/package.json +125 -101
  230. package/src/AdsPlayer/AdsPlayer.tsx +312 -0
  231. package/src/AdsPlayer/MediaControls/AdBottomControls.tsx +189 -0
  232. package/src/AdsPlayer/MediaControls/AdMediaControls.tsx +98 -0
  233. package/src/AdsPlayer/MediaControls/AdMediaControlsProvider.tsx +62 -0
  234. package/src/AdsPlayer/MediaControls/AdMiddleControls.tsx +63 -0
  235. package/src/AdsPlayer/MediaControls/AdTopControls.tsx +196 -0
  236. package/src/AdsPlayer/MediaControls/index.ts +5 -0
  237. package/src/AdsPlayer/components/RotatingLoader.tsx +79 -0
  238. package/src/AdsPlayer/index.ts +4 -0
  239. package/src/AdsPlayer/store/adsPlayer.type.ts +29 -0
  240. package/src/AdsPlayer/store/adsPlayerStore.ts +59 -0
  241. package/src/AdsPlayer/store/index.ts +2 -0
  242. package/src/AdsPlayer/utils/adStateReset.ts +29 -0
  243. package/src/AdsPlayer/utils/controls.ts +69 -0
  244. package/src/AdsPlayer/utils/useAdControlsAutoHide.ts +32 -0
  245. package/src/AdsPlayer/utils/useAdInitialization.ts +86 -0
  246. package/src/AdsPlayer/utils/useAdTracking.ts +89 -0
  247. package/src/AdsPlayer/utils/useAdsManager.ts +215 -0
  248. package/src/VideoPlayer/MediaControls/BottomControls.tsx +22 -3
  249. package/src/VideoPlayer/MediaControls/MediaControls.tsx +3 -2
  250. package/src/VideoPlayer/MediaControls/MediaControlsProvider.tsx +36 -35
  251. package/src/VideoPlayer/MediaControls/MiddleControls.tsx +87 -60
  252. package/src/VideoPlayer/MediaControls/TopControls.tsx +21 -7
  253. package/src/VideoPlayer/{model → Settings}/AudioAndSubtitles.tsx +0 -7
  254. package/src/VideoPlayer/{model → Settings}/Episodes.tsx +6 -3
  255. package/src/VideoPlayer/{model → Settings}/SettingModal.tsx +1 -2
  256. package/src/VideoPlayer/{model → Settings}/SpeedControls.tsx +1 -5
  257. package/src/VideoPlayer/{model → Settings}/VideoPlayerSettings.tsx +1 -1
  258. package/src/VideoPlayer/VideoPlayerCore.tsx +356 -0
  259. package/src/VideoPlayer/components/ProgressBar.tsx +85 -21
  260. package/src/VideoPlayer/components/SkipAndNextControls.tsx +2 -5
  261. package/src/VideoPlayer/components/SubtitleView.tsx +1 -1
  262. package/src/VideoPlayer/components/Toast.tsx +61 -0
  263. package/src/VideoPlayer/index.ts +1 -1
  264. package/src/VideoPlayer/store/videoPlayer.type.ts +28 -6
  265. package/src/VideoPlayer/store/videoPlayerStore.ts +0 -4
  266. package/src/VideoPlayer/{Styles → styles}/globalStyles.ts +5 -6
  267. package/src/VideoPlayer/utils/{Display.ts → display/Display.ts} +0 -4
  268. package/src/VideoPlayer/utils/display/index.ts +1 -0
  269. package/src/VideoPlayer/utils/format/index.ts +1 -0
  270. package/src/VideoPlayer/utils/{timeFormatter.ts → format/timeFormatter.ts} +4 -7
  271. package/src/VideoPlayer/utils/hooks/index.ts +3 -0
  272. package/src/VideoPlayer/utils/hooks/useAdEventHandler.ts +95 -0
  273. package/src/VideoPlayer/utils/hooks/useOrientationLock.ts +29 -0
  274. package/src/VideoPlayer/utils/hooks/usePauseVideoOnAd.ts +46 -0
  275. package/src/VideoPlayer/utils/hooks/useVideoPlayerBack.ts +3 -3
  276. package/src/VideoPlayer/utils/hooks/useVideoResolutions.ts +1 -3
  277. package/src/VideoPlayer/utils/index.ts +5 -6
  278. package/src/VideoPlayer/utils/{PlatformSelector.ts → platform/PlatformSelector.ts} +0 -5
  279. package/src/VideoPlayer/utils/platform/index.ts +2 -0
  280. package/src/VideoPlayer/utils/{lockOrientation.ts → platform/lockOrientation.ts} +11 -5
  281. package/src/VideoPlayer/utils/player/index.ts +2 -0
  282. package/src/VideoPlayer/utils/{playerEvents.ts → player/playerEvents.ts} +4 -4
  283. package/src/VideoPlayer/utils/{useWatchReporter.ts → player/useWatchReporter.ts} +4 -3
  284. package/src/VideoPlayer/utils/video/index.ts +5 -0
  285. package/src/VideoPlayer/utils/{videoControl.ts → video/videoControl.ts} +2 -9
  286. package/src/VideoPlayer/utils/video/videoRef.ts +21 -0
  287. package/src/VideoPlayer/utils/video/videoResume.ts +23 -0
  288. package/src/VideoPlayer/utils/{videoSource.ts → video/videoSource.ts} +1 -1
  289. package/src/VideoPlayer.tsx +166 -0
  290. package/src/index.tsx +3 -1
  291. package/lib/module/VideoPlayer/Styles/fonts.js +0 -58
  292. package/lib/module/VideoPlayer/Styles/fonts.js.map +0 -1
  293. package/lib/module/VideoPlayer/Styles/globalStyles.js.map +0 -1
  294. package/lib/module/VideoPlayer/VideoPlayer.js +0 -180
  295. package/lib/module/VideoPlayer/VideoPlayer.js.map +0 -1
  296. package/lib/module/VideoPlayer/model/AudioAndSubtitles.js.map +0 -1
  297. package/lib/module/VideoPlayer/model/Episodes.js.map +0 -1
  298. package/lib/module/VideoPlayer/model/SettingModal.js.map +0 -1
  299. package/lib/module/VideoPlayer/model/SpeedControls.js.map +0 -1
  300. package/lib/module/VideoPlayer/model/VideoPlayerSettings.js.map +0 -1
  301. package/lib/module/VideoPlayer/utils/Display.js.map +0 -1
  302. package/lib/module/VideoPlayer/utils/PlatformSelector.js.map +0 -1
  303. package/lib/module/VideoPlayer/utils/lockOrientation.js.map +0 -1
  304. package/lib/module/VideoPlayer/utils/playerEvents.js.map +0 -1
  305. package/lib/module/VideoPlayer/utils/timeFormatter.js.map +0 -1
  306. package/lib/module/VideoPlayer/utils/useWatchReporter.js.map +0 -1
  307. package/lib/module/VideoPlayer/utils/videoControl.js.map +0 -1
  308. package/lib/module/VideoPlayer/utils/videoRef.js +0 -5
  309. package/lib/module/VideoPlayer/utils/videoRef.js.map +0 -1
  310. package/lib/module/VideoPlayer/utils/videoSource.js.map +0 -1
  311. package/lib/typescript/src/VideoPlayer/Styles/fonts.d.ts +0 -54
  312. package/lib/typescript/src/VideoPlayer/Styles/fonts.d.ts.map +0 -1
  313. package/lib/typescript/src/VideoPlayer/Styles/globalStyles.d.ts.map +0 -1
  314. package/lib/typescript/src/VideoPlayer/VideoPlayer.d.ts.map +0 -1
  315. package/lib/typescript/src/VideoPlayer/model/AudioAndSubtitles.d.ts.map +0 -1
  316. package/lib/typescript/src/VideoPlayer/model/Episodes.d.ts.map +0 -1
  317. package/lib/typescript/src/VideoPlayer/model/SettingModal.d.ts.map +0 -1
  318. package/lib/typescript/src/VideoPlayer/model/SpeedControls.d.ts.map +0 -1
  319. package/lib/typescript/src/VideoPlayer/model/VideoPlayerSettings.d.ts.map +0 -1
  320. package/lib/typescript/src/VideoPlayer/utils/Display.d.ts.map +0 -1
  321. package/lib/typescript/src/VideoPlayer/utils/PlatformSelector.d.ts.map +0 -1
  322. package/lib/typescript/src/VideoPlayer/utils/lockOrientation.d.ts.map +0 -1
  323. package/lib/typescript/src/VideoPlayer/utils/playerEvents.d.ts.map +0 -1
  324. package/lib/typescript/src/VideoPlayer/utils/timeFormatter.d.ts.map +0 -1
  325. package/lib/typescript/src/VideoPlayer/utils/useWatchReporter.d.ts.map +0 -1
  326. package/lib/typescript/src/VideoPlayer/utils/videoControl.d.ts.map +0 -1
  327. package/lib/typescript/src/VideoPlayer/utils/videoRef.d.ts +0 -3
  328. package/lib/typescript/src/VideoPlayer/utils/videoRef.d.ts.map +0 -1
  329. package/lib/typescript/src/VideoPlayer/utils/videoSource.d.ts.map +0 -1
  330. package/src/VideoPlayer/Styles/fonts.ts +0 -106
  331. package/src/VideoPlayer/VideoPlayer.tsx +0 -217
  332. package/src/VideoPlayer/utils/videoRef.ts +0 -4
  333. /package/lib/module/VideoPlayer/utils/{videoSource.js → video/videoSource.js} +0 -0
  334. /package/lib/typescript/src/VideoPlayer/{model → Settings}/AudioAndSubtitles.d.ts +0 -0
  335. /package/lib/typescript/src/VideoPlayer/{model → Settings}/SpeedControls.d.ts +0 -0
  336. /package/lib/typescript/src/VideoPlayer/{model → Settings}/VideoPlayerSettings.d.ts +0 -0
  337. /package/lib/typescript/src/VideoPlayer/utils/{Display.d.ts → display/Display.d.ts} +0 -0
  338. /package/lib/typescript/src/VideoPlayer/utils/{lockOrientation.d.ts → platform/lockOrientation.d.ts} +0 -0
@@ -1,8 +1,3 @@
1
- /**
2
- * @author Naresh Dhamu
3
- * @lastModified Sat 16 Aug 2025 at 10:32 PM
4
- * @description: Utility functions for formatting time
5
- */
6
1
  export declare const formatDuration: (totalSeconds: number, hideSeconds?: boolean, addSpaces?: boolean) => string;
7
2
  export declare const formatTime: (seconds: number) => string;
8
3
  export declare const formatTimeWithMs: (seconds: number) => string;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeFormatter.d.ts","sourceRoot":"","sources":["../../../../../../src/VideoPlayer/utils/format/timeFormatter.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,GACzB,cAAc,MAAM,EACpB,qBAAmB,EACnB,mBAAiB,KAChB,MAgBF,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,SAAS,MAAM,WAQzC,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,SAAS,MAAM,KAAG,MAWlD,CAAC"}
@@ -1,3 +1,6 @@
1
1
  export * from './useVideoPlayerBack';
2
2
  export * from './useVideoResolutions';
3
+ export * from './useAdEventHandler';
4
+ export * from './usePauseVideoOnAd';
5
+ export * from './useOrientationLock';
3
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/VideoPlayer/utils/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/VideoPlayer/utils/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,34 @@
1
+ import type { VideoAd } from '../../store/videoPlayer.type';
2
+ import type { ExtendedWatchProgress } from '../player/useWatchReporter';
3
+ import type { MediaEpisode } from '../../store/videoPlayer.type';
4
+ interface UseAdEventHandlerParams {
5
+ resumeVideoFromAd: (resumeTime: number | null) => void;
6
+ resumeTime: number | null;
7
+ playerEvents: {
8
+ onEnd: (params: {
9
+ reportProgress: (event: ExtendedWatchProgress['event']) => void;
10
+ onPressEpisode: ({ episode, }: {
11
+ episode: MediaEpisode;
12
+ }) => Promise<boolean>;
13
+ autoNext: boolean;
14
+ }) => void;
15
+ };
16
+ reportProgress: (event: ExtendedWatchProgress['event']) => void;
17
+ onPressEpisode?: ({ episode }: {
18
+ episode: MediaEpisode;
19
+ }) => Promise<boolean>;
20
+ autoNext: boolean;
21
+ onAdEnd?: (ad: VideoAd) => void;
22
+ onAdError?: (error: Error, ad: VideoAd) => void;
23
+ }
24
+ /**
25
+ * Reusable hook for handling ad events (end, skip, error)
26
+ * Consolidates duplicate logic from handleAdEnd, handleAdSkip, and handleAdError
27
+ */
28
+ export declare const useAdEventHandler: ({ resumeVideoFromAd, resumeTime, playerEvents, reportProgress, onPressEpisode, autoNext, onAdEnd, onAdError, }: UseAdEventHandlerParams) => {
29
+ handleAdEnd: (endedAd: VideoAd) => void;
30
+ handleAdSkip: (skippedAd: VideoAd) => void;
31
+ handleAdError: (error: Error, errorAd: VideoAd) => void;
32
+ };
33
+ export {};
34
+ //# sourceMappingURL=useAdEventHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAdEventHandler.d.ts","sourceRoot":"","sources":["../../../../../../src/VideoPlayer/utils/hooks/useAdEventHandler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEjE,UAAU,uBAAuB;IAC/B,iBAAiB,EAAE,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACvD,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,EAAE;QACZ,KAAK,EAAE,CAAC,MAAM,EAAE;YACd,cAAc,EAAE,CAAC,KAAK,EAAE,qBAAqB,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;YAChE,cAAc,EAAE,CAAC,EACf,OAAO,GACR,EAAE;gBACD,OAAO,EAAE,YAAY,CAAC;aACvB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;YACvB,QAAQ,EAAE,OAAO,CAAC;SACnB,KAAK,IAAI,CAAC;KACZ,CAAC;IACF,cAAc,EAAE,CAAC,KAAK,EAAE,qBAAqB,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAChE,cAAc,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,YAAY,CAAA;KAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9E,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,KAAK,IAAI,CAAC;CACjD;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,gHAS/B,uBAAuB;2BAcZ,OAAO;8BAaL,OAAO;2BAWX,KAAK,WAAW,OAAO;CAiBlC,CAAC"}
@@ -0,0 +1,11 @@
1
+ interface UseOrientationLockParams {
2
+ isFocused: boolean;
3
+ mode: 'fullscreen' | 'normal';
4
+ }
5
+ /**
6
+ * Reusable hook for managing orientation locking
7
+ * Consolidates orientation logic from VideoPlayer
8
+ */
9
+ export declare const useOrientationLock: ({ isFocused, mode, }: UseOrientationLockParams) => void;
10
+ export {};
11
+ //# sourceMappingURL=useOrientationLock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOrientationLock.d.ts","sourceRoot":"","sources":["../../../../../../src/VideoPlayer/utils/hooks/useOrientationLock.ts"],"names":[],"mappings":"AAGA,UAAU,wBAAwB;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,YAAY,GAAG,QAAQ,CAAC;CAC/B;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAAI,sBAGhC,wBAAwB,SAa1B,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Reusable hook to pause main video when ads start playing
3
+ * Saves current time as resume time for pre-roll ads
4
+ */
5
+ export declare const usePauseVideoOnAd: () => void;
6
+ //# sourceMappingURL=usePauseVideoOnAd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePauseVideoOnAd.d.ts","sourceRoot":"","sources":["../../../../../../src/VideoPlayer/utils/hooks/usePauseVideoOnAd.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,eAAO,MAAM,iBAAiB,YAqC7B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useVideoResolutions.d.ts","sourceRoot":"","sources":["../../../../../../src/VideoPlayer/utils/hooks/useVideoResolutions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE/D,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AA0DD,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAKD,eAAO,MAAM,mBAAmB,GAAI,OAAO,UAAU,GAAG,IAAI,iBA4C3D,CAAC"}
1
+ {"version":3,"file":"useVideoResolutions.d.ts","sourceRoot":"","sources":["../../../../../../src/VideoPlayer/utils/hooks/useVideoResolutions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE/D,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AA0DD,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAID,eAAO,MAAM,mBAAmB,GAAI,OAAO,UAAU,GAAG,IAAI,iBA2C3D,CAAC"}
@@ -1,8 +1,7 @@
1
- export * from './lockOrientation';
1
+ export * from './video';
2
+ export * from './player';
3
+ export * from './platform';
4
+ export * from './format';
5
+ export * from './display';
2
6
  export * from './hooks';
3
- export * from './playerEvents';
4
- export * from './videoControl';
5
- export * from './videoSource';
6
- export * from './timeFormatter';
7
- export * from './videoRef';
8
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/VideoPlayer/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/VideoPlayer/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
@@ -1,7 +1,3 @@
1
- /**
2
- * @author Naresh Dhamu
3
- * @lastModified Fri 08 Aug 2025 at 08:44 PM
4
- */
5
1
  declare class PlatformSelector {
6
2
  isAndroid(): boolean;
7
3
  isIOS(): boolean;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlatformSelector.d.ts","sourceRoot":"","sources":["../../../../../../src/VideoPlayer/utils/platform/PlatformSelector.ts"],"names":[],"mappings":"AAEA,cAAM,gBAAgB;IACb,SAAS,IAAI,OAAO;IAIpB,KAAK,IAAI,OAAO;CAGxB;;AAED,wBAAsC"}
@@ -0,0 +1,3 @@
1
+ export * from './lockOrientation';
2
+ export { default as PlatformSelector } from './PlatformSelector';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/VideoPlayer/utils/platform/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lockOrientation.d.ts","sourceRoot":"","sources":["../../../../../../src/VideoPlayer/utils/platform/lockOrientation.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,cAAc,YAgB1B,CAAC;AAEF,eAAO,MAAM,eAAe,YAgB3B,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './playerEvents';
2
+ export * from './useWatchReporter';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/VideoPlayer/utils/player/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { OnBufferData, OnLoadData, OnLoadStartData, OnProgressData } from 'react-native-video';
2
- import type { MediaEpisode } from '../store/videoPlayer.type';
2
+ import type { MediaEpisode } from '../../store/videoPlayer.type';
3
3
  import type { ExtendedWatchProgress } from './useWatchReporter';
4
4
  export declare const createPlayerEvents: () => {
5
5
  onProgress: ({ currentTime, playableDuration, }: OnProgressData) => void;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playerEvents.d.ts","sourceRoot":"","sources":["../../../../../../src/VideoPlayer/utils/player/playerEvents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,eAAe,EACf,cAAc,EACf,MAAM,oBAAoB,CAAC;AAI5B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,eAAO,MAAM,kBAAkB;qDAI1B,cAAc;mBAcK,UAAU;gCAeG,YAAY;2DAU5C;QACD,cAAc,EAAE,CAAC,KAAK,EAAE,qBAAqB,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;QAChE,cAAc,EAAE,CAAC,EACf,OAAO,GACR,EAAE;YACD,OAAO,EAAE,YAAY,CAAC;SACvB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;QACvB,QAAQ,EAAE,OAAO,CAAC;KACnB;qBAUuB,eAAe;;CAuBxC,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { MediaTrack } from '../store/videoPlayer.type';
1
+ import type { MediaTrack } from '../../store/videoPlayer.type';
2
2
  export type WatchEventType = 'VIEW_COUNT' | 'COMPLETED' | 'PROGRESS' | 'EPISODE_CHANGE' | 'VIDEO_CLOSE';
3
3
  export interface WatchProgressDetails {
4
4
  contentId: string | null;
@@ -13,11 +13,6 @@ export interface WatchProgressDetails {
13
13
  export interface ExtendedWatchProgress extends WatchProgressDetails {
14
14
  event?: WatchEventType;
15
15
  }
16
- export declare const countWatchTime: (forceFlush?: boolean) => {
17
- totalWatchTime: number;
18
- completed: boolean;
19
- currentTime: number;
20
- };
21
16
  export declare const useWatchReporter: ({ onWatchProgress, }: {
22
17
  onWatchProgress?: (progress: ExtendedWatchProgress) => void;
23
18
  }) => {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWatchReporter.d.ts","sourceRoot":"","sources":["../../../../../../src/VideoPlayer/utils/player/useWatchReporter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE/D,MAAM,MAAM,cAAc,GACtB,YAAY,GACZ,WAAW,GACX,UAAU,GACV,gBAAgB,GAChB,aAAa,CAAC;AAElB,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,EAAE,UAAU,GAAG,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,qBAAsB,SAAQ,oBAAoB;IACjE,KAAK,CAAC,EAAE,cAAc,CAAC;CACxB;AA+CD,eAAO,MAAM,gBAAgB,GAAI,sBAE9B;IACD,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,qBAAqB,KAAK,IAAI,CAAC;CAC7D;6BAEW,cAAc,sBAAmC,MAAM;CA2BlE,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from './videoRef';
2
+ export * from './videoSource';
3
+ export * from './videoControl';
4
+ export * from './videoResume';
5
+ export { adVideoRef } from './videoRef';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/VideoPlayer/utils/video/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { MediaEpisode } from '../store/videoPlayer.type';
1
+ import type { MediaEpisode } from '../../store/videoPlayer.type';
2
2
  export declare const handlePause: () => void;
3
3
  interface HandleNextOptions {
4
4
  onPressEpisode: ({ episode }: {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"videoControl.d.ts","sourceRoot":"","sources":["../../../../../../src/VideoPlayer/utils/video/videoControl.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEjE,eAAO,MAAM,WAAW,YAiBvB,CAAC;AAEF,UAAU,iBAAiB;IACzB,cAAc,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,YAAY,CAAA;KAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AACD,eAAO,MAAM,UAAU,GAAU,+BAG9B,iBAAiB,KAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAsF3C,CAAC;AAEF,eAAO,MAAM,SAAS,QAAO,OAY5B,CAAC;AAEF,eAAO,MAAM,cAAc,QAAO;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CAkDrB,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { VideoRef } from 'react-native-video';
2
+ import type { AdsPlayerRef } from '../../../AdsPlayer/AdsPlayer';
3
+ export declare const hideControlsStyles: {
4
+ hideForward: boolean;
5
+ hideDuration: boolean;
6
+ hideFullscreen: boolean;
7
+ hidePlayPause: boolean;
8
+ hideNavigationBarOnFullScreenMode: boolean;
9
+ hideNotificationBarOnFullScreenMode: boolean;
10
+ hideNext: boolean;
11
+ hidePosition: boolean;
12
+ hidePrevious: boolean;
13
+ hideRewind: boolean;
14
+ hideSeekBar: boolean;
15
+ hideSettingButton: boolean;
16
+ };
17
+ export declare const videoRef: import("react").RefObject<VideoRef | null>;
18
+ export declare const adVideoRef: import("react").RefObject<AdsPlayerRef | null>;
19
+ //# sourceMappingURL=videoRef.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"videoRef.d.ts","sourceRoot":"","sources":["../../../../../../src/VideoPlayer/utils/video/videoRef.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEjE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;CAa9B,CAAC;AAEF,eAAO,MAAM,QAAQ,4CAAwB,CAAC;AAC9C,eAAO,MAAM,UAAU,gDAA4B,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Reusable function to resume video from ad
3
+ * Handles seeking to resume time and unpausing the video
4
+ */
5
+ export declare const resumeVideoFromAd: (resumeTimeValue: number | null) => void;
6
+ //# sourceMappingURL=videoResume.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"videoResume.d.ts","sourceRoot":"","sources":["../../../../../../src/VideoPlayer/utils/video/videoResume.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,iBAAiB,MAAM,GAAG,IAAI,SAc/D,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { MediaTrack } from '../store/videoPlayer.type';
1
+ import type { MediaTrack } from '../../store/videoPlayer.type';
2
2
  import type { ReactVideoSource } from 'react-native-video';
3
3
  interface UrlHandlerProps {
4
4
  playList: MediaTrack[];
@@ -0,0 +1 @@
1
+ {"version":3,"file":"videoSource.d.ts","sourceRoot":"","sources":["../../../../../../src/VideoPlayer/utils/video/videoSource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,UAAU,eAAe;IACvB,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,cAAc,GAAI,kCAG5B,eAAe,KAAG,gBAMpB,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,UAAU,UAAU,EAAE,EACtB,WAAW,MAAM,KAChB,MAAoE,CAAC"}
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import { type EdgeInsets } from 'react-native-safe-area-context';
3
+ import type { MediaEpisode, VideoAd } from './VideoPlayer/store/videoPlayer.type';
4
+ import type { VideoPlayerTheme } from './VideoPlayer/context';
5
+ import { type ExtendedWatchProgress } from './VideoPlayer/utils';
6
+ export interface VideoPlayerProps {
7
+ onClose?: () => void;
8
+ isFocused?: boolean;
9
+ seekTime?: number | null;
10
+ mode?: 'fullscreen' | 'normal';
11
+ autoNext?: boolean;
12
+ event?: {
13
+ onPressEpisode?: ({ episode, }: {
14
+ episode: MediaEpisode;
15
+ }) => Promise<boolean>;
16
+ };
17
+ theme?: Partial<VideoPlayerTheme>;
18
+ onWatchProgress?: (progress: ExtendedWatchProgress) => void;
19
+ ads?: VideoAd[];
20
+ onAdEnd?: (ad: VideoAd) => void;
21
+ onAdError?: (error: Error, ad: VideoAd) => void;
22
+ onAdTracking?: ({ ad, trackingUrl, event, }: {
23
+ ad: VideoAd;
24
+ trackingUrl: string;
25
+ event: string;
26
+ }) => void;
27
+ insets: EdgeInsets;
28
+ }
29
+ declare const _default: React.NamedExoticComponent<VideoPlayerProps>;
30
+ export default _default;
31
+ //# sourceMappingURL=VideoPlayer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VideoPlayer.d.ts","sourceRoot":"","sources":["../../../src/VideoPlayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAMjE,OAAO,KAAK,EACV,YAAY,EACZ,OAAO,EACR,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAQL,KAAK,qBAAqB,EAC3B,MAAM,qBAAqB,CAAC;AAE7B,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,CAAC,EAAE,YAAY,GAAG,QAAQ,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE;QACN,cAAc,CAAC,EAAE,CAAC,EAChB,OAAO,GACR,EAAE;YACD,OAAO,EAAE,YAAY,CAAC;SACvB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;KACxB,CAAC;IACF,KAAK,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAClC,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC5D,GAAG,CAAC,EAAE,OAAO,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,YAAY,CAAC,EAAE,CAAC,EACd,EAAE,EACF,WAAW,EACX,KAAK,GACN,EAAE;QACD,EAAE,EAAE,OAAO,CAAC;QACZ,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,MAAM,CAAC;KACf,KAAK,IAAI,CAAC;IACX,MAAM,EAAE,UAAU,CAAC;CACpB;;AAiHD,wBAAuC"}
@@ -1,2 +1,4 @@
1
- export * from './VideoPlayer';
1
+ export * from './VideoPlayer/store';
2
+ export * from './VideoPlayer/utils';
3
+ export { default as VideoPlayer } from './VideoPlayer';
2
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC"}
package/package.json CHANGED
@@ -1,65 +1,74 @@
1
1
  {
2
2
  "name": "@zezosoft/zezo-ott-react-native-video-player",
3
- "version": "1.0.1",
4
- "description": "React Native OTT Video Player for Android & iOS. Supports playlists, seasons, auto-next playback, subtitles, theming, analytics, fullscreen mode, and custom controls. 🚀 Powered by ZezoSoft.",
3
+ "version": "1.0.2",
4
+ "description": "Production-ready React Native OTT video player library for Android & iOS. Features: playlists, seasons, auto-next playback, subtitles (SRT/VTT), custom theming, analytics tracking, fullscreen mode, gesture controls, ads player (pre-roll/mid-roll/post-roll), TypeScript support, and centralized state management. Perfect for streaming apps, video platforms, and OTT services.",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
7
7
  "exports": {
8
8
  ".": {
9
- "source": "./src/index.ts",
9
+ "source": "./src/index.tsx",
10
10
  "types": "./lib/typescript/src/index.d.ts",
11
11
  "default": "./lib/module/index.js"
12
12
  },
13
13
  "./package.json": "./package.json"
14
14
  },
15
15
  "files": [
16
- "src",
17
- "lib",
16
+ "*.podspec",
18
17
  "android",
19
- "ios",
20
18
  "cpp",
21
- "*.podspec",
19
+ "ios",
20
+ "lib",
22
21
  "react-native.config.js",
23
- "!ios/build",
22
+ "src",
24
23
  "!android/build",
25
24
  "!android/gradle",
26
25
  "!android/gradlew",
27
26
  "!android/gradlew.bat",
28
27
  "!android/local.properties",
29
- "!**/__tests__",
28
+ "!ios/build",
30
29
  "!**/__fixtures__",
31
30
  "!**/__mocks__",
31
+ "!**/__tests__",
32
32
  "!**/.*"
33
33
  ],
34
34
  "scripts": {
35
+ "clean": "del-cli lib",
35
36
  "example": "yarn workspace @zezosoft/zezo-ott-react-native-video-player-example",
36
- "test": "jest",
37
- "typecheck": "tsc",
38
37
  "lint": "eslint \"**/*.{js,ts,tsx}\"",
39
- "clean": "del-cli lib",
40
38
  "prepare": "bob build",
41
39
  "release": "release-it --only-version",
42
- "watch": "nodemon --watch src --ext ts,tsx,js --delay 500ms --exec \"yarn clean && yarn prepare && yalc push\""
40
+ "test": "jest",
41
+ "typecheck": "tsc"
43
42
  },
44
43
  "keywords": [
45
- "react-native",
46
- "ios",
44
+ "analytics",
47
45
  "android",
48
- "video-player",
49
- "react-native-video",
50
- "react-native-video-player",
46
+ "auto-next",
47
+ "custom-video-player",
48
+ "fullscreen-video",
49
+ "ios",
50
+ "media-player",
51
+ "mobile-video",
51
52
  "ott",
52
53
  "ott-player",
53
- "react-native-ott",
54
+ "ott-platform",
54
55
  "playlist",
56
+ "react-native",
57
+ "react-native-component",
58
+ "react-native-library",
59
+ "react-native-ott",
60
+ "react-native-video",
61
+ "react-native-video-player",
55
62
  "season-navigation",
56
- "fullscreen-video",
57
- "custom-video-player",
63
+ "streaming",
64
+ "streaming-player",
58
65
  "subtitles",
59
- "analytics",
60
- "auto-next",
61
- "react-native-library",
62
- "react-native-component"
66
+ "srt-subtitles",
67
+ "typescript",
68
+ "video-analytics",
69
+ "video-player",
70
+ "video-streaming",
71
+ "zustand"
63
72
  ],
64
73
  "repository": {
65
74
  "type": "git",
@@ -74,48 +83,93 @@
74
83
  "publishConfig": {
75
84
  "registry": "https://registry.npmjs.org/"
76
85
  },
86
+ "packageManager": "yarn@4.11.0",
87
+ "workspaces": [
88
+ "example"
89
+ ],
90
+ "peerDependencies": {
91
+ "react": "*",
92
+ "react-native": "*",
93
+ "react-native-fast-image": "*",
94
+ "react-native-gesture-handler": "*",
95
+ "react-native-linear-gradient": "*",
96
+ "react-native-reanimated": "*",
97
+ "react-native-safe-area-context": "*",
98
+ "react-native-svg": "*",
99
+ "react-native-video": "*"
100
+ },
101
+ "dependencies": {
102
+ "@react-native-community/slider": "^4.5.7",
103
+ "axios": "^1.11.0",
104
+ "lucide-react-native": "^0.539.0",
105
+ "react-native-awesome-slider": "^2.9.0",
106
+ "react-native-mmkv": "^3.3.0",
107
+ "react-native-orientation-locker": "1.6.0",
108
+ "react-native-popup-menu": "^0.18.0",
109
+ "react-native-responsive-fontsize": "^0.5.1",
110
+ "react-native-size-matters": "^0.4.2",
111
+ "react-native-subtitles": "^5.0.5",
112
+ "react-native-system-navigation-bar": "^2.6.4",
113
+ "zustand": "^5.0.7"
114
+ },
77
115
  "devDependencies": {
78
- "@commitlint/config-conventional": "^19.6.0",
79
- "@eslint/compat": "^1.2.7",
80
- "@eslint/eslintrc": "^3.3.0",
81
- "@eslint/js": "^9.22.0",
116
+ "@commitlint/config-conventional": "^19.8.1",
117
+ "@eslint/compat": "^1.3.2",
118
+ "@eslint/eslintrc": "^3.3.1",
119
+ "@eslint/js": "^9.35.0",
82
120
  "@evilmartians/lefthook": "^1.5.0",
83
- "@react-native/babel-preset": "0.78.2",
84
- "@react-native/eslint-config": "^0.78.0",
85
- "@release-it/conventional-changelog": "^9.0.2",
86
- "@types/jest": "^29.5.5",
87
- "@types/react": "^19.0.12",
88
- "commitlint": "^19.6.1",
89
- "del-cli": "^5.1.0",
90
- "eslint": "^9.22.0",
91
- "eslint-config-prettier": "^10.1.1",
92
- "eslint-plugin-prettier": "^5.2.3",
121
+ "@react-native/babel-preset": "0.81.1",
122
+ "@react-native/eslint-config": "^0.81.1",
123
+ "@release-it/conventional-changelog": "^10.0.1",
124
+ "@types/jest": "^29.5.14",
125
+ "@types/react": "^19.1.12",
126
+ "commitlint": "^19.8.1",
127
+ "del-cli": "^6.0.0",
128
+ "eslint": "^9.35.0",
129
+ "eslint-config-prettier": "^10.1.8",
130
+ "eslint-plugin-prettier": "^5.5.4",
93
131
  "jest": "^29.7.0",
132
+ "lefthook": "^2.0.3",
94
133
  "nodemon": "^3.1.10",
95
- "prettier": "^3.0.3",
96
- "react": "19.0.0",
97
- "react-native": "0.79.6",
98
- "react-native-builder-bob": "^0.40.13",
134
+ "prettier": "^2.8.8",
135
+ "react": "19.1.0",
136
+ "react-native": "0.81.5",
137
+ "react-native-builder-bob": "^0.40.15",
138
+ "react-native-fast-image": "^8.6.3",
139
+ "react-native-gesture-handler": "^2.28.0",
140
+ "react-native-linear-gradient": "^2.8.3",
99
141
  "react-native-reanimated": "^4.1.0",
100
- "react-native-video": "^6.16.1",
101
- "release-it": "^17.10.0",
102
- "typescript": "^5.8.3"
142
+ "react-native-safe-area-context": "^5.6.1",
143
+ "react-native-svg": "^15.14.0",
144
+ "react-native-video": "^6.17.0",
145
+ "release-it": "^19.0.4",
146
+ "typescript": "^5.9.2"
103
147
  },
104
- "peerDependencies": {
105
- "react": "*",
106
- "react-native": "*",
107
- "react-native-reanimated": "*"
108
- },
109
- "workspaces": [
110
- "example"
111
- ],
112
- "jest": {
113
- "preset": "react-native",
114
- "modulePathIgnorePatterns": [
115
- "<rootDir>/example/node_modules",
116
- "<rootDir>/lib/"
148
+ "react-native-builder-bob": {
149
+ "source": "src",
150
+ "output": "lib",
151
+ "targets": [
152
+ [
153
+ "module",
154
+ {
155
+ "esm": true
156
+ }
157
+ ],
158
+ [
159
+ "typescript",
160
+ {
161
+ "project": "tsconfig.build.json"
162
+ }
163
+ ]
117
164
  ]
118
165
  },
166
+ "prettier": {
167
+ "quoteProps": "consistent",
168
+ "singleQuote": true,
169
+ "tabWidth": 2,
170
+ "trailingComma": "es5",
171
+ "useTabs": false
172
+ },
119
173
  "commitlint": {
120
174
  "extends": [
121
175
  "@commitlint/config-conventional"
@@ -140,52 +194,22 @@
140
194
  }
141
195
  }
142
196
  },
143
- "prettier": {
144
- "quoteProps": "consistent",
145
- "singleQuote": true,
146
- "tabWidth": 2,
147
- "trailingComma": "es5",
148
- "useTabs": false
149
- },
150
- "react-native-builder-bob": {
151
- "source": "src",
152
- "output": "lib",
153
- "targets": [
154
- [
155
- "module",
156
- {
157
- "esm": true
158
- }
159
- ],
160
- [
161
- "typescript",
162
- {
163
- "project": "tsconfig.build.json"
164
- }
165
- ]
197
+ "jest": {
198
+ "preset": "react-native",
199
+ "modulePathIgnorePatterns": [
200
+ "<rootDir>/example/node_modules",
201
+ "<rootDir>/lib/"
166
202
  ]
167
203
  },
168
204
  "create-react-native-library": {
169
205
  "languages": "js",
170
206
  "type": "library",
171
- "version": "0.52.0"
172
- },
173
- "dependencies": {
174
- "@react-native-community/slider": "^4.5.7",
175
- "axios": "^1.11.0",
176
- "lucide-react-native": "^0.539.0",
177
- "react-native-awesome-slider": "^2.9.0",
178
- "react-native-fast-image": "^8.6.3",
179
- "react-native-gesture-handler": "^2.28.0",
180
- "react-native-mmkv": "^3.3.0",
181
- "react-native-orientation-locker": "1.6.0",
182
- "react-native-popup-menu": "^0.18.0",
183
- "react-native-responsive-fontsize": "^0.5.1",
184
- "react-native-safe-area-context": "^5.6.0",
185
- "react-native-size-matters": "^0.4.2",
186
- "react-native-subtitles": "^5.0.5",
187
- "react-native-svg": "^15.12.1",
188
- "react-native-system-navigation-bar": "^2.6.4",
189
- "zustand": "^5.0.7"
207
+ "tools": [
208
+ "eslint",
209
+ "lefthook",
210
+ "release-it",
211
+ "jest"
212
+ ],
213
+ "version": "0.55.0"
190
214
  }
191
215
  }