react-native-firework-sdk 2.16.1 → 2.17.0-beta.1

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 (506) hide show
  1. package/android/build.gradle +43 -75
  2. package/android/gradle.properties +5 -5
  3. package/android/settings.gradle +1 -1
  4. package/android/src/main/AndroidManifestNew.xml +41 -0
  5. package/ios/FireworkSdk-Bridging-Header.h +3 -3
  6. package/lib/commonjs/FWNavigator.js +13 -34
  7. package/lib/commonjs/FWNavigator.js.map +1 -1
  8. package/lib/commonjs/FireworkSDK.js +44 -159
  9. package/lib/commonjs/FireworkSDK.js.map +1 -1
  10. package/lib/commonjs/LiveStream.js +8 -27
  11. package/lib/commonjs/LiveStream.js.map +1 -1
  12. package/lib/commonjs/VideoShopping.js +21 -91
  13. package/lib/commonjs/VideoShopping.js.map +1 -1
  14. package/lib/commonjs/components/FWStoryBlock.js +2 -6
  15. package/lib/commonjs/components/FWStoryBlock.js.map +1 -1
  16. package/lib/commonjs/components/FWVideoFeed.js +2 -6
  17. package/lib/commonjs/components/FWVideoFeed.js.map +1 -1
  18. package/lib/commonjs/components/StoryBlock.js +60 -161
  19. package/lib/commonjs/components/StoryBlock.js.map +1 -1
  20. package/lib/commonjs/components/VideoFeed.js +214 -335
  21. package/lib/commonjs/components/VideoFeed.js.map +1 -1
  22. package/lib/commonjs/constants/FWErrorMessage.js +1 -4
  23. package/lib/commonjs/constants/FWErrorMessage.js.map +1 -1
  24. package/lib/commonjs/index.js +14 -29
  25. package/lib/commonjs/index.js.map +1 -1
  26. package/lib/commonjs/models/AdBadgeConfiguration.js.map +1 -1
  27. package/lib/commonjs/models/AdConfiguration.js.map +1 -1
  28. package/lib/commonjs/models/AndroidFontInfo.js.map +1 -1
  29. package/lib/commonjs/models/ButtonInfo.js.map +1 -1
  30. package/lib/commonjs/models/CountdownTimerConfiguration.js.map +1 -1
  31. package/lib/commonjs/models/DataTrackingLevel.js.map +1 -1
  32. package/lib/commonjs/models/FWComponentType.js +3 -5
  33. package/lib/commonjs/models/FWComponentType.js.map +1 -1
  34. package/lib/commonjs/models/FWError.js.map +1 -1
  35. package/lib/commonjs/models/FWEventName.js +3 -5
  36. package/lib/commonjs/models/FWEventName.js.map +1 -1
  37. package/lib/commonjs/models/FWEvents.js.map +1 -1
  38. package/lib/commonjs/models/FWNativeErrorAction.js +3 -5
  39. package/lib/commonjs/models/FWNativeErrorAction.js.map +1 -1
  40. package/lib/commonjs/models/FeedItemDetails.js.map +1 -1
  41. package/lib/commonjs/models/GradientDrawable.js.map +1 -1
  42. package/lib/commonjs/models/IOSFontInfo.js.map +1 -1
  43. package/lib/commonjs/models/LiveStreamChatEventName.js +7 -7
  44. package/lib/commonjs/models/LiveStreamChatEventName.js.map +1 -1
  45. package/lib/commonjs/models/LiveStreamEventDetails.js.map +1 -1
  46. package/lib/commonjs/models/LiveStreamEventName.js +13 -7
  47. package/lib/commonjs/models/LiveStreamEventName.js.map +1 -1
  48. package/lib/commonjs/models/LiveStreamMessageDetails.js.map +1 -1
  49. package/lib/commonjs/models/LivestreamPlayerDesignVersion.js +4 -7
  50. package/lib/commonjs/models/LivestreamPlayerDesignVersion.js.map +1 -1
  51. package/lib/commonjs/models/MarkInitCalledOptions.js.map +1 -1
  52. package/lib/commonjs/models/OpenVideoPlayerConfiguration.js.map +1 -1
  53. package/lib/commonjs/models/Product.js.map +1 -1
  54. package/lib/commonjs/models/ProductInfoViewConfiguration.js.map +1 -1
  55. package/lib/commonjs/models/ProductUnit.js.map +1 -1
  56. package/lib/commonjs/models/PushRNContainerParams.js.map +1 -1
  57. package/lib/commonjs/models/ReplayBadgeConfiguration.js.map +1 -1
  58. package/lib/commonjs/models/SDKInitOptions.js.map +1 -1
  59. package/lib/commonjs/models/ShoppingCTAResult.js.map +1 -1
  60. package/lib/commonjs/models/StoryBlockConfiguration.js.map +1 -1
  61. package/lib/commonjs/models/StoryBlockNativeConfiguration.js.map +1 -1
  62. package/lib/commonjs/models/StoryBlockSource.js.map +1 -1
  63. package/lib/commonjs/models/TrackPurchaseParameters.js.map +1 -1
  64. package/lib/commonjs/models/VideoFeedConfiguration.js.map +1 -1
  65. package/lib/commonjs/models/VideoFeedSource.js.map +1 -1
  66. package/lib/commonjs/models/VideoPlaybackDetails.js.map +1 -1
  67. package/lib/commonjs/models/VideoPlaybackEventName.js +40 -7
  68. package/lib/commonjs/models/VideoPlaybackEventName.js.map +1 -1
  69. package/lib/commonjs/models/VideoPlayerButtonConfiguration.js.map +1 -1
  70. package/lib/commonjs/models/VideoPlayerCTADelay.js.map +1 -1
  71. package/lib/commonjs/models/VideoPlayerCTAStyle.js.map +1 -1
  72. package/lib/commonjs/models/VideoPlayerCTAWidth.js.map +1 -1
  73. package/lib/commonjs/models/VideoPlayerCompleteAction.js.map +1 -1
  74. package/lib/commonjs/models/VideoPlayerConfiguration.js.map +1 -1
  75. package/lib/commonjs/models/VideoPlayerLivestreamCountdownTimerTheme.js.map +1 -1
  76. package/lib/commonjs/models/VideoPlayerLogoConfiguration.js.map +1 -1
  77. package/lib/commonjs/models/VideoPlayerNativeConfiguration.js.map +1 -1
  78. package/lib/commonjs/models/VideoPlayerStyle.js.map +1 -1
  79. package/lib/commonjs/modules/FWNavigatorModule.js +3 -9
  80. package/lib/commonjs/modules/FWNavigatorModule.js.map +1 -1
  81. package/lib/commonjs/modules/FireworkSDKModule.js +3 -9
  82. package/lib/commonjs/modules/FireworkSDKModule.js.map +1 -1
  83. package/lib/commonjs/modules/LiveStreamModule.js +3 -9
  84. package/lib/commonjs/modules/LiveStreamModule.js.map +1 -1
  85. package/lib/commonjs/modules/ShoppingModule.js +3 -9
  86. package/lib/commonjs/modules/ShoppingModule.js.map +1 -1
  87. package/lib/commonjs/package.json +1 -0
  88. package/lib/commonjs/utils/FWGlobalState.js +3 -21
  89. package/lib/commonjs/utils/FWGlobalState.js.map +1 -1
  90. package/lib/commonjs/utils/FWJsonUtil.js +1 -9
  91. package/lib/commonjs/utils/FWJsonUtil.js.map +1 -1
  92. package/lib/commonjs/utils/FWLoggerUtil.js +1 -9
  93. package/lib/commonjs/utils/FWLoggerUtil.js.map +1 -1
  94. package/lib/commonjs/utils/VideoFeedUtil.js +15 -28
  95. package/lib/commonjs/utils/VideoFeedUtil.js.map +1 -1
  96. package/lib/module/FWNavigator.js +13 -24
  97. package/lib/module/FWNavigator.js.map +1 -1
  98. package/lib/module/FireworkSDK.js +42 -127
  99. package/lib/module/FireworkSDK.js.map +1 -1
  100. package/lib/module/LiveStream.js +7 -18
  101. package/lib/module/LiveStream.js.map +1 -1
  102. package/lib/module/VideoShopping.js +19 -68
  103. package/lib/module/VideoShopping.js.map +1 -1
  104. package/lib/module/components/FWStoryBlock.js +3 -1
  105. package/lib/module/components/FWStoryBlock.js.map +1 -1
  106. package/lib/module/components/FWVideoFeed.js +3 -1
  107. package/lib/module/components/FWVideoFeed.js.map +1 -1
  108. package/lib/module/components/StoryBlock.js +59 -111
  109. package/lib/module/components/StoryBlock.js.map +1 -1
  110. package/lib/module/components/VideoFeed.js +214 -299
  111. package/lib/module/components/VideoFeed.js.map +1 -1
  112. package/lib/module/constants/FWErrorMessage.js +2 -0
  113. package/lib/module/constants/FWErrorMessage.js.map +1 -1
  114. package/lib/module/index.js +14 -12
  115. package/lib/module/index.js.map +1 -1
  116. package/lib/module/models/AdBadgeConfiguration.js +1 -1
  117. package/lib/module/models/AdBadgeConfiguration.js.map +1 -1
  118. package/lib/module/models/AdConfiguration.js +1 -1
  119. package/lib/module/models/AdConfiguration.js.map +1 -1
  120. package/lib/module/models/AndroidFontInfo.js +1 -1
  121. package/lib/module/models/AndroidFontInfo.js.map +1 -1
  122. package/lib/module/models/ButtonInfo.js +1 -1
  123. package/lib/module/models/ButtonInfo.js.map +1 -1
  124. package/lib/module/models/CountdownTimerConfiguration.js +1 -1
  125. package/lib/module/models/CountdownTimerConfiguration.js.map +1 -1
  126. package/lib/module/models/DataTrackingLevel.js +1 -1
  127. package/lib/module/models/DataTrackingLevel.js.map +1 -1
  128. package/lib/module/models/FWComponentType.js +4 -3
  129. package/lib/module/models/FWComponentType.js.map +1 -1
  130. package/lib/module/models/FWError.js +1 -1
  131. package/lib/module/models/FWError.js.map +1 -1
  132. package/lib/module/models/FWEventName.js +4 -3
  133. package/lib/module/models/FWEventName.js.map +1 -1
  134. package/lib/module/models/FWEvents.js +2 -0
  135. package/lib/module/models/FWEvents.js.map +1 -1
  136. package/lib/module/models/FWNativeErrorAction.js +4 -3
  137. package/lib/module/models/FWNativeErrorAction.js.map +1 -1
  138. package/lib/module/models/FeedItemDetails.js +1 -1
  139. package/lib/module/models/FeedItemDetails.js.map +1 -1
  140. package/lib/module/models/GradientDrawable.js +1 -1
  141. package/lib/module/models/GradientDrawable.js.map +1 -1
  142. package/lib/module/models/IOSFontInfo.js +1 -1
  143. package/lib/module/models/IOSFontInfo.js.map +1 -1
  144. package/lib/module/models/LiveStreamChatEventName.js +7 -4
  145. package/lib/module/models/LiveStreamChatEventName.js.map +1 -1
  146. package/lib/module/models/LiveStreamEventDetails.js +1 -1
  147. package/lib/module/models/LiveStreamEventDetails.js.map +1 -1
  148. package/lib/module/models/LiveStreamEventName.js +13 -4
  149. package/lib/module/models/LiveStreamEventName.js.map +1 -1
  150. package/lib/module/models/LiveStreamMessageDetails.js +1 -1
  151. package/lib/module/models/LiveStreamMessageDetails.js.map +1 -1
  152. package/lib/module/models/LivestreamPlayerDesignVersion.js +4 -4
  153. package/lib/module/models/LivestreamPlayerDesignVersion.js.map +1 -1
  154. package/lib/module/models/MarkInitCalledOptions.js +1 -1
  155. package/lib/module/models/MarkInitCalledOptions.js.map +1 -1
  156. package/lib/module/models/OpenVideoPlayerConfiguration.js +1 -1
  157. package/lib/module/models/OpenVideoPlayerConfiguration.js.map +1 -1
  158. package/lib/module/models/Product.js +1 -1
  159. package/lib/module/models/Product.js.map +1 -1
  160. package/lib/module/models/ProductInfoViewConfiguration.js +1 -1
  161. package/lib/module/models/ProductInfoViewConfiguration.js.map +1 -1
  162. package/lib/module/models/ProductUnit.js +1 -1
  163. package/lib/module/models/ProductUnit.js.map +1 -1
  164. package/lib/module/models/PushRNContainerParams.js +1 -1
  165. package/lib/module/models/PushRNContainerParams.js.map +1 -1
  166. package/lib/module/models/ReplayBadgeConfiguration.js +1 -1
  167. package/lib/module/models/ReplayBadgeConfiguration.js.map +1 -1
  168. package/lib/module/models/SDKInitOptions.js +1 -1
  169. package/lib/module/models/SDKInitOptions.js.map +1 -1
  170. package/lib/module/models/ShoppingCTAResult.js +1 -1
  171. package/lib/module/models/ShoppingCTAResult.js.map +1 -1
  172. package/lib/module/models/StoryBlockConfiguration.js +2 -0
  173. package/lib/module/models/StoryBlockConfiguration.js.map +1 -1
  174. package/lib/module/models/StoryBlockNativeConfiguration.js +1 -1
  175. package/lib/module/models/StoryBlockNativeConfiguration.js.map +1 -1
  176. package/lib/module/models/StoryBlockSource.js +1 -1
  177. package/lib/module/models/StoryBlockSource.js.map +1 -1
  178. package/lib/module/models/TrackPurchaseParameters.js +1 -1
  179. package/lib/module/models/TrackPurchaseParameters.js.map +1 -1
  180. package/lib/module/models/VideoFeedConfiguration.js +1 -1
  181. package/lib/module/models/VideoFeedConfiguration.js.map +1 -1
  182. package/lib/module/models/VideoFeedSource.js +1 -1
  183. package/lib/module/models/VideoFeedSource.js.map +1 -1
  184. package/lib/module/models/VideoPlaybackDetails.js +1 -1
  185. package/lib/module/models/VideoPlaybackDetails.js.map +1 -1
  186. package/lib/module/models/VideoPlaybackEventName.js +40 -4
  187. package/lib/module/models/VideoPlaybackEventName.js.map +1 -1
  188. package/lib/module/models/VideoPlayerButtonConfiguration.js +1 -1
  189. package/lib/module/models/VideoPlayerButtonConfiguration.js.map +1 -1
  190. package/lib/module/models/VideoPlayerCTADelay.js +1 -1
  191. package/lib/module/models/VideoPlayerCTADelay.js.map +1 -1
  192. package/lib/module/models/VideoPlayerCTAStyle.js +2 -0
  193. package/lib/module/models/VideoPlayerCTAStyle.js.map +1 -1
  194. package/lib/module/models/VideoPlayerCTAWidth.js +1 -1
  195. package/lib/module/models/VideoPlayerCTAWidth.js.map +1 -1
  196. package/lib/module/models/VideoPlayerCompleteAction.js +1 -1
  197. package/lib/module/models/VideoPlayerCompleteAction.js.map +1 -1
  198. package/lib/module/models/VideoPlayerConfiguration.js +1 -1
  199. package/lib/module/models/VideoPlayerConfiguration.js.map +1 -1
  200. package/lib/module/models/VideoPlayerLivestreamCountdownTimerTheme.js +1 -1
  201. package/lib/module/models/VideoPlayerLivestreamCountdownTimerTheme.js.map +1 -1
  202. package/lib/module/models/VideoPlayerLogoConfiguration.js +1 -1
  203. package/lib/module/models/VideoPlayerLogoConfiguration.js.map +1 -1
  204. package/lib/module/models/VideoPlayerNativeConfiguration.js +1 -1
  205. package/lib/module/models/VideoPlayerNativeConfiguration.js.map +1 -1
  206. package/lib/module/models/VideoPlayerStyle.js +1 -1
  207. package/lib/module/models/VideoPlayerStyle.js.map +1 -1
  208. package/lib/module/modules/FWNavigatorModule.js +3 -2
  209. package/lib/module/modules/FWNavigatorModule.js.map +1 -1
  210. package/lib/module/modules/FireworkSDKModule.js +3 -2
  211. package/lib/module/modules/FireworkSDKModule.js.map +1 -1
  212. package/lib/module/modules/LiveStreamModule.js +3 -2
  213. package/lib/module/modules/LiveStreamModule.js.map +1 -1
  214. package/lib/module/modules/ShoppingModule.js +3 -2
  215. package/lib/module/modules/ShoppingModule.js.map +1 -1
  216. package/lib/module/package.json +1 -0
  217. package/lib/module/utils/FWGlobalState.js +3 -17
  218. package/lib/module/utils/FWGlobalState.js.map +1 -1
  219. package/lib/module/utils/FWJsonUtil.js +2 -6
  220. package/lib/module/utils/FWJsonUtil.js.map +1 -1
  221. package/lib/module/utils/FWLoggerUtil.js +2 -6
  222. package/lib/module/utils/FWLoggerUtil.js.map +1 -1
  223. package/lib/module/utils/VideoFeedUtil.js +16 -25
  224. package/lib/module/utils/VideoFeedUtil.js.map +1 -1
  225. package/lib/typescript/commonjs/package.json +1 -0
  226. package/lib/typescript/{FWNavigator.d.ts → commonjs/src/FWNavigator.d.ts} +3 -0
  227. package/lib/typescript/commonjs/src/FWNavigator.d.ts.map +1 -0
  228. package/lib/typescript/{FireworkSDK.d.ts → commonjs/src/FireworkSDK.d.ts} +1 -0
  229. package/lib/typescript/commonjs/src/FireworkSDK.d.ts.map +1 -0
  230. package/lib/typescript/{LiveStream.d.ts → commonjs/src/LiveStream.d.ts} +1 -0
  231. package/lib/typescript/commonjs/src/LiveStream.d.ts.map +1 -0
  232. package/lib/typescript/{VideoShopping.d.ts → commonjs/src/VideoShopping.d.ts} +1 -0
  233. package/lib/typescript/commonjs/src/VideoShopping.d.ts.map +1 -0
  234. package/lib/typescript/{components → commonjs/src/components}/FWStoryBlock.d.ts +1 -0
  235. package/lib/typescript/commonjs/src/components/FWStoryBlock.d.ts.map +1 -0
  236. package/lib/typescript/{components → commonjs/src/components}/FWVideoFeed.d.ts +1 -0
  237. package/lib/typescript/commonjs/src/components/FWVideoFeed.d.ts.map +1 -0
  238. package/lib/typescript/{components → commonjs/src/components}/StoryBlock.d.ts +3 -3
  239. package/lib/typescript/commonjs/src/components/StoryBlock.d.ts.map +1 -0
  240. package/lib/typescript/{components → commonjs/src/components}/VideoFeed.d.ts +3 -2
  241. package/lib/typescript/commonjs/src/components/VideoFeed.d.ts.map +1 -0
  242. package/lib/typescript/{constants → commonjs/src/constants}/FWErrorMessage.d.ts +1 -0
  243. package/lib/typescript/commonjs/src/constants/FWErrorMessage.d.ts.map +1 -0
  244. package/lib/typescript/{index.d.ts → commonjs/src/index.d.ts} +3 -1
  245. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  246. package/lib/typescript/{models → commonjs/src/models}/AdBadgeConfiguration.d.ts +1 -0
  247. package/lib/typescript/commonjs/src/models/AdBadgeConfiguration.d.ts.map +1 -0
  248. package/lib/typescript/{models → commonjs/src/models}/AdConfiguration.d.ts +1 -0
  249. package/lib/typescript/commonjs/src/models/AdConfiguration.d.ts.map +1 -0
  250. package/lib/typescript/{models → commonjs/src/models}/AndroidFontInfo.d.ts +1 -0
  251. package/lib/typescript/commonjs/src/models/AndroidFontInfo.d.ts.map +1 -0
  252. package/lib/typescript/{models → commonjs/src/models}/ButtonInfo.d.ts +1 -0
  253. package/lib/typescript/commonjs/src/models/ButtonInfo.d.ts.map +1 -0
  254. package/lib/typescript/{models → commonjs/src/models}/CountdownTimerConfiguration.d.ts +1 -0
  255. package/lib/typescript/commonjs/src/models/CountdownTimerConfiguration.d.ts.map +1 -0
  256. package/lib/typescript/{models → commonjs/src/models}/DataTrackingLevel.d.ts +1 -0
  257. package/lib/typescript/commonjs/src/models/DataTrackingLevel.d.ts.map +1 -0
  258. package/lib/typescript/{models → commonjs/src/models}/FWComponentType.d.ts +1 -0
  259. package/lib/typescript/commonjs/src/models/FWComponentType.d.ts.map +1 -0
  260. package/lib/typescript/{models → commonjs/src/models}/FWError.d.ts +1 -0
  261. package/lib/typescript/commonjs/src/models/FWError.d.ts.map +1 -0
  262. package/lib/typescript/{models → commonjs/src/models}/FWEventName.d.ts +1 -0
  263. package/lib/typescript/commonjs/src/models/FWEventName.d.ts.map +1 -0
  264. package/lib/typescript/{models → commonjs/src/models}/FWEvents.d.ts +1 -0
  265. package/lib/typescript/commonjs/src/models/FWEvents.d.ts.map +1 -0
  266. package/lib/typescript/{models → commonjs/src/models}/FWNativeErrorAction.d.ts +1 -0
  267. package/lib/typescript/commonjs/src/models/FWNativeErrorAction.d.ts.map +1 -0
  268. package/lib/typescript/{models → commonjs/src/models}/FeedItemDetails.d.ts +1 -0
  269. package/lib/typescript/commonjs/src/models/FeedItemDetails.d.ts.map +1 -0
  270. package/lib/typescript/{models → commonjs/src/models}/GradientDrawable.d.ts +1 -0
  271. package/lib/typescript/commonjs/src/models/GradientDrawable.d.ts.map +1 -0
  272. package/lib/typescript/{models → commonjs/src/models}/IOSFontInfo.d.ts +1 -0
  273. package/lib/typescript/commonjs/src/models/IOSFontInfo.d.ts.map +1 -0
  274. package/lib/typescript/{models → commonjs/src/models}/LiveStreamChatEventName.d.ts +1 -0
  275. package/lib/typescript/commonjs/src/models/LiveStreamChatEventName.d.ts.map +1 -0
  276. package/lib/typescript/{models → commonjs/src/models}/LiveStreamEventDetails.d.ts +1 -0
  277. package/lib/typescript/commonjs/src/models/LiveStreamEventDetails.d.ts.map +1 -0
  278. package/lib/typescript/{models → commonjs/src/models}/LiveStreamEventName.d.ts +1 -0
  279. package/lib/typescript/commonjs/src/models/LiveStreamEventName.d.ts.map +1 -0
  280. package/lib/typescript/{models → commonjs/src/models}/LiveStreamMessageDetails.d.ts +1 -0
  281. package/lib/typescript/commonjs/src/models/LiveStreamMessageDetails.d.ts.map +1 -0
  282. package/lib/typescript/{models → commonjs/src/models}/LivestreamPlayerDesignVersion.d.ts +1 -0
  283. package/lib/typescript/commonjs/src/models/LivestreamPlayerDesignVersion.d.ts.map +1 -0
  284. package/lib/typescript/{models → commonjs/src/models}/MarkInitCalledOptions.d.ts +1 -0
  285. package/lib/typescript/commonjs/src/models/MarkInitCalledOptions.d.ts.map +1 -0
  286. package/lib/typescript/{models → commonjs/src/models}/OpenVideoPlayerConfiguration.d.ts +1 -0
  287. package/lib/typescript/commonjs/src/models/OpenVideoPlayerConfiguration.d.ts.map +1 -0
  288. package/lib/typescript/{models → commonjs/src/models}/Product.d.ts +1 -0
  289. package/lib/typescript/commonjs/src/models/Product.d.ts.map +1 -0
  290. package/lib/typescript/{models → commonjs/src/models}/ProductInfoViewConfiguration.d.ts +1 -0
  291. package/lib/typescript/commonjs/src/models/ProductInfoViewConfiguration.d.ts.map +1 -0
  292. package/lib/typescript/{models → commonjs/src/models}/ProductUnit.d.ts +1 -0
  293. package/lib/typescript/commonjs/src/models/ProductUnit.d.ts.map +1 -0
  294. package/lib/typescript/{models → commonjs/src/models}/PushRNContainerParams.d.ts +1 -0
  295. package/lib/typescript/commonjs/src/models/PushRNContainerParams.d.ts.map +1 -0
  296. package/lib/typescript/{models → commonjs/src/models}/ReplayBadgeConfiguration.d.ts +1 -0
  297. package/lib/typescript/commonjs/src/models/ReplayBadgeConfiguration.d.ts.map +1 -0
  298. package/lib/typescript/{models → commonjs/src/models}/SDKInitOptions.d.ts +1 -0
  299. package/lib/typescript/commonjs/src/models/SDKInitOptions.d.ts.map +1 -0
  300. package/lib/typescript/{models → commonjs/src/models}/ShoppingCTAResult.d.ts +1 -0
  301. package/lib/typescript/commonjs/src/models/ShoppingCTAResult.d.ts.map +1 -0
  302. package/lib/typescript/{models → commonjs/src/models}/StoryBlockConfiguration.d.ts +1 -0
  303. package/lib/typescript/commonjs/src/models/StoryBlockConfiguration.d.ts.map +1 -0
  304. package/lib/typescript/{models → commonjs/src/models}/StoryBlockNativeConfiguration.d.ts +1 -0
  305. package/lib/typescript/commonjs/src/models/StoryBlockNativeConfiguration.d.ts.map +1 -0
  306. package/lib/typescript/{models → commonjs/src/models}/StoryBlockSource.d.ts +1 -0
  307. package/lib/typescript/commonjs/src/models/StoryBlockSource.d.ts.map +1 -0
  308. package/lib/typescript/{models → commonjs/src/models}/TrackPurchaseParameters.d.ts +1 -0
  309. package/lib/typescript/commonjs/src/models/TrackPurchaseParameters.d.ts.map +1 -0
  310. package/lib/typescript/{models → commonjs/src/models}/VideoFeedConfiguration.d.ts +1 -0
  311. package/lib/typescript/commonjs/src/models/VideoFeedConfiguration.d.ts.map +1 -0
  312. package/lib/typescript/{models → commonjs/src/models}/VideoFeedSource.d.ts +1 -0
  313. package/lib/typescript/commonjs/src/models/VideoFeedSource.d.ts.map +1 -0
  314. package/lib/typescript/{models → commonjs/src/models}/VideoPlaybackDetails.d.ts +1 -0
  315. package/lib/typescript/commonjs/src/models/VideoPlaybackDetails.d.ts.map +1 -0
  316. package/lib/typescript/{models → commonjs/src/models}/VideoPlaybackEventName.d.ts +1 -0
  317. package/lib/typescript/commonjs/src/models/VideoPlaybackEventName.d.ts.map +1 -0
  318. package/lib/typescript/{models → commonjs/src/models}/VideoPlayerButtonConfiguration.d.ts +1 -0
  319. package/lib/typescript/commonjs/src/models/VideoPlayerButtonConfiguration.d.ts.map +1 -0
  320. package/lib/typescript/{models → commonjs/src/models}/VideoPlayerCTADelay.d.ts +1 -0
  321. package/lib/typescript/commonjs/src/models/VideoPlayerCTADelay.d.ts.map +1 -0
  322. package/lib/typescript/{models → commonjs/src/models}/VideoPlayerCTAStyle.d.ts +1 -0
  323. package/lib/typescript/commonjs/src/models/VideoPlayerCTAStyle.d.ts.map +1 -0
  324. package/lib/typescript/{models → commonjs/src/models}/VideoPlayerCTAWidth.d.ts +1 -0
  325. package/lib/typescript/commonjs/src/models/VideoPlayerCTAWidth.d.ts.map +1 -0
  326. package/lib/typescript/{models → commonjs/src/models}/VideoPlayerCompleteAction.d.ts +1 -0
  327. package/lib/typescript/commonjs/src/models/VideoPlayerCompleteAction.d.ts.map +1 -0
  328. package/lib/typescript/{models → commonjs/src/models}/VideoPlayerConfiguration.d.ts +1 -0
  329. package/lib/typescript/commonjs/src/models/VideoPlayerConfiguration.d.ts.map +1 -0
  330. package/lib/typescript/{models → commonjs/src/models}/VideoPlayerLivestreamCountdownTimerTheme.d.ts +1 -0
  331. package/lib/typescript/commonjs/src/models/VideoPlayerLivestreamCountdownTimerTheme.d.ts.map +1 -0
  332. package/lib/typescript/{models → commonjs/src/models}/VideoPlayerLogoConfiguration.d.ts +2 -1
  333. package/lib/typescript/commonjs/src/models/VideoPlayerLogoConfiguration.d.ts.map +1 -0
  334. package/lib/typescript/{models → commonjs/src/models}/VideoPlayerNativeConfiguration.d.ts +1 -0
  335. package/lib/typescript/commonjs/src/models/VideoPlayerNativeConfiguration.d.ts.map +1 -0
  336. package/lib/typescript/{models → commonjs/src/models}/VideoPlayerStyle.d.ts +1 -0
  337. package/lib/typescript/commonjs/src/models/VideoPlayerStyle.d.ts.map +1 -0
  338. package/lib/typescript/{modules → commonjs/src/modules}/FWNavigatorModule.d.ts +2 -1
  339. package/lib/typescript/commonjs/src/modules/FWNavigatorModule.d.ts.map +1 -0
  340. package/lib/typescript/{modules → commonjs/src/modules}/FireworkSDKModule.d.ts +4 -3
  341. package/lib/typescript/commonjs/src/modules/FireworkSDKModule.d.ts.map +1 -0
  342. package/lib/typescript/{modules → commonjs/src/modules}/LiveStreamModule.d.ts +2 -1
  343. package/lib/typescript/commonjs/src/modules/LiveStreamModule.d.ts.map +1 -0
  344. package/lib/typescript/{modules → commonjs/src/modules}/ShoppingModule.d.ts +2 -1
  345. package/lib/typescript/commonjs/src/modules/ShoppingModule.d.ts.map +1 -0
  346. package/lib/typescript/{utils → commonjs/src/utils}/FWGlobalState.d.ts +2 -1
  347. package/lib/typescript/commonjs/src/utils/FWGlobalState.d.ts.map +1 -0
  348. package/lib/typescript/{utils → commonjs/src/utils}/FWJsonUtil.d.ts +1 -0
  349. package/lib/typescript/commonjs/src/utils/FWJsonUtil.d.ts.map +1 -0
  350. package/lib/typescript/{utils → commonjs/src/utils}/FWLoggerUtil.d.ts +1 -0
  351. package/lib/typescript/commonjs/src/utils/FWLoggerUtil.d.ts.map +1 -0
  352. package/lib/typescript/{utils → commonjs/src/utils}/VideoFeedUtil.d.ts +1 -0
  353. package/lib/typescript/commonjs/src/utils/VideoFeedUtil.d.ts.map +1 -0
  354. package/lib/typescript/module/package.json +1 -0
  355. package/lib/typescript/module/src/FWNavigator.d.ts +59 -0
  356. package/lib/typescript/module/src/FWNavigator.d.ts.map +1 -0
  357. package/lib/typescript/module/src/FireworkSDK.d.ts +143 -0
  358. package/lib/typescript/module/src/FireworkSDK.d.ts.map +1 -0
  359. package/lib/typescript/module/src/LiveStream.d.ts +22 -0
  360. package/lib/typescript/module/src/LiveStream.d.ts.map +1 -0
  361. package/lib/typescript/module/src/VideoShopping.d.ts +94 -0
  362. package/lib/typescript/module/src/VideoShopping.d.ts.map +1 -0
  363. package/lib/typescript/module/src/components/FWStoryBlock.d.ts +3 -0
  364. package/lib/typescript/module/src/components/FWStoryBlock.d.ts.map +1 -0
  365. package/lib/typescript/module/src/components/FWVideoFeed.d.ts +3 -0
  366. package/lib/typescript/module/src/components/FWVideoFeed.d.ts.map +1 -0
  367. package/lib/typescript/module/src/components/StoryBlock.d.ts +116 -0
  368. package/lib/typescript/module/src/components/StoryBlock.d.ts.map +1 -0
  369. package/lib/typescript/module/src/components/VideoFeed.d.ts +145 -0
  370. package/lib/typescript/module/src/components/VideoFeed.d.ts.map +1 -0
  371. package/lib/typescript/module/src/constants/FWErrorMessage.d.ts +3 -0
  372. package/lib/typescript/module/src/constants/FWErrorMessage.d.ts.map +1 -0
  373. package/lib/typescript/module/src/index.d.ts +68 -0
  374. package/lib/typescript/module/src/index.d.ts.map +1 -0
  375. package/lib/typescript/module/src/models/AdBadgeConfiguration.d.ts +26 -0
  376. package/lib/typescript/module/src/models/AdBadgeConfiguration.d.ts.map +1 -0
  377. package/lib/typescript/module/src/models/AdConfiguration.d.ts +23 -0
  378. package/lib/typescript/module/src/models/AdConfiguration.d.ts.map +1 -0
  379. package/lib/typescript/module/src/models/AndroidFontInfo.d.ts +15 -0
  380. package/lib/typescript/module/src/models/AndroidFontInfo.d.ts.map +1 -0
  381. package/lib/typescript/module/src/models/ButtonInfo.d.ts +18 -0
  382. package/lib/typescript/module/src/models/ButtonInfo.d.ts.map +1 -0
  383. package/lib/typescript/module/src/models/CountdownTimerConfiguration.d.ts +13 -0
  384. package/lib/typescript/module/src/models/CountdownTimerConfiguration.d.ts.map +1 -0
  385. package/lib/typescript/module/src/models/DataTrackingLevel.d.ts +2 -0
  386. package/lib/typescript/module/src/models/DataTrackingLevel.d.ts.map +1 -0
  387. package/lib/typescript/module/src/models/FWComponentType.d.ts +5 -0
  388. package/lib/typescript/module/src/models/FWComponentType.d.ts.map +1 -0
  389. package/lib/typescript/module/src/models/FWError.d.ts +11 -0
  390. package/lib/typescript/module/src/models/FWError.d.ts.map +1 -0
  391. package/lib/typescript/module/src/models/FWEventName.d.ts +25 -0
  392. package/lib/typescript/module/src/models/FWEventName.d.ts.map +1 -0
  393. package/lib/typescript/module/src/models/FWEvents.d.ts +168 -0
  394. package/lib/typescript/module/src/models/FWEvents.d.ts.map +1 -0
  395. package/lib/typescript/module/src/models/FWNativeErrorAction.d.ts +5 -0
  396. package/lib/typescript/module/src/models/FWNativeErrorAction.d.ts.map +1 -0
  397. package/lib/typescript/module/src/models/FeedItemDetails.d.ts +59 -0
  398. package/lib/typescript/module/src/models/FeedItemDetails.d.ts.map +1 -0
  399. package/lib/typescript/module/src/models/GradientDrawable.d.ts +6 -0
  400. package/lib/typescript/module/src/models/GradientDrawable.d.ts.map +1 -0
  401. package/lib/typescript/module/src/models/IOSFontInfo.d.ts +22 -0
  402. package/lib/typescript/module/src/models/IOSFontInfo.d.ts.map +1 -0
  403. package/lib/typescript/module/src/models/LiveStreamChatEventName.d.ts +8 -0
  404. package/lib/typescript/module/src/models/LiveStreamChatEventName.d.ts.map +1 -0
  405. package/lib/typescript/module/src/models/LiveStreamEventDetails.d.ts +5 -0
  406. package/lib/typescript/module/src/models/LiveStreamEventDetails.d.ts.map +1 -0
  407. package/lib/typescript/module/src/models/LiveStreamEventName.d.ts +16 -0
  408. package/lib/typescript/module/src/models/LiveStreamEventName.d.ts.map +1 -0
  409. package/lib/typescript/module/src/models/LiveStreamMessageDetails.d.ts +15 -0
  410. package/lib/typescript/module/src/models/LiveStreamMessageDetails.d.ts.map +1 -0
  411. package/lib/typescript/module/src/models/LivestreamPlayerDesignVersion.d.ts +6 -0
  412. package/lib/typescript/module/src/models/LivestreamPlayerDesignVersion.d.ts.map +1 -0
  413. package/lib/typescript/module/src/models/MarkInitCalledOptions.d.ts +7 -0
  414. package/lib/typescript/module/src/models/MarkInitCalledOptions.d.ts.map +1 -0
  415. package/lib/typescript/module/src/models/OpenVideoPlayerConfiguration.d.ts +8 -0
  416. package/lib/typescript/module/src/models/OpenVideoPlayerConfiguration.d.ts.map +1 -0
  417. package/lib/typescript/module/src/models/Product.d.ts +24 -0
  418. package/lib/typescript/module/src/models/Product.d.ts.map +1 -0
  419. package/lib/typescript/module/src/models/ProductInfoViewConfiguration.d.ts +175 -0
  420. package/lib/typescript/module/src/models/ProductInfoViewConfiguration.d.ts.map +1 -0
  421. package/lib/typescript/module/src/models/ProductUnit.d.ts +39 -0
  422. package/lib/typescript/module/src/models/ProductUnit.d.ts.map +1 -0
  423. package/lib/typescript/module/src/models/PushRNContainerParams.d.ts +9 -0
  424. package/lib/typescript/module/src/models/PushRNContainerParams.d.ts.map +1 -0
  425. package/lib/typescript/module/src/models/ReplayBadgeConfiguration.d.ts +8 -0
  426. package/lib/typescript/module/src/models/ReplayBadgeConfiguration.d.ts.map +1 -0
  427. package/lib/typescript/module/src/models/SDKInitOptions.d.ts +12 -0
  428. package/lib/typescript/module/src/models/SDKInitOptions.d.ts.map +1 -0
  429. package/lib/typescript/module/src/models/ShoppingCTAResult.d.ts +12 -0
  430. package/lib/typescript/module/src/models/ShoppingCTAResult.d.ts.map +1 -0
  431. package/lib/typescript/module/src/models/StoryBlockConfiguration.d.ts +82 -0
  432. package/lib/typescript/module/src/models/StoryBlockConfiguration.d.ts.map +1 -0
  433. package/lib/typescript/module/src/models/StoryBlockNativeConfiguration.d.ts +8 -0
  434. package/lib/typescript/module/src/models/StoryBlockNativeConfiguration.d.ts.map +1 -0
  435. package/lib/typescript/module/src/models/StoryBlockSource.d.ts +2 -0
  436. package/lib/typescript/module/src/models/StoryBlockSource.d.ts.map +1 -0
  437. package/lib/typescript/module/src/models/TrackPurchaseParameters.d.ts +27 -0
  438. package/lib/typescript/module/src/models/TrackPurchaseParameters.d.ts.map +1 -0
  439. package/lib/typescript/module/src/models/VideoFeedConfiguration.d.ts +162 -0
  440. package/lib/typescript/module/src/models/VideoFeedConfiguration.d.ts.map +1 -0
  441. package/lib/typescript/module/src/models/VideoFeedSource.d.ts +2 -0
  442. package/lib/typescript/module/src/models/VideoFeedSource.d.ts.map +1 -0
  443. package/lib/typescript/module/src/models/VideoPlaybackDetails.d.ts +48 -0
  444. package/lib/typescript/module/src/models/VideoPlaybackDetails.d.ts.map +1 -0
  445. package/lib/typescript/module/src/models/VideoPlaybackEventName.d.ts +52 -0
  446. package/lib/typescript/module/src/models/VideoPlaybackEventName.d.ts.map +1 -0
  447. package/lib/typescript/module/src/models/VideoPlayerButtonConfiguration.d.ts +34 -0
  448. package/lib/typescript/module/src/models/VideoPlayerButtonConfiguration.d.ts.map +1 -0
  449. package/lib/typescript/module/src/models/VideoPlayerCTADelay.d.ts +12 -0
  450. package/lib/typescript/module/src/models/VideoPlayerCTADelay.d.ts.map +1 -0
  451. package/lib/typescript/module/src/models/VideoPlayerCTAStyle.d.ts +28 -0
  452. package/lib/typescript/module/src/models/VideoPlayerCTAStyle.d.ts.map +1 -0
  453. package/lib/typescript/module/src/models/VideoPlayerCTAWidth.d.ts +2 -0
  454. package/lib/typescript/module/src/models/VideoPlayerCTAWidth.d.ts.map +1 -0
  455. package/lib/typescript/module/src/models/VideoPlayerCompleteAction.d.ts +2 -0
  456. package/lib/typescript/module/src/models/VideoPlayerCompleteAction.d.ts.map +1 -0
  457. package/lib/typescript/module/src/models/VideoPlayerConfiguration.d.ts +87 -0
  458. package/lib/typescript/module/src/models/VideoPlayerConfiguration.d.ts.map +1 -0
  459. package/lib/typescript/module/src/models/VideoPlayerLivestreamCountdownTimerTheme.d.ts +2 -0
  460. package/lib/typescript/module/src/models/VideoPlayerLivestreamCountdownTimerTheme.d.ts.map +1 -0
  461. package/lib/typescript/module/src/models/VideoPlayerLogoConfiguration.d.ts +22 -0
  462. package/lib/typescript/module/src/models/VideoPlayerLogoConfiguration.d.ts.map +1 -0
  463. package/lib/typescript/module/src/models/VideoPlayerNativeConfiguration.d.ts +8 -0
  464. package/lib/typescript/module/src/models/VideoPlayerNativeConfiguration.d.ts.map +1 -0
  465. package/lib/typescript/module/src/models/VideoPlayerStyle.d.ts +2 -0
  466. package/lib/typescript/module/src/models/VideoPlayerStyle.d.ts.map +1 -0
  467. package/lib/typescript/module/src/modules/FWNavigatorModule.d.ts +17 -0
  468. package/lib/typescript/module/src/modules/FWNavigatorModule.d.ts.map +1 -0
  469. package/lib/typescript/module/src/modules/FireworkSDKModule.d.ts +28 -0
  470. package/lib/typescript/module/src/modules/FireworkSDKModule.d.ts.map +1 -0
  471. package/lib/typescript/module/src/modules/LiveStreamModule.d.ts +9 -0
  472. package/lib/typescript/module/src/modules/LiveStreamModule.d.ts.map +1 -0
  473. package/lib/typescript/module/src/modules/ShoppingModule.d.ts +22 -0
  474. package/lib/typescript/module/src/modules/ShoppingModule.d.ts.map +1 -0
  475. package/lib/typescript/module/src/utils/FWGlobalState.d.ts +13 -0
  476. package/lib/typescript/module/src/utils/FWGlobalState.d.ts.map +1 -0
  477. package/lib/typescript/module/src/utils/FWJsonUtil.d.ts +3 -0
  478. package/lib/typescript/module/src/utils/FWJsonUtil.d.ts.map +1 -0
  479. package/lib/typescript/module/src/utils/FWLoggerUtil.d.ts +7 -0
  480. package/lib/typescript/module/src/utils/FWLoggerUtil.d.ts.map +1 -0
  481. package/lib/typescript/module/src/utils/VideoFeedUtil.d.ts +11 -0
  482. package/lib/typescript/module/src/utils/VideoFeedUtil.d.ts.map +1 -0
  483. package/package.json +71 -55
  484. package/react_native_firework_sdk.podspec +35 -0
  485. package/src/FWNavigator.ts +2 -0
  486. package/src/components/StoryBlock.tsx +45 -48
  487. package/src/components/VideoFeed.tsx +7 -6
  488. package/src/{index.ts → index.tsx} +14 -12
  489. package/src/models/VideoPlayerLogoConfiguration.ts +7 -7
  490. package/src/modules/FWNavigatorModule.ts +5 -1
  491. package/src/modules/FireworkSDKModule.ts +7 -3
  492. package/src/modules/LiveStreamModule.ts +5 -1
  493. package/src/modules/ShoppingModule.ts +5 -1
  494. package/src/utils/FWGlobalState.ts +1 -1
  495. package/android/.idea/codeStyles/Project.xml +0 -124
  496. package/android/.idea/codeStyles/codeStyleConfig.xml +0 -5
  497. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  498. package/android/gradle/wrapper/gradle-wrapper.properties +0 -5
  499. package/android/gradlew +0 -185
  500. package/android/gradlew.bat +0 -89
  501. package/ios/FireworkSdk.xcodeproj/project.pbxproj +0 -603
  502. package/ios/Modules/FWNavigatorModule/RNSScreenStackView+Window.h +0 -20
  503. package/ios/Modules/FWNavigatorModule/RNSScreenStackView+Window.m +0 -84
  504. package/ios/Support/MultiHostStreaming/FWMultiHostStreaming.podspec +0 -22
  505. package/ios/Support/MultiHostStreaming/Sources/MultiHostStreamingSDK.swift +0 -17
  506. package/react-native-firework-sdk.podspec +0 -38
