spactureai-mobile-player 1.0.30

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 (492) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +474 -0
  3. package/UnifiedPlayer.podspec +51 -0
  4. package/android/CMakeLists.txt +29 -0
  5. package/android/build.gradle +249 -0
  6. package/android/fix-prefab.gradle +51 -0
  7. package/android/gradle.properties +15 -0
  8. package/android/src/main/AndroidManifest.xml +10 -0
  9. package/android/src/main/AndroidManifestNew.xml +9 -0
  10. package/android/src/main/cpp/cpp-adapter.cpp +9 -0
  11. package/android/src/main/java/com/unifiedplayer/core/AudioFocusManager.kt +233 -0
  12. package/android/src/main/java/com/unifiedplayer/core/VideoError.kt +105 -0
  13. package/android/src/main/java/com/unifiedplayer/core/VideoManager.kt +292 -0
  14. package/android/src/main/java/com/unifiedplayer/core/extensions/ResizeMode+AspectRatioFrameLayout.kt +20 -0
  15. package/android/src/main/java/com/unifiedplayer/core/extensions/SubtitleType+toString.kt +14 -0
  16. package/android/src/main/java/com/unifiedplayer/core/extensions/VideoPlaybackService+ServiceManagment.kt +59 -0
  17. package/android/src/main/java/com/unifiedplayer/core/fragments/FullscreenVideoFragment.kt +346 -0
  18. package/android/src/main/java/com/unifiedplayer/core/fragments/PictureInPictureHelperFragment.kt +85 -0
  19. package/android/src/main/java/com/unifiedplayer/core/player/DRMManagerSpec.kt +23 -0
  20. package/android/src/main/java/com/unifiedplayer/core/player/DataSourceFactoryUtils.kt +93 -0
  21. package/android/src/main/java/com/unifiedplayer/core/player/MediaItemUtils.kt +141 -0
  22. package/android/src/main/java/com/unifiedplayer/core/player/MediaSourceUtils.kt +134 -0
  23. package/android/src/main/java/com/unifiedplayer/core/player/OnAudioFocusChangedListener.kt +25 -0
  24. package/android/src/main/java/com/unifiedplayer/core/plugins/PluginsRegistry.kt +223 -0
  25. package/android/src/main/java/com/unifiedplayer/core/plugins/ReactNativeVideoPlugin.kt +173 -0
  26. package/android/src/main/java/com/unifiedplayer/core/recivers/AudioBecomingNoisyReceiver.kt +38 -0
  27. package/android/src/main/java/com/unifiedplayer/core/services/playback/CustomMediaNotificationProvider.kt +151 -0
  28. package/android/src/main/java/com/unifiedplayer/core/services/playback/VideoPlaybackCallback.kt +96 -0
  29. package/android/src/main/java/com/unifiedplayer/core/services/playback/VideoPlaybackService.kt +219 -0
  30. package/android/src/main/java/com/unifiedplayer/core/services/playback/VideoPlaybackServiceConnection.kt +59 -0
  31. package/android/src/main/java/com/unifiedplayer/core/utils/PictureInPictureUtils.kt +153 -0
  32. package/android/src/main/java/com/unifiedplayer/core/utils/SmallVideoPlayerOptimizer.kt +157 -0
  33. package/android/src/main/java/com/unifiedplayer/core/utils/SourceLoader.kt +48 -0
  34. package/android/src/main/java/com/unifiedplayer/core/utils/TextTrackUtils.kt +175 -0
  35. package/android/src/main/java/com/unifiedplayer/core/utils/Threading.kt +75 -0
  36. package/android/src/main/java/com/unifiedplayer/core/utils/VideoFileHelper.kt +51 -0
  37. package/android/src/main/java/com/unifiedplayer/core/utils/VideoInformationUtils.kt +67 -0
  38. package/android/src/main/java/com/unifiedplayer/core/utils/VideoOrientationUtils.kt +30 -0
  39. package/android/src/main/java/com/unifiedplayer/hybrids/videoplayer/HybridVideoPlayer.kt +732 -0
  40. package/android/src/main/java/com/unifiedplayer/hybrids/videoplayer/HybridVideoPlayerFactory.kt +16 -0
  41. package/android/src/main/java/com/unifiedplayer/hybrids/videoplayereventemitter/HybridVideoPlayerEventEmitter.kt +180 -0
  42. package/android/src/main/java/com/unifiedplayer/hybrids/videoplayersource/HybridVideoPlayerSource.kt +67 -0
  43. package/android/src/main/java/com/unifiedplayer/hybrids/videoplayersource/HybridVideoPlayerSourceFactory.kt +58 -0
  44. package/android/src/main/java/com/unifiedplayer/hybrids/videoviewviewmanager/HybridVideoViewViewManager.kt +187 -0
  45. package/android/src/main/java/com/unifiedplayer/hybrids/videoviewviewmanager/HybridVideoViewViewManagerFactory.kt +13 -0
  46. package/android/src/main/java/com/unifiedplayer/react/VideoPackage.kt +25 -0
  47. package/android/src/main/java/com/unifiedplayer/react/VideoViewViewManager.kt +78 -0
  48. package/android/src/main/java/com/unifiedplayer/view/VideoView.kt +565 -0
  49. package/android/src/main/res/layout/custom_player_control_view.xml +82 -0
  50. package/android/src/main/res/layout/player_view_surface.xml +13 -0
  51. package/android/src/main/res/layout/player_view_texture.xml +13 -0
  52. package/android/src/paper/java/com/facebook/react/viewmanagers/RNCVideoViewManagerDelegate.java +32 -0
  53. package/android/src/paper/java/com/facebook/react/viewmanagers/RNCVideoViewManagerInterface.java +16 -0
  54. package/android/src/stubs/dash/androidx/media3/exoplayer/dash/DashMediaSource.kt +35 -0
  55. package/android/src/stubs/dash/androidx/media3/exoplayer/dash/DashUtil.kt +11 -0
  56. package/android/src/stubs/dash/androidx/media3/exoplayer/dash/manifest/AdaptationSet.kt +9 -0
  57. package/android/src/stubs/dash/androidx/media3/exoplayer/dash/manifest/DashManifest.kt +10 -0
  58. package/android/src/stubs/dash/androidx/media3/exoplayer/dash/manifest/Period.kt +7 -0
  59. package/android/src/stubs/dash/androidx/media3/exoplayer/dash/manifest/Representation.kt +8 -0
  60. package/android/src/stubs/hls/androidx/media3/exoplayer/hls/HlsMediaSource.kt +33 -0
  61. package/ios/RNCVideoViewManager.mm +39 -0
  62. package/ios/Video-Bridging-Header.h +2 -0
  63. package/ios/core/HLSAuthProxy.swift +428 -0
  64. package/ios/core/VideoError.swift +164 -0
  65. package/ios/core/VideoManager.swift +219 -0
  66. package/ios/hybrids/VideoPlayer/HybridVideoPlayer.swift +697 -0
  67. package/ios/hybrids/VideoPlayer/HybridVideoPlayerFactory.swift +15 -0
  68. package/ios/hybrids/VideoPlayer/VLCPlaybackDelegates.swift +58 -0
  69. package/ios/hybrids/VideoPlayerEmitter/HybridVideoPlayerEventEmitter.swift +203 -0
  70. package/ios/hybrids/VideoPlayerSource/HybridVideoPlayerSource.swift +55 -0
  71. package/ios/hybrids/VideoPlayerSource/HybridVideoPlayerSourceFactory.swift +29 -0
  72. package/ios/hybrids/VideoViewViewManager/HybridVideoViewViewManager.swift +266 -0
  73. package/ios/hybrids/VideoViewViewManager/HybridVideoViewViewManagerFactory.swift +14 -0
  74. package/ios/view/VideoComponentView.swift +196 -0
  75. package/ios/view/VideoComponentViewObserver.swift +48 -0
  76. package/lib/module/core/VideoPlayer.js +287 -0
  77. package/lib/module/core/VideoPlayer.js.map +1 -0
  78. package/lib/module/core/VideoPlayerEvents.js +84 -0
  79. package/lib/module/core/VideoPlayerEvents.js.map +1 -0
  80. package/lib/module/core/hooks/useEvent.js +19 -0
  81. package/lib/module/core/hooks/useEvent.js.map +1 -0
  82. package/lib/module/core/hooks/useManagedInstance.js +75 -0
  83. package/lib/module/core/hooks/useManagedInstance.js.map +1 -0
  84. package/lib/module/core/hooks/useVideoPlayer.js +57 -0
  85. package/lib/module/core/hooks/useVideoPlayer.js.map +1 -0
  86. package/lib/module/core/types/BufferConfig.js +2 -0
  87. package/lib/module/core/types/BufferConfig.js.map +1 -0
  88. package/lib/module/core/types/DrmParams.js +2 -0
  89. package/lib/module/core/types/DrmParams.js.map +1 -0
  90. package/lib/module/core/types/Events.js +10 -0
  91. package/lib/module/core/types/Events.js.map +1 -0
  92. package/lib/module/core/types/IgnoreSilentSwitchMode.js +2 -0
  93. package/lib/module/core/types/IgnoreSilentSwitchMode.js.map +1 -0
  94. package/lib/module/core/types/MixAudioMode.js +2 -0
  95. package/lib/module/core/types/MixAudioMode.js.map +1 -0
  96. package/lib/module/core/types/ResizeMode.js +2 -0
  97. package/lib/module/core/types/ResizeMode.js.map +1 -0
  98. package/lib/module/core/types/TextTrack.js +2 -0
  99. package/lib/module/core/types/TextTrack.js.map +1 -0
  100. package/lib/module/core/types/Utils.js +2 -0
  101. package/lib/module/core/types/Utils.js.map +1 -0
  102. package/lib/module/core/types/VideoConfig.js +4 -0
  103. package/lib/module/core/types/VideoConfig.js.map +1 -0
  104. package/lib/module/core/types/VideoError.js +100 -0
  105. package/lib/module/core/types/VideoError.js.map +1 -0
  106. package/lib/module/core/types/VideoInformation.js +4 -0
  107. package/lib/module/core/types/VideoInformation.js.map +1 -0
  108. package/lib/module/core/types/VideoOrientation.js +2 -0
  109. package/lib/module/core/types/VideoOrientation.js.map +1 -0
  110. package/lib/module/core/types/VideoPlayerBase.js +4 -0
  111. package/lib/module/core/types/VideoPlayerBase.js.map +1 -0
  112. package/lib/module/core/types/VideoPlayerSourceBase.js +4 -0
  113. package/lib/module/core/types/VideoPlayerSourceBase.js.map +1 -0
  114. package/lib/module/core/types/VideoPlayerStatus.js +2 -0
  115. package/lib/module/core/types/VideoPlayerStatus.js.map +1 -0
  116. package/lib/module/core/utils/playerFactory.js +25 -0
  117. package/lib/module/core/utils/playerFactory.js.map +1 -0
  118. package/lib/module/core/utils/sourceFactory.js +138 -0
  119. package/lib/module/core/utils/sourceFactory.js.map +1 -0
  120. package/lib/module/core/video-view/NativeVideoView.tsx +18 -0
  121. package/lib/module/core/video-view/VideoView.js +261 -0
  122. package/lib/module/core/video-view/VideoView.js.map +1 -0
  123. package/lib/module/expo-plugins/@types.js +2 -0
  124. package/lib/module/expo-plugins/@types.js.map +1 -0
  125. package/lib/module/expo-plugins/getPackageInfo.js +23 -0
  126. package/lib/module/expo-plugins/getPackageInfo.js.map +1 -0
  127. package/lib/module/expo-plugins/withAndroidExtensions.js +35 -0
  128. package/lib/module/expo-plugins/withAndroidExtensions.js.map +1 -0
  129. package/lib/module/expo-plugins/withAndroidNotificationControls.js +29 -0
  130. package/lib/module/expo-plugins/withAndroidNotificationControls.js.map +1 -0
  131. package/lib/module/expo-plugins/withAndroidPictureInPicture.js +18 -0
  132. package/lib/module/expo-plugins/withAndroidPictureInPicture.js.map +1 -0
  133. package/lib/module/expo-plugins/withBackgroundAudio.js +22 -0
  134. package/lib/module/expo-plugins/withBackgroundAudio.js.map +1 -0
  135. package/lib/module/expo-plugins/withReactNativeVideo.js +27 -0
  136. package/lib/module/expo-plugins/withReactNativeVideo.js.map +1 -0
  137. package/lib/module/expo-plugins/writeToPodfile.js +53 -0
  138. package/lib/module/expo-plugins/writeToPodfile.js.map +1 -0
  139. package/lib/module/index.js +8 -0
  140. package/lib/module/index.js.map +1 -0
  141. package/lib/module/package.json +1 -0
  142. package/lib/module/spec/fabric/VideoViewNativeComponent.ts +17 -0
  143. package/lib/module/spec/nitro/VideoPlayer.nitro.js +4 -0
  144. package/lib/module/spec/nitro/VideoPlayer.nitro.js.map +1 -0
  145. package/lib/module/spec/nitro/VideoPlayerEventEmitter.nitro.js +4 -0
  146. package/lib/module/spec/nitro/VideoPlayerEventEmitter.nitro.js.map +1 -0
  147. package/lib/module/spec/nitro/VideoPlayerSource.nitro.js +4 -0
  148. package/lib/module/spec/nitro/VideoPlayerSource.nitro.js.map +1 -0
  149. package/lib/module/spec/nitro/VideoViewViewManager.nitro.js +4 -0
  150. package/lib/module/spec/nitro/VideoViewViewManager.nitro.js.map +1 -0
  151. package/lib/typescript/drm-plugin/src/PluginManager.nitro.d.ts +10 -0
  152. package/lib/typescript/drm-plugin/src/PluginManager.nitro.d.ts.map +1 -0
  153. package/lib/typescript/drm-plugin/src/index.d.ts +4 -0
  154. package/lib/typescript/drm-plugin/src/index.d.ts.map +1 -0
  155. package/lib/typescript/package.json +1 -0
  156. package/lib/typescript/src/core/VideoPlayer.d.ts +88 -0
  157. package/lib/typescript/src/core/VideoPlayer.d.ts.map +1 -0
  158. package/lib/typescript/src/core/VideoPlayerEvents.d.ts +22 -0
  159. package/lib/typescript/src/core/VideoPlayerEvents.d.ts.map +1 -0
  160. package/lib/typescript/src/core/hooks/useEvent.d.ts +11 -0
  161. package/lib/typescript/src/core/hooks/useEvent.d.ts.map +1 -0
  162. package/lib/typescript/src/core/hooks/useManagedInstance.d.ts +19 -0
  163. package/lib/typescript/src/core/hooks/useManagedInstance.d.ts.map +1 -0
  164. package/lib/typescript/src/core/hooks/useVideoPlayer.d.ts +16 -0
  165. package/lib/typescript/src/core/hooks/useVideoPlayer.d.ts.map +1 -0
  166. package/lib/typescript/src/core/types/BufferConfig.d.ts +97 -0
  167. package/lib/typescript/src/core/types/BufferConfig.d.ts.map +1 -0
  168. package/lib/typescript/src/core/types/DrmParams.d.ts +64 -0
  169. package/lib/typescript/src/core/types/DrmParams.d.ts.map +1 -0
  170. package/lib/typescript/src/core/types/Events.d.ts +224 -0
  171. package/lib/typescript/src/core/types/Events.d.ts.map +1 -0
  172. package/lib/typescript/src/core/types/IgnoreSilentSwitchMode.d.ts +2 -0
  173. package/lib/typescript/src/core/types/IgnoreSilentSwitchMode.d.ts.map +1 -0
  174. package/lib/typescript/src/core/types/MixAudioMode.d.ts +2 -0
  175. package/lib/typescript/src/core/types/MixAudioMode.d.ts.map +1 -0
  176. package/lib/typescript/src/core/types/ResizeMode.d.ts +10 -0
  177. package/lib/typescript/src/core/types/ResizeMode.d.ts.map +1 -0
  178. package/lib/typescript/src/core/types/TextTrack.d.ts +20 -0
  179. package/lib/typescript/src/core/types/TextTrack.d.ts.map +1 -0
  180. package/lib/typescript/src/core/types/Utils.d.ts +2 -0
  181. package/lib/typescript/src/core/types/Utils.d.ts.map +1 -0
  182. package/lib/typescript/src/core/types/VideoConfig.d.ts +138 -0
  183. package/lib/typescript/src/core/types/VideoConfig.d.ts.map +1 -0
  184. package/lib/typescript/src/core/types/VideoError.d.ts +31 -0
  185. package/lib/typescript/src/core/types/VideoError.d.ts.map +1 -0
  186. package/lib/typescript/src/core/types/VideoInformation.d.ts +38 -0
  187. package/lib/typescript/src/core/types/VideoInformation.d.ts.map +1 -0
  188. package/lib/typescript/src/core/types/VideoOrientation.d.ts +2 -0
  189. package/lib/typescript/src/core/types/VideoOrientation.d.ts.map +1 -0
  190. package/lib/typescript/src/core/types/VideoPlayerBase.d.ts +155 -0
  191. package/lib/typescript/src/core/types/VideoPlayerBase.d.ts.map +1 -0
  192. package/lib/typescript/src/core/types/VideoPlayerSourceBase.d.ts +17 -0
  193. package/lib/typescript/src/core/types/VideoPlayerSourceBase.d.ts.map +1 -0
  194. package/lib/typescript/src/core/types/VideoPlayerStatus.d.ts +9 -0
  195. package/lib/typescript/src/core/types/VideoPlayerStatus.d.ts.map +1 -0
  196. package/lib/typescript/src/core/utils/playerFactory.d.ts +12 -0
  197. package/lib/typescript/src/core/utils/playerFactory.d.ts.map +1 -0
  198. package/lib/typescript/src/core/utils/sourceFactory.d.ts +29 -0
  199. package/lib/typescript/src/core/utils/sourceFactory.d.ts.map +1 -0
  200. package/lib/typescript/src/core/video-view/NativeVideoView.d.ts +2 -0
  201. package/lib/typescript/src/core/video-view/NativeVideoView.d.ts.map +1 -0
  202. package/lib/typescript/src/core/video-view/VideoView.d.ts +104 -0
  203. package/lib/typescript/src/core/video-view/VideoView.d.ts.map +1 -0
  204. package/lib/typescript/src/index.d.ts +13 -0
  205. package/lib/typescript/src/index.d.ts.map +1 -0
  206. package/lib/typescript/src/spec/fabric/VideoViewNativeComponent.d.ts +13 -0
  207. package/lib/typescript/src/spec/fabric/VideoViewNativeComponent.d.ts.map +1 -0
  208. package/lib/typescript/src/spec/nitro/VideoPlayer.nitro.d.ts +55 -0
  209. package/lib/typescript/src/spec/nitro/VideoPlayer.nitro.d.ts.map +1 -0
  210. package/lib/typescript/src/spec/nitro/VideoPlayerEventEmitter.nitro.d.ts +150 -0
  211. package/lib/typescript/src/spec/nitro/VideoPlayerEventEmitter.nitro.d.ts.map +1 -0
  212. package/lib/typescript/src/spec/nitro/VideoPlayerSource.nitro.d.ts +21 -0
  213. package/lib/typescript/src/spec/nitro/VideoPlayerSource.nitro.d.ts.map +1 -0
  214. package/lib/typescript/src/spec/nitro/VideoViewViewManager.nitro.d.ts +75 -0
  215. package/lib/typescript/src/spec/nitro/VideoViewViewManager.nitro.d.ts.map +1 -0
  216. package/nitro.json +47 -0
  217. package/nitrogen/generated/android/UnifiedPlayer+autolinking.cmake +95 -0
  218. package/nitrogen/generated/android/UnifiedPlayer+autolinking.gradle +27 -0
  219. package/nitrogen/generated/android/UnifiedPlayerOnLoad.cpp +122 -0
  220. package/nitrogen/generated/android/UnifiedPlayerOnLoad.hpp +34 -0
  221. package/nitrogen/generated/android/c++/JBandwidthData.hpp +65 -0
  222. package/nitrogen/generated/android/c++/JBufferConfig.hpp +101 -0
  223. package/nitrogen/generated/android/c++/JCustomVideoMetadata.hpp +74 -0
  224. package/nitrogen/generated/android/c++/JFunc_std__shared_ptr_Promise_std__shared_ptr_Promise_std__string_____OnGetLicensePayload.hpp +126 -0
  225. package/nitrogen/generated/android/c++/JFunc_void.hpp +75 -0
  226. package/nitrogen/generated/android/c++/JFunc_void_BandwidthData.hpp +78 -0
  227. package/nitrogen/generated/android/c++/JFunc_void_TimedMetadata.hpp +81 -0
  228. package/nitrogen/generated/android/c++/JFunc_void_VideoPlayerStatus.hpp +77 -0
  229. package/nitrogen/generated/android/c++/JFunc_void_bool.hpp +75 -0
  230. package/nitrogen/generated/android/c++/JFunc_void_double.hpp +75 -0
  231. package/nitrogen/generated/android/c++/JFunc_void_onLoadData.hpp +79 -0
  232. package/nitrogen/generated/android/c++/JFunc_void_onLoadStartData.hpp +82 -0
  233. package/nitrogen/generated/android/c++/JFunc_void_onPlaybackStateChangeData.hpp +77 -0
  234. package/nitrogen/generated/android/c++/JFunc_void_onProgressData.hpp +77 -0
  235. package/nitrogen/generated/android/c++/JFunc_void_onVolumeChangeData.hpp +77 -0
  236. package/nitrogen/generated/android/c++/JFunc_void_std__optional_std__variant_nitro__NullType__TextTrack__.hpp +83 -0
  237. package/nitrogen/generated/android/c++/JFunc_void_std__vector_std__string_.hpp +95 -0
  238. package/nitrogen/generated/android/c++/JHybridVideoPlayerEventEmitterSpec.cpp +224 -0
  239. package/nitrogen/generated/android/c++/JHybridVideoPlayerEventEmitterSpec.hpp +82 -0
  240. package/nitrogen/generated/android/c++/JHybridVideoPlayerFactorySpec.cpp +60 -0
  241. package/nitrogen/generated/android/c++/JHybridVideoPlayerFactorySpec.hpp +63 -0
  242. package/nitrogen/generated/android/c++/JHybridVideoPlayerSourceFactorySpec.cpp +106 -0
  243. package/nitrogen/generated/android/c++/JHybridVideoPlayerSourceFactorySpec.hpp +64 -0
  244. package/nitrogen/generated/android/c++/JHybridVideoPlayerSourceSpec.cpp +124 -0
  245. package/nitrogen/generated/android/c++/JHybridVideoPlayerSourceSpec.hpp +64 -0
  246. package/nitrogen/generated/android/c++/JHybridVideoPlayerSpec.cpp +300 -0
  247. package/nitrogen/generated/android/c++/JHybridVideoPlayerSpec.hpp +98 -0
  248. package/nitrogen/generated/android/c++/JHybridVideoViewViewManagerFactorySpec.cpp +56 -0
  249. package/nitrogen/generated/android/c++/JHybridVideoViewViewManagerFactorySpec.hpp +63 -0
  250. package/nitrogen/generated/android/c++/JHybridVideoViewViewManagerSpec.cpp +185 -0
  251. package/nitrogen/generated/android/c++/JHybridVideoViewViewManagerSpec.hpp +87 -0
  252. package/nitrogen/generated/android/c++/JIgnoreSilentSwitchMode.hpp +61 -0
  253. package/nitrogen/generated/android/c++/JListenerSubscription.hpp +67 -0
  254. package/nitrogen/generated/android/c++/JLivePlaybackParams.hpp +73 -0
  255. package/nitrogen/generated/android/c++/JMixAudioMode.hpp +64 -0
  256. package/nitrogen/generated/android/c++/JNativeDrmParams.hpp +111 -0
  257. package/nitrogen/generated/android/c++/JNativeExternalSubtitle.hpp +71 -0
  258. package/nitrogen/generated/android/c++/JNativeVideoConfig.hpp +136 -0
  259. package/nitrogen/generated/android/c++/JOnGetLicensePayload.hpp +69 -0
  260. package/nitrogen/generated/android/c++/JResizeMode.hpp +64 -0
  261. package/nitrogen/generated/android/c++/JResolution.hpp +61 -0
  262. package/nitrogen/generated/android/c++/JSourceType.hpp +58 -0
  263. package/nitrogen/generated/android/c++/JSubtitleType.hpp +67 -0
  264. package/nitrogen/generated/android/c++/JSurfaceType.hpp +58 -0
  265. package/nitrogen/generated/android/c++/JTextTrack.hpp +70 -0
  266. package/nitrogen/generated/android/c++/JTimedMetadata.hpp +78 -0
  267. package/nitrogen/generated/android/c++/JTimedMetadataObject.hpp +61 -0
  268. package/nitrogen/generated/android/c++/JVariant_NullType_HybridVideoPlayerSourceSpec.cpp +26 -0
  269. package/nitrogen/generated/android/c++/JVariant_NullType_HybridVideoPlayerSourceSpec.hpp +72 -0
  270. package/nitrogen/generated/android/c++/JVariant_NullType_TextTrack.cpp +26 -0
  271. package/nitrogen/generated/android/c++/JVariant_NullType_TextTrack.hpp +73 -0
  272. package/nitrogen/generated/android/c++/JVideoInformation.hpp +86 -0
  273. package/nitrogen/generated/android/c++/JVideoOrientation.hpp +73 -0
  274. package/nitrogen/generated/android/c++/JVideoPlayerStatus.hpp +64 -0
  275. package/nitrogen/generated/android/c++/JonLoadData.hpp +74 -0
  276. package/nitrogen/generated/android/c++/JonLoadStartData.hpp +65 -0
  277. package/nitrogen/generated/android/c++/JonPlaybackStateChangeData.hpp +61 -0
  278. package/nitrogen/generated/android/c++/JonProgressData.hpp +65 -0
  279. package/nitrogen/generated/android/c++/JonVolumeChangeData.hpp +61 -0
  280. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/BandwidthData.kt +61 -0
  281. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/BufferConfig.kt +101 -0
  282. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/CustomVideoMetadata.kt +71 -0
  283. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_std__shared_ptr_Promise_std__shared_ptr_Promise_std__string_____OnGetLicensePayload.kt +80 -0
  284. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_void.kt +80 -0
  285. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_void_BandwidthData.kt +80 -0
  286. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_void_TimedMetadata.kt +80 -0
  287. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_void_VideoPlayerStatus.kt +80 -0
  288. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_void_bool.kt +80 -0
  289. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_void_double.kt +80 -0
  290. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_void_onLoadData.kt +80 -0
  291. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_void_onLoadStartData.kt +80 -0
  292. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_void_onPlaybackStateChangeData.kt +80 -0
  293. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_void_onProgressData.kt +80 -0
  294. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_void_onVolumeChangeData.kt +80 -0
  295. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_void_std__optional_std__variant_nitro__NullType__TextTrack__.kt +80 -0
  296. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_void_std__vector_std__string_.kt +80 -0
  297. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/HybridVideoPlayerEventEmitterSpec.kt +226 -0
  298. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/HybridVideoPlayerFactorySpec.kt +54 -0
  299. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/HybridVideoPlayerSourceFactorySpec.kt +58 -0
  300. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/HybridVideoPlayerSourceSpec.kt +61 -0
  301. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/HybridVideoPlayerSpec.kt +178 -0
  302. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/HybridVideoViewViewManagerFactorySpec.kt +54 -0
  303. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/HybridVideoViewViewManagerSpec.kt +168 -0
  304. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/IgnoreSilentSwitchMode.kt +24 -0
  305. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/ListenerSubscription.kt +55 -0
  306. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/LivePlaybackParams.kt +71 -0
  307. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/MixAudioMode.kt +25 -0
  308. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/NativeDrmParams.kt +85 -0
  309. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/NativeExternalSubtitle.kt +66 -0
  310. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/NativeVideoConfig.kt +81 -0
  311. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/OnGetLicensePayload.kt +66 -0
  312. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/ResizeMode.kt +25 -0
  313. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Resolution.kt +56 -0
  314. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/SourceType.kt +23 -0
  315. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/SubtitleType.kt +26 -0
  316. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/SurfaceType.kt +23 -0
  317. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/TextTrack.kt +66 -0
  318. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/TimedMetadata.kt +51 -0
  319. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/TimedMetadataObject.kt +56 -0
  320. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/UnifiedPlayerOnLoad.kt +35 -0
  321. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Variant_NullType_HybridVideoPlayerSourceSpec.kt +62 -0
  322. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Variant_NullType_TextTrack.kt +62 -0
  323. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/VideoInformation.kt +86 -0
  324. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/VideoOrientation.kt +28 -0
  325. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/VideoPlayerStatus.kt +25 -0
  326. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/onLoadData.kt +71 -0
  327. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/onLoadStartData.kt +56 -0
  328. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/onPlaybackStateChangeData.kt +56 -0
  329. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/onProgressData.kt +61 -0
  330. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/onVolumeChangeData.kt +56 -0
  331. package/nitrogen/generated/ios/UnifiedPlayer+autolinking.rb +62 -0
  332. package/nitrogen/generated/ios/UnifiedPlayer-Swift-Cxx-Bridge.cpp +280 -0
  333. package/nitrogen/generated/ios/UnifiedPlayer-Swift-Cxx-Bridge.hpp +1106 -0
  334. package/nitrogen/generated/ios/UnifiedPlayer-Swift-Cxx-Umbrella.hpp +162 -0
  335. package/nitrogen/generated/ios/UnifiedPlayerAutolinking.mm +49 -0
  336. package/nitrogen/generated/ios/UnifiedPlayerAutolinking.swift +50 -0
  337. package/nitrogen/generated/ios/c++/HybridVideoPlayerEventEmitterSpecSwift.cpp +11 -0
  338. package/nitrogen/generated/ios/c++/HybridVideoPlayerEventEmitterSpecSwift.hpp +279 -0
  339. package/nitrogen/generated/ios/c++/HybridVideoPlayerFactorySpecSwift.cpp +11 -0
  340. package/nitrogen/generated/ios/c++/HybridVideoPlayerFactorySpecSwift.hpp +87 -0
  341. package/nitrogen/generated/ios/c++/HybridVideoPlayerSourceFactorySpecSwift.cpp +11 -0
  342. package/nitrogen/generated/ios/c++/HybridVideoPlayerSourceFactorySpecSwift.hpp +125 -0
  343. package/nitrogen/generated/ios/c++/HybridVideoPlayerSourceSpecSwift.cpp +11 -0
  344. package/nitrogen/generated/ios/c++/HybridVideoPlayerSourceSpecSwift.hpp +125 -0
  345. package/nitrogen/generated/ios/c++/HybridVideoPlayerSpecSwift.cpp +11 -0
  346. package/nitrogen/generated/ios/c++/HybridVideoPlayerSpecSwift.hpp +256 -0
  347. package/nitrogen/generated/ios/c++/HybridVideoViewViewManagerFactorySpecSwift.cpp +11 -0
  348. package/nitrogen/generated/ios/c++/HybridVideoViewViewManagerFactorySpecSwift.hpp +84 -0
  349. package/nitrogen/generated/ios/c++/HybridVideoViewViewManagerSpecSwift.cpp +11 -0
  350. package/nitrogen/generated/ios/c++/HybridVideoViewViewManagerSpecSwift.hpp +217 -0
  351. package/nitrogen/generated/ios/swift/BandwidthData.swift +65 -0
  352. package/nitrogen/generated/ios/swift/BufferConfig.swift +201 -0
  353. package/nitrogen/generated/ios/swift/CustomVideoMetadata.swift +114 -0
  354. package/nitrogen/generated/ios/swift/Func_std__shared_ptr_Promise_std__shared_ptr_Promise_std__string_____OnGetLicensePayload.swift +61 -0
  355. package/nitrogen/generated/ios/swift/Func_void.swift +46 -0
  356. package/nitrogen/generated/ios/swift/Func_void_BandwidthData.swift +46 -0
  357. package/nitrogen/generated/ios/swift/Func_void_TimedMetadata.swift +46 -0
  358. package/nitrogen/generated/ios/swift/Func_void_VideoInformation.swift +46 -0
  359. package/nitrogen/generated/ios/swift/Func_void_VideoPlayerStatus.swift +46 -0
  360. package/nitrogen/generated/ios/swift/Func_void_bool.swift +46 -0
  361. package/nitrogen/generated/ios/swift/Func_void_double.swift +46 -0
  362. package/nitrogen/generated/ios/swift/Func_void_onLoadData.swift +46 -0
  363. package/nitrogen/generated/ios/swift/Func_void_onLoadStartData.swift +46 -0
  364. package/nitrogen/generated/ios/swift/Func_void_onPlaybackStateChangeData.swift +46 -0
  365. package/nitrogen/generated/ios/swift/Func_void_onProgressData.swift +46 -0
  366. package/nitrogen/generated/ios/swift/Func_void_onVolumeChangeData.swift +46 -0
  367. package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +46 -0
  368. package/nitrogen/generated/ios/swift/Func_void_std__optional_std__variant_nitro__NullType__TextTrack__.swift +65 -0
  369. package/nitrogen/generated/ios/swift/Func_void_std__shared_ptr_Promise_std__string__.swift +66 -0
  370. package/nitrogen/generated/ios/swift/Func_void_std__string.swift +46 -0
  371. package/nitrogen/generated/ios/swift/Func_void_std__vector_std__string_.swift +46 -0
  372. package/nitrogen/generated/ios/swift/HybridVideoPlayerEventEmitterSpec.swift +74 -0
  373. package/nitrogen/generated/ios/swift/HybridVideoPlayerEventEmitterSpec_cxx.swift +479 -0
  374. package/nitrogen/generated/ios/swift/HybridVideoPlayerFactorySpec.swift +55 -0
  375. package/nitrogen/generated/ios/swift/HybridVideoPlayerFactorySpec_cxx.swift +145 -0
  376. package/nitrogen/generated/ios/swift/HybridVideoPlayerSourceFactorySpec.swift +56 -0
  377. package/nitrogen/generated/ios/swift/HybridVideoPlayerSourceFactorySpec_cxx.swift +156 -0
  378. package/nitrogen/generated/ios/swift/HybridVideoPlayerSourceSpec.swift +56 -0
  379. package/nitrogen/generated/ios/swift/HybridVideoPlayerSourceSpec_cxx.swift +157 -0
  380. package/nitrogen/generated/ios/swift/HybridVideoPlayerSpec.swift +80 -0
  381. package/nitrogen/generated/ios/swift/HybridVideoPlayerSpec_cxx.swift +490 -0
  382. package/nitrogen/generated/ios/swift/HybridVideoViewViewManagerFactorySpec.swift +55 -0
  383. package/nitrogen/generated/ios/swift/HybridVideoViewViewManagerFactorySpec_cxx.swift +141 -0
  384. package/nitrogen/generated/ios/swift/HybridVideoViewViewManagerSpec.swift +72 -0
  385. package/nitrogen/generated/ios/swift/HybridVideoViewViewManagerSpec_cxx.swift +390 -0
  386. package/nitrogen/generated/ios/swift/IgnoreSilentSwitchMode.swift +44 -0
  387. package/nitrogen/generated/ios/swift/ListenerSubscription.swift +37 -0
  388. package/nitrogen/generated/ios/swift/LivePlaybackParams.swift +114 -0
  389. package/nitrogen/generated/ios/swift/MixAudioMode.swift +48 -0
  390. package/nitrogen/generated/ios/swift/NativeDrmParams.swift +193 -0
  391. package/nitrogen/generated/ios/swift/NativeExternalSubtitle.swift +44 -0
  392. package/nitrogen/generated/ios/swift/NativeVideoConfig.swift +136 -0
  393. package/nitrogen/generated/ios/swift/OnGetLicensePayload.swift +44 -0
  394. package/nitrogen/generated/ios/swift/ResizeMode.swift +48 -0
  395. package/nitrogen/generated/ios/swift/Resolution.swift +34 -0
  396. package/nitrogen/generated/ios/swift/SourceType.swift +40 -0
  397. package/nitrogen/generated/ios/swift/SubtitleType.swift +52 -0
  398. package/nitrogen/generated/ios/swift/SurfaceType.swift +40 -0
  399. package/nitrogen/generated/ios/swift/TextTrack.swift +57 -0
  400. package/nitrogen/generated/ios/swift/TimedMetadata.swift +35 -0
  401. package/nitrogen/generated/ios/swift/TimedMetadataObject.swift +34 -0
  402. package/nitrogen/generated/ios/swift/Variant_NullType_TextTrack.swift +30 -0
  403. package/nitrogen/generated/ios/swift/Variant_NullType__any_HybridVideoPlayerSourceSpec_.swift +30 -0
  404. package/nitrogen/generated/ios/swift/VideoInformation.swift +64 -0
  405. package/nitrogen/generated/ios/swift/VideoOrientation.swift +60 -0
  406. package/nitrogen/generated/ios/swift/VideoPlayerStatus.swift +48 -0
  407. package/nitrogen/generated/ios/swift/onLoadData.swift +49 -0
  408. package/nitrogen/generated/ios/swift/onLoadStartData.swift +41 -0
  409. package/nitrogen/generated/ios/swift/onPlaybackStateChangeData.swift +34 -0
  410. package/nitrogen/generated/ios/swift/onProgressData.swift +39 -0
  411. package/nitrogen/generated/ios/swift/onVolumeChangeData.swift +34 -0
  412. package/nitrogen/generated/shared/c++/BandwidthData.hpp +91 -0
  413. package/nitrogen/generated/shared/c++/BufferConfig.hpp +128 -0
  414. package/nitrogen/generated/shared/c++/CustomVideoMetadata.hpp +100 -0
  415. package/nitrogen/generated/shared/c++/HybridVideoPlayerEventEmitterSpec.cpp +40 -0
  416. package/nitrogen/generated/shared/c++/HybridVideoPlayerEventEmitterSpec.hpp +115 -0
  417. package/nitrogen/generated/shared/c++/HybridVideoPlayerFactorySpec.cpp +21 -0
  418. package/nitrogen/generated/shared/c++/HybridVideoPlayerFactorySpec.hpp +67 -0
  419. package/nitrogen/generated/shared/c++/HybridVideoPlayerSourceFactorySpec.cpp +22 -0
  420. package/nitrogen/generated/shared/c++/HybridVideoPlayerSourceFactorySpec.hpp +69 -0
  421. package/nitrogen/generated/shared/c++/HybridVideoPlayerSourceSpec.cpp +23 -0
  422. package/nitrogen/generated/shared/c++/HybridVideoPlayerSourceSpec.hpp +69 -0
  423. package/nitrogen/generated/shared/c++/HybridVideoPlayerSpec.cpp +57 -0
  424. package/nitrogen/generated/shared/c++/HybridVideoPlayerSpec.hpp +120 -0
  425. package/nitrogen/generated/shared/c++/HybridVideoViewViewManagerFactorySpec.cpp +21 -0
  426. package/nitrogen/generated/shared/c++/HybridVideoViewViewManagerFactorySpec.hpp +64 -0
  427. package/nitrogen/generated/shared/c++/HybridVideoViewViewManagerSpec.cpp +46 -0
  428. package/nitrogen/generated/shared/c++/HybridVideoViewViewManagerSpec.hpp +99 -0
  429. package/nitrogen/generated/shared/c++/IgnoreSilentSwitchMode.hpp +80 -0
  430. package/nitrogen/generated/shared/c++/ListenerSubscription.hpp +83 -0
  431. package/nitrogen/generated/shared/c++/LivePlaybackParams.hpp +99 -0
  432. package/nitrogen/generated/shared/c++/MixAudioMode.hpp +84 -0
  433. package/nitrogen/generated/shared/c++/NativeDrmParams.hpp +113 -0
  434. package/nitrogen/generated/shared/c++/NativeExternalSubtitle.hpp +97 -0
  435. package/nitrogen/generated/shared/c++/NativeVideoConfig.hpp +121 -0
  436. package/nitrogen/generated/shared/c++/OnGetLicensePayload.hpp +95 -0
  437. package/nitrogen/generated/shared/c++/ResizeMode.hpp +84 -0
  438. package/nitrogen/generated/shared/c++/Resolution.hpp +87 -0
  439. package/nitrogen/generated/shared/c++/SourceType.hpp +76 -0
  440. package/nitrogen/generated/shared/c++/SubtitleType.hpp +88 -0
  441. package/nitrogen/generated/shared/c++/SurfaceType.hpp +76 -0
  442. package/nitrogen/generated/shared/c++/TextTrack.hpp +96 -0
  443. package/nitrogen/generated/shared/c++/TimedMetadata.hpp +85 -0
  444. package/nitrogen/generated/shared/c++/TimedMetadataObject.hpp +87 -0
  445. package/nitrogen/generated/shared/c++/VideoInformation.hpp +112 -0
  446. package/nitrogen/generated/shared/c++/VideoOrientation.hpp +96 -0
  447. package/nitrogen/generated/shared/c++/VideoPlayerStatus.hpp +84 -0
  448. package/nitrogen/generated/shared/c++/onLoadData.hpp +100 -0
  449. package/nitrogen/generated/shared/c++/onLoadStartData.hpp +92 -0
  450. package/nitrogen/generated/shared/c++/onPlaybackStateChangeData.hpp +87 -0
  451. package/nitrogen/generated/shared/c++/onProgressData.hpp +91 -0
  452. package/nitrogen/generated/shared/c++/onVolumeChangeData.hpp +87 -0
  453. package/package.json +180 -0
  454. package/react-native.config.js +10 -0
  455. package/src/core/VideoPlayer.ts +357 -0
  456. package/src/core/VideoPlayerEvents.ts +146 -0
  457. package/src/core/hooks/useEvent.ts +24 -0
  458. package/src/core/hooks/useManagedInstance.ts +96 -0
  459. package/src/core/hooks/useVideoPlayer.ts +73 -0
  460. package/src/core/types/BufferConfig.ts +103 -0
  461. package/src/core/types/DrmParams.ts +65 -0
  462. package/src/core/types/Events.ts +283 -0
  463. package/src/core/types/IgnoreSilentSwitchMode.ts +1 -0
  464. package/src/core/types/MixAudioMode.ts +1 -0
  465. package/src/core/types/ResizeMode.ts +9 -0
  466. package/src/core/types/TextTrack.ts +22 -0
  467. package/src/core/types/Utils.ts +1 -0
  468. package/src/core/types/VideoConfig.ts +150 -0
  469. package/src/core/types/VideoError.ts +174 -0
  470. package/src/core/types/VideoInformation.ts +45 -0
  471. package/src/core/types/VideoOrientation.ts +8 -0
  472. package/src/core/types/VideoPlayerBase.ts +181 -0
  473. package/src/core/types/VideoPlayerSourceBase.ts +19 -0
  474. package/src/core/types/VideoPlayerStatus.ts +8 -0
  475. package/src/core/utils/playerFactory.ts +33 -0
  476. package/src/core/utils/sourceFactory.ts +171 -0
  477. package/src/core/video-view/NativeVideoView.tsx +18 -0
  478. package/src/core/video-view/VideoView.tsx +492 -0
  479. package/src/expo-plugins/@types.ts +37 -0
  480. package/src/expo-plugins/getPackageInfo.ts +23 -0
  481. package/src/expo-plugins/withAndroidExtensions.ts +46 -0
  482. package/src/expo-plugins/withAndroidNotificationControls.ts +43 -0
  483. package/src/expo-plugins/withAndroidPictureInPicture.ts +31 -0
  484. package/src/expo-plugins/withBackgroundAudio.ts +26 -0
  485. package/src/expo-plugins/withReactNativeVideo.ts +32 -0
  486. package/src/expo-plugins/writeToPodfile.ts +74 -0
  487. package/src/index.tsx +29 -0
  488. package/src/spec/fabric/VideoViewNativeComponent.ts +17 -0
  489. package/src/spec/nitro/VideoPlayer.nitro.ts +62 -0
  490. package/src/spec/nitro/VideoPlayerEventEmitter.nitro.ts +207 -0
  491. package/src/spec/nitro/VideoPlayerSource.nitro.ts +18 -0
  492. package/src/spec/nitro/VideoViewViewManager.nitro.ts +92 -0
