bitmovin-player-react-native 0.44.1-alpha.0 → 1.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (497) hide show
  1. package/.eslintignore +11 -0
  2. package/.eslintrc.js +7 -0
  3. package/.gitattributes +3 -0
  4. package/.prettierignore +11 -0
  5. package/.ruby-version +1 -0
  6. package/.swiftlint.yml +171 -0
  7. package/Brewfile +2 -0
  8. package/CHANGELOG.md +627 -0
  9. package/CONTRIBUTING.md +255 -0
  10. package/TODO.md +0 -0
  11. package/android/.editorconfig +8 -0
  12. package/android/build.gradle +78 -75
  13. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  14. package/android/gradle/wrapper/gradle-wrapper.properties +7 -0
  15. package/android/gradle.properties +1 -0
  16. package/android/gradlew +248 -0
  17. package/android/gradlew.bat +92 -0
  18. package/android/ktlint.gradle +31 -0
  19. package/android/src/main/java/com/bitmovin/player/reactnative/ActivityLifecycleListener.kt +51 -0
  20. package/android/src/main/java/com/bitmovin/player/reactnative/BitmovinCastManagerModule.kt +32 -55
  21. package/android/src/main/java/com/bitmovin/player/reactnative/BufferModule.kt +33 -45
  22. package/android/src/main/java/com/bitmovin/player/reactnative/CustomMessageHandlerModule.kt +84 -0
  23. package/android/src/main/java/com/bitmovin/player/reactnative/DebugModule.kt +6 -14
  24. package/android/src/main/java/com/bitmovin/player/reactnative/DecoderConfigModule.kt +89 -44
  25. package/android/src/main/java/com/bitmovin/player/reactnative/DrmModule.kt +80 -99
  26. package/android/src/main/java/com/bitmovin/player/reactnative/EventSubscription.kt +22 -0
  27. package/android/src/main/java/com/bitmovin/player/reactnative/FullscreenHandlerModule.kt +100 -0
  28. package/android/src/main/java/com/bitmovin/player/reactnative/MediaSessionPlaybackManager.kt +5 -5
  29. package/android/src/main/java/com/bitmovin/player/reactnative/NetworkModule.kt +98 -56
  30. package/android/src/main/java/com/bitmovin/player/reactnative/OfflineModule.kt +132 -186
  31. package/android/src/main/java/com/bitmovin/player/reactnative/PlayerAnalyticsModule.kt +37 -36
  32. package/android/src/main/java/com/bitmovin/player/reactnative/PlayerModule.kt +252 -528
  33. package/android/src/main/java/com/bitmovin/player/reactnative/RNPlayerPackage.kt +11 -0
  34. package/android/src/main/java/com/bitmovin/player/reactnative/RNPlayerView.kt +558 -213
  35. package/android/src/main/java/com/bitmovin/player/reactnative/RNPlayerViewManager.kt +99 -286
  36. package/android/src/main/java/com/bitmovin/player/reactnative/ResultWaiter.kt +58 -0
  37. package/android/src/main/java/com/bitmovin/player/reactnative/SourceModule.kt +77 -151
  38. package/android/src/main/java/com/bitmovin/player/reactnative/Types.kt +44 -0
  39. package/android/src/main/java/com/bitmovin/player/reactnative/UuidModule.kt +12 -15
  40. package/android/src/main/java/com/bitmovin/player/reactnative/converter/JsonConverter.kt +296 -456
  41. package/android/src/main/java/com/bitmovin/player/reactnative/extensions/ListExtension.kt +89 -0
  42. package/android/src/main/java/com/bitmovin/player/reactnative/extensions/MapExtension.kt +95 -0
  43. package/android/src/main/java/com/bitmovin/player/reactnative/offline/OfflineContentManagerBridge.kt +20 -52
  44. package/android/src/main/java/com/bitmovin/player/reactnative/ui/CustomMessageHandlerBridge.kt +10 -20
  45. package/android/src/main/java/com/bitmovin/player/reactnative/ui/FullscreenHandlerBridge.kt +4 -9
  46. package/app.plugin.js +21 -0
  47. package/build/BitmovinPlayerReactNative.types.d.ts +18 -0
  48. package/build/BitmovinPlayerReactNative.types.d.ts.map +1 -0
  49. package/build/BitmovinPlayerReactNative.types.js +2 -0
  50. package/build/BitmovinPlayerReactNative.types.js.map +1 -0
  51. package/build/adaptationConfig.d.ts +18 -0
  52. package/build/adaptationConfig.d.ts.map +1 -0
  53. package/build/adaptationConfig.js +2 -0
  54. package/build/adaptationConfig.js.map +1 -0
  55. package/build/advertising.d.ts +175 -0
  56. package/build/advertising.d.ts.map +1 -0
  57. package/build/advertising.js +37 -0
  58. package/build/advertising.js.map +1 -0
  59. package/build/analytics/config.d.ts +194 -0
  60. package/build/analytics/config.d.ts.map +1 -0
  61. package/build/analytics/config.js +2 -0
  62. package/build/analytics/config.js.map +1 -0
  63. package/build/analytics/index.d.ts +3 -0
  64. package/build/analytics/index.d.ts.map +1 -0
  65. package/build/analytics/index.js +3 -0
  66. package/build/analytics/index.js.map +1 -0
  67. package/build/analytics/player.d.ts +24 -0
  68. package/build/analytics/player.d.ts.map +1 -0
  69. package/build/analytics/player.js +30 -0
  70. package/build/analytics/player.js.map +1 -0
  71. package/build/analytics/playerAnalyticsModule.d.ts +13 -0
  72. package/build/analytics/playerAnalyticsModule.d.ts.map +1 -0
  73. package/build/analytics/playerAnalyticsModule.js +3 -0
  74. package/build/analytics/playerAnalyticsModule.js.map +1 -0
  75. package/build/audioSession.d.ts +33 -0
  76. package/build/audioSession.d.ts.map +1 -0
  77. package/build/audioSession.js +21 -0
  78. package/build/audioSession.js.map +1 -0
  79. package/build/audioTrack.d.ts +39 -0
  80. package/build/audioTrack.d.ts.map +1 -0
  81. package/build/audioTrack.js +2 -0
  82. package/build/audioTrack.js.map +1 -0
  83. package/build/bitmovinCastManager.d.ts +58 -0
  84. package/build/bitmovinCastManager.d.ts.map +1 -0
  85. package/build/bitmovinCastManager.js +64 -0
  86. package/build/bitmovinCastManager.js.map +1 -0
  87. package/build/bufferApi.d.ts +85 -0
  88. package/build/bufferApi.d.ts.map +1 -0
  89. package/build/bufferApi.js +60 -0
  90. package/build/bufferApi.js.map +1 -0
  91. package/build/bufferConfig.d.ts +42 -0
  92. package/build/bufferConfig.d.ts.map +1 -0
  93. package/build/bufferConfig.js +2 -0
  94. package/build/bufferConfig.js.map +1 -0
  95. package/build/components/PlayerView/events.d.ts +310 -0
  96. package/build/components/PlayerView/events.d.ts.map +1 -0
  97. package/build/components/PlayerView/events.js +2 -0
  98. package/build/components/PlayerView/events.js.map +1 -0
  99. package/build/components/PlayerView/index.d.ts +10 -0
  100. package/build/components/PlayerView/index.d.ts.map +1 -0
  101. package/build/components/PlayerView/index.js +72 -0
  102. package/build/components/PlayerView/index.js.map +1 -0
  103. package/build/components/PlayerView/native.d.ts +30 -0
  104. package/build/components/PlayerView/native.d.ts.map +1 -0
  105. package/build/components/PlayerView/native.js +6 -0
  106. package/build/components/PlayerView/native.js.map +1 -0
  107. package/build/components/PlayerView/nativeEvents.d.ts +437 -0
  108. package/build/components/PlayerView/nativeEvents.d.ts.map +1 -0
  109. package/build/components/PlayerView/nativeEvents.js +2 -0
  110. package/build/components/PlayerView/nativeEvents.js.map +1 -0
  111. package/build/components/PlayerView/pictureInPictureConfig.d.ts +22 -0
  112. package/build/components/PlayerView/pictureInPictureConfig.d.ts.map +1 -0
  113. package/build/components/PlayerView/pictureInPictureConfig.js +2 -0
  114. package/build/components/PlayerView/pictureInPictureConfig.js.map +1 -0
  115. package/build/components/PlayerView/playerViewConfig.d.ts +111 -0
  116. package/build/components/PlayerView/playerViewConfig.d.ts.map +1 -0
  117. package/build/components/PlayerView/playerViewConfig.js +51 -0
  118. package/build/components/PlayerView/playerViewConfig.js.map +1 -0
  119. package/build/components/PlayerView/properties.d.ts +61 -0
  120. package/build/components/PlayerView/properties.d.ts.map +1 -0
  121. package/build/components/PlayerView/properties.js +2 -0
  122. package/build/components/PlayerView/properties.js.map +1 -0
  123. package/build/components/index.d.ts +5 -0
  124. package/build/components/index.d.ts.map +1 -0
  125. package/build/components/index.js +5 -0
  126. package/build/components/index.js.map +1 -0
  127. package/build/debug.d.ts +46 -0
  128. package/build/debug.d.ts.map +1 -0
  129. package/build/debug.js +52 -0
  130. package/build/debug.js.map +1 -0
  131. package/build/decoder/decoderConfig.d.ts +96 -0
  132. package/build/decoder/decoderConfig.d.ts.map +1 -0
  133. package/build/decoder/decoderConfig.js +6 -0
  134. package/build/decoder/decoderConfig.js.map +1 -0
  135. package/build/decoder/decoderConfigModule.d.ts +14 -0
  136. package/build/decoder/decoderConfigModule.d.ts.map +1 -0
  137. package/build/decoder/decoderConfigModule.js +31 -0
  138. package/build/decoder/decoderConfigModule.js.map +1 -0
  139. package/build/decoder/index.d.ts +26 -0
  140. package/build/decoder/index.d.ts.map +1 -0
  141. package/build/decoder/index.js +50 -0
  142. package/build/decoder/index.js.map +1 -0
  143. package/build/drm/drmModule.d.ts +55 -0
  144. package/build/drm/drmModule.d.ts.map +1 -0
  145. package/build/drm/drmModule.js +3 -0
  146. package/build/drm/drmModule.js.map +1 -0
  147. package/build/drm/fairplayConfig.d.ts +91 -0
  148. package/build/drm/fairplayConfig.d.ts.map +1 -0
  149. package/build/drm/fairplayConfig.js +2 -0
  150. package/build/drm/fairplayConfig.js.map +1 -0
  151. package/build/drm/index.d.ts +112 -0
  152. package/build/drm/index.d.ts.map +1 -0
  153. package/build/drm/index.js +191 -0
  154. package/build/drm/index.js.map +1 -0
  155. package/build/drm/widevineConfig.d.ts +58 -0
  156. package/build/drm/widevineConfig.d.ts.map +1 -0
  157. package/build/drm/widevineConfig.js +2 -0
  158. package/build/drm/widevineConfig.js.map +1 -0
  159. package/build/events.d.ts +692 -0
  160. package/build/events.d.ts.map +1 -0
  161. package/build/events.js +2 -0
  162. package/build/events.js.map +1 -0
  163. package/build/hooks/index.d.ts +2 -0
  164. package/build/hooks/index.d.ts.map +1 -0
  165. package/build/hooks/index.js +2 -0
  166. package/build/hooks/index.js.map +1 -0
  167. package/build/hooks/usePlayer.d.ts +8 -0
  168. package/build/hooks/usePlayer.d.ts.map +1 -0
  169. package/build/hooks/usePlayer.js +10 -0
  170. package/build/hooks/usePlayer.js.map +1 -0
  171. package/build/hooks/useProxy.d.ts +18 -0
  172. package/build/hooks/useProxy.d.ts.map +1 -0
  173. package/build/hooks/useProxy.js +16 -0
  174. package/build/hooks/useProxy.js.map +1 -0
  175. package/build/index.d.ts +32 -0
  176. package/build/index.d.ts.map +1 -0
  177. package/build/index.js +32 -0
  178. package/build/index.js.map +1 -0
  179. package/build/liveConfig.d.ts +13 -0
  180. package/build/liveConfig.d.ts.map +1 -0
  181. package/build/liveConfig.js +2 -0
  182. package/build/liveConfig.js.map +1 -0
  183. package/build/media.d.ts +85 -0
  184. package/build/media.d.ts.map +1 -0
  185. package/build/media.js +2 -0
  186. package/build/media.js.map +1 -0
  187. package/build/mediaControlConfig.d.ts +62 -0
  188. package/build/mediaControlConfig.d.ts.map +1 -0
  189. package/build/mediaControlConfig.js +2 -0
  190. package/build/mediaControlConfig.js.map +1 -0
  191. package/build/mediaTrackRole.d.ts +28 -0
  192. package/build/mediaTrackRole.d.ts.map +1 -0
  193. package/build/mediaTrackRole.js +2 -0
  194. package/build/mediaTrackRole.js.map +1 -0
  195. package/build/modules/AudioSessionModule.d.ts +8 -0
  196. package/build/modules/AudioSessionModule.d.ts.map +1 -0
  197. package/build/modules/AudioSessionModule.js +7 -0
  198. package/build/modules/AudioSessionModule.js.map +1 -0
  199. package/build/modules/BitmovinCastManagerModule.d.ts +11 -0
  200. package/build/modules/BitmovinCastManagerModule.d.ts.map +1 -0
  201. package/build/modules/BitmovinCastManagerModule.js +3 -0
  202. package/build/modules/BitmovinCastManagerModule.js.map +1 -0
  203. package/build/modules/BufferModule.d.ts +16 -0
  204. package/build/modules/BufferModule.d.ts.map +1 -0
  205. package/build/modules/BufferModule.js +3 -0
  206. package/build/modules/BufferModule.js.map +1 -0
  207. package/build/modules/DebugModule.d.ts +8 -0
  208. package/build/modules/DebugModule.d.ts.map +1 -0
  209. package/build/modules/DebugModule.js +3 -0
  210. package/build/modules/DebugModule.js.map +1 -0
  211. package/build/modules/PlayerModule.d.ts +188 -0
  212. package/build/modules/PlayerModule.d.ts.map +1 -0
  213. package/build/modules/PlayerModule.js +3 -0
  214. package/build/modules/PlayerModule.js.map +1 -0
  215. package/build/modules/SourceModule.d.ts +51 -0
  216. package/build/modules/SourceModule.d.ts.map +1 -0
  217. package/build/modules/SourceModule.js +3 -0
  218. package/build/modules/SourceModule.js.map +1 -0
  219. package/build/modules/UuidModule.d.ts +8 -0
  220. package/build/modules/UuidModule.d.ts.map +1 -0
  221. package/build/modules/UuidModule.js +3 -0
  222. package/build/modules/UuidModule.js.map +1 -0
  223. package/build/nativeInstance.d.ts +49 -0
  224. package/build/nativeInstance.d.ts.map +1 -0
  225. package/build/nativeInstance.js +20 -0
  226. package/build/nativeInstance.js.map +1 -0
  227. package/build/network/index.d.ts +50 -0
  228. package/build/network/index.d.ts.map +1 -0
  229. package/build/network/index.js +102 -0
  230. package/build/network/index.js.map +1 -0
  231. package/build/network/networkConfig.d.ts +151 -0
  232. package/build/network/networkConfig.d.ts.map +1 -0
  233. package/build/network/networkConfig.js +21 -0
  234. package/build/network/networkConfig.js.map +1 -0
  235. package/build/network/networkModule.d.ts +29 -0
  236. package/build/network/networkModule.d.ts.map +1 -0
  237. package/build/network/networkModule.js +3 -0
  238. package/build/network/networkModule.js.map +1 -0
  239. package/build/offline/index.d.ts +8 -0
  240. package/build/offline/index.d.ts.map +1 -0
  241. package/build/offline/index.js +8 -0
  242. package/build/offline/index.js.map +1 -0
  243. package/build/offline/offlineContentConfig.d.ts +18 -0
  244. package/build/offline/offlineContentConfig.d.ts.map +1 -0
  245. package/build/offline/offlineContentConfig.js +2 -0
  246. package/build/offline/offlineContentConfig.js.map +1 -0
  247. package/build/offline/offlineContentManager.d.ts +90 -0
  248. package/build/offline/offlineContentManager.d.ts.map +1 -0
  249. package/build/offline/offlineContentManager.js +177 -0
  250. package/build/offline/offlineContentManager.js.map +1 -0
  251. package/build/offline/offlineContentManagerListener.d.ts +174 -0
  252. package/build/offline/offlineContentManagerListener.d.ts.map +1 -0
  253. package/build/offline/offlineContentManagerListener.js +17 -0
  254. package/build/offline/offlineContentManagerListener.js.map +1 -0
  255. package/build/offline/offlineContentOptions.d.ts +29 -0
  256. package/build/offline/offlineContentOptions.d.ts.map +1 -0
  257. package/build/offline/offlineContentOptions.js +2 -0
  258. package/build/offline/offlineContentOptions.js.map +1 -0
  259. package/build/offline/offlineDownloadRequest.d.ts +19 -0
  260. package/build/offline/offlineDownloadRequest.d.ts.map +1 -0
  261. package/build/offline/offlineDownloadRequest.js +2 -0
  262. package/build/offline/offlineDownloadRequest.js.map +1 -0
  263. package/build/offline/offlineModule.d.ts +32 -0
  264. package/build/offline/offlineModule.d.ts.map +1 -0
  265. package/build/offline/offlineModule.js +3 -0
  266. package/build/offline/offlineModule.js.map +1 -0
  267. package/build/offline/offlineSourceOptions.d.ts +12 -0
  268. package/build/offline/offlineSourceOptions.d.ts.map +1 -0
  269. package/build/offline/offlineSourceOptions.js +2 -0
  270. package/build/offline/offlineSourceOptions.js.map +1 -0
  271. package/build/offline/offlineState.d.ts +23 -0
  272. package/build/offline/offlineState.d.ts.map +1 -0
  273. package/build/offline/offlineState.js +24 -0
  274. package/build/offline/offlineState.js.map +1 -0
  275. package/build/playbackConfig.d.ts +88 -0
  276. package/build/playbackConfig.d.ts.map +1 -0
  277. package/build/playbackConfig.js +2 -0
  278. package/build/playbackConfig.js.map +1 -0
  279. package/build/player.d.ts +308 -0
  280. package/build/player.d.ts.map +1 -0
  281. package/build/player.js +445 -0
  282. package/build/player.js.map +1 -0
  283. package/build/playerConfig.d.ts +83 -0
  284. package/build/playerConfig.d.ts.map +1 -0
  285. package/build/playerConfig.js +2 -0
  286. package/build/playerConfig.js.map +1 -0
  287. package/build/remoteControlConfig.d.ts +38 -0
  288. package/build/remoteControlConfig.d.ts.map +1 -0
  289. package/build/remoteControlConfig.js +2 -0
  290. package/build/remoteControlConfig.js.map +1 -0
  291. package/build/source.d.ts +216 -0
  292. package/build/source.d.ts.map +1 -0
  293. package/build/source.js +167 -0
  294. package/build/source.js.map +1 -0
  295. package/build/styleConfig.d.ts +120 -0
  296. package/build/styleConfig.d.ts.map +1 -0
  297. package/build/styleConfig.js +38 -0
  298. package/build/styleConfig.js.map +1 -0
  299. package/build/subtitleFormat.d.ts +27 -0
  300. package/build/subtitleFormat.d.ts.map +1 -0
  301. package/build/subtitleFormat.js +28 -0
  302. package/build/subtitleFormat.js.map +1 -0
  303. package/build/subtitleTrack.d.ts +55 -0
  304. package/build/subtitleTrack.d.ts.map +1 -0
  305. package/build/subtitleTrack.js +2 -0
  306. package/build/subtitleTrack.js.map +1 -0
  307. package/build/thumbnail.d.ts +38 -0
  308. package/build/thumbnail.d.ts.map +1 -0
  309. package/build/thumbnail.js +2 -0
  310. package/build/thumbnail.js.map +1 -0
  311. package/build/tweaksConfig.d.ts +197 -0
  312. package/build/tweaksConfig.d.ts.map +1 -0
  313. package/build/tweaksConfig.js +25 -0
  314. package/build/tweaksConfig.js.map +1 -0
  315. package/build/ui/customMessageHandlerModule.d.ts +27 -0
  316. package/build/ui/customMessageHandlerModule.d.ts.map +1 -0
  317. package/build/ui/customMessageHandlerModule.js +3 -0
  318. package/build/ui/customMessageHandlerModule.js.map +1 -0
  319. package/build/ui/custommessagehandler.d.ts +56 -0
  320. package/build/ui/custommessagehandler.d.ts.map +1 -0
  321. package/build/ui/custommessagehandler.js +54 -0
  322. package/build/ui/custommessagehandler.js.map +1 -0
  323. package/build/ui/custommessagehandlerbridge.d.ts +33 -0
  324. package/build/ui/custommessagehandlerbridge.d.ts.map +1 -0
  325. package/build/ui/custommessagehandlerbridge.js +72 -0
  326. package/build/ui/custommessagehandlerbridge.js.map +1 -0
  327. package/build/ui/custommessagesender.d.ts +5 -0
  328. package/build/ui/custommessagesender.d.ts.map +1 -0
  329. package/build/ui/custommessagesender.js +2 -0
  330. package/build/ui/custommessagesender.js.map +1 -0
  331. package/build/ui/fullscreenHandlerModule.d.ts +20 -0
  332. package/build/ui/fullscreenHandlerModule.d.ts.map +1 -0
  333. package/build/ui/fullscreenHandlerModule.js +3 -0
  334. package/build/ui/fullscreenHandlerModule.js.map +1 -0
  335. package/build/ui/fullscreenhandler.d.ts +18 -0
  336. package/build/ui/fullscreenhandler.d.ts.map +1 -0
  337. package/build/ui/fullscreenhandler.js +2 -0
  338. package/build/ui/fullscreenhandler.js.map +1 -0
  339. package/build/ui/fullscreenhandlerbridge.d.ts +26 -0
  340. package/build/ui/fullscreenhandlerbridge.d.ts.map +1 -0
  341. package/build/ui/fullscreenhandlerbridge.js +67 -0
  342. package/build/ui/fullscreenhandlerbridge.js.map +1 -0
  343. package/build/ui/index.d.ts +3 -0
  344. package/build/ui/index.d.ts.map +1 -0
  345. package/build/ui/index.js +3 -0
  346. package/build/ui/index.js.map +1 -0
  347. package/expo-module.config.json +40 -0
  348. package/ios/AppLifecycleDelegate.swift +25 -0
  349. package/ios/AudioSessionModule.swift +14 -40
  350. package/ios/BitmovinCastManagerModule.swift +30 -69
  351. package/ios/BufferModule.swift +26 -62
  352. package/ios/CustomMessageHandlerBridge.swift +11 -18
  353. package/ios/CustomMessageHandlerModule.swift +61 -63
  354. package/ios/DebugModule.swift +6 -27
  355. package/ios/DrmModule.swift +105 -379
  356. package/ios/Event+JSON.swift +1 -0
  357. package/ios/FullscreenHandlerBridge.swift +12 -5
  358. package/ios/FullscreenHandlerModule.swift +73 -57
  359. package/ios/LockedBox.swift +21 -0
  360. package/ios/ModuleRegistry+Generics.swift +11 -0
  361. package/ios/NetworkModule.swift +78 -82
  362. package/ios/OfflineContentManagerBridge.swift +11 -38
  363. package/ios/OfflineModule.swift +136 -454
  364. package/ios/PlayerAnalyticsModule.swift +24 -52
  365. package/ios/PlayerModule.swift +192 -770
  366. package/ios/RCTConvert+BitmovinPlayer.swift +38 -312
  367. package/ios/RNBitmovinPlayer.h +1 -8
  368. package/ios/RNBitmovinPlayer.podspec +47 -0
  369. package/ios/RNPlayerView.swift +600 -77
  370. package/ios/RNPlayerViewManager.swift +96 -210
  371. package/ios/Registry.swift +2 -2
  372. package/ios/ResultWaiter.swift +66 -0
  373. package/ios/SourceModule.swift +104 -223
  374. package/ios/UuidModule.swift +9 -18
  375. package/package.json +67 -71
  376. package/plugin/build/FeatureFlags.d.ts +24 -0
  377. package/plugin/build/FeatureFlags.js +2 -0
  378. package/plugin/build/index.d.ts +7 -0
  379. package/plugin/build/index.js +10 -0
  380. package/plugin/build/withAppGradleDependencies.d.ts +7 -0
  381. package/plugin/build/withAppGradleDependencies.js +49 -0
  382. package/plugin/build/withBitmovinAndroidConfig.d.ts +7 -0
  383. package/plugin/build/withBitmovinAndroidConfig.js +159 -0
  384. package/plugin/build/withBitmovinConfig.d.ts +7 -0
  385. package/plugin/build/withBitmovinConfig.js +21 -0
  386. package/plugin/build/withBitmovinIosConfig.d.ts +7 -0
  387. package/plugin/build/withBitmovinIosConfig.js +53 -0
  388. package/plugin/src/FeatureFlags.ts +21 -0
  389. package/plugin/src/index.ts +9 -0
  390. package/plugin/src/withAppGradleDependencies.ts +80 -0
  391. package/plugin/src/withBitmovinAndroidConfig.ts +224 -0
  392. package/plugin/src/withBitmovinConfig.ts +24 -0
  393. package/plugin/src/withBitmovinIosConfig.ts +71 -0
  394. package/plugin/tsconfig.json +9 -0
  395. package/plugin/tsconfig.tsbuildinfo +1 -0
  396. package/prettier.config.js +7 -0
  397. package/scripts/format-android.sh +2 -0
  398. package/scripts/format-swift.sh +3 -0
  399. package/scripts/lint-android.sh +2 -0
  400. package/scripts/lint-swift.sh +3 -0
  401. package/scripts/pre-commit.sh +14 -0
  402. package/scripts/setup-hooks.sh +58 -0
  403. package/src/BitmovinPlayerReactNative.types.ts +19 -0
  404. package/src/adaptationConfig.ts +1 -1
  405. package/src/advertising.ts +1 -1
  406. package/src/analytics/config.ts +4 -4
  407. package/src/analytics/player.ts +4 -6
  408. package/src/analytics/playerAnalyticsModule.ts +19 -0
  409. package/src/audioSession.ts +4 -6
  410. package/src/audioTrack.ts +1 -1
  411. package/src/bitmovinCastManager.ts +14 -10
  412. package/src/bufferApi.ts +1 -3
  413. package/src/bufferConfig.ts +2 -2
  414. package/src/components/PlayerView/events.ts +92 -94
  415. package/src/components/PlayerView/index.tsx +109 -159
  416. package/src/components/PlayerView/native.ts +24 -11
  417. package/src/components/PlayerView/nativeEvents.ts +113 -94
  418. package/src/components/PlayerView/pictureInPictureConfig.ts +1 -1
  419. package/src/components/PlayerView/playerViewConfig.ts +4 -8
  420. package/src/components/PlayerView/properties.ts +23 -22
  421. package/src/debug.ts +1 -3
  422. package/src/decoder/decoderConfig.ts +3 -3
  423. package/src/decoder/decoderConfigModule.ts +62 -0
  424. package/src/decoder/index.ts +32 -16
  425. package/src/drm/drmModule.ts +84 -0
  426. package/src/drm/fairplayConfig.ts +1 -1
  427. package/src/drm/index.ts +130 -40
  428. package/src/drm/widevineConfig.ts +5 -5
  429. package/src/events.ts +47 -41
  430. package/src/hooks/useProxy.ts +13 -20
  431. package/src/mediaControlConfig.ts +1 -1
  432. package/src/modules/AudioSessionModule.ts +13 -0
  433. package/src/modules/BitmovinCastManagerModule.ts +14 -0
  434. package/src/modules/BufferModule.ts +18 -0
  435. package/src/modules/DebugModule.ts +9 -0
  436. package/src/modules/PlayerModule.ts +251 -0
  437. package/src/modules/SourceModule.ts +74 -0
  438. package/src/modules/UuidModule.ts +9 -0
  439. package/src/nativeInstance.ts +3 -3
  440. package/src/network/index.ts +42 -15
  441. package/src/network/networkConfig.ts +3 -3
  442. package/src/network/networkModule.ts +51 -0
  443. package/src/offline/offlineContentConfig.ts +1 -1
  444. package/src/offline/offlineContentManager.ts +15 -50
  445. package/src/offline/offlineContentManagerListener.ts +20 -23
  446. package/src/offline/offlineContentOptions.ts +2 -2
  447. package/src/offline/offlineDownloadRequest.ts +1 -1
  448. package/src/offline/offlineModule.ts +46 -0
  449. package/src/offline/offlineSourceOptions.ts +2 -2
  450. package/src/offline/offlineState.ts +1 -1
  451. package/src/playbackConfig.ts +5 -6
  452. package/src/player.ts +53 -48
  453. package/src/source.ts +15 -14
  454. package/src/styleConfig.ts +5 -5
  455. package/src/subtitleFormat.ts +5 -5
  456. package/src/subtitleTrack.ts +1 -1
  457. package/src/tweaksConfig.ts +16 -16
  458. package/src/ui/customMessageHandlerModule.ts +46 -0
  459. package/src/ui/custommessagehandlerbridge.ts +45 -18
  460. package/src/ui/fullscreenHandlerModule.ts +35 -0
  461. package/src/ui/fullscreenhandlerbridge.ts +35 -15
  462. package/tsconfig.json +9 -0
  463. package/typedoc.json +23 -0
  464. package/RNBitmovinPlayer.podspec +0 -26
  465. package/android/src/main/java/com/bitmovin/player/reactnative/BitmovinBaseModule.kt +0 -114
  466. package/android/src/main/java/com/bitmovin/player/reactnative/EventRelay.kt +0 -47
  467. package/android/src/main/java/com/bitmovin/player/reactnative/RNPlayerViewPackage.kt +0 -48
  468. package/android/src/main/java/com/bitmovin/player/reactnative/extensions/ReactContextExtension.kt +0 -24
  469. package/android/src/main/java/com/bitmovin/player/reactnative/extensions/ReadableArray.kt +0 -20
  470. package/android/src/main/java/com/bitmovin/player/reactnative/extensions/ReadableMap.kt +0 -15
  471. package/android/src/main/java/com/bitmovin/player/reactnative/extensions/ReadableMapExtension.kt +0 -57
  472. package/android/src/main/java/com/bitmovin/player/reactnative/extensions/WritableMap.kt +0 -27
  473. package/android/src/main/java/com/bitmovin/player/reactnative/ui/CustomMessageHandlerModule.kt +0 -86
  474. package/android/src/main/java/com/bitmovin/player/reactnative/ui/FullscreenHandlerModule.kt +0 -78
  475. package/ios/AudioSessionModule.m +0 -10
  476. package/ios/BitmovinCastManagerModule.m +0 -14
  477. package/ios/BufferModule.m +0 -8
  478. package/ios/CustomMessageHandlerModule.m +0 -10
  479. package/ios/DebugModule.m +0 -7
  480. package/ios/DrmModule.m +0 -16
  481. package/ios/FullscreenHandlerModule.m +0 -10
  482. package/ios/NetworkModule.m +0 -10
  483. package/ios/OfflineModule.m +0 -19
  484. package/ios/PlayerAnalyticsModule.m +0 -8
  485. package/ios/PlayerModule.m +0 -130
  486. package/ios/PreprocessHttpRequestDelegateBridge.swift +0 -30
  487. package/ios/RCTBridge+Generics.swift +0 -6
  488. package/ios/RNBitmovinPlayer.xcodeproj/project.pbxproj +0 -303
  489. package/ios/RNPlayerView+PlayerListener.swift +0 -229
  490. package/ios/RNPlayerView+UserInterfaceListener.swift +0 -35
  491. package/ios/RNPlayerViewManager.m +0 -79
  492. package/ios/SourceModule.m +0 -42
  493. package/ios/UuidModule.m +0 -9
  494. package/lib/index.d.mts +0 -4303
  495. package/lib/index.d.ts +0 -4303
  496. package/lib/index.js +0 -1895
  497. package/lib/index.mjs +0 -1836