@@ -1,201 +1,181 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ "use strict";
4
2
 
5
3
  import React from 'react';
6
4
  import { findNodeHandle, Platform, UIManager } from 'react-native';
7
- import FireworkSDK from '../FireworkSDK';
8
- import { FWEventName } from '../models/FWEventName';
9
- import { FWNativeErrorAction } from '../models/FWNativeErrorAction';
10
- import { FireworkSDKModuleEventEmitter } from '../modules/FireworkSDKModule';
11
- import FWGlobalState from '../utils/FWGlobalState';
12
- import gennerateJsonKey from '../utils/FWJsonUtil';
13
- import FWLoggerUtil from '../utils/FWLoggerUtil';
14
- import FWVideoFeed from './FWVideoFeed';
15
- import { FWComponentType } from '../models/FWComponentType';
5
+ import FireworkSDK from "../FireworkSDK.js";
6
+ import { FWEventName } from "../models/FWEventName.js";
7
+ import { FWNativeErrorAction } from "../models/FWNativeErrorAction.js";
8
+ import { FireworkSDKModuleEventEmitter } from "../modules/FireworkSDKModule.js";
9
+ import FWGlobalState from "../utils/FWGlobalState.js";
10
+ import gennerateJsonKey from "../utils/FWJsonUtil.js";
11
+ import FWLoggerUtil from "../utils/FWLoggerUtil.js";
12
+ import FWVideoFeed from "./FWVideoFeed.js";
13
+ import { FWComponentType } from "../models/FWComponentType.js";
14
+
15
+ /**
16
+ * The props of VideoFeed component.
17
+ */
18
+ import { jsx as _jsx } from "react/jsx-runtime";
16
19
  const NativeComponentName = 'FWVideoFeed';