@@ -0,0 +1,138 @@
1
+ import type { BufferConfig } from './BufferConfig';
2
+ import type { DrmParams } from './DrmParams';
3
+ export type VideoSource = number | string;
4
+ export type VideoConfig = {
5
+ /**
6
+ * The uri of the video.
7
+ * @example
8
+ * ```ts
9
+ * uri: 'https://example.com/video.mp4'
10
+ * // or
11
+ * uri: require('./assets/video.mp4')
12
+ * ```
13
+ */
14
+ uri: VideoSource;
15
+ /**
16
+ * The headers to be sent with the request.
17
+ */
18
+ headers?: Record<string, string>;
19
+ /**
20
+ * The DRM parameters to be used.
21
+ */
22
+ drm?: DrmParams;
23
+ /**
24
+ * The player buffer configuration.
25
+ */
26
+ bufferConfig?: BufferConfig;
27
+ /**
28
+ * The custom metadata to be associated with the video.
29
+ * This metadata can be used by the native player to show information about the video.
30
+ */
31
+ metadata?: CustomVideoMetadata;
32
+ /**
33
+ * The external subtitles to be used.
34
+ * @note on iOS, only WebVTT (.vtt) subtitles are supported (for HLS streams and MP4 files).
35
+ * @note on iOS, `label` can be overridden by player and there is no way to get around it.
36
+ * @example
37
+ * ```ts
38
+ * externalSubtitles: [
39
+ * {
40
+ * uri: 'https://example.com/subtitles_en.vtt',
41
+ * label: 'English',
42
+ * type: 'vtt',
43
+ * language: 'en'
44
+ * },
45
+ * {
46
+ * uri: 'https://example.com/subtitles_es.vtt',
47
+ * label: 'Español',
48
+ * type: 'vtt',
49
+ * language: 'es'
50
+ * }
51
+ * ]
52
+ * ```
53
+ */
54
+ externalSubtitles?: ExternalSubtitle[];
55
+ /**
56
+ * when the player is created, this flag will determine if native player should be initialized immediately.
57
+ * If set to true, the player will be initialized as soon as player is created
58
+ * If set to false, the player will need be initialized manually later
59
+ * @default true
60
+ */
61
+ initializeOnCreation?: boolean;
62
+ };
63
+ export interface NativeVideoConfig extends VideoConfig {
64
+ uri: string;
65
+ externalSubtitles?: NativeExternalSubtitle[];
66
+ drm?: NativeDrmParams;
67
+ }
68
+ /**
69
+ * The type of the subtitle.
70
+ * - `vtt` - WebVTT
71
+ * - `srt` - SubRip
72
+ * - `ssa` - SubStation Alpha
73
+ * - `ass` - Advanced SubStation Alpha
74
+ * - `auto` - Auto detect the subtitle type from the file extension
75
+ *
76
+ * @note `auto` is not available when uri have no extension.
77
+ */
78
+ export type SubtitleType = 'vtt' | 'srt' | 'ssa' | 'ass' | 'auto';
79
+ interface ExternalSubtitleWithInferredType {
80
+ /**
81
+ * The uri of the subtitle.
82
+ * @note the uri must end with the subtitle type.
83
+ */
84
+ uri: `${string}.${SubtitleType}`;
85
+ /**
86
+ * The label for the subtitle.
87
+ */
88
+ label: string;
89
+ /**
90
+ * The type of the subtitle.
91
+ */
92
+ type?: SubtitleType;
93
+ /**
94
+ * The language code for the subtitle (ISO 639-1 or ISO 639-2).
95
+ * @example 'en', 'es', 'fr', 'de', 'zh-CN'
96
+ * @default 'und' (undefined)
97
+ */
98
+ language?: string;
99
+ }
100
+ interface ExternalSubtitleWithCustomType {
101
+ /**
102
+ * The uri of the subtitle.
103
+ */
104
+ uri: string;
105
+ /**
106
+ * The label for the subtitle.
107
+ */
108
+ label: string;
109
+ /**
110
+ * The type of the subtitle.
111
+ */
112
+ type: Omit<SubtitleType, 'auto'>;
113
+ /**
114
+ * The language code for the subtitle (ISO 639-1 or ISO 639-2).
115
+ * @example 'en', 'es', 'fr', 'de', 'zh-CN'
116
+ * @default 'und' (undefined)
117
+ */
118
+ language?: string;
119
+ }
120
+ export type ExternalSubtitle = ExternalSubtitleWithInferredType | ExternalSubtitleWithCustomType;
121
+ interface NativeExternalSubtitle {
122
+ uri: string;
123
+ label: string;
124
+ type: SubtitleType;
125
+ language: string;
126
+ }
127
+ interface NativeDrmParams extends DrmParams {
128
+ type?: string;
129
+ }
130
+ interface CustomVideoMetadata {
131
+ title?: string;
132
+ subtitle?: string;
133
+ description?: string;
134
+ artist?: string;
135
+ imageUri?: string;
136
+ }
137
+ export {};
138
+ //# sourceMappingURL=VideoConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VideoConfig.d.ts","sourceRoot":"","sources":["../../../../../src/core/types/VideoConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC;AAE1C,MAAM,MAAM,WAAW,GAAG;IACxB;;;;;;;;OAQG;IACH,GAAG,EAAE,WAAW,CAAC;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC;;OAEG;IACH,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB;;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I,CAAC,EAAE,MAAM,CAAC;CACf;AAED,UAAU,mBAAmB;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,31 @@
1
+ export type LibraryError = 'library/deallocated' | 'library/application-context-not-found';
2
+ export type PlayerError = 'player/released' | 'player/not-initialized' | 'player/asset-not-initialized' | 'player/invalid-source';
3
+ export type SourceError = 'source/invalid-uri' | 'source/missing-read-file-permission' | 'source/file-does-not-exist' | 'source/failed-to-initialize-asset' | 'source/unsupported-content-type';
4
+ export type VideoViewError = 'view/not-found' | 'view/deallocated' | 'view/picture-in-picture-not-supported';
5
+ export type UnknownError = 'unknown/unknown';
6
+ export type VideoErrorCode = LibraryError | PlayerError | SourceError | VideoViewError | UnknownError;
7
+ export declare class VideoError<TCode extends VideoErrorCode> extends Error {
8
+ private readonly _code;
9
+ private readonly _message;
10
+ private readonly _stack?;
11
+ get code(): TCode;
12
+ get message(): string;
13
+ get stack(): string | undefined;
14
+ /**
15
+ * @internal
16
+ */
17
+ constructor(code: TCode, message: string, stack?: string);
18
+ toString(): string;
19
+ }
20
+ export declare class VideoComponentError extends VideoError<VideoViewError> {
21
+ }
22
+ export declare class VideoRuntimeError extends VideoError<LibraryError | PlayerError | SourceError | UnknownError> {
23
+ }
24
+ /**
25
+ * Tries to parse an error coming from native to a typed JS video error.
26
+ * @param {VideoError} nativeError The native error instance. This is a JSON in the legacy native module architecture.
27
+ * @returns A {@linkcode VideoRuntimeError} or {@linkcode VideoComponentError}, or the `nativeError` itself if it's not parsable
28
+ * @method
29
+ */
30
+ export declare const tryParseNativeVideoError: <T>(nativeError: T) => (VideoRuntimeError | VideoComponentError) | T;
31
+ //# sourceMappingURL=VideoError.d.ts.map
@@ -0,0 +1 @@
1
+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AiB,GAAG,mBAAmB,CAAC,GAAG,CA6B9C,CAAC"}
@@ -0,0 +1,38 @@
1
+ import type { Int64 } from 'react-native-nitro-modules';
2
+ import type { VideoOrientation } from './VideoOrientation';
3
+ export interface VideoInformation {
4
+ /**
5
+ * The bitrate of the video in kbps.
6
+ */
7
+ bitrate: number;
8
+ /**
9
+ * The width of the video in pixels.
10
+ */
11
+ width: number;
12
+ /**
13
+ * The height of the video in pixels.
14
+ */
15
+ height: number;
16
+ /**
17
+ * The duration of the video in seconds.
18
+ */
19
+ duration: Int64;
20
+ /**
21
+ * The file size of the video in bytes.
22
+ */
23
+ fileSize: Int64;
24
+ /**
25
+ * Whether the video is HDR.
26
+ */
27
+ isHDR: boolean;
28
+ /**
29
+ * Whether the video is live
30
+ */
31
+ isLive: boolean;
32
+ /**
33
+ * The orientation of the video.
34
+ * see {@link VideoOrientation}
35
+ */
36
+ orientation: VideoOrientation;
37
+ }
38
+ //# sourceMappingURL=VideoInformation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VideoInformation.d.ts","sourceRoot":"","sources":["../../../../../src/core/types/VideoInformation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC;IAEhB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC;IAEhB;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;;OAGG;IACH,WAAW,EAAE,gBAAgB,CAAC;CAC/B"}
@@ -0,0 +1,2 @@
1
+ export type VideoOrientation = 'portrait' | 'landscape' | 'portrait-upside-down' | 'landscape-left' | 'landscape-right' | 'square' | 'unknown';
2
+ //# sourceMappingURL=VideoOrientation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VideoOrientation.d.ts","sourceRoot":"","sources":["../../../../../src/core/types/VideoOrientation.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GACxB,UAAU,GACV,WAAW,GACX,sBAAsB,GACtB,gBAAgB,GAChB,iBAAiB,GACjB,QAAQ,GACR,SAAS,CAAC"}
@@ -0,0 +1,155 @@
1
+ import type { IgnoreSilentSwitchMode } from './IgnoreSilentSwitchMode';
2
+ import type { MixAudioMode } from './MixAudioMode';
3
+ import type { TextTrack } from './TextTrack';
4
+ import type { VideoPlayerSourceBase } from './VideoPlayerSourceBase';
5
+ import type { VideoPlayerStatus } from './VideoPlayerStatus';
6
+ export interface VideoPlayerBase {
7
+ /**
8
+ * The source of the video.
9
+ * Source is immutable. To change the source, you need to call {@link replaceSourceAsync} method.
10
+ * see {@link VideoPlayerSourceBase}
11
+ */
12
+ readonly source: VideoPlayerSourceBase;
13
+ /**
14
+ * The status of the player.
15
+ * @param idle - The player is idle (source is not loaded)
16
+ * @param loading - The player is loading.
17
+ * @param readyToPlay - The player is ready to play (source is loaded).
18
+ * @param error - The player has an error.
19
+ */
20
+ readonly status: VideoPlayerStatus;
21
+ /**
22
+ * The current time of the video in seconds (1.0 = 1 sec).
23
+ * Returns NaN if the current time is not available.
24
+ */
25
+ readonly duration: number;
26
+ /**
27
+ * The volume of the video (0.0 = 0%, 1.0 = 100%).
28
+ * @note If the player is {@link muted}, the volume will be 0.0.
29
+ */
30
+ volume: number;
31
+ /**
32
+ * The duration of the video in seconds (1.0 = 1 sec).
33
+ * Returns NaN if the duration is not available.
34
+ */
35
+ currentTime: number;
36
+ /**
37
+ * Whether the player is muted.
38
+ */
39
+ muted: boolean;
40
+ /**
41
+ * Whether the player is looped.
42
+ */
43
+ loop: boolean;
44
+ /**
45
+ * Controls the speed at which the player should play.
46
+ * @note if rate is = 0, it will pause video.
47
+ */
48
+ rate: number;
49
+ /**
50
+ * Controls the audio mixing mode of the player.
51
+ *
52
+ * - `mixWithOthers` - Mix with other players.
53
+ * - `doNotMix` - Do not mix with other players.
54
+ * - `duckOthers` - Duck other players.
55
+ * - `auto` - uses default behavior for player.
56
+ *
57
+ * default is `auto`.
58
+ */
59
+ mixAudioMode: MixAudioMode;
60
+ /**
61
+ * Controls the silent switch mode of the player.
62
+ * @note This is only supported on iOS.
63
+ *
64
+ * - `auto` - uses default behavior for player.
65
+ * - `ignore` - ignore the silent switch.
66
+ * - `obey` - obey the silent switch.
67
+ */
68
+ ignoreSilentSwitchMode: IgnoreSilentSwitchMode;
69
+ /**
70
+ * Whether the player should play in background.
71
+ *
72
+ * - `true` - play in background.
73
+ * - `false` - pause in background (default).
74
+ *
75
+ * @note this can override {@link playWhenInactive}.
76
+ */
77
+ playInBackground: boolean;
78
+ /**
79
+ * Whether the player should play when the app is inactive (user opened control center).
80
+ *
81
+ * - `true` - play when the app is inactive.
82
+ * - `false` - pause when the app is inactive (default).
83
+ *
84
+ * @note this can be overridden by {@link playInBackground}.
85
+ * @note This is only supported on iOS.
86
+ */
87
+ playWhenInactive: boolean;
88
+ /**
89
+ * Whether the player is playing.
90
+ * @note This is a read-only property.
91
+ * @note To pause/resume the player, you need to use {@link play} and {@link pause} methods.
92
+ */
93
+ readonly isPlaying: boolean;
94
+ /**
95
+ * Manually initialize the player. You don't need to call this method manually, unless you set `initializeOnCreation` to false in {@link VideoConfig}
96
+ */
97
+ initialize(): Promise<void>;
98
+ /**
99
+ * Preload the video.
100
+ * This is useful to avoid delay when the user plays the video.
101
+ * Preloading too many videos can lead to memory issues or performance issues.
102
+ */
103
+ preload(): Promise<void>;
104
+ /**
105
+ * Start playback of player.
106
+ */
107
+ play(): void;
108
+ /**
109
+ * Pause playback of player.
110
+ */
111
+ pause(): void;
112
+ /**
113
+ * Seek by given time.
114
+ * If the time is negative, it will seek backward.
115
+ * time will be clamped if it is out of range (0 ~ {@link duration}).
116
+ * @param time - The time to seek from current time in seconds.
117
+ */
118
+ seekBy(time: number): void;
119
+ /**
120
+ * Seek to a specific time in the video.
121
+ * @param time - The time to seek to in seconds.
122
+ * @note This have same effect as {@link currentTime} setter.
123
+ * @note time will be clamped if it is out of range (0 ~ {@link duration}).
124
+ */
125
+ seekTo(time: number): void;
126
+ /**
127
+ * Replace the current source of the player.
128
+ * @param source - The new source of the video.
129
+ * @note If you want to clear the source, you can pass null.
130
+ * see {@link VideoPlayerSourceBase}
131
+ */
132
+ replaceSourceAsync(source: VideoPlayerSourceBase | null): Promise<void>;
133
+ /**
134
+ * Get all available text tracks for the current source.
135
+ * @returns Array of available text tracks
136
+ */
137
+ getAvailableTextTracks(): TextTrack[];
138
+ /**
139
+ * Select a text track to display.
140
+ * @param textTrack - Text track to select, or null to unselect current track
141
+ */
142
+ selectTextTrack(textTrack: TextTrack | null): void;
143
+ /**
144
+ * Get the currently selected text track.
145
+ * @returns The currently selected text track, or undefined if none is selected
146
+ */
147
+ readonly selectedTrack?: TextTrack;
148
+ /**
149
+ * Capture the current video frame as a base64 encoded image.
150
+ * @returns A promise that resolves to the base64 encoded image string (PNG format).
151
+ * @note The image will be captured at the current playback position.
152
+ */
153
+ captureFrame(): Promise<string>;
154
+ }
155
+ //# sourceMappingURL=VideoPlayerBase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VideoPlayerBase.d.ts","sourceRoot":"","sources":["../../../../../src/core/types/VideoPlayerBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAA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BAAsB,IAAI,SAAS,EAAE,CAAC;IAEtC;;;OAGG;IACH,eAAe,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC;IAEnD;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,CAAC;IAEnC;;;;OAIG;IACH,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CACjC"}
@@ -0,0 +1,17 @@
1
+ import type { NativeVideoConfig } from './VideoConfig';
2
+ import type { VideoInformation } from './VideoInformation';
3
+ export interface VideoPlayerSourceBase {
4
+ /**
5
+ * The URI of the asset.
6
+ */
7
+ readonly uri: string;
8
+ /**
9
+ * The config of the asset.
10
+ */
11
+ readonly config: NativeVideoConfig;
12
+ /**
13
+ * Get the information about the asset.
14
+ */
15
+ getAssetInformationAsync(): Promise<VideoInformation>;
16
+ }
17
+ //# sourceMappingURL=VideoPlayerSourceBase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VideoPlayerSourceBase.d.ts","sourceRoot":"","sources":["../../../../../src/core/types/VideoPlayerSourceBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IAEnC;;OAEG;IACH,wBAAwB,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAAC;CACvD"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The status of the player.
3
+ * @param idle - The player is idle (source is not loaded)
4
+ * @param loading - The player is loading (source is loading).
5
+ * @param readyToPlay - The player is ready to play (source is loaded).
6
+ * @param error - The player has an error (source is not loaded).
7
+ */
8
+ export type VideoPlayerStatus = 'idle' | 'loading' | 'readyToPlay' | 'error';
9
+ //# sourceMappingURL=VideoPlayerStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VideoPlayerStatus.d.ts","sourceRoot":"","sources":["../../../../../src/core/types/VideoPlayerStatus.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,SAAS,GAAG,aAAa,GAAG,OAAO,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { VideoPlayer } from '../../spec/nitro/VideoPlayer.nitro';
2
+ import type { VideoPlayerSource } from '../../spec/nitro/VideoPlayerSource.nitro';
3
+ import type { VideoConfig, VideoSource } from '../types/VideoConfig';
4
+ /**
5
+ * @internal
6
+ * Creates a Native VideoPlayer instance.
7
+ *
8
+ * @param source - The source of the video to play
9
+ * @returns The Native VideoPlayer instance
10
+ */
11
+ export declare const createPlayer: (source: VideoSource | VideoConfig | VideoPlayerSource) => VideoPlayer;
12
+ //# sourceMappingURL=playerFactory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playerFactory.d.ts","sourceRoot":"","sources":["../../../../../src/core/utils/playerFactory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EAEZ,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAOrE;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,GACvB,QAAQ,WAAW,GAAG,WAAW,GAAG,iBAAiB,KACpD,WAUF,CAAC"}
@@ -0,0 +1,29 @@
1
+ import type { VideoPlayerSource } from '../../spec/nitro/VideoPlayerSource.nitro';
2
+ import type { VideoConfig, VideoSource } from '../types/VideoConfig';
3
+ export declare const isVideoPlayerSource: (obj: any) => obj is VideoPlayerSource;
4
+ /**
5
+ * Creates a `VideoPlayerSource` instance from a URI (string).
6
+ *
7
+ * @param uri - The URI of the video to play
8
+ * @returns The `VideoPlayerSource` instance
9
+ */
10
+ export declare const createSourceFromUri: (uri: string) => VideoPlayerSource;
11
+ /**
12
+ * Creates a `VideoPlayerSource` instance from a `VideoConfig`.
13
+ *
14
+ * @note The `uri` property is required to be a string.
15
+ *
16
+ * @param config - The `VideoConfig` to create the `VideoPlayerSource` from
17
+ * @returns The `VideoPlayerSource` instance
18
+ */
19
+ export declare const createSourceFromVideoConfig: (config: VideoConfig & {
20
+ uri: string;
21
+ }) => VideoPlayerSource;
22
+ /**
23
+ * Creates a `VideoPlayerSource`
24
+ *
25
+ * @param source - The `VideoSource` to create the `VideoPlayerSource` from
26
+ * @returns The `VideoPlayerSource` instance
27
+ */
28
+ export declare const createSource: (source: VideoSource | VideoConfig | VideoPlayerSource) => VideoPlayerSource;
29
+ //# sourceMappingURL=sourceFactory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sourceFactory.d.ts","sourceRoot":"","sources":["../../../../../src/core/utils/sourceFactory.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,iBAAiB,EAElB,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EAIV,WAAW,EACX,WAAW,EACZ,MAAM,sBAAsB,CAAC;AAW9B,eAAO,MAAM,mBAAmB,GAAI,KAAK,GAAG,KAAG,GAAG,IAAI,iBAOrD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAAI,KAAK,MAAM,sBAU9C,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,GACtC,QAAQ,WAAW,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,sBAsCtC,CAAC;AAmBF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GACvB,QAAQ,WAAW,GAAG,WAAW,GAAG,iBAAiB,KACpD,iBA8CF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const NativeVideoView: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<import("../../spec/fabric/VideoViewNativeComponent").NativeProps> | (() => never);
2
+ //# sourceMappingURL=NativeVideoView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeVideoView.d.ts","sourceRoot":"","sources":["../../../../../src/core/video-view/NativeVideoView.tsx"],"names":[],"mappings":"AAYA,eAAO,MAAM,eAAe,yKAKrB,CAAC"}
@@ -0,0 +1,104 @@
1
+ import * as React from 'react';
2
+ import type { ViewProps, ViewStyle } from 'react-native';
3
+ import type { ListenerSubscription } from '../../spec/nitro/VideoPlayerEventEmitter.nitro';
4
+ import type { SurfaceType } from '../../spec/nitro/VideoViewViewManager.nitro';
5
+ import { type VideoViewEvents } from '../types/Events';
6
+ import type { ResizeMode } from '../types/ResizeMode';
7
+ import type { VideoPlayer } from '../VideoPlayer';
8
+ export interface VideoViewProps extends Partial<VideoViewEvents>, ViewProps {
9
+ /**
10
+ * The player to play the video - {@link VideoPlayer}
11
+ */
12
+ player: VideoPlayer;
13
+ /**
14
+ * The style of the video view - {@link ViewStyle}
15
+ */
16
+ style?: ViewStyle;
17
+ /**
18
+ * Whether to show the controls. Defaults to false.
19
+ */
20
+ controls?: boolean;
21
+ /**
22
+ * Whether to enable & show the picture in picture button in native controls. Defaults to false.
23
+ */
24
+ pictureInPicture?: boolean;
25
+ /**
26
+ * Whether to automatically enter picture in picture mode when the video is playing. Defaults to false.
27
+ */
28
+ autoEnterPictureInPicture?: boolean;
29
+ /**
30
+ * How the video should be resized to fit the view. Defaults to 'none'.
31
+ * - 'contain': Scale the video uniformly (maintain aspect ratio) so that it fits entirely within the view
32
+ * - 'cover': Scale the video uniformly (maintain aspect ratio) so that it fills the entire view (may crop)
33
+ * - 'stretch': Scale the video to fill the entire view without maintaining aspect ratio
34
+ * - 'none': Do not resize the video
35
+ */
36
+ resizeMode?: ResizeMode;
37
+ /**
38
+ * Whether to keep the screen awake while the video view is mounted. Defaults to true.
39
+ */
40
+ keepScreenAwake?: boolean;
41
+ /**
42
+ * The type of underlying native view. Defaults to 'surface'.
43
+ * - 'surface': Uses a SurfaceView on Android. More performant, but cannot be animated or transformed.
44
+ * - 'texture': Uses a TextureView on Android. Less performant, but can be animated and transformed.
45
+ *
46
+ * Only applicable on Android
47
+ *
48
+ * @default 'surface'
49
+ * @platform android
50
+ */
51
+ surfaceType?: SurfaceType;
52
+ /**
53
+ * Whether to automatically start playing the video when loaded. Defaults to true.
54
+ */
55
+ autoplay?: boolean;
56
+ /**
57
+ * Whether the video should be displayed in fullscreen mode.
58
+ * Set to true to enter fullscreen, false to exit fullscreen.
59
+ */
60
+ fullscreen?: boolean;
61
+ /**
62
+ * Whether the video acts as paused.
63
+ * - true: Pause the video
64
+ * - false: Play the video
65
+ */
66
+ paused?: boolean;
67
+ /**
68
+ * The playback speed of the video. Defaults to 1.0.
69
+ */
70
+ speed?: number;
71
+ }
72
+ export interface VideoViewRef {
73
+ /**
74
+ * Enter fullscreen mode
75
+ */
76
+ enterFullscreen: () => void;
77
+ /**
78
+ * Exit fullscreen mode
79
+ */
80
+ exitFullscreen: () => void;
81
+ /**
82
+ * Enter picture in picture mode
83
+ */
84
+ enterPictureInPicture: () => void;
85
+ /**
86
+ * Exit picture in picture mode
87
+ */
88
+ exitPictureInPicture: () => void;
89
+ /**
90
+ * Check if picture in picture mode is supported
91
+ * @returns true if picture in picture mode is supported, false otherwise
92
+ */
93
+ canEnterPictureInPicture: () => boolean;
94
+ /**
95
+ * Adds a listener for a view event.
96
+ * @param event - The event to add a listener for.
97
+ * @param callback - The callback to call when the event is triggered.
98
+ * @returns A subscription object that can be used to remove the listener.
99
+ */
100
+ addEventListener: <Event extends keyof VideoViewEvents>(event: Event, callback: VideoViewEvents[Event]) => ListenerSubscription;
101
+ }
102
+ declare const _default: React.NamedExoticComponent<VideoViewProps & React.RefAttributes<VideoViewRef>>;
103
+ export default _default;
104
+ //# sourceMappingURL=VideoView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VideoView.d.ts","sourceRoot":"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,CAAC;IAC3B;;OAEG;IACH,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAClC;;OAEG;IACH,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC;;;OAGG;IACH,wBAAwB,EAAE,MAAM,OAAO,CAAC;IACxC;;;;;OAKG;IACH,gBAAgB,EAAE,CAAC,KAAK,SAAS,MAAM,eAAe,EACpD,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,eAAe,CAAC,KAAK,CAAC,KAC7B,oBAAoB,CAAC;CAC3B;;AAsXD,wBAAqC"}
@@ -0,0 +1,13 @@
1
+ export { useEvent } from './core/hooks/useEvent';
2
+ export { useVideoPlayer } from './core/hooks/useVideoPlayer';
3
+ export * from './core/types/Events';
4
+ export type { IgnoreSilentSwitchMode } from './core/types/IgnoreSilentSwitchMode';
5
+ export type { MixAudioMode } from './core/types/MixAudioMode';
6
+ export type { ResizeMode } from './core/types/ResizeMode';
7
+ export type { TextTrack } from './core/types/TextTrack';
8
+ export type { VideoConfig, VideoSource } from './core/types/VideoConfig';
9
+ export { type LibraryError, type PlayerError, type SourceError, type UnknownError, type VideoComponentError, type VideoError, type VideoErrorCode, type VideoRuntimeError, type VideoViewError, } from './core/types/VideoError';
10
+ export type { VideoPlayerStatus } from './core/types/VideoPlayerStatus';
11
+ export { default as VideoView, default as UnifiedPlayerView, type VideoViewProps, type VideoViewProps as UnifiedPlayerViewProps, type VideoViewRef, type VideoViewRef as UnifiedPlayerViewRef, } from './core/video-view/VideoView';
12
+ export { VideoPlayer } from './core/VideoPlayer';
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,cAAc,qBAAqB,CAAC;AACpC,YAAY,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAClF,YAAY,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,YAAY,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,cAAc,GACpB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EACL,OAAO,IAAI,SAAS,EACpB,OAAO,IAAI,iBAAiB,EAC5B,KAAK,cAAc,EACnB,KAAK,cAAc,IAAI,sBAAsB,EAC7C,KAAK,YAAY,EACjB,KAAK,YAAY,IAAI,oBAAoB,GAC1C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { ViewProps } from 'react-native';
2
+ import type { Int32 } from 'react-native/Libraries/Types/CodegenTypes';
3
+ import type { DirectEventHandler } from 'react-native/Libraries/Types/CodegenTypes';
4
+ type OnNitroIdChangeEvent = Readonly<{
5
+ nitroId: Int32;
6
+ }>;
7
+ export interface NativeProps extends ViewProps {
8
+ nitroId: Int32;
9
+ onNitroIdChange?: DirectEventHandler<OnNitroIdChangeEvent>;
10
+ }
11
+ declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
12
+ export default _default;
13
+ //# sourceMappingURL=VideoViewNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VideoViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../../src/spec/fabric/VideoViewNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAEpF,KAAK,oBAAoB,GAAG,QAAQ,CAAC;IACnC,OAAO,EAAE,KAAK,CAAC;CAChB,CAAC,CAAC;AAEH,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,OAAO,EAAE,KAAK,CAAC;IACf,eAAe,CAAC,EAAE,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;CAC5D;;AAED,wBAEG"}