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
@@ -0,0 +1,216 @@
1
+ import { DrmConfig } from './drm';
2
+ import NativeInstance, { NativeInstanceConfig } from './nativeInstance';
3
+ import { SideLoadedSubtitleTrack } from './subtitleTrack';
4
+ import { Thumbnail } from './thumbnail';
5
+ import { SourceMetadata } from './analytics';
6
+ /**
7
+ * Types of media that can be handled by the player.
8
+ */
9
+ export declare enum SourceType {
10
+ /**
11
+ * Indicates a missing source type.
12
+ */
13
+ NONE = "none",
14
+ /**
15
+ * Indicates media type HLS.
16
+ */
17
+ HLS = "hls",
18
+ /**
19
+ * Indicates media type DASH.
20
+ */
21
+ DASH = "dash",
22
+ /**
23
+ * Indicates media type Progressive MP4.
24
+ */
25
+ PROGRESSIVE = "progressive"
26
+ }
27
+ /**
28
+ * The different loading states a {@link Source} instance can be in.
29
+ */
30
+ export declare enum LoadingState {
31
+ /**
32
+ * The source is unloaded.
33
+ */
34
+ UNLOADED = 0,
35
+ /**
36
+ * The source is currently loading.
37
+ */
38
+ LOADING = 1,
39
+ /**
40
+ * The source is loaded.
41
+ */
42
+ LOADED = 2
43
+ }
44
+ /**
45
+ * Types of SourceOptions.
46
+ */
47
+ export interface SourceOptions {
48
+ /**
49
+ * The position where the stream should be started.
50
+ * Number can be positive or negative depending on the used `TimelineReferencePoint`.
51
+ * Invalid numbers will be corrected according to the stream boundaries.
52
+ * For VOD this is applied at the time the stream is loaded, for LIVE when playback starts.
53
+ */
54
+ startOffset?: number;
55
+ /**
56
+ * Sets the Timeline reference point to calculate the startOffset from.
57
+ * Default for live: `TimelineReferencePoint.END`.
58
+ * Default for VOD: `TimelineReferencePoint.START`.
59
+ */
60
+ startOffsetTimelineReference?: TimelineReferencePoint;
61
+ }
62
+ /**
63
+ Timeline reference point to calculate SourceOptions.startOffset from.
64
+ Default for live: TimelineReferencePoint.EBD Default for VOD: TimelineReferencePoint.START.
65
+ */
66
+ export declare enum TimelineReferencePoint {
67
+ /**
68
+ * Relative offset will be calculated from the beginning of the stream or DVR window.
69
+ */
70
+ START = "start",
71
+ /**
72
+ * Relative offset will be calculated from the end of the stream or the live edge in case of a live stream with DVR window.
73
+ */
74
+ END = "end"
75
+ }
76
+ /**
77
+ * Represents a source configuration that be loaded into a player instance.
78
+ */
79
+ export interface SourceConfig extends NativeInstanceConfig {
80
+ /**
81
+ * The url for this source configuration.
82
+ */
83
+ url: string;
84
+ /**
85
+ * The `SourceType` for this configuration.
86
+ */
87
+ type?: SourceType;
88
+ /**
89
+ * The title of the video source.
90
+ */
91
+ title?: string;
92
+ /**
93
+ * The description of the video source.
94
+ */
95
+ description?: string;
96
+ /**
97
+ * The URL to a preview image displayed until the video starts.
98
+ */
99
+ poster?: string;
100
+ /**
101
+ * Indicates whether to show the poster image during playback.
102
+ * Useful, for example, for audio-only streams.
103
+ */
104
+ isPosterPersistent?: boolean;
105
+ /**
106
+ * The DRM config for the source.
107
+ */
108
+ drmConfig?: DrmConfig;
109
+ /**
110
+ * External subtitle tracks to be added into the player.
111
+ */
112
+ subtitleTracks?: SideLoadedSubtitleTrack[];
113
+ /**
114
+ * External thumbnails to be added into the player.
115
+ */
116
+ thumbnailTrack?: string;
117
+ /**
118
+ * The optional custom metadata. Also sent to the cast receiver when loading the Source.
119
+ */
120
+ metadata?: Record<string, string>;
121
+ /**
122
+ * The `SourceOptions` for this configuration.
123
+ */
124
+ options?: SourceOptions;
125
+ /**
126
+ * The `SourceMetadata` for the {@link Source} to setup custom analytics tracking
127
+ */
128
+ analyticsSourceMetadata?: SourceMetadata;
129
+ }
130
+ /**
131
+ * The remote control config for a source.
132
+ * @remarks Platform: iOS
133
+ */
134
+ export interface SourceRemoteControlConfig {
135
+ /**
136
+ * The `SourceConfig` for casting.
137
+ * Enables to play different content when casting.
138
+ * This can be useful when the remote playback device supports different streaming formats,
139
+ * DRM systems, etc. than the local device.
140
+ * If not set, the local source config will be used for casting.
141
+ */
142
+ castSourceConfig?: SourceConfig | null;
143
+ }
144
+ /**
145
+ * Represents audio and video content that can be loaded into a player.
146
+ */
147
+ export declare class Source extends NativeInstance<SourceConfig> {
148
+ /**
149
+ * The native DRM config reference of this source.
150
+ */
151
+ private drm?;
152
+ /**
153
+ * The remote control config for this source.
154
+ * This is only supported on iOS.
155
+ *
156
+ * @remarks Platform: iOS
157
+ */
158
+ remoteControl: SourceRemoteControlConfig | null;
159
+ /**
160
+ * Whether the native {@link Source} object has been created.
161
+ */
162
+ isInitialized: boolean;
163
+ /**
164
+ * Whether the native {@link Source} object has been disposed.
165
+ */
166
+ isDestroyed: boolean;
167
+ /**
168
+ * Allocates the native {@link Source} instance and its resources natively.
169
+ */
170
+ initialize: () => Promise<void>;
171
+ /**
172
+ * Destroys the native {@link Source} and releases all of its allocated resources.
173
+ */
174
+ destroy: () => void;
175
+ /**
176
+ * The duration of the source in seconds if it’s a VoD or `INFINITY` if it’s a live stream.
177
+ * Default value is `0` if the duration is not available or not known.
178
+ */
179
+ duration: () => Promise<number>;
180
+ /**
181
+ * Whether the source is currently active in a player (i.e. playing back or paused).
182
+ * Only one source can be active in the same player instance at any time.
183
+ */
184
+ isActive: () => Promise<boolean>;
185
+ /**
186
+ * Whether the source is currently attached to a player instance.
187
+ */
188
+ isAttachedToPlayer: () => Promise<boolean>;
189
+ /**
190
+ * Metadata for the currently loaded source.
191
+ */
192
+ metadata: () => Promise<Record<string, any> | null>;
193
+ /**
194
+ * Set metadata for the currently loaded source.
195
+ * Setting the metadata to `null` clears the metadata object in native source.
196
+ *
197
+ * @param metadata metadata to be set.
198
+ */
199
+ setMetadata: (metadata: Record<string, any> | null) => void;
200
+ /**
201
+ * The current `LoadingState` of the source.
202
+ */
203
+ loadingState: () => Promise<LoadingState>;
204
+ /**
205
+ * @returns a `Thumbnail` for the specified playback time if available.
206
+ * Supported thumbnail formats are:
207
+ * - `WebVtt` configured via {@link SourceConfig.thumbnailTrack}, on all supported platforms
208
+ * - HLS `Image Media Playlist` in the multivariant playlist, Android-only
209
+ * - DASH `Image Adaptation Set` as specified in DASH-IF IOP, Android-only
210
+ * If a `WebVtt` thumbnail track is provided, any potential in-manifest thumbnails are ignored on Android.
211
+ *
212
+ * @param time - The time in seconds for which to retrieve the thumbnail.
213
+ */
214
+ getThumbnail: (time: number) => Promise<Thumbnail | null>;
215
+ }
216
+ //# sourceMappingURL=source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../src/source.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,167 @@
1
+ import { Drm } from './drm';
2
+ import NativeInstance from './nativeInstance';
3
+ import SourceModule from './modules/SourceModule';
4
+ /**
5
+ * Types of media that can be handled by the player.
6
+ */
7
+ export var SourceType;
8
+ (function (SourceType) {
9
+ /**
10
+ * Indicates a missing source type.
11
+ */
12
+ SourceType["NONE"] = "none";
13
+ /**
14
+ * Indicates media type HLS.
15
+ */
16
+ SourceType["HLS"] = "hls";
17
+ /**
18
+ * Indicates media type DASH.
19
+ */
20
+ SourceType["DASH"] = "dash";
21
+ /**
22
+ * Indicates media type Progressive MP4.
23
+ */
24
+ SourceType["PROGRESSIVE"] = "progressive";
25
+ })(SourceType || (SourceType = {}));
26
+ /**
27
+ * The different loading states a {@link Source} instance can be in.
28
+ */
29
+ export var LoadingState;
30
+ (function (LoadingState) {
31
+ /**
32
+ * The source is unloaded.
33
+ */
34
+ LoadingState[LoadingState["UNLOADED"] = 0] = "UNLOADED";
35
+ /**
36
+ * The source is currently loading.
37
+ */
38
+ LoadingState[LoadingState["LOADING"] = 1] = "LOADING";
39
+ /**
40
+ * The source is loaded.
41
+ */
42
+ LoadingState[LoadingState["LOADED"] = 2] = "LOADED";
43
+ })(LoadingState || (LoadingState = {}));
44
+ /**
45
+ Timeline reference point to calculate SourceOptions.startOffset from.
46
+ Default for live: TimelineReferencePoint.EBD Default for VOD: TimelineReferencePoint.START.
47
+ */
48
+ export var TimelineReferencePoint;
49
+ (function (TimelineReferencePoint) {
50
+ /**
51
+ * Relative offset will be calculated from the beginning of the stream or DVR window.
52
+ */
53
+ TimelineReferencePoint["START"] = "start";
54
+ /**
55
+ * Relative offset will be calculated from the end of the stream or the live edge in case of a live stream with DVR window.
56
+ */
57
+ TimelineReferencePoint["END"] = "end";
58
+ })(TimelineReferencePoint || (TimelineReferencePoint = {}));
59
+ /**
60
+ * Represents audio and video content that can be loaded into a player.
61
+ */
62
+ export class Source extends NativeInstance {
63
+ /**
64
+ * The native DRM config reference of this source.
65
+ */
66
+ drm;
67
+ /**
68
+ * The remote control config for this source.
69
+ * This is only supported on iOS.
70
+ *
71
+ * @remarks Platform: iOS
72
+ */
73
+ remoteControl = null;
74
+ /**
75
+ * Whether the native {@link Source} object has been created.
76
+ */
77
+ isInitialized = false;
78
+ /**
79
+ * Whether the native {@link Source} object has been disposed.
80
+ */
81
+ isDestroyed = false;
82
+ /**
83
+ * Allocates the native {@link Source} instance and its resources natively.
84
+ */
85
+ initialize = async () => {
86
+ if (!this.isInitialized) {
87
+ const sourceMetadata = this.config?.analyticsSourceMetadata;
88
+ if (this.config?.drmConfig) {
89
+ this.drm = new Drm(this.config.drmConfig);
90
+ this.drm.initialize();
91
+ }
92
+ if (sourceMetadata) {
93
+ await SourceModule.initializeWithAnalyticsConfig(this.nativeId, this.drm?.nativeId, this.config, this.remoteControl || undefined, sourceMetadata);
94
+ }
95
+ else {
96
+ await SourceModule.initializeWithConfig(this.nativeId, this.drm?.nativeId, this.config, this.remoteControl || undefined);
97
+ }
98
+ this.isInitialized = true;
99
+ }
100
+ return Promise.resolve();
101
+ };
102
+ /**
103
+ * Destroys the native {@link Source} and releases all of its allocated resources.
104
+ */
105
+ destroy = () => {
106
+ if (!this.isDestroyed) {
107
+ SourceModule.destroy(this.nativeId);
108
+ this.drm?.destroy();
109
+ this.isDestroyed = true;
110
+ }
111
+ };
112
+ /**
113
+ * The duration of the source in seconds if it’s a VoD or `INFINITY` if it’s a live stream.
114
+ * Default value is `0` if the duration is not available or not known.
115
+ */
116
+ duration = async () => {
117
+ return (await SourceModule.duration(this.nativeId)) || 0;
118
+ };
119
+ /**
120
+ * Whether the source is currently active in a player (i.e. playing back or paused).
121
+ * Only one source can be active in the same player instance at any time.
122
+ */
123
+ isActive = async () => {
124
+ return (await SourceModule.isActive(this.nativeId)) ?? false;
125
+ };
126
+ /**
127
+ * Whether the source is currently attached to a player instance.
128
+ */
129
+ isAttachedToPlayer = async () => {
130
+ return (await SourceModule.isAttachedToPlayer(this.nativeId)) ?? false;
131
+ };
132
+ /**
133
+ * Metadata for the currently loaded source.
134
+ */
135
+ metadata = async () => {
136
+ return SourceModule.getMetadata(this.nativeId);
137
+ };
138
+ /**
139
+ * Set metadata for the currently loaded source.
140
+ * Setting the metadata to `null` clears the metadata object in native source.
141
+ *
142
+ * @param metadata metadata to be set.
143
+ */
144
+ setMetadata = (metadata) => {
145
+ SourceModule.setMetadata(this.nativeId, metadata);
146
+ };
147
+ /**
148
+ * The current `LoadingState` of the source.
149
+ */
150
+ loadingState = async () => {
151
+ return ((await SourceModule.loadingState(this.nativeId)) || LoadingState.UNLOADED);
152
+ };
153
+ /**
154
+ * @returns a `Thumbnail` for the specified playback time if available.
155
+ * Supported thumbnail formats are:
156
+ * - `WebVtt` configured via {@link SourceConfig.thumbnailTrack}, on all supported platforms
157
+ * - HLS `Image Media Playlist` in the multivariant playlist, Android-only
158
+ * - DASH `Image Adaptation Set` as specified in DASH-IF IOP, Android-only
159
+ * If a `WebVtt` thumbnail track is provided, any potential in-manifest thumbnails are ignored on Android.
160
+ *
161
+ * @param time - The time in seconds for which to retrieve the thumbnail.
162
+ */
163
+ getThumbnail = async (time) => {
164
+ return SourceModule.getThumbnail(this.nativeId, time);
165
+ };
166
+ }
167
+ //# sourceMappingURL=source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source.js","sourceRoot":"","sources":["../src/source.ts"],"names":[],"mappings":"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","sourcesContent":["import { Drm, DrmConfig } from './drm';\nimport NativeInstance, { NativeInstanceConfig } from './nativeInstance';\nimport { SideLoadedSubtitleTrack } from './subtitleTrack';\nimport { Thumbnail } from './thumbnail';\nimport { SourceMetadata } from './analytics';\nimport SourceModule from './modules/SourceModule';\n\n/**\n * Types of media that can be handled by the player.\n */\nexport enum SourceType {\n /**\n * Indicates a missing source type.\n */\n NONE = 'none',\n /**\n * Indicates media type HLS.\n */\n HLS = 'hls',\n /**\n * Indicates media type DASH.\n */\n DASH = 'dash',\n /**\n * Indicates media type Progressive MP4.\n */\n PROGRESSIVE = 'progressive',\n}\n\n/**\n * The different loading states a {@link Source} instance can be in.\n */\nexport enum LoadingState {\n /**\n * The source is unloaded.\n */\n UNLOADED = 0,\n /**\n * The source is currently loading.\n */\n LOADING = 1,\n /**\n * The source is loaded.\n */\n LOADED = 2,\n}\n\n/**\n * Types of SourceOptions.\n */\nexport interface SourceOptions {\n /**\n * The position where the stream should be started.\n * Number can be positive or negative depending on the used `TimelineReferencePoint`.\n * Invalid numbers will be corrected according to the stream boundaries.\n * For VOD this is applied at the time the stream is loaded, for LIVE when playback starts.\n */\n startOffset?: number;\n /**\n * Sets the Timeline reference point to calculate the startOffset from.\n * Default for live: `TimelineReferencePoint.END`.\n * Default for VOD: `TimelineReferencePoint.START`.\n */\n startOffsetTimelineReference?: TimelineReferencePoint;\n}\n\n/**\n Timeline reference point to calculate SourceOptions.startOffset from.\n Default for live: TimelineReferencePoint.EBD Default for VOD: TimelineReferencePoint.START.\n */\nexport enum TimelineReferencePoint {\n /**\n * Relative offset will be calculated from the beginning of the stream or DVR window.\n */\n START = 'start',\n /**\n * Relative offset will be calculated from the end of the stream or the live edge in case of a live stream with DVR window.\n */\n END = 'end',\n}\n\n/**\n * Represents a source configuration that be loaded into a player instance.\n */\nexport interface SourceConfig extends NativeInstanceConfig {\n /**\n * The url for this source configuration.\n */\n url: string;\n /**\n * The `SourceType` for this configuration.\n */\n type?: SourceType;\n /**\n * The title of the video source.\n */\n title?: string;\n /**\n * The description of the video source.\n */\n description?: string;\n /**\n * The URL to a preview image displayed until the video starts.\n */\n poster?: string;\n /**\n * Indicates whether to show the poster image during playback.\n * Useful, for example, for audio-only streams.\n */\n isPosterPersistent?: boolean;\n /**\n * The DRM config for the source.\n */\n drmConfig?: DrmConfig;\n /**\n * External subtitle tracks to be added into the player.\n */\n subtitleTracks?: SideLoadedSubtitleTrack[];\n /**\n * External thumbnails to be added into the player.\n */\n thumbnailTrack?: string;\n /**\n * The optional custom metadata. Also sent to the cast receiver when loading the Source.\n */\n metadata?: Record<string, string>;\n /**\n * The `SourceOptions` for this configuration.\n */\n options?: SourceOptions;\n /**\n * The `SourceMetadata` for the {@link Source} to setup custom analytics tracking\n */\n analyticsSourceMetadata?: SourceMetadata;\n}\n\n/**\n * The remote control config for a source.\n * @remarks Platform: iOS\n */\nexport interface SourceRemoteControlConfig {\n /**\n * The `SourceConfig` for casting.\n * Enables to play different content when casting.\n * This can be useful when the remote playback device supports different streaming formats,\n * DRM systems, etc. than the local device.\n * If not set, the local source config will be used for casting.\n */\n castSourceConfig?: SourceConfig | null;\n}\n\n/**\n * Represents audio and video content that can be loaded into a player.\n */\nexport class Source extends NativeInstance<SourceConfig> {\n /**\n * The native DRM config reference of this source.\n */\n private drm?: Drm;\n /**\n * The remote control config for this source.\n * This is only supported on iOS.\n *\n * @remarks Platform: iOS\n */\n remoteControl: SourceRemoteControlConfig | null = null;\n /**\n * Whether the native {@link Source} object has been created.\n */\n isInitialized = false;\n /**\n * Whether the native {@link Source} object has been disposed.\n */\n isDestroyed = false;\n\n /**\n * Allocates the native {@link Source} instance and its resources natively.\n */\n initialize = async (): Promise<void> => {\n if (!this.isInitialized) {\n const sourceMetadata = this.config?.analyticsSourceMetadata;\n if (this.config?.drmConfig) {\n this.drm = new Drm(this.config.drmConfig);\n this.drm.initialize();\n }\n if (sourceMetadata) {\n await SourceModule.initializeWithAnalyticsConfig(\n this.nativeId,\n this.drm?.nativeId,\n this.config,\n this.remoteControl || undefined,\n sourceMetadata\n );\n } else {\n await SourceModule.initializeWithConfig(\n this.nativeId,\n this.drm?.nativeId,\n this.config,\n this.remoteControl || undefined\n );\n }\n this.isInitialized = true;\n }\n return Promise.resolve();\n };\n\n /**\n * Destroys the native {@link Source} and releases all of its allocated resources.\n */\n destroy = () => {\n if (!this.isDestroyed) {\n SourceModule.destroy(this.nativeId);\n this.drm?.destroy();\n this.isDestroyed = true;\n }\n };\n\n /**\n * The duration of the source in seconds if it’s a VoD or `INFINITY` if it’s a live stream.\n * Default value is `0` if the duration is not available or not known.\n */\n duration = async (): Promise<number> => {\n return (await SourceModule.duration(this.nativeId)) || 0;\n };\n\n /**\n * Whether the source is currently active in a player (i.e. playing back or paused).\n * Only one source can be active in the same player instance at any time.\n */\n isActive = async (): Promise<boolean> => {\n return (await SourceModule.isActive(this.nativeId)) ?? false;\n };\n\n /**\n * Whether the source is currently attached to a player instance.\n */\n isAttachedToPlayer = async (): Promise<boolean> => {\n return (await SourceModule.isAttachedToPlayer(this.nativeId)) ?? false;\n };\n\n /**\n * Metadata for the currently loaded source.\n */\n metadata = async (): Promise<Record<string, any> | null> => {\n return SourceModule.getMetadata(this.nativeId);\n };\n\n /**\n * Set metadata for the currently loaded source.\n * Setting the metadata to `null` clears the metadata object in native source.\n *\n * @param metadata metadata to be set.\n */\n setMetadata = (metadata: Record<string, any> | null): void => {\n SourceModule.setMetadata(this.nativeId, metadata);\n };\n\n /**\n * The current `LoadingState` of the source.\n */\n loadingState = async (): Promise<LoadingState> => {\n return (\n (await SourceModule.loadingState(this.nativeId)) || LoadingState.UNLOADED\n );\n };\n\n /**\n * @returns a `Thumbnail` for the specified playback time if available.\n * Supported thumbnail formats are:\n * - `WebVtt` configured via {@link SourceConfig.thumbnailTrack}, on all supported platforms\n * - HLS `Image Media Playlist` in the multivariant playlist, Android-only\n * - DASH `Image Adaptation Set` as specified in DASH-IF IOP, Android-only\n * If a `WebVtt` thumbnail track is provided, any potential in-manifest thumbnails are ignored on Android.\n *\n * @param time - The time in seconds for which to retrieve the thumbnail.\n */\n getThumbnail = async (time: number): Promise<Thumbnail | null> => {\n return SourceModule.getThumbnail(this.nativeId, time);\n };\n}\n"]}
@@ -0,0 +1,120 @@
1
+ /**
2
+ * Contains config values which can be used to alter the visual presentation and behaviour of the player UI.
3
+ */
4
+ export interface StyleConfig {
5
+ /**
6
+ * Sets if the UI should be enabled or not. Default value is `true`.
7
+ * @example
8
+ * ```
9
+ * const player = new Player({
10
+ * styleConfig: {
11
+ * isUiEnabled: false,
12
+ * },
13
+ * });
14
+ * ```
15
+ */
16
+ isUiEnabled?: boolean;
17
+ /**
18
+ * Sets which user interface type should be used.
19
+ * Default value is `UserInterfaceType.bitmovin` on `iOS` and `UserInterfaceType.system` on `tvOS`.
20
+ * This setting only applies if `StyleConfig.isUiEnabled` is set to true.
21
+ * @example
22
+ * ```
23
+ * const player = new Player({
24
+ * styleConfig: {
25
+ * userInterfaceType: UserInterfaceType.System,
26
+ * },
27
+ * });
28
+ * ```
29
+ * @remarks Platform: iOS, tvOS
30
+ */
31
+ userInterfaceType?: UserInterfaceType;
32
+ /**
33
+ * Sets the CSS file that will be used for the UI. The default CSS file will be completely replaced by the CSS file set with this property.
34
+ * @example
35
+ * ```
36
+ * const player = new Player({
37
+ * styleConfig: {
38
+ * playerUiCss: 'https://domain.tld/path/to/bitmovinplayer-ui.css',
39
+ * },
40
+ * });
41
+ * ```
42
+ * @remarks Platform: iOS, Android
43
+ */
44
+ playerUiCss?: string;
45
+ /**
46
+ * Sets a CSS file which contains supplemental styles for the player UI. These styles will be added to the default CSS file or the CSS file set with `StyleConfig.playerUiCss`.
47
+ * @example
48
+ * ```
49
+ * const player = new Player({
50
+ * styleConfig: {
51
+ * supplementalPlayerUiCss: 'https://domain.tld/path/to/bitmovinplayer-supplemental-ui.css',
52
+ * },
53
+ * });
54
+ * ```
55
+ * @remarks Platform: iOS, Android
56
+ */
57
+ supplementalPlayerUiCss?: string;
58
+ /**
59
+ * Sets the JS file that will be used for the UI. The default JS file will be completely replaced by the JS file set with this property.
60
+ * @example
61
+ * ```
62
+ * const player = new Player({
63
+ * styleConfig: {
64
+ * playerUiJs: 'https://domain.tld/path/to/bitmovinplayer-ui.js',
65
+ * },
66
+ * });
67
+ * ```
68
+ * @remarks Platform: iOS, Android
69
+ */
70
+ playerUiJs?: string;
71
+ /**
72
+ * Determines how the video content is scaled or stretched within the parent container’s bounds. Possible values are defined in `ScalingMode`.
73
+ * Default value is `ScalingMode.fit`.
74
+ * @example
75
+ * ```
76
+ * const player = new Player({
77
+ * styleConfig: {
78
+ * scalingMode: ScalingMode.Zoom,
79
+ * },
80
+ * });
81
+ * ```
82
+ */
83
+ scalingMode?: ScalingMode;
84
+ }
85
+ /**
86
+ * Specifies how the video content is scaled or stretched.
87
+ */
88
+ export declare enum ScalingMode {
89
+ /**
90
+ * Specifies that the player should preserve the video’s aspect ratio and fit the video within the container's bounds.
91
+ */
92
+ Fit = "Fit",
93
+ /**
94
+ * Specifies that the video should be stretched to fill the container’s bounds. The aspect ratio may not be preserved.
95
+ */
96
+ Stretch = "Stretch",
97
+ /**
98
+ * Specifies that the player should preserve the video’s aspect ratio and fill the container’s bounds.
99
+ */
100
+ Zoom = "Zoom"
101
+ }
102
+ /**
103
+ * Indicates which type of UI should be used.
104
+ */
105
+ export declare enum UserInterfaceType {
106
+ /**
107
+ * Indicates that Bitmovin's customizable UI should be used.
108
+ */
109
+ Bitmovin = "Bitmovin",
110
+ /**
111
+ * Indicates that the system UI should be used.
112
+ * @remarks Platform: iOS, tvOS
113
+ */
114
+ System = "System",
115
+ /**
116
+ * Indicates that only subtitles should be displayed along with the video content.
117
+ */
118
+ Subtitle = "Subtitle"
119
+ }
120
+ //# sourceMappingURL=styleConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styleConfig.d.ts","sourceRoot":"","sources":["../src/styleConfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;;;;;;;;;OAaG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC;;;;;;;;;;;OAWG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;;;;;OAWG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;;;;;;OAWG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED;;GAEG;AACH,oBAAY,WAAW;IACrB;;OAEG;IACH,GAAG,QAAQ;IACX;;OAEG;IACH,OAAO,YAAY;IACnB;;OAEG;IACH,IAAI,SAAS;CACd;AAED;;GAEG;AACH,oBAAY,iBAAiB;IAC3B;;OAEG;IACH,QAAQ,aAAa;IACrB;;;OAGG;IACH,MAAM,WAAW;IACjB;;OAEG;IACH,QAAQ,aAAa;CACtB"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Specifies how the video content is scaled or stretched.
3
+ */
4
+ export var ScalingMode;
5
+ (function (ScalingMode) {
6
+ /**
7
+ * Specifies that the player should preserve the video’s aspect ratio and fit the video within the container's bounds.
8
+ */
9
+ ScalingMode["Fit"] = "Fit";
10
+ /**
11
+ * Specifies that the video should be stretched to fill the container’s bounds. The aspect ratio may not be preserved.
12
+ */
13
+ ScalingMode["Stretch"] = "Stretch";
14
+ /**
15
+ * Specifies that the player should preserve the video’s aspect ratio and fill the container’s bounds.
16
+ */
17
+ ScalingMode["Zoom"] = "Zoom";
18
+ })(ScalingMode || (ScalingMode = {}));
19
+ /**
20
+ * Indicates which type of UI should be used.
21
+ */
22
+ export var UserInterfaceType;
23
+ (function (UserInterfaceType) {
24
+ /**
25
+ * Indicates that Bitmovin's customizable UI should be used.
26
+ */
27
+ UserInterfaceType["Bitmovin"] = "Bitmovin";
28
+ /**
29
+ * Indicates that the system UI should be used.
30
+ * @remarks Platform: iOS, tvOS
31
+ */
32
+ UserInterfaceType["System"] = "System";
33
+ /**
34
+ * Indicates that only subtitles should be displayed along with the video content.
35
+ */
36
+ UserInterfaceType["Subtitle"] = "Subtitle";
37
+ })(UserInterfaceType || (UserInterfaceType = {}));
38
+ //# sourceMappingURL=styleConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styleConfig.js","sourceRoot":"","sources":["../src/styleConfig.ts"],"names":[],"mappings":"AAqFA;;GAEG;AACH,MAAM,CAAN,IAAY,WAaX;AAbD,WAAY,WAAW;IACrB;;OAEG;IACH,0BAAW,CAAA;IACX;;OAEG;IACH,kCAAmB,CAAA;IACnB;;OAEG;IACH,4BAAa,CAAA;AACf,CAAC,EAbW,WAAW,KAAX,WAAW,QAatB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,iBAcX;AAdD,WAAY,iBAAiB;IAC3B;;OAEG;IACH,0CAAqB,CAAA;IACrB;;;OAGG;IACH,sCAAiB,CAAA;IACjB;;OAEG;IACH,0CAAqB,CAAA;AACvB,CAAC,EAdW,iBAAiB,KAAjB,iBAAiB,QAc5B","sourcesContent":["/**\n * Contains config values which can be used to alter the visual presentation and behaviour of the player UI.\n */\nexport interface StyleConfig {\n /**\n * Sets if the UI should be enabled or not. Default value is `true`.\n * @example\n * ```\n * const player = new Player({\n * styleConfig: {\n * isUiEnabled: false,\n * },\n * });\n * ```\n */\n isUiEnabled?: boolean;\n /**\n * Sets which user interface type should be used.\n * Default value is `UserInterfaceType.bitmovin` on `iOS` and `UserInterfaceType.system` on `tvOS`.\n * This setting only applies if `StyleConfig.isUiEnabled` is set to true.\n * @example\n * ```\n * const player = new Player({\n * styleConfig: {\n * userInterfaceType: UserInterfaceType.System,\n * },\n * });\n * ```\n * @remarks Platform: iOS, tvOS\n */\n userInterfaceType?: UserInterfaceType;\n /**\n * Sets the CSS file that will be used for the UI. The default CSS file will be completely replaced by the CSS file set with this property.\n * @example\n * ```\n * const player = new Player({\n * styleConfig: {\n * playerUiCss: 'https://domain.tld/path/to/bitmovinplayer-ui.css',\n * },\n * });\n * ```\n * @remarks Platform: iOS, Android\n */\n playerUiCss?: string;\n /**\n * Sets a CSS file which contains supplemental styles for the player UI. These styles will be added to the default CSS file or the CSS file set with `StyleConfig.playerUiCss`.\n * @example\n * ```\n * const player = new Player({\n * styleConfig: {\n * supplementalPlayerUiCss: 'https://domain.tld/path/to/bitmovinplayer-supplemental-ui.css',\n * },\n * });\n * ```\n * @remarks Platform: iOS, Android\n */\n supplementalPlayerUiCss?: string;\n /**\n * Sets the JS file that will be used for the UI. The default JS file will be completely replaced by the JS file set with this property.\n * @example\n * ```\n * const player = new Player({\n * styleConfig: {\n * playerUiJs: 'https://domain.tld/path/to/bitmovinplayer-ui.js',\n * },\n * });\n * ```\n * @remarks Platform: iOS, Android\n */\n playerUiJs?: string;\n /**\n * Determines how the video content is scaled or stretched within the parent container’s bounds. Possible values are defined in `ScalingMode`.\n * Default value is `ScalingMode.fit`.\n * @example\n * ```\n * const player = new Player({\n * styleConfig: {\n * scalingMode: ScalingMode.Zoom,\n * },\n * });\n * ```\n */\n scalingMode?: ScalingMode;\n}\n\n/**\n * Specifies how the video content is scaled or stretched.\n */\nexport enum ScalingMode {\n /**\n * Specifies that the player should preserve the video’s aspect ratio and fit the video within the container's bounds.\n */\n Fit = 'Fit',\n /**\n * Specifies that the video should be stretched to fill the container’s bounds. The aspect ratio may not be preserved.\n */\n Stretch = 'Stretch',\n /**\n * Specifies that the player should preserve the video’s aspect ratio and fill the container’s bounds.\n */\n Zoom = 'Zoom',\n}\n\n/**\n * Indicates which type of UI should be used.\n */\nexport enum UserInterfaceType {\n /**\n * Indicates that Bitmovin's customizable UI should be used.\n */\n Bitmovin = 'Bitmovin',\n /**\n * Indicates that the system UI should be used.\n * @remarks Platform: iOS, tvOS\n */\n System = 'System',\n /**\n * Indicates that only subtitles should be displayed along with the video content.\n */\n Subtitle = 'Subtitle',\n}\n"]}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Supported subtitle/caption file formats.
3
+ * @remarks Platform: Android, iOS, tvOS
4
+ */
5
+ export declare enum SubtitleFormat {
6
+ /**
7
+ * Closed Captioning (CEA) subtitle format.
8
+ * @remarks Platform: Android, iOS, tvOS
9
+ */
10
+ CEA = "cea",
11
+ /**
12
+ * Timed Text Markup Language (TTML) subtitle format.
13
+ * @remarks Platform: Android, iOS, tvOS
14
+ */
15
+ TTML = "ttml",
16
+ /**
17
+ * Web Video Text Tracks Format (WebVTT) subtitle format.
18
+ * @remarks Platform: Android, iOS, tvOS
19
+ */
20
+ VTT = "vtt",
21
+ /**
22
+ * SubRip (SRT) subtitle format.
23
+ * @remarks Platform: Android, iOS, tvOS
24
+ */
25
+ SRT = "srt"
26
+ }
27
+ //# sourceMappingURL=subtitleFormat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subtitleFormat.d.ts","sourceRoot":"","sources":["../src/subtitleFormat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,cAAc;IACxB;;;OAGG;IACH,GAAG,QAAQ;IACX;;;OAGG;IACH,IAAI,SAAS;IACb;;;OAGG;IACH,GAAG,QAAQ;IACX;;;OAGG;IACH,GAAG,QAAQ;CACZ"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Supported subtitle/caption file formats.
3
+ * @remarks Platform: Android, iOS, tvOS
4
+ */
5
+ export var SubtitleFormat;
6
+ (function (SubtitleFormat) {
7
+ /**
8
+ * Closed Captioning (CEA) subtitle format.
9
+ * @remarks Platform: Android, iOS, tvOS
10
+ */
11
+ SubtitleFormat["CEA"] = "cea";
12
+ /**
13
+ * Timed Text Markup Language (TTML) subtitle format.
14
+ * @remarks Platform: Android, iOS, tvOS
15
+ */
16
+ SubtitleFormat["TTML"] = "ttml";
17
+ /**
18
+ * Web Video Text Tracks Format (WebVTT) subtitle format.
19
+ * @remarks Platform: Android, iOS, tvOS
20
+ */
21
+ SubtitleFormat["VTT"] = "vtt";
22
+ /**
23
+ * SubRip (SRT) subtitle format.
24
+ * @remarks Platform: Android, iOS, tvOS
25
+ */
26
+ SubtitleFormat["SRT"] = "srt";
27
+ })(SubtitleFormat || (SubtitleFormat = {}));
28
+ //# sourceMappingURL=subtitleFormat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subtitleFormat.js","sourceRoot":"","sources":["../src/subtitleFormat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAN,IAAY,cAqBX;AArBD,WAAY,cAAc;IACxB;;;OAGG;IACH,6BAAW,CAAA;IACX;;;OAGG;IACH,+BAAa,CAAA;IACb;;;OAGG;IACH,6BAAW,CAAA;IACX;;;OAGG;IACH,6BAAW,CAAA;AACb,CAAC,EArBW,cAAc,KAAd,cAAc,QAqBzB","sourcesContent":["/**\n * Supported subtitle/caption file formats.\n * @remarks Platform: Android, iOS, tvOS\n */\nexport enum SubtitleFormat {\n /**\n * Closed Captioning (CEA) subtitle format.\n * @remarks Platform: Android, iOS, tvOS\n */\n CEA = 'cea',\n /**\n * Timed Text Markup Language (TTML) subtitle format.\n * @remarks Platform: Android, iOS, tvOS\n */\n TTML = 'ttml',\n /**\n * Web Video Text Tracks Format (WebVTT) subtitle format.\n * @remarks Platform: Android, iOS, tvOS\n */\n VTT = 'vtt',\n /**\n * SubRip (SRT) subtitle format.\n * @remarks Platform: Android, iOS, tvOS\n */\n SRT = 'srt',\n}\n"]}