react-native-firework-sdk 2.12.0 → 2.13.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 (39) hide show
  1. package/android/build.gradle +3 -2
  2. package/android/gradle.properties +4 -3
  3. package/android/src/main/AndroidManifest.xml +14 -0
  4. package/android/src/main/java/com/fireworksdk/bridge/FWInitializationProvider.kt +4 -0
  5. package/android/src/main/java/com/fireworksdk/bridge/components/storyblock/StoryBlockFragment.kt +1 -2
  6. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerLogoConfigurationModel.kt +1 -0
  7. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerLogoConfigurationModelDeserializer.kt +3 -0
  8. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerLogoConfigurationModelSerializer.kt +2 -0
  9. package/android/src/main/java/com/fireworksdk/bridge/reactnative/models/FWNavigatorInterface.kt +2 -0
  10. package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FWNavigatorModule.kt +26 -0
  11. package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FireworkSDKModule.kt +2 -2
  12. package/android/src/main/java/com/fireworksdk/bridge/utils/FWConfigUtil.kt +21 -2
  13. package/android/src/main/java/com/fireworksdk/bridge/utils/FWModelUtils.kt +9 -9
  14. package/ios/Components/StoryBlock.swift +5 -8
  15. package/ios/Components/VideoFeed.swift +1 -5
  16. package/ios/FireworkSdk.xcodeproj/project.pbxproj +4 -0
  17. package/ios/Modules/FireworkSDKModule/FireworkSDKModule.swift +2 -0
  18. package/ios/Utils/Extensions/UIWindowScene+Swizzle.swift +33 -0
  19. package/lib/commonjs/components/VideoFeed.js +15 -6
  20. package/lib/commonjs/components/VideoFeed.js.map +1 -1
  21. package/lib/commonjs/index.js.map +1 -1
  22. package/lib/commonjs/models/VideoPlayerLivestreamCountdownTimerTheme.js +2 -0
  23. package/lib/commonjs/models/VideoPlayerLivestreamCountdownTimerTheme.js.map +1 -0
  24. package/lib/module/components/VideoFeed.js +15 -5
  25. package/lib/module/components/VideoFeed.js.map +1 -1
  26. package/lib/module/index.js.map +1 -1
  27. package/lib/module/models/VideoPlayerLivestreamCountdownTimerTheme.js +2 -0
  28. package/lib/module/models/VideoPlayerLivestreamCountdownTimerTheme.js.map +1 -0
  29. package/lib/typescript/index.d.ts +2 -1
  30. package/lib/typescript/models/ReplayBadgeConfiguration.d.ts +1 -1
  31. package/lib/typescript/models/StoryBlockConfiguration.d.ts +0 -2
  32. package/lib/typescript/models/VideoPlayerLivestreamCountdownTimerTheme.d.ts +1 -0
  33. package/package.json +1 -1
  34. package/react-native-firework-sdk.podspec +1 -1
  35. package/src/components/VideoFeed.tsx +13 -6
  36. package/src/index.ts +2 -0
  37. package/src/models/ReplayBadgeConfiguration.ts +1 -1
  38. package/src/models/StoryBlockConfiguration.ts +0 -2
  39. package/src/models/VideoPlayerLivestreamCountdownTimerTheme.ts +1 -0
@@ -53,9 +53,10 @@ import type { VideoPlayerCTADelay, VideoPlayerCTADelayType } from './models/Vide
53
53
  import type { VideoPlayerCTAStyle } from './models/VideoPlayerCTAStyle';
54
54
  import type { VideoPlayerCTAWidth } from './models/VideoPlayerCTAWidth';
55
55
  import type { VideoPlayerCompleteAction } from './models/VideoPlayerCompleteAction';
56
+ import type { VideoPlayerLivestreamCountdownTimerTheme } from './models/VideoPlayerLivestreamCountdownTimerTheme';
56
57
  import type VideoPlayerConfiguration from './models/VideoPlayerConfiguration';