20
+
17
21
  /**
18
22
  * VideoFeed component.
19
23
  */
20
-
21
24
  class VideoFeed extends React.Component {
22
25
  /**
23
26
  * @ignore
24
27
  */
28
+ static defaultProps = {
29
+ mode: 'row'
30
+ };
31
+ _nativeComponentRef = /*#__PURE__*/React.createRef();
32
+ _subscriptions = [];
33
+ _loaded = false;
25
34
  constructor(props) {
26
35
  super(props);
27
-
28
- _defineProperty(this, "_nativeComponentRef", /*#__PURE__*/React.createRef());
29
-
30
- _defineProperty(this, "_subscriptions", []);
31
-
32
- _defineProperty(this, "_loaded", false);
33
-
34
- _defineProperty(this, "refresh", () => {
35
- FWLoggerUtil.log(`VideoFeed refresh ${JSON.stringify(this.props)}`);
36
- const nativeNodeHandle = findNodeHandle(this._nativeComponentRef.current);
37
- let commandId = UIManager.getViewManagerConfig(NativeComponentName).Commands.refresh;
38
-
39
- if (Platform.OS === 'android') {
40
- commandId = commandId.toString();
41
- }
42
-
43
- let reactTag = findNodeHandle(nativeNodeHandle);
44
- FWLoggerUtil.log(`VideoFeed refresh commandId: ${commandId} nativeNodeHandle: ${nativeNodeHandle} reactTag: ${reactTag}`);
45
-
46
- if (!nativeNodeHandle || !reactTag) {
47
- return;
48
- }
49
-
50
- UIManager.dispatchViewManagerCommand(reactTag, commandId, []);
51
- });
52
-
53
- _defineProperty(this, "_onVideoFeedLoadFinished", event => {
54
- const {
55
- onVideoFeedLoadFinished,
56
- onVideoFeedEmpty
57
- } = this.props;
58
- const {
59
- name,
60
- reason,
61
- action
62
- } = event.nativeEvent;
63
-
64
- if (onVideoFeedLoadFinished) {
65
- if (name) {
66
- let error = {
67
- name
68
- };
69
-
70
- if (reason) {
71
- error.reason = reason;
72
- }
73
-
74
- if (Platform.OS === 'android') {
75
- if (!this._loaded) {
76
- onVideoFeedLoadFinished(error);
77
- }
78
-
79
- if (action === FWNativeErrorAction.loadingFirstPage || !this._loaded) {
80
- onVideoFeedEmpty === null || onVideoFeedEmpty === void 0 ? void 0 : onVideoFeedEmpty(error);
81
- }
82
- } else {
36
+ this.state = {
37
+ sdkInitCalled: FWGlobalState.getInstance().sdkInitCalled
38
+ };
39
+ }
40
+ refresh = () => {
41
+ FWLoggerUtil.log(`VideoFeed refresh ${JSON.stringify(this.props)}`);
42
+ const nativeNodeHandle = findNodeHandle(this._nativeComponentRef.current);
43
+ let commandId = UIManager.getViewManagerConfig(NativeComponentName).Commands.refresh ?? '';
44
+ if (Platform.OS === 'android') {
45
+ commandId = commandId.toString();
46
+ }
47
+ let reactTag = findNodeHandle(nativeNodeHandle);
48
+ FWLoggerUtil.log(`VideoFeed refresh commandId: ${commandId} nativeNodeHandle: ${nativeNodeHandle} reactTag: ${reactTag}`);
49
+ if (!nativeNodeHandle || !reactTag) {
50
+ return;
51
+ }
52
+ UIManager.dispatchViewManagerCommand(reactTag, commandId, []);
53
+ };
54
+ _onVideoFeedLoadFinished = event => {
55
+ const {
56
+ onVideoFeedLoadFinished,
57
+ onVideoFeedEmpty
58
+ } = this.props;
59
+ const {
60
+ name,
61
+ reason,
62
+ action
63
+ } = event.nativeEvent;
64
+ if (onVideoFeedLoadFinished) {
65
+ if (name) {
66
+ let error = {
67
+ name
68
+ };
69
+ if (reason) {
70
+ error.reason = reason;
71
+ }
72
+ if (Platform.OS === 'android') {
73
+ if (!this._loaded) {
83
74
  onVideoFeedLoadFinished(error);
84
-
85
- if (!this._loaded) {
86
- onVideoFeedEmpty === null || onVideoFeedEmpty === void 0 ? void 0 : onVideoFeedEmpty(error);
87
- }
75
+ }
76
+ if (action === FWNativeErrorAction.loadingFirstPage || !this._loaded) {
77
+ onVideoFeedEmpty?.(error);
88
78
  }
89
79
  } else {
90
- if (Platform.OS === 'android') {
91
- if (!this._loaded) {
92
- onVideoFeedLoadFinished();
93
- }
94
- } else {
95
- onVideoFeedLoadFinished();
80
+ onVideoFeedLoadFinished(error);
81
+ if (!this._loaded) {
82
+ onVideoFeedEmpty?.(error);
96
83
  }
97
-
98
- this._loaded = true;
99
84
  }
100
- }
101
- });
102
-
103
- _defineProperty(this, "_onVideoFeedEmpty", event => {
104
- FWLoggerUtil.log(`VideoFeed _onVideoFeedLoadFinished ${JSON.stringify(event.nativeEvent)}`);
105
- const {
106
- onVideoFeedEmpty
107
- } = this.props;
108
-
109
- if (onVideoFeedEmpty) {
110
- onVideoFeedEmpty();
111
- }
112
- });
113
-
114
- _defineProperty(this, "_onVideoFeedDidStartPictureInPicture", event => {
115
- FWLoggerUtil.log(`VideoFeed _onVideoFeedDidStartPictureInPicture ${JSON.stringify(event.nativeEvent)}`);
116
- const {
117
- onVideoFeedDidStartPictureInPicture
118
- } = this.props;
119
- const {
120
- name,
121
- reason
122
- } = event.nativeEvent;
123
-
124
- if (onVideoFeedDidStartPictureInPicture) {
125
- if (name) {
126
- if (reason) {
127
- onVideoFeedDidStartPictureInPicture({
128
- name,
129
- reason
130
- });
131
- } else {
132
- onVideoFeedDidStartPictureInPicture({
133
- name
134
- });
85
+ } else {
86
+ if (Platform.OS === 'android') {
87
+ if (!this._loaded) {
88
+ onVideoFeedLoadFinished();
135
89
  }
136
90
  } else {
137
- onVideoFeedDidStartPictureInPicture();
91
+ onVideoFeedLoadFinished();
138
92
  }
93
+ this._loaded = true;
139
94
  }
140
- });
141
-
142
- _defineProperty(this, "_onVideoFeedDidStopPictureInPicture", event => {
143
- FWLoggerUtil.log(`VideoFeed _onVideoFeedDidStopPictureInPicture ${JSON.stringify(event.nativeEvent)}`);
144
- const {
145
- onVideoFeedDidStopPictureInPicture
146
- } = this.props;
147
- const {
148
- name,
149
- reason
150
- } = event.nativeEvent;
151
-
152
- if (onVideoFeedDidStopPictureInPicture) {
153
- if (name) {
154
- if (reason) {
155
- onVideoFeedDidStopPictureInPicture({
156
- name,
157
- reason
158
- });
159
- } else {
160
- onVideoFeedDidStopPictureInPicture({
161
- name
162
- });
163
- }
95
+ }
96
+ };
97
+ _onVideoFeedEmpty = event => {
98
+ FWLoggerUtil.log(`VideoFeed _onVideoFeedLoadFinished ${JSON.stringify(event.nativeEvent)}`);
99
+ const {
100
+ onVideoFeedEmpty
101
+ } = this.props;
102
+ if (onVideoFeedEmpty) {
103
+ onVideoFeedEmpty();
104
+ }
105
+ };
106
+ _onVideoFeedDidStartPictureInPicture = event => {
107
+ FWLoggerUtil.log(`VideoFeed _onVideoFeedDidStartPictureInPicture ${JSON.stringify(event.nativeEvent)}`);
108
+ const {
109
+ onVideoFeedDidStartPictureInPicture
110
+ } = this.props;
111
+ const {
112
+ name,
113
+ reason
114
+ } = event.nativeEvent;
115
+ if (onVideoFeedDidStartPictureInPicture) {
116
+ if (name) {
117
+ if (reason) {
118
+ onVideoFeedDidStartPictureInPicture({
119
+ name,
120
+ reason
121
+ });
164
122
  } else {
165
- onVideoFeedDidStopPictureInPicture();
123
+ onVideoFeedDidStartPictureInPicture({
124
+ name
125
+ });
166
126
  }
127
+ } else {
128
+ onVideoFeedDidStartPictureInPicture();
167
129
  }
168
- });
169
-
170
- _defineProperty(this, "_onVideoFeedGetFeedId", event => {
171
- FWLoggerUtil.log(`VideoFeed onVideoFeedGetFeedId ${JSON.stringify(event.nativeEvent)}`);
172
- const {
173
- onVideoFeedGetFeedId
174
- } = this.props;
175
- const {
176
- feedId
177
- } = event.nativeEvent;
178
-
179
- if (feedId) {
180
- FWGlobalState.getInstance().componentTypeByFeedIdMap.set(feedId, FWComponentType.videoFeed);
181
- }
182
-
183
- if (onVideoFeedGetFeedId) {
184
- onVideoFeedGetFeedId(feedId !== null && feedId !== void 0 ? feedId : '');
130
+ }
131
+ };
132
+ _onVideoFeedDidStopPictureInPicture = event => {
133
+ FWLoggerUtil.log(`VideoFeed _onVideoFeedDidStopPictureInPicture ${JSON.stringify(event.nativeEvent)}`);
134
+ const {
135
+ onVideoFeedDidStopPictureInPicture
136
+ } = this.props;
137
+ const {
138
+ name,
139
+ reason
140
+ } = event.nativeEvent;
141
+ if (onVideoFeedDidStopPictureInPicture) {
142
+ if (name) {
143
+ if (reason) {
144
+ onVideoFeedDidStopPictureInPicture({
145
+ name,
146
+ reason
147
+ });
148
+ } else {
149
+ onVideoFeedDidStopPictureInPicture({
150
+ name
151
+ });
152
+ }
153
+ } else {
154
+ onVideoFeedDidStopPictureInPicture();
185
155
  }
186
- });
187
-
188
- this.state = {
189
- sdkInitCalled: FWGlobalState.getInstance().sdkInitCalled
190
- };
191
- }
156
+ }
157
+ };
158
+ _onVideoFeedGetFeedId = event => {
159
+ FWLoggerUtil.log(`VideoFeed onVideoFeedGetFeedId ${JSON.stringify(event.nativeEvent)}`);
160
+ const {
161
+ onVideoFeedGetFeedId
162
+ } = this.props;
163
+ const {
164
+ feedId
165
+ } = event.nativeEvent;
166
+ if (feedId) {
167
+ FWGlobalState.getInstance().componentTypeByFeedIdMap.set(feedId, FWComponentType.videoFeed);
168
+ }
169
+ if (onVideoFeedGetFeedId) {
170
+ onVideoFeedGetFeedId(feedId ?? '');
171
+ }
172
+ };
192
173
 
193
174
  /**
194
175
  * @ignore
195
176
  */
196
177
  componentDidMount() {
197
178
  FWLoggerUtil.log(`VideoFeed componentDidMount ${JSON.stringify(this.props)}`);
198
-
199
179
  if (!this.state.sdkInitCalled) {
200
180
  FWGlobalState.getInstance().sdkInitCalledPromise.then(() => {
201
181
  this.setState({
@@ -203,84 +183,65 @@ class VideoFeed extends React.Component {
203
183
  });
204
184
  });
205
185
  }
206
-
207
186
  const subscriptionOfShareBaseURLUpdated = FireworkSDKModuleEventEmitter.addListener(FWEventName.ShareBaseURLUpdated, () => {
208
187
  FWLoggerUtil.log('Receive FWEventName.ShareBaseURLUpdated');
209
188
  this.setState({});
210
189
  });
211
-
212
190
  this._subscriptions.push(subscriptionOfShareBaseURLUpdated);
213
-
214
191
  const subscriptionOfAdBadgeConfigurationUpdated = FireworkSDKModuleEventEmitter.addListener(FWEventName.AdBadgeConfigurationUpdated, () => {
215
192
  FWLoggerUtil.log('Receive FWEventName.AdBadgeConfigurationUpdated');
216
193
  this.setState({});
217
194
  });
218
-
219
195
  this._subscriptions.push(subscriptionOfAdBadgeConfigurationUpdated);
220
-
221
196
  const subscriptionOfVideoLaunchBehaviorUpdated = FireworkSDKModuleEventEmitter.addListener(FWEventName.VideoLaunchBehaviorUpdated, () => {
222
197
  FWLoggerUtil.log('Receive FWEventName.VideoLaunchBehaviorUpdated');
223
198
  this.setState({});
224
199
  });
225
-
226
200
  this._subscriptions.push(subscriptionOfVideoLaunchBehaviorUpdated);
227
-
228
201
  const subscriptionOfAppLanguageUpdated = FireworkSDKModuleEventEmitter.addListener(FWEventName.AppLanguageUpdated, () => {
229
202
  FWLoggerUtil.log('Receive FWEventName.AppLanguageUpdated');
230
203
  this.setState({});
231
204
  });
232
-
233
205
  this._subscriptions.push(subscriptionOfAppLanguageUpdated);
234
-
235
206
  const subscriptionOfDataTrackingLevelUpdated = FireworkSDKModuleEventEmitter.addListener(FWEventName.DataTrackingLevelUpdated, () => {
236
207
  FWLoggerUtil.log('Receive FWEventName.DataTrackingLevelUpdated');
237
208
  this.setState({});
238
209
  });
239
-
240
210
  this._subscriptions.push(subscriptionOfDataTrackingLevelUpdated);
241
-
242
211
  const subscriptionOfLivestreamPlayerDesignVersionUpdated = FireworkSDKModuleEventEmitter.addListener(FWEventName.LivestreamPlayerDesignVersionUpdated, () => {
243
212
  FWLoggerUtil.log('Receive FWEventName.LivestreamPlayerDesignVersionUpdated');
244
213
  this.setState({});
245
214
  });
246
-
247
215
  this._subscriptions.push(subscriptionOfLivestreamPlayerDesignVersionUpdated);
248
216
  }
217
+
249
218
  /**
250
219
  * @ignore
251
220
  */
252
-
253
-
254
221
  componentWillUnmount() {
255
222
  FWLoggerUtil.log(`VideoFeed componentWillUnmount ${JSON.stringify(this.props)}`);
256
-
257
223
  this._subscriptions.forEach(value => {
258
224
  value.remove();
259
225
  });
260
-
261
226
  this._subscriptions = [];
262
227
  }
228
+
263
229
  /**
264
230
  * @ignore
265
231
  */
266
-
267
-
268
232
  render() {
269
- var _adBadgeConfiguration, _adBadgeConfiguration2, _adBadgeConfiguration3, _videoFeedConfigurati, _videoFeedConfigurati2, _videoFeedConfigurati3, _videoFeedConfigurati4, _videoFeedConfigurati5, _videoFeedConfigurati6, _videoFeedConfigurati7, _videoFeedConfigurati8, _videoFeedConfigurati9, _videoFeedConfigurati10, _videoFeedConfigurati11, _videoFeedConfigurati12, _videoFeedConfigurati13, _videoFeedConfigurati14, _videoPlayerConfigura, _videoPlayerConfigura2, _videoPlayerConfigura3, _videoPlayerConfigura4, _videoPlayerConfigura5, _videoPlayerConfigura6;
270
-
271
233
  if (!this.state.sdkInitCalled) {
272
234
  return null;
273
235
  }
274
-
275
236
  const gShareBaseURL = FireworkSDK.getInstance().shareBaseURL;
276
237
  const appLanguage = FireworkSDK.getInstance().appLanguage;
277
238
  const videoLaunchBehavior = FireworkSDK.getInstance().videoLaunchBehavior;
278
239
  const adBadgeConfiguration = FireworkSDK.getInstance().adBadgeConfiguration;
279
- const adBadgeTextType = adBadgeConfiguration === null || adBadgeConfiguration === void 0 ? void 0 : adBadgeConfiguration.badgeTextType;
280
- const backgroundColorOfAdBadge = adBadgeConfiguration === null || adBadgeConfiguration === void 0 ? void 0 : adBadgeConfiguration.backgroundColor;
281
- const textColorOfAdBadge = adBadgeConfiguration === null || adBadgeConfiguration === void 0 ? void 0 : adBadgeConfiguration.textColor;
282
- const androidFontIsCustomOfAdBadge = adBadgeConfiguration === null || adBadgeConfiguration === void 0 ? void 0 : (_adBadgeConfiguration = adBadgeConfiguration.androidFontInfo) === null || _adBadgeConfiguration === void 0 ? void 0 : (_adBadgeConfiguration2 = _adBadgeConfiguration.isCustom) === null || _adBadgeConfiguration2 === void 0 ? void 0 : _adBadgeConfiguration2.toString();
283
- const androidFontTypefaceNameOfAdBadge = adBadgeConfiguration === null || adBadgeConfiguration === void 0 ? void 0 : (_adBadgeConfiguration3 = adBadgeConfiguration.androidFontInfo) === null || _adBadgeConfiguration3 === void 0 ? void 0 : _adBadgeConfiguration3.typefaceName;
240
+ const adBadgeTextType = adBadgeConfiguration?.badgeTextType;
241
+ const backgroundColorOfAdBadge = adBadgeConfiguration?.backgroundColor;
242
+ const textColorOfAdBadge = adBadgeConfiguration?.textColor;
243
+ const androidFontIsCustomOfAdBadge = adBadgeConfiguration?.androidFontInfo?.isCustom?.toString();
244
+ const androidFontTypefaceNameOfAdBadge = adBadgeConfiguration?.androidFontInfo?.typefaceName;
284
245
  const dataTrackingLevel = FireworkSDK.getInstance().dataTrackingLevel;
285
246
  const livestreamPlayerDesignVersion = FireworkSDK.getInstance().livestreamPlayerDesignVersion;
286
247
  const {
@@ -295,68 +256,57 @@ class VideoFeed extends React.Component {
295
256
  enablePictureInPicture,
296
257
  adConfiguration
297
258
  } = this.props;
298
-
299
259
  const dynamicContentParametersString = this._generateDynamicContentParametersString();
300
-
301
260
  const videoFeedConfiguration = this._getVideoFeedConfiguration();
302
-
303
- const cornerRadius = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati = videoFeedConfiguration.cornerRadius) === null || _videoFeedConfigurati === void 0 ? void 0 : _videoFeedConfigurati.toFixed(5);
304
- const titleHidden = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati2 = videoFeedConfiguration.title) === null || _videoFeedConfigurati2 === void 0 ? void 0 : (_videoFeedConfigurati3 = _videoFeedConfigurati2.hidden) === null || _videoFeedConfigurati3 === void 0 ? void 0 : _videoFeedConfigurati3.toString();
305
- const titleTextColor = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati4 = videoFeedConfiguration.title) === null || _videoFeedConfigurati4 === void 0 ? void 0 : _videoFeedConfigurati4.textColor;
306
- const titleFontSize = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati5 = videoFeedConfiguration.title) === null || _videoFeedConfigurati5 === void 0 ? void 0 : (_videoFeedConfigurati6 = _videoFeedConfigurati5.fontSize) === null || _videoFeedConfigurati6 === void 0 ? void 0 : _videoFeedConfigurati6.toFixed(5);
307
- const titleNumberOfLines = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati7 = videoFeedConfiguration.title) === null || _videoFeedConfigurati7 === void 0 ? void 0 : _videoFeedConfigurati7.numberOfLines;
308
- const titleAndroidFontInfo = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati8 = videoFeedConfiguration.title) === null || _videoFeedConfigurati8 === void 0 ? void 0 : _videoFeedConfigurati8.androidFontInfo;
309
- const titleGradientDrawable = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati9 = videoFeedConfiguration.title) === null || _videoFeedConfigurati9 === void 0 ? void 0 : _videoFeedConfigurati9.gradientDrawable;
310
- const titlePosition = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : videoFeedConfiguration.titlePosition;
311
- const playIconHidden = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati10 = videoFeedConfiguration.playIcon) === null || _videoFeedConfigurati10 === void 0 ? void 0 : _videoFeedConfigurati10.hidden;
312
- const playIconWidth = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati11 = videoFeedConfiguration.playIcon) === null || _videoFeedConfigurati11 === void 0 ? void 0 : (_videoFeedConfigurati12 = _videoFeedConfigurati11.iconWidth) === null || _videoFeedConfigurati12 === void 0 ? void 0 : _videoFeedConfigurati12.toFixed(5);
313
- const showAdBadge = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati13 = videoFeedConfiguration.showAdBadge) === null || _videoFeedConfigurati13 === void 0 ? void 0 : _videoFeedConfigurati13.toString();
314
- const enableAutoplay = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : videoFeedConfiguration.enableAutoplay;
315
- const gridColumns = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : videoFeedConfiguration.gridColumns;
316
- const itemSpacing = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati14 = videoFeedConfiguration.itemSpacing) === null || _videoFeedConfigurati14 === void 0 ? void 0 : _videoFeedConfigurati14.toFixed(5);
317
-
261
+ const cornerRadius = videoFeedConfiguration?.cornerRadius?.toFixed(5);
262
+ const titleHidden = videoFeedConfiguration?.title?.hidden?.toString();
263
+ const titleTextColor = videoFeedConfiguration?.title?.textColor;
264
+ const titleFontSize = videoFeedConfiguration?.title?.fontSize?.toFixed(5);
265
+ const titleNumberOfLines = videoFeedConfiguration?.title?.numberOfLines;
266
+ const titleAndroidFontInfo = videoFeedConfiguration?.title?.androidFontInfo;
267
+ const titleGradientDrawable = videoFeedConfiguration?.title?.gradientDrawable;
268
+ const titlePosition = videoFeedConfiguration?.titlePosition;
269
+ const playIconHidden = videoFeedConfiguration?.playIcon?.hidden;
270
+ const playIconWidth = videoFeedConfiguration?.playIcon?.iconWidth?.toFixed(5);
271
+ const showAdBadge = videoFeedConfiguration?.showAdBadge?.toString();
272
+ const enableAutoplay = videoFeedConfiguration?.enableAutoplay;
273
+ const gridColumns = videoFeedConfiguration?.gridColumns;
274
+ const itemSpacing = videoFeedConfiguration?.itemSpacing?.toFixed(5);
318
275
  const videoPlayerConfiguration = this._getVideoPlayerConfiguration();
319
-
320
- const playerStyle = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : videoPlayerConfiguration.playerStyle;
321
- const videoCompleteAction = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : videoPlayerConfiguration.videoCompleteAction;
322
- const showShareButton = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : videoPlayerConfiguration.showShareButton;
323
- const showPlaybackButton = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : videoPlayerConfiguration.showPlaybackButton;
324
- const showMuteButton = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : videoPlayerConfiguration.showMuteButton;
325
- const showBranding = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : videoPlayerConfiguration.showBranding;
326
- const ctaDelayType = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : (_videoPlayerConfigura = videoPlayerConfiguration.ctaDelay) === null || _videoPlayerConfigura === void 0 ? void 0 : _videoPlayerConfigura.type;
327
- const ctaDelayValue = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : (_videoPlayerConfigura2 = videoPlayerConfiguration.ctaDelay) === null || _videoPlayerConfigura2 === void 0 ? void 0 : (_videoPlayerConfigura3 = _videoPlayerConfigura2.value) === null || _videoPlayerConfigura3 === void 0 ? void 0 : _videoPlayerConfigura3.toFixed(5);
328
- const ctaHighlightDelayType = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : (_videoPlayerConfigura4 = videoPlayerConfiguration.ctaHighlightDelay) === null || _videoPlayerConfigura4 === void 0 ? void 0 : _videoPlayerConfigura4.type;
329
- const ctaHighlightDelayValue = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : (_videoPlayerConfigura5 = videoPlayerConfiguration.ctaHighlightDelay) === null || _videoPlayerConfigura5 === void 0 ? void 0 : (_videoPlayerConfigura6 = _videoPlayerConfigura5.value) === null || _videoPlayerConfigura6 === void 0 ? void 0 : _videoPlayerConfigura6.toFixed(5);
330
- const shareBaseURL = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : videoPlayerConfiguration.shareBaseURL;
331
- const ctaWidth = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : videoPlayerConfiguration.ctaWidth;
332
- const buttonConfiguration = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : videoPlayerConfiguration.buttonConfiguration;
333
- const videoPlayerLogoConfigurationJsonKey = gennerateJsonKey(videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : videoPlayerConfiguration.videoPlayerLogoConfiguration);
334
- const countdownTimerConfigurationJsonKey = gennerateJsonKey(videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : videoPlayerConfiguration.countdownTimerConfiguration);
335
- const showVideoDetailTitle = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : videoPlayerConfiguration.showVideoDetailTitle;
336
- const requiresAds = adConfiguration === null || adConfiguration === void 0 ? void 0 : adConfiguration.requiresAds;
337
- const adsFetchTimeout = adConfiguration === null || adConfiguration === void 0 ? void 0 : adConfiguration.adsFetchTimeout;
338
-
276
+ const playerStyle = videoPlayerConfiguration?.playerStyle;
277
+ const videoCompleteAction = videoPlayerConfiguration?.videoCompleteAction;
278
+ const showShareButton = videoPlayerConfiguration?.showShareButton;
279
+ const showPlaybackButton = videoPlayerConfiguration?.showPlaybackButton;
280
+ const showMuteButton = videoPlayerConfiguration?.showMuteButton;
281
+ const showBranding = videoPlayerConfiguration?.showBranding;
282
+ const ctaDelayType = videoPlayerConfiguration?.ctaDelay?.type;
283
+ const ctaDelayValue = videoPlayerConfiguration?.ctaDelay?.value?.toFixed(5);
284
+ const ctaHighlightDelayType = videoPlayerConfiguration?.ctaHighlightDelay?.type;
285
+ const ctaHighlightDelayValue = videoPlayerConfiguration?.ctaHighlightDelay?.value?.toFixed(5);
286
+ const shareBaseURL = videoPlayerConfiguration?.shareBaseURL;
287
+ const ctaWidth = videoPlayerConfiguration?.ctaWidth;
288
+ const buttonConfiguration = videoPlayerConfiguration?.buttonConfiguration;
289
+ const videoPlayerLogoConfigurationJsonKey = gennerateJsonKey(videoPlayerConfiguration?.videoPlayerLogoConfiguration);
290
+ const countdownTimerConfigurationJsonKey = gennerateJsonKey(videoPlayerConfiguration?.countdownTimerConfiguration);
291
+ const showVideoDetailTitle = videoPlayerConfiguration?.showVideoDetailTitle;
292
+ const requiresAds = adConfiguration?.requiresAds;
293
+ const adsFetchTimeout = adConfiguration?.adsFetchTimeout;
339
294
  const vastAttributesString = this._generateVastAttributesString();
340
-
341
- const replayBadgeVideoFeedConfigurationJsonKey = gennerateJsonKey(videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : videoFeedConfiguration.replayBadge);
342
- const replayBadgeVideoPlayerConfigurationJsonKey = gennerateJsonKey(videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : videoPlayerConfiguration.replayBadgeConfiguration);
343
- const shadowVideoFeedConfigurationJsonKey = gennerateJsonKey(videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : videoFeedConfiguration.shadow);
295
+ const replayBadgeVideoFeedConfigurationJsonKey = gennerateJsonKey(videoFeedConfiguration?.replayBadge);
296
+ const replayBadgeVideoPlayerConfigurationJsonKey = gennerateJsonKey(videoPlayerConfiguration?.replayBadgeConfiguration);
297
+ const shadowVideoFeedConfigurationJsonKey = gennerateJsonKey(videoFeedConfiguration?.shadow);
344
298
  let key = `gShareBaseURL:${gShareBaseURL}`;
345
-
346
299
  if (Platform.OS === 'ios') {
347
300
  key += `_appLanguage:${appLanguage}`;
348
301
  }
349
-
350
302
  key += `_videoLaunchBehavior:${videoLaunchBehavior}`;
351
303
  key += `_adBadgeTextType:${adBadgeTextType}`;
352
304
  key += `_backgroundColorOfAdBadge:${backgroundColorOfAdBadge}`;
353
305
  key += `_textColorOfAdBadge:${textColorOfAdBadge}`;
354
-
355
306
  if (Platform.OS === 'android') {
356
307
  key += `_androidFontIsCustomOfAdBadge${androidFontIsCustomOfAdBadge}`;
357
308
  key += `_androidFontTypefaceNameOfAdBadge${androidFontTypefaceNameOfAdBadge}`;
358
309
  }
359
-
360
310
  key += `_dataTrackingLevel:${dataTrackingLevel}`;
361
311
  key += `_livestreamPlayerDesignVersion:${livestreamPlayerDesignVersion}`;
362
312
  key += `_source:${source}`;
@@ -365,38 +315,31 @@ class VideoFeed extends React.Component {
365
315
  key += `_playlistGroup:${playlistGroup}`;
366
316
  key += `_dynamicContentParameters:${dynamicContentParametersString}`;
367
317
  key += `_hashtagFilterExpression:${hashtagFilterExpression}`;
368
- key += `_productIds:${productIds === null || productIds === void 0 ? void 0 : productIds.join(',')}`;
318
+ key += `_productIds:${productIds?.join(',')}`;
369
319
  key += `_contentId:${contentId}`;
370
320
  key += `_mode:${mode}`;
371
321
  key += `_enablePictureInPicture:${enablePictureInPicture}`;
372
322
  key += `_titleHidden:${titleHidden}`;
373
-
374
323
  if (Platform.OS === 'android') {
375
- var _titleGradientDrawabl;
376
-
377
324
  key += `_cornerRadius:${cornerRadius}`;
378
325
  key += `_titleTextColor:${titleTextColor}`;
379
326
  key += `_titleFontSize:${titleFontSize}`;
380
327
  key += `_titleNumberOfLines:${titleNumberOfLines}`;
381
- key += `_titleAndroidFontInfo.isCustom:${titleAndroidFontInfo === null || titleAndroidFontInfo === void 0 ? void 0 : titleAndroidFontInfo.isCustom}`;
382
- key += `_titleAndroidFontInfo.typefaceName:${titleAndroidFontInfo === null || titleAndroidFontInfo === void 0 ? void 0 : titleAndroidFontInfo.typefaceName}`;
383
- key += `_titleGradientDrawable.orientation:${titleGradientDrawable === null || titleGradientDrawable === void 0 ? void 0 : titleGradientDrawable.orientation}`;
384
- key += `_titleGradientDrawable.colors:${titleGradientDrawable === null || titleGradientDrawable === void 0 ? void 0 : (_titleGradientDrawabl = titleGradientDrawable.colors) === null || _titleGradientDrawabl === void 0 ? void 0 : _titleGradientDrawabl.join(',')}`;
328
+ key += `_titleAndroidFontInfo.isCustom:${titleAndroidFontInfo?.isCustom}`;
329
+ key += `_titleAndroidFontInfo.typefaceName:${titleAndroidFontInfo?.typefaceName}`;
330
+ key += `_titleGradientDrawable.orientation:${titleGradientDrawable?.orientation}`;
331
+ key += `_titleGradientDrawable.colors:${titleGradientDrawable?.colors?.join(',')}`;
385
332
  key += `_playIconHidden:${playIconHidden}`;
386
333
  key += `_playIconWidth:${playIconWidth}`;
387
334
  key += `_showAdBadge:${showAdBadge}`;
388
335
  }
389
-
390
336
  key += `_titlePosition:${titlePosition}`;
391
-
392
337
  if (Platform.OS === 'android') {
393
338
  key += `_enableAutoplay:${enableAutoplay}`;
394
339
  }
395
-
396
340
  key += `_gridColumns:${gridColumns}`;
397
341
  key += `_itemSpacing:${itemSpacing}`;
398
342
  key += `_shareBaseURL:${shareBaseURL}`;
399
-
400
343
  if (Platform.OS === 'android') {
401
344
  key += `_playerStyle:${playerStyle}`;
402
345
  key += `_videoCompleteAction:${videoCompleteAction}`;
@@ -409,17 +352,16 @@ class VideoFeed extends React.Component {
409
352
  key += `_ctaHighlightDelayType:${ctaHighlightDelayType}`;
410
353
  key += `_ctaHighlightDelayValue:${ctaHighlightDelayValue}`;
411
354
  key += `_ctaWidth:${ctaWidth}`;
412
- key += `_buttonConfiguration.videoDetailButton:${this._generateButtonInfoString(buttonConfiguration === null || buttonConfiguration === void 0 ? void 0 : buttonConfiguration.videoDetailButton)}`;
413
- key += `_buttonConfiguration.closeButton:${this._generateButtonInfoString(buttonConfiguration === null || buttonConfiguration === void 0 ? void 0 : buttonConfiguration.closeButton)}`;
414
- key += `_buttonConfiguration.muteButton:${this._generateButtonInfoString(buttonConfiguration === null || buttonConfiguration === void 0 ? void 0 : buttonConfiguration.muteButton)}`;
415
- key += `_buttonConfiguration.unmuteButton:${this._generateButtonInfoString(buttonConfiguration === null || buttonConfiguration === void 0 ? void 0 : buttonConfiguration.unmuteButton)}`;
416
- key += `_buttonConfiguration.playButton:${this._generateButtonInfoString(buttonConfiguration === null || buttonConfiguration === void 0 ? void 0 : buttonConfiguration.playButton)}`;
417
- key += `_buttonConfiguration.pauseButton:${this._generateButtonInfoString(buttonConfiguration === null || buttonConfiguration === void 0 ? void 0 : buttonConfiguration.pauseButton)}`;
355
+ key += `_buttonConfiguration.videoDetailButton:${this._generateButtonInfoString(buttonConfiguration?.videoDetailButton)}`;
356
+ key += `_buttonConfiguration.closeButton:${this._generateButtonInfoString(buttonConfiguration?.closeButton)}`;
357
+ key += `_buttonConfiguration.muteButton:${this._generateButtonInfoString(buttonConfiguration?.muteButton)}`;
358
+ key += `_buttonConfiguration.unmuteButton:${this._generateButtonInfoString(buttonConfiguration?.unmuteButton)}`;
359
+ key += `_buttonConfiguration.playButton:${this._generateButtonInfoString(buttonConfiguration?.playButton)}`;
360
+ key += `_buttonConfiguration.pauseButton:${this._generateButtonInfoString(buttonConfiguration?.pauseButton)}`;
418
361
  key += `_videoPlayerLogoConfiguration:${videoPlayerLogoConfigurationJsonKey}`;
419
362
  key += `_countdownTimerConfiguration:${countdownTimerConfigurationJsonKey}`;
420
363
  key += `_showVideoDetailTitle:${showVideoDetailTitle}`;
421
364
  }
422
-
423
365
  key += `_requiresAds:${requiresAds}`;
424
366
  key += `_adsFetchTimeout:${adsFetchTimeout}`;
425
367
  key += `_vastAttributes:${vastAttributesString}`;
@@ -427,9 +369,8 @@ class VideoFeed extends React.Component {
427
369
  key += `_replayBadgeVideoPlayerConfiguration:${replayBadgeVideoPlayerConfigurationJsonKey}`;
428
370
  key += `_shadowVideoFeedConfiguration:${shadowVideoFeedConfigurationJsonKey}`;
429
371
  console.log('video feed key', key);
430
- return /*#__PURE__*/React.createElement(FWVideoFeed, _extends({
431
- key: key
432
- }, this.props, {
372
+ return /*#__PURE__*/_jsx(FWVideoFeed, {
373
+ ...this.props,
433
374
  enablePictureInPicture: undefined,
434
375
  videoFeedConfiguration: videoFeedConfiguration,
435
376
  videoPlayerConfiguration: videoPlayerConfiguration,
@@ -439,118 +380,92 @@ class VideoFeed extends React.Component {
439
380
  onVideoFeedDidStartPictureInPicture: this._onVideoFeedDidStartPictureInPicture,
440
381
  onVideoFeedDidStopPictureInPicture: this._onVideoFeedDidStopPictureInPicture,
441
382
  onVideoFeedGetFeedId: this._onVideoFeedGetFeedId,
442
- mode: mode !== null && mode !== void 0 ? mode : 'row'
443
- }));
383
+ mode: mode ?? 'row'
384
+ }, key);
444
385
  }
445
-
446
386
  _generateDynamicContentParametersString() {
447
387
  const {
448
388
  dynamicContentParameters
449
389
  } = this.props;
450
-
451
390
  if (!dynamicContentParameters) {
452
391
  return '';
453
392
  }
454
-
455
393
  let resultString = '';
456
394
  const sortedKeyList = Object.keys(dynamicContentParameters).sort();
457
-
458
395
  for (const key of sortedKeyList) {
459
- const value = dynamicContentParameters[key];
396
+ const value = dynamicContentParameters[key] ?? [];
460
397
  const valueString = value.join(',');
461
-
462
398
  if (resultString.length > 0) {
463
399
  resultString += '_';
464
400
  }
465
-
466
401
  resultString += `${key}:${valueString}`;
467
402
  }
468
-
469
403
  return resultString;
470
404
  }
471
-
472
405
  _generateVastAttributesString() {
473
406
  const {
474
407
  adConfiguration
475
408
  } = this.props;
476
- const vastAttributes = adConfiguration === null || adConfiguration === void 0 ? void 0 : adConfiguration.vastAttributes;
477
-
409
+ const vastAttributes = adConfiguration?.vastAttributes;
478
410
  if (!vastAttributes) {
479
411
  return '';
480
412
  }
481
-
482
413
  let resultString = '';
483
-
484
414
  for (const attribute of vastAttributes) {
485
415
  if (resultString.length > 0) {
486
416
  resultString += '_';
487
417
  }
488
-
489
418
  resultString += `${attribute.name}:${attribute.value}`;
490
419
  }
491
-
492
420
  return resultString;
493
421
  }
494
-
495
422
  _generateButtonInfoString(buttonInfo) {
496
- return `imageName:${buttonInfo === null || buttonInfo === void 0 ? void 0 : buttonInfo.imageName}_systemImageName:${buttonInfo === null || buttonInfo === void 0 ? void 0 : buttonInfo.systemImageName}_tintColor:${buttonInfo === null || buttonInfo === void 0 ? void 0 : buttonInfo.tintColor}`;
423
+ return `imageName:${buttonInfo?.imageName}_systemImageName:${buttonInfo?.systemImageName}_tintColor:${buttonInfo?.tintColor}`;
497
424
  }
498
-
499
425
  _getVideoFeedConfiguration() {
500
426
  const {
501
427
  videoFeedConfiguration
502
428
  } = this.props;
503
-
504
429
  if (!videoFeedConfiguration) {
505
430
  return videoFeedConfiguration;
506
431
  }
507
-
508
432
  let resultVideoFeedConfiguration = videoFeedConfiguration;
509
-
510
433
  if (resultVideoFeedConfiguration.gridColumns && Math.floor(resultVideoFeedConfiguration.gridColumns) !== resultVideoFeedConfiguration.gridColumns) {
511
434
  const gridColumns = Math.floor(resultVideoFeedConfiguration.gridColumns);
512
- resultVideoFeedConfiguration = { ...resultVideoFeedConfiguration,
435
+ resultVideoFeedConfiguration = {
436
+ ...resultVideoFeedConfiguration,
513
437
  gridColumns
514
438
  };
515
439
  }
516
-
517
440
  if (resultVideoFeedConfiguration.title && resultVideoFeedConfiguration.title.numberOfLines && Math.floor(resultVideoFeedConfiguration.title.numberOfLines) !== resultVideoFeedConfiguration.title.numberOfLines) {
518
441
  const numberOfLines = Math.floor(resultVideoFeedConfiguration.title.numberOfLines);
519
- resultVideoFeedConfiguration = { ...resultVideoFeedConfiguration,
520
- title: { ...resultVideoFeedConfiguration.title,
442
+ resultVideoFeedConfiguration = {
443
+ ...resultVideoFeedConfiguration,
444
+ title: {
445
+ ...resultVideoFeedConfiguration.title,
521
446
  numberOfLines
522
447
  }
523
448
  };
524
449
  }
525
-
526
450
  return resultVideoFeedConfiguration;
527
451
  }
528
-
529
452
  _getVideoPlayerConfiguration() {
530
453
  const {
531
454
  videoPlayerConfiguration,
532
455
  enablePictureInPicture
533
456
  } = this.props;
534
457
  let resultVideoPlayerConfiguration = videoPlayerConfiguration;
535
-
536
458
  if (typeof enablePictureInPicture === 'boolean') {
537
459
  if (!resultVideoPlayerConfiguration) {
538
460
  resultVideoPlayerConfiguration = {};
539
461
  }
540
-
541
- resultVideoPlayerConfiguration = { ...resultVideoPlayerConfiguration,
462
+ resultVideoPlayerConfiguration = {
463
+ ...resultVideoPlayerConfiguration,
542
464
  enablePictureInPicture
543
465
  };
544
466
  }
545
-
546
467
  return resultVideoPlayerConfiguration;
547
468
  }
548
-
549
469
  }
550
-
551
- _defineProperty(VideoFeed, "defaultProps", {
552
- mode: 'row'
553
- });
554
-
555
470
  export default VideoFeed;
556
471
  //# sourceMappingURL=VideoFeed.js.map