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.
- package/android/build.gradle +3 -2
- package/android/gradle.properties +4 -3
- package/android/src/main/AndroidManifest.xml +14 -0
- package/android/src/main/java/com/fireworksdk/bridge/FWInitializationProvider.kt +4 -0
- package/android/src/main/java/com/fireworksdk/bridge/components/storyblock/StoryBlockFragment.kt +1 -2
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerLogoConfigurationModel.kt +1 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerLogoConfigurationModelDeserializer.kt +3 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerLogoConfigurationModelSerializer.kt +2 -0
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/models/FWNavigatorInterface.kt +2 -0
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FWNavigatorModule.kt +26 -0
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FireworkSDKModule.kt +2 -2
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWConfigUtil.kt +21 -2
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWModelUtils.kt +9 -9
- package/ios/Components/StoryBlock.swift +5 -8
- package/ios/Components/VideoFeed.swift +1 -5
- package/ios/FireworkSdk.xcodeproj/project.pbxproj +4 -0
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule.swift +2 -0
- package/ios/Utils/Extensions/UIWindowScene+Swizzle.swift +33 -0
- package/lib/commonjs/components/VideoFeed.js +15 -6
- package/lib/commonjs/components/VideoFeed.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/VideoPlayerLivestreamCountdownTimerTheme.js +2 -0
- package/lib/commonjs/models/VideoPlayerLivestreamCountdownTimerTheme.js.map +1 -0
- package/lib/module/components/VideoFeed.js +15 -5
- package/lib/module/components/VideoFeed.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/VideoPlayerLivestreamCountdownTimerTheme.js +2 -0
- package/lib/module/models/VideoPlayerLivestreamCountdownTimerTheme.js.map +1 -0
- package/lib/typescript/index.d.ts +2 -1
- package/lib/typescript/models/ReplayBadgeConfiguration.d.ts +1 -1
- package/lib/typescript/models/StoryBlockConfiguration.d.ts +0 -2
- package/lib/typescript/models/VideoPlayerLivestreamCountdownTimerTheme.d.ts +1 -0
- package/package.json +1 -1
- package/react-native-firework-sdk.podspec +1 -1
- package/src/components/VideoFeed.tsx +13 -6
- package/src/index.ts +2 -0
- package/src/models/ReplayBadgeConfiguration.ts +1 -1
- package/src/models/StoryBlockConfiguration.ts +0 -2
- 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, };
|
|
@@ -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
|
@@ -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
|
-
`
|
|
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
|
-
|
|
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
|
-
|
|
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,
|
|
@@ -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';
|