57
58
  import type { VideoPlayerLogoConfiguration, VideoPlayerLogoOption } from './models/VideoPlayerLogoConfiguration';
58
59
  import type { VideoPlayerStyle } from './models/VideoPlayerStyle';
59
60
  import VideoFeedUtil from './utils/VideoFeedUtil';
60
61
  export default FireworkSDK;
61
- export { AdBadgeConfiguration, AdBadgeTextType, AdConfiguration, AndroidFontInfo, ButtonInfo, CountdownTimerAppearanceMode, CountdownTimerConfiguration, CustomCTAClickCallback, CustomCTAClickEvent, CustomClickCartIconCallback, CustomClickCartIconEvent, CustomClickLinkButtonCallback, CustomClickLinkButtonEvent, CustomTapProductCardCallback, CustomTapProductCardEvent, FWError, FWNavigator, FeedItemDetails, FireworkSDK, GradientDrawable, GradientDrawableOrientation, IOSFontInfo, IOSSystemFontStyle, IOSSystemFontWeight, IStoryBlockMethods, IStoryBlockProps, IVideoFeedProps, LinkButtonConfiguration, LiveStream, LiveStreamChatEvent, LiveStreamChatEventName, LiveStreamEvent, LiveStreamEventDetails, LiveStreamEventName, LiveStreamMessageDetails, OpenVideoPlayerConfiguration, PlayerHandler, Product, ProductCardCTAButtonStyle, ProductCardCTAButtonText, ProductCardConfiguration, ProductCardIconConfiguration, ProductCardLabelConfiguration, ProductCardPriceConfiguration, ProductCardPriceLabelAxis, ProductCardTheme, ProductInfoViewConfiguration, ProductPrice, ProductUnit, ProductUnitOption, PushRNContainerParams, RNAppProps, SDKInitCallback, SDKInitEvent, SDKInitOptions, ShoppingCTAButtonConfiguration, ShoppingCTAButtonText, ShoppingCTACallback, ShoppingCTAEvent, ShoppingCTAResult, StoryBlock, StoryBlockConfiguration, StoryBlockSource, TrackPurchaseParameters, UpdateProductDetailsCallback, UpdateProductDetailsEvent, VastAttribute, VideoFeed, VideoFeedClickCallback, VideoFeedClickEvent, VideoFeedConfiguration, VideoFeedMode, VideoFeedPadding, VideoFeedPlayIconConfiguration, VideoFeedSource, VideoFeedTitleConfiguration, VideoFeedTitlePosition, VideoFeedUtil, VideoLaunchBehavior, VideoPlaybackCallback, VideoPlaybackDetails, VideoPlaybackEvent, VideoPlaybackEventName, VideoPlayerButtonConfiguration, VideoPlayerCTADelay, VideoPlayerCTADelayType, VideoPlayerCTAStyle, VideoPlayerCTAWidth, VideoPlayerCompleteAction, VideoPlayerConfiguration, VideoPlayerLogoConfiguration, VideoPlayerLogoOption, VideoPlayerSize, VideoPlayerStyle, VideoShopping, onLiveStreamChatEventCallback, onLiveStreamEventCallback, };
62
+ export { AdBadgeConfiguration, AdBadgeTextType, AdConfiguration, AndroidFontInfo, ButtonInfo, CountdownTimerAppearanceMode, CountdownTimerConfiguration, CustomCTAClickCallback, CustomCTAClickEvent, CustomClickCartIconCallback, CustomClickCartIconEvent, CustomClickLinkButtonCallback, CustomClickLinkButtonEvent, CustomTapProductCardCallback, CustomTapProductCardEvent, FWError, FWNavigator, FeedItemDetails, FireworkSDK, GradientDrawable, GradientDrawableOrientation, IOSFontInfo, IOSSystemFontStyle, IOSSystemFontWeight, IStoryBlockMethods, IStoryBlockProps, IVideoFeedProps, LinkButtonConfiguration, LiveStream, LiveStreamChatEvent, LiveStreamChatEventName, LiveStreamEvent, LiveStreamEventDetails, LiveStreamEventName, LiveStreamMessageDetails, OpenVideoPlayerConfiguration, PlayerHandler, Product, ProductCardCTAButtonStyle, ProductCardCTAButtonText, ProductCardConfiguration, ProductCardIconConfiguration, ProductCardLabelConfiguration, ProductCardPriceConfiguration, ProductCardPriceLabelAxis, ProductCardTheme, ProductInfoViewConfiguration, ProductPrice, ProductUnit, ProductUnitOption, PushRNContainerParams, RNAppProps, SDKInitCallback, SDKInitEvent, SDKInitOptions, ShoppingCTAButtonConfiguration, ShoppingCTAButtonText, ShoppingCTACallback, ShoppingCTAEvent, ShoppingCTAResult, StoryBlock, StoryBlockConfiguration, StoryBlockSource, TrackPurchaseParameters, UpdateProductDetailsCallback, UpdateProductDetailsEvent, VastAttribute, VideoFeed, VideoFeedClickCallback, VideoFeedClickEvent, VideoFeedConfiguration, VideoFeedMode, VideoFeedPadding, VideoFeedPlayIconConfiguration, VideoFeedSource, VideoFeedTitleConfiguration, VideoFeedTitlePosition, VideoFeedUtil, VideoLaunchBehavior, VideoPlaybackCallback, VideoPlaybackDetails, VideoPlaybackEvent, VideoPlaybackEventName, VideoPlayerButtonConfiguration, VideoPlayerCTADelay, VideoPlayerCTADelayType, VideoPlayerCTAStyle, VideoPlayerCTAWidth, VideoPlayerCompleteAction, VideoPlayerLivestreamCountdownTimerTheme, VideoPlayerConfiguration, VideoPlayerLogoConfiguration, VideoPlayerLogoOption, VideoPlayerSize, VideoPlayerStyle, VideoShopping, onLiveStreamChatEventCallback, onLiveStreamEventCallback, };
@@ -1,7 +1,7 @@
1
1
  export interface ReplayBadgeConfiguration {
2
2
  /**
3
3
  * Indicates if the replay badge is hidden.
4
- * Defaults to false.
4
+ * Defaults to true.
5
5
  */
6
6
  isHidden?: boolean;
7
7
  }