@@ -1,4 +1,3 @@
1
- import { NativeSyntheticEvent } from 'react-native';
2
1
  import {
3
2
  AdBreakFinishedEvent,
4
3
  AdBreakStartedEvent,
@@ -68,317 +67,337 @@ import {
68
67
  } from '../../events';
69
68
 
70
69
  /**
71
- * Type that defines all event props supported by `PlayerView` and `NativePlayerView`.
72
- * Used to generate the specific events interface for each component.
70
+ * Event props for `NativePlayerView`.
73
71
  */
74
- interface NativeEventProps {
72
+ export type NativePlayerViewEvents = {
75
73
  /**
76
74
  * Event emitted when an ad break has finished.
77
75
  */
78
- onBmpAdBreakFinished: AdBreakFinishedEvent;
76
+ onBmpAdBreakFinished?: (event: { nativeEvent: AdBreakFinishedEvent }) => void;
79
77
  /**
80
78
  * Event emitted when an ad break has started.
81
79
  */
82
- onBmpAdBreakStarted: AdBreakStartedEvent;
80
+ onBmpAdBreakStarted?: (event: { nativeEvent: AdBreakStartedEvent }) => void;
83
81
  /**
84
82
  * Event emitted when an ad has been clicked.
85
83
  */
86
- onBmpAdClicked: AdClickedEvent;
84
+ onBmpAdClicked?: (event: { nativeEvent: AdClickedEvent }) => void;
87
85
  /**
88
86
  * Event emitted when an ad error has occurred.
89
87
  */
90
- onBmpAdError: AdErrorEvent;
88
+ onBmpAdError?: (event: { nativeEvent: AdErrorEvent }) => void;
91
89
  /**
92
90
  * Event emitted when an ad has finished.
93
91
  */
94
- onBmpAdFinished: AdFinishedEvent;
92
+ onBmpAdFinished?: (event: { nativeEvent: AdFinishedEvent }) => void;
95
93
  /**
96
94
  * Event emitted when an ad manifest starts loading.
97
95
  */
98
- onBmpAdManifestLoad: AdManifestLoadEvent;
96
+ onBmpAdManifestLoad?: (event: { nativeEvent: AdManifestLoadEvent }) => void;
99
97
  /**
100
98
  * Event emitted when an ad manifest has been loaded.
101
99
  */
102
- onBmpAdManifestLoaded: AdManifestLoadedEvent;
100
+ onBmpAdManifestLoaded?: (event: {
101
+ nativeEvent: AdManifestLoadedEvent;
102
+ }) => void;
103
103
  /**
104
104
  * Event emitted when an ad quartile has been reached.
105
105
  */
106
- onBmpAdQuartile: AdQuartileEvent;
106
+ onBmpAdQuartile?: (event: { nativeEvent: AdQuartileEvent }) => void;
107
107
  /**
108
108
  * Event emitted when an ad has been scheduled.
109
109
  */
110
- onBmpAdScheduled: AdScheduledEvent;
110
+ onBmpAdScheduled?: (event: { nativeEvent: AdScheduledEvent }) => void;
111
111
  /**
112
112
  * Event emitted when an ad has been skipped.
113
113
  */
114
- onBmpAdSkipped: AdSkippedEvent;
114
+ onBmpAdSkipped?: (event: { nativeEvent: AdSkippedEvent }) => void;
115
115
  /**
116
116
  * Event emitted when an ad has started.
117
117
  */
118
- onBmpAdStarted: AdStartedEvent;
118
+ onBmpAdStarted?: (event: { nativeEvent: AdStartedEvent }) => void;
119
119
  /**
120
120
  * Event emitted when casting to a cast-compatible device is available.
121
121
  *
122
- * @platform iOS, Android
122
+ * @remarks Platform: iOS, Android
123
123
  */
124
- onBmpCastAvailable: CastAvailableEvent;
124
+ onBmpCastAvailable?: (event: { nativeEvent: CastAvailableEvent }) => void;
125
125
  /**
126
126
  * Event emitted when the playback on a cast-compatible device was paused.
127
127
  *
128
- * @platform iOS, Android
128
+ * @remarks Platform: iOS, Android
129
129
  */
130
- onBmpCastPaused: CastPausedEvent;
130
+ onBmpCastPaused?: (event: { nativeEvent: CastPausedEvent }) => void;
131
131
  /**
132
132
  * Event emitted when the playback on a cast-compatible device has finished.
133
133
  *
134
- * @platform iOS, Android
134
+ * @remarks Platform: iOS, Android
135
135
  */
136
- onBmpCastPlaybackFinished: CastPlaybackFinishedEvent;
136
+ onBmpCastPlaybackFinished?: (event: {
137
+ nativeEvent: CastPlaybackFinishedEvent;
138
+ }) => void;
137
139
  /**
138
140
  * Event emitted when playback on a cast-compatible device has started.
139
141
  *
140
- * @platform iOS, Android
142
+ * @remarks Platform: iOS, Android
141
143
  */
142
- onBmpCastPlaying: CastPlayingEvent;
144
+ onBmpCastPlaying?: (event: { nativeEvent: CastPlayingEvent }) => void;
143
145
  /**
144
146
  * Event emitted when the cast app is launched successfully.
145
147
  *
146
- * @platform iOS, Android
148
+ * @remarks Platform: iOS, Android
147
149
  */
148
- onBmpCastStarted: CastStartedEvent;
150
+ onBmpCastStarted?: (event: { nativeEvent: CastStartedEvent }) => void;
149
151
  /**
150
152
  * Event emitted when casting is initiated, but the user still needs to choose which device should be used.
151
153
  *
152
- * @platform iOS, Android
154
+ * @remarks Platform: iOS, Android
153
155
  */
154
- onBmpCastStart: CastStartEvent;
156
+ onBmpCastStart?: (event: { nativeEvent: CastStartEvent }) => void;
155
157
  /**
156
158
  * Event emitted when casting to a cast-compatible device is stopped.
157
159
  *
158
- * @platform iOS, Android
160
+ * @remarks Platform: iOS, Android
159
161
  */
160
- onBmpCastStopped: CastStoppedEvent;
162
+ onBmpCastStopped?: (event: { nativeEvent: CastStoppedEvent }) => void;
161
163
  /**
162
164
  * Event emitted when the time update from the currently used cast-compatible device is received.
163
165
  *
164
- * @platform iOS, Android
166
+ * @remarks Platform: iOS, Android
165
167
  */
166
- onBmpCastTimeUpdated: CastTimeUpdatedEvent;
168
+ onBmpCastTimeUpdated?: (event: { nativeEvent: CastTimeUpdatedEvent }) => void;
167
169
  /**
168
170
  * Event emitted when a cast-compatible device has been chosen and the player is waiting for the device to get ready for
169
171
  * playback.
170
172
  *
171
- * @platform iOS, Android
173
+ * @remarks Platform: iOS, Android
172
174
  */
173
- onBmpCastWaitingForDevice: CastWaitingForDeviceEvent;
175
+ onBmpCastWaitingForDevice?: (event: {
176
+ nativeEvent: CastWaitingForDeviceEvent;
177
+ }) => void;
174
178
  /**
175
179
  * Event emitted when a subtitle entry transitions into the active status.
176
180
  */
177
- onBmpCueEnter: CueEnterEvent;
181
+ onBmpCueEnter?: (event: { nativeEvent: CueEnterEvent }) => void;
178
182
  /**
179
183
  * Event emitted when an active subtitle entry transitions into the inactive status.
180
184
  */
181
- onBmpCueExit: CueExitEvent;
185
+ onBmpCueExit?: (event: { nativeEvent: CueExitEvent }) => void;
182
186
  /**
183
187
  * Event emitted when the player is destroyed.
184
188
  */
185
- onBmpDestroy: DestroyEvent;
189
+ onBmpDestroy?: (event: { nativeEvent: DestroyEvent }) => void;
186
190
  /**
187
191
  * Emitted when a download was finished.
188
192
  */
189
- onBmpDownloadFinished: DownloadFinishedEvent;
193
+ onBmpDownloadFinished?: (event: {
194
+ nativeEvent: DownloadFinishedEvent;
195
+ }) => void;
190
196
  /**
191
197
  * All events emitted by the player.
192
198
  */
193
- onBmpEvent: Event;
199
+ onBmpEvent?: (event: { nativeEvent: Event }) => void;
194
200
  /**
195
201
  * Event emitted when fullscreen mode has been enabled.
196
202
  *
197
- * @platform iOS, Android
203
+ * @remarks Platform: iOS, Android
198
204
  */
199
- onBmpFullscreenEnabled: FullscreenEnabledEvent;
205
+ onBmpFullscreenEnabled?: (event: {
206
+ nativeEvent: FullscreenEnabledEvent;
207
+ }) => void;
200
208
  /**
201
209
  * Event emitted when fullscreen mode has been disabled.
202
210
  *
203
- * @platform iOS, Android
211
+ * @remarks Platform: iOS, Android
204
212
  */
205
- onBmpFullscreenDisabled: FullscreenDisabledEvent;
213
+ onBmpFullscreenDisabled?: (event: {
214
+ nativeEvent: FullscreenDisabledEvent;
215
+ }) => void;
206
216
  /**
207
217
  * Event emitted when fullscreen mode has been entered.
208
218
  *
209
- * @platform iOS, Android
219
+ * @remarks Platform: iOS, Android
210
220
  */
211
- onBmpFullscreenEnter: FullscreenEnterEvent;
221
+ onBmpFullscreenEnter?: (event: { nativeEvent: FullscreenEnterEvent }) => void;
212
222
  /**
213
223
  * Event emitted when fullscreen mode has been exited.
214
224
  *
215
- * @platform iOS, Android
225
+ * @remarks Platform: iOS, Android
216
226
  */
217
- onBmpFullscreenExit: FullscreenExitEvent;
227
+ onBmpFullscreenExit?: (event: { nativeEvent: FullscreenExitEvent }) => void;
218
228
  /**
219
229
  * Event emitted when the player has been muted.
220
230
  */
221
- onBmpMuted: MutedEvent;
231
+ onBmpMuted?: (event: { nativeEvent: MutedEvent }) => void;
222
232
  /**
223
233
  * Event emitted when the player has been paused.
224
234
  */
225
- onBmpPaused: PausedEvent;
235
+ onBmpPaused?: (event: { nativeEvent: PausedEvent }) => void;
226
236
  /**
227
237
  * Event mitted when the availability of the Picture in Picture mode changed.
228
238
  */
229
- onBmpPictureInPictureAvailabilityChanged: PictureInPictureAvailabilityChangedEvent;
239
+ onBmpPictureInPictureAvailabilityChanged?: (event: {
240
+ nativeEvent: PictureInPictureAvailabilityChangedEvent;
241
+ }) => void;
230
242
  /**
231
243
  * Event emitted when the player enters Picture in Picture mode.
232
244
  */
233
- onBmpPictureInPictureEnter: PictureInPictureEnterEvent;
245
+ onBmpPictureInPictureEnter?: (event: {
246
+ nativeEvent: PictureInPictureEnterEvent;
247
+ }) => void;
234
248
  /**
235
249
  * Event emitted when the player entered Picture in Picture mode.
236
250
  *
237
- * @platform iOS
251
+ * @remarks Platform: iOS
238
252
  */
239
- onBmpPictureInPictureEntered: PictureInPictureEnteredEvent;
253
+ onBmpPictureInPictureEntered?: (event: {
254
+ nativeEvent: PictureInPictureEnteredEvent;
255
+ }) => void;
240
256
  /**
241
257
  * Event emitted when the player exits Picture in Picture mode.
242
258
  */
243
- onBmpPictureInPictureExit: PictureInPictureExitEvent;
259
+ onBmpPictureInPictureExit?: (event: {
260
+ nativeEvent: PictureInPictureExitEvent;
261
+ }) => void;
244
262
  /**
245
263
  * Event emitted when the player exited Picture in Picture mode.
246
264
  *
247
- * @platform iOS
265
+ * @remarks Platform: iOS
248
266
  */
249
- onBmpPictureInPictureExited: PictureInPictureExitedEvent;
267
+ onBmpPictureInPictureExited?: (event: {
268
+ nativeEvent: PictureInPictureExitedEvent;
269
+ }) => void;
250
270
  /**
251
271
  * Event emitted when the player received an intention to start/resume playback.
252
272
  */
253
- onBmpPlay: PlayEvent;
273
+ onBmpPlay?: (event: { nativeEvent: PlayEvent }) => void;
254
274
  /**
255
275
  * Event emitted when the playback of the current media has finished.
256
276
  */
257
- onBmpPlaybackFinished: PlaybackFinishedEvent;
277
+ onBmpPlaybackFinished?: (event: {
278
+ nativeEvent: PlaybackFinishedEvent;
279
+ }) => void;
258
280
  /**
259
281
  * Emitted when the player transitions from one playback speed to another.
260
- * @platform iOS, tvOS
282
+ * @remarks Platform: iOS, tvOS
261
283
  */
262
- onBmpPlaybackSpeedChanged: PlaybackSpeedChangedEvent;
284
+ onBmpPlaybackSpeedChanged?: (event: {
285
+ nativeEvent: PlaybackSpeedChangedEvent;
286
+ }) => void;
263
287
  /**
264
288
  * Event emitted when a source is loaded into the player.
265
289
  * Seeking and time shifting are allowed as soon as this event is seen.
266
290
  */
267
- onBmpPlayerActive: PlayerActiveEvent;
291
+ onBmpPlayerActive?: (event: { nativeEvent: PlayerActiveEvent }) => void;
268
292
  /**
269
293
  * Event Emitted when a player error occurred.
270
294
  */
271
- onBmpPlayerError: PlayerErrorEvent;
295
+ onBmpPlayerError?: (event: { nativeEvent: PlayerErrorEvent }) => void;
272
296
  /**
273
297
  * Event emitted when a player warning occurred.
274
298
  */
275
- onBmpPlayerWarning: PlayerWarningEvent;
299
+ onBmpPlayerWarning?: (event: { nativeEvent: PlayerWarningEvent }) => void;
276
300
  /**
277
301
  * Emitted when playback has started.
278
302
  */
279
- onBmpPlaying: PlayingEvent;
303
+ onBmpPlaying?: (event: { nativeEvent: PlayingEvent }) => void;
280
304
  /**
281
305
  * Emitted when the player is ready for immediate playback, because initial audio/video
282
306
  * has been downloaded.
283
307
  */
284
- onBmpReady: ReadyEvent;
308
+ onBmpReady?: (event: { nativeEvent: ReadyEvent }) => void;
285
309
  /**
286
310
  * Event emitted when the player is about to seek to a new position.
287
311
  * Only applies to VoD streams.
288
312
  */
289
- onBmpSeek: SeekEvent;
313
+ onBmpSeek?: (event: { nativeEvent: SeekEvent }) => void;
290
314
  /**
291
315
  * Event emitted when seeking has finished and data to continue playback is available.
292
316
  * Only applies to VoD streams.
293
317
  */
294
- onBmpSeeked: SeekedEvent;
318
+ onBmpSeeked?: (event: { nativeEvent: SeekedEvent }) => void;
295
319
  /**
296
320
  * Event mitted when the player starts time shifting.
297
321
  * Only applies to live streams.
298
322
  */
299
- onBmpTimeShift: TimeShiftEvent;
323
+ onBmpTimeShift?: (event: { nativeEvent: TimeShiftEvent }) => void;
300
324
  /**
301
325
  * Event emitted when time shifting has finished and data is available to continue playback.
302
326
  * Only applies to live streams.
303
327
  */
304
- onBmpTimeShifted: TimeShiftedEvent;
328
+ onBmpTimeShifted?: (event: { nativeEvent: TimeShiftedEvent }) => void;
305
329
  /**
306
330
  * Event emitted when the player begins to stall and to buffer due to an empty buffer.
307
331
  */
308
- onBmpStallStarted: StallStartedEvent;
332
+ onBmpStallStarted?: (event: { nativeEvent: StallStartedEvent }) => void;
309
333
  /**
310
334
  * Event emitted when the player ends stalling, due to enough data in the buffer.
311
335
  */
312
- onBmpStallEnded: StallEndedEvent;
336
+ onBmpStallEnded?: (event: { nativeEvent: StallEndedEvent }) => void;
313
337
  /**
314
338
  * Event emitted when a source error occurred.
315
339
  */
316
- onBmpSourceError: SourceErrorEvent;
340
+ onBmpSourceError?: (event: { nativeEvent: SourceErrorEvent }) => void;
317
341
  /**
318
342
  * Event emitted when a new source loading has started.
319
343
  */
320
- onBmpSourceLoad: SourceLoadEvent;
344
+ onBmpSourceLoad?: (event: { nativeEvent: SourceLoadEvent }) => void;
321
345
  /**
322
346
  * Event emitted when a new source is loaded.
323
347
  * This does not mean that the source is immediately ready for playback.
324
348
  * `ReadyEvent` indicates the player is ready for immediate playback.
325
349
  */
326
- onBmpSourceLoaded: SourceLoadedEvent;
350
+ onBmpSourceLoaded?: (event: { nativeEvent: SourceLoadedEvent }) => void;
327
351
  /**
328
352
  * Event emitted when the current source has been unloaded.
329
353
  */
330
- onBmpSourceUnloaded: SourceUnloadedEvent;
354
+ onBmpSourceUnloaded?: (event: { nativeEvent: SourceUnloadedEvent }) => void;
331
355
  /**
332
356
  * Event emitted when a source warning occurred.
333
357
  */
334
- onBmpSourceWarning: SourceWarningEvent;
358
+ onBmpSourceWarning?: (event: { nativeEvent: SourceWarningEvent }) => void;
335
359
  /**
336
360
  * Event emitted when a new audio track is added to the player.
337
361
  */
338
- onBmpAudioAdded: AudioAddedEvent;
362
+ onBmpAudioAdded?: (event: { nativeEvent: AudioAddedEvent }) => void;
339
363
  /**
340
364
  * Event emitted when the player's selected audio track has changed.
341
365
  */
342
- onBmpAudioChanged: AudioChangedEvent;
366
+ onBmpAudioChanged?: (event: { nativeEvent: AudioChangedEvent }) => void;
343
367
  /**
344
368
  * Event emitted when an audio track is removed from the player.
345
369
  */
346
- onBmpAudioRemoved: AudioRemovedEvent;
370
+ onBmpAudioRemoved?: (event: { nativeEvent: AudioRemovedEvent }) => void;
347
371
  /**
348
372
  * Event emitted when a new subtitle track is added to the player.
349
373
  */
350
- onBmpSubtitleAdded: SubtitleAddedEvent;
374
+ onBmpSubtitleAdded?: (event: { nativeEvent: SubtitleAddedEvent }) => void;
351
375
  /**
352
376
  * Event emitted when the player's selected subtitle track has changed.
353
377
  */
354
- onBmpSubtitleChanged: SubtitleChangedEvent;
378
+ onBmpSubtitleChanged?: (event: { nativeEvent: SubtitleChangedEvent }) => void;
355
379
  /**
356
380
  * Event emitted when a subtitle track is removed from the player.
357
381
  */
358
- onBmpSubtitleRemoved: SubtitleRemovedEvent;
382
+ onBmpSubtitleRemoved?: (event: { nativeEvent: SubtitleRemovedEvent }) => void;
359
383
  /**
360
384
  * Event emitted when the current playback time has changed.
361
385
  */
362
- onBmpTimeChanged: TimeChangedEvent;
386
+ onBmpTimeChanged?: (event: { nativeEvent: TimeChangedEvent }) => void;
363
387
  /**
364
388
  * Emitted when the player is unmuted.
365
389
  */
366
- onBmpUnmuted: UnmutedEvent;
390
+ onBmpUnmuted?: (event: { nativeEvent: UnmutedEvent }) => void;
367
391
  /**
368
392
  * Emitted when current video download quality has changed.
369
393
  */
370
- onBmpVideoDownloadQualityChanged: VideoDownloadQualityChangedEvent;
394
+ onBmpVideoDownloadQualityChanged?: (event: {
395
+ nativeEvent: VideoDownloadQualityChangedEvent;
396
+ }) => void;
371
397
  /**
372
398
  * Emitted when the current video playback quality has changed.
373
399
  */
374
- onBmpVideoPlaybackQualityChanged: VideoPlaybackQualityChangedEvent;
375
- }
376
-
377
- /**
378
- * Event props for `NativePlayerView`.
379
- */
380
- export type NativePlayerViewEvents = {
381
- [Prop in keyof NativeEventProps]?: (
382
- nativeEvent: NativeSyntheticEvent<NativeEventProps[Prop]>
383
- ) => void;
400
+ onBmpVideoPlaybackQualityChanged?: (event: {
401
+ nativeEvent: VideoPlaybackQualityChangedEvent;
402
+ }) => void;
384
403
  };
@@ -16,7 +16,7 @@ export interface PictureInPictureConfig {
16
16
  *
17
17
  * Default is `false`.
18
18
  *
19
- * @platform iOS 14.2 and above
19
+ * @remarks Platform: iOS 14.2 and above
20
20
  */
21
21
  shouldEnterOnBackground?: boolean;
22
22
  }
@@ -36,7 +36,7 @@ export interface PlayerViewConfig {
36
36
  *
37
37
  * Default is {@link SurfaceType.SurfaceView}.
38
38
  *
39
- * @platform Android
39
+ * @remarks Platform: Android
40
40
  */
41
41
  surfaceType?: SurfaceType;
42
42
  }
@@ -44,7 +44,7 @@ export interface PlayerViewConfig {
44
44
  /**
45
45
  * Configures the visual presentation and behaviour of the Bitmovin Player UI.
46
46
  */
47
- export interface UiConfig {}
47
+ export type UiConfig = object;
48
48
 
49
49
  /**
50
50
  * Configures the visual presentation and behaviour of the Bitmovin Web UI.
@@ -67,7 +67,7 @@ export interface WebUiConfig extends UiConfig {
67
67
  * By default this is enabled only for the TV UI variant, as it's needed there to
68
68
  * initiate spatial navigation using the remote control.
69
69
  *
70
- * @platform Android
70
+ * @remarks Platform: Android
71
71
  */
72
72
  focusUiOnInitialization?: boolean;
73
73
  }
@@ -104,11 +104,7 @@ export class TvUi extends Variant {
104
104
  }
105
105
  }
106
106
 
107
- export class CustomUi extends Variant {
108
- constructor(uiManagerFactoryFunction: string) {
109
- super(uiManagerFactoryFunction);
110
- }
111
- }
107
+ export class CustomUi extends Variant {}
112
108
 
113
109
  /**
114
110
  * The type of surface on which to render video.
@@ -10,6 +10,7 @@ import { PlayerViewConfig } from './playerViewConfig';
10
10
  * Used to establish common props between `NativePlayerView` and {@link PlayerView}.
11
11
  */
12
12
  export interface BasePlayerViewProps {
13
+ ref?: React.RefObject<null>;
13
14
  /**
14
15
  * The {@link FullscreenHandler} that is used by the {@link PlayerView} to control the fullscreen mode.
15
16
  */
@@ -20,6 +21,28 @@ export interface BasePlayerViewProps {
20
21
  */
21
22
  customMessageHandler?: CustomMessageHandler;
22
23
 
24
+ /**
25
+ * Can be set to `true` to request fullscreen mode, or `false` to request exit of fullscreen mode.
26
+ * Should not be used to get the current fullscreen state. Use {@link PlayerViewEvents.onFullscreenEnter} and {@link PlayerViewEvents.onFullscreenExit}
27
+ * or the {@link FullscreenHandler.isFullscreenActive} property to get the current state.
28
+ * Using this property to change the fullscreen state, it is ensured that the embedded Player UI is also aware
29
+ * of potential fullscreen state changes.
30
+ * To use this property, a {@link FullscreenHandler} must be set.
31
+ */
32
+ isFullscreenRequested?: boolean;
33
+
34
+ /**
35
+ * A value defining how the video is displayed within the parent container's bounds.
36
+ * Possible values are defined in {@link ScalingMode}.
37
+ */
38
+ scalingMode?: ScalingMode;
39
+
40
+ /**
41
+ * Can be set to `true` to request Picture in Picture mode, or `false` to request exit of Picture in Picture mode.
42
+ * Should not be used to get the current Picture in Picture state. Use {@link PlayerViewEvents.onPictureInPictureEnter} and {@link PlayerViewEvents.onPictureInPictureExit}.
43
+ */
44
+ isPictureInPictureRequested?: boolean;
45
+
23
46
  /**
24
47
  * Style of the {@link PlayerView}.
25
48
  */
@@ -42,26 +65,4 @@ export interface PlayerViewProps extends BasePlayerViewProps, PlayerViewEvents {
42
65
  * and render audio/video inside the {@link PlayerView}.
43
66
  */
44
67
  player: Player;
45
-
46
- /**
47
- * Can be set to `true` to request fullscreen mode, or `false` to request exit of fullscreen mode.
48
- * Should not be used to get the current fullscreen state. Use {@link PlayerViewEvents.onFullscreenEnter} and {@link PlayerViewEvents.onFullscreenExit}
49
- * or the {@link FullscreenHandler.isFullscreenActive} property to get the current state.
50
- * Using this property to change the fullscreen state, it is ensured that the embedded Player UI is also aware
51
- * of potential fullscreen state changes.
52
- * To use this property, a {@link FullscreenHandler} must be set.
53
- */
54
- isFullscreenRequested?: Boolean;
55
-
56
- /**
57
- * A value defining how the video is displayed within the parent container's bounds.
58
- * Possible values are defined in {@link ScalingMode}.
59
- */
60
- scalingMode?: ScalingMode;
61
-
62
- /**
63
- * Can be set to `true` to request Picture in Picture mode, or `false` to request exit of Picture in Picture mode.
64
- * Should not be used to get the current Picture in Picture state. Use {@link PlayerViewEvents.onPictureInPictureEnter} and {@link PlayerViewEvents.onPictureInPictureExit}.
65
- */
66
- isPictureInPictureRequested?: Boolean;
67
68
  }
package/src/debug.ts CHANGED
@@ -1,6 +1,4 @@
1
- import { NativeModules } from 'react-native';
2
-
3
- const DebugModule = NativeModules.DebugModule;
1
+ import DebugModule from './modules/DebugModule';
4
2
 
5
3
  /**
6
4
  * Global debug configuration for all Bitmovin components.
@@ -3,7 +3,7 @@ import { NativeInstanceConfig } from '../nativeInstance';
3
3
  /**
4
4
  * Configures the playback behaviour of the player.
5
5
  *
6
- * @platform Android
6
+ * @remarks Platform: Android
7
7
  */
8
8
  export interface DecoderConfig extends NativeInstanceConfig {
9
9
  /**
@@ -77,7 +77,7 @@ export interface DecoderConfig extends NativeInstanceConfig {
77
77
  * Can be set on the `DecoderConfig.decoderPriorityProvider` to override the default decoder selection logic.
78
78
  * See {@link DecoderConfig#decoderPriorityProvider} for more details
79
79
  *
80
- * @platform Android
80
+ * @remarks Platform: Android
81
81
  * */
82
82
  export interface DecoderPriorityProvider {
83
83
  overrideDecodersPriority: (
@@ -93,7 +93,7 @@ export interface DecoderContext {
93
93
  }
94
94
 
95
95
  export interface MediaCodecInfo {
96
- name: String;
96
+ name: string;
97
97
  isSoftware: boolean;
98
98
  }
99
99
 
@@ -0,0 +1,62 @@
1
+ import { NativeModule, requireNativeModule } from 'expo-modules-core';
2
+ import { Platform } from 'react-native';
3
+
4
+ export type DecoderConfigModuleEvents = {
5
+ onOverrideDecodersPriority: ({
6
+ nativeId,
7
+ context,
8
+ preferredDecoders,
9
+ }: {
10
+ nativeId: string;
11
+ context: any;
12
+ preferredDecoders: any[];
13
+ }) => void;
14
+ };
15
+
16
+ /**
17
+ * Native DecoderConfigModule using Expo modules API.
18
+ * Android-only module for decoder configuration.
19
+ */
20
+ declare class DecoderConfigModule extends NativeModule<DecoderConfigModuleEvents> {
21
+ initializeWithConfig(
22
+ nativeId: string,
23
+ config: Record<string, any>
24
+ ): Promise<void>;
25
+ overrideDecoderPriorityProviderComplete(
26
+ nativeId: string,
27
+ response: any[]
28
+ ): Promise<void>;
29
+ destroy(nativeId: string): Promise<void>;
30
+ }
31
+
32
+ /**
33
+ * Expo-based DecoderConfigModule implementation.
34
+ * Android-only module that gracefully handles iOS by providing no-op implementations.
35
+ */
36
+ let DecoderConfigModuleInstance: any;
37
+
38
+ if (Platform.OS === 'android') {
39
+ DecoderConfigModuleInstance = requireNativeModule<DecoderConfigModule>(
40
+ 'DecoderConfigModule'
41
+ );
42
+ } else {
43
+ // iOS graceful fallback - provide no-op implementations
44
+ DecoderConfigModuleInstance = {
45
+ initializeWithConfig: async () => {
46
+ // No-op on iOS
47
+ },
48
+ overrideDecoderPriorityProviderComplete: async () => {
49
+ // No-op on iOS
50
+ },
51
+ destroy: async () => {
52
+ // No-op on iOS
53
+ },
54
+ addListener: () => ({ remove: () => {} }),
55
+ removeListener: () => {},
56
+ removeAllListeners: () => {},
57
+ emit: () => {},
58
+ listenerCount: () => 0,
59
+ };
60
+ }
61
+
62
+ export default DecoderConfigModuleInstance;