@@ -32,8 +32,6 @@ export interface StoryBlockConfiguration {
32
32
  ctaButtonStyle?: VideoPlayerCTAStyle;
33
33
  /**
34
34
  * Indicates if the video player shows playback button.
35
- * The property only applies to full-screen story block but not to compact story block.
36
- * Only supported on Android.
37
35
  */
38
36
  showPlaybackButton?: boolean;
39
37
  /**
@@ -0,0 +1 @@
1
+ export type VideoPlayerLivestreamCountdownTimerTheme = 'dark' | 'light';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-firework-sdk",
3
- "version": "2.12.0",
3
+ "version": "2.13.0",
4
4
  "description": "Firework React Native SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -33,5 +33,5 @@ fi
33
33
  s.static_framework = true
34
34
  s.dependency 'React-Core'
35
35
  s.dependency 'FireworkVideoUI', '0.1.0'
36
- s.dependency 'FireworkVideo', '1.19.0'
36
+ s.dependency 'FireworkVideo', '1.20.2'
37
37
  end
@@ -163,7 +163,7 @@ class VideoFeed extends React.Component<IVideoFeedProps, IVideoFeedState> {
163
163
  }
164
164
  let reactTag: number | null = findNodeHandle(nativeNodeHandle);
165
165
  FWLoggerUtil.log(
166
- `StoryBlock refresh commandId: ${commandId} nativeNodeHandle: ${nativeNodeHandle} reactTag: ${reactTag}`
166
+ `VideoFeed refresh commandId: ${commandId} nativeNodeHandle: ${nativeNodeHandle} reactTag: ${reactTag}`
167
167
  );
168
168
  if (!nativeNodeHandle || !reactTag) {
169
169
  return;
@@ -172,9 +172,6 @@ class VideoFeed extends React.Component<IVideoFeedProps, IVideoFeedState> {
172
172
  };
173
173
 
174
174
  private _onVideoFeedLoadFinished = (event: NativeSyntheticEvent<any>) => {
175
- FWLoggerUtil.log(
176
- `VideoFeed _onVideoFeedLoadFinished ${JSON.stringify(event.nativeEvent)}`
177
- );
178
175
  const { onVideoFeedLoadFinished, onVideoFeedEmpty } = this.props;
179
176
 
180
177
  const { name, reason, action } = event.nativeEvent;
@@ -185,8 +182,11 @@ class VideoFeed extends React.Component<IVideoFeedProps, IVideoFeedState> {
185
182
  if (reason) {
186
183
  error.reason = reason;
187
184
  }
188
- onVideoFeedLoadFinished(error);
185
+
189
186
  if (Platform.OS === 'android') {
187
+ if (!this._loaded) {
188
+ onVideoFeedLoadFinished(error);
189
+ }
190
190
  if (
191
191
  action === FWNativeErrorAction.loadingFirstPage ||
192
192
  !this._loaded
@@ -194,12 +194,19 @@ class VideoFeed extends React.Component<IVideoFeedProps, IVideoFeedState> {
194
194
  onVideoFeedEmpty?.(error);
195
195
  }
196
196
  } else {
197
+ onVideoFeedLoadFinished(error);
197
198
  if (!this._loaded) {
198
199
  onVideoFeedEmpty?.(error);
199
200
  }
200
201
  }
201
202
  } else {
202
- onVideoFeedLoadFinished();
203
+ if (Platform.OS === 'android') {
204
+ if (!this._loaded) {
205
+ onVideoFeedLoadFinished();
206
+ }
207
+ } else {
208
+ onVideoFeedLoadFinished();
209
+ }
203
210
  this._loaded = true;
204
211
  }
205
212
  }
package/src/index.ts CHANGED
@@ -106,6 +106,7 @@ import type {
106
106
  import type { VideoPlayerCTAStyle } from './models/VideoPlayerCTAStyle';
107
107
  import type { VideoPlayerCTAWidth } from './models/VideoPlayerCTAWidth';
108
108
  import type { VideoPlayerCompleteAction } from './models/VideoPlayerCompleteAction';
109
+ import type { VideoPlayerLivestreamCountdownTimerTheme } from './models/VideoPlayerLivestreamCountdownTimerTheme';
109
110
  import type VideoPlayerConfiguration from './models/VideoPlayerConfiguration';
110
111
  import type {
111
112
  VideoPlayerLogoConfiguration,
@@ -206,6 +207,7 @@ export {
206
207
  VideoPlayerCTAStyle,
207
208
  VideoPlayerCTAWidth,
208
209
  VideoPlayerCompleteAction,
210
+ VideoPlayerLivestreamCountdownTimerTheme,
209
211
  VideoPlayerConfiguration,
210
212
  VideoPlayerLogoConfiguration,
211
213
  VideoPlayerLogoOption,
@@ -1,7 +1,7 @@
1
1
  export interface ReplayBadgeConfiguration {
2
2
  /**
3
3
  * Indicates if the replay badge is hidden.
4
- * Defaults to false.
4
+ * Defaults to true.
5
5
  */
6
6
  isHidden?: boolean;
7
7
  }
@@ -33,8 +33,6 @@ export interface StoryBlockConfiguration {
33
33
  ctaButtonStyle?: VideoPlayerCTAStyle;
34
34
  /**
35
35
  * Indicates if the video player shows playback button.
36
- * The property only applies to full-screen story block but not to compact story block.
37
- * Only supported on Android.
38
36
  */
39
37
  showPlaybackButton?: boolean;
40
38
  /**
@@ -0,0 +1 @@
1
+ export type VideoPlayerLivestreamCountdownTimerTheme = 'dark' | 'light';