react-native-firework-sdk 2.2.4 → 2.3.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/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/FireworkVideoUI +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Info.plist +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios.abi.json +2 -9
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/FireworkVideoUI +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Info.plist +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.abi.json +2 -9
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.abi.json +2 -9
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/_CodeSignature/CodeResources +9 -9
- package/android/build.gradle +9 -39
- package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/android/gradle.properties +7 -5
- package/android/proguard-rules.pro +5 -26
- package/android/src/main/AndroidManifest.xml +0 -3
- package/android/src/main/java/com/fireworksdk/bridge/FireworkSDKPackage.kt +1 -1
- package/android/src/main/java/com/fireworksdk/bridge/components/base/FWBaseFragment.kt +10 -0
- package/android/src/main/java/com/fireworksdk/bridge/components/storyblock/StoryBlockFragment.kt +157 -0
- package/android/src/main/java/com/fireworksdk/bridge/components/storyblock/StoryBlockFrameLayout.kt +19 -0
- package/android/src/main/java/com/fireworksdk/bridge/components/videofeed/FWVideoFeed.kt +15 -5
- package/android/src/main/java/com/fireworksdk/bridge/models/FWAdBadgeConfigModel.kt +6 -7
- package/android/src/main/java/com/fireworksdk/bridge/models/FWAdBadgeConfigModelDeserializer.kt +5 -1
- package/android/src/main/java/com/fireworksdk/bridge/models/FWAdBadgeConfigModelSerializer.kt +22 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWFontInfoModel.kt +3 -5
- package/android/src/main/java/com/fireworksdk/bridge/models/FWFontInfoModelDeserializer.kt +2 -1
- package/android/src/main/java/com/fireworksdk/bridge/models/FWFontInfoModelSerializer.kt +18 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWGradientDrawableModel.kt +8 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWGradientDrawableModelDeserializer.kt +35 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWGradientDrawableModelSerializer.kt +27 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWLiveStreamEventDetailsModel.kt +1 -5
- package/android/src/main/java/com/fireworksdk/bridge/models/FWLiveStreamMessageDetailsModel.kt +1 -5
- package/android/src/main/java/com/fireworksdk/bridge/models/FWProductInfoViewConfiguration.kt +5 -15
- package/android/src/main/java/com/fireworksdk/bridge/models/FWProductInfoViewConfigurationDeserializer.kt +2 -9
- package/android/src/main/java/com/fireworksdk/bridge/models/FWProductInfoViewConfigurationSerializer.kt +42 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWSDKInitOptionsModel.kt +3 -5
- package/android/src/main/java/com/fireworksdk/bridge/models/FWSDKInitOptionsModelDeserializer.kt +2 -1
- package/android/src/main/java/com/fireworksdk/bridge/models/FWSDKInitOptionsModelSerializer.kt +20 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWShoppingCtaResult.kt +3 -12
- package/android/src/main/java/com/fireworksdk/bridge/models/FWShoppingCtaResultDeserializer.kt +2 -13
- package/android/src/main/java/com/fireworksdk/bridge/models/FWShoppingCtaResultSerializer.kt +18 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedConfigModel.kt +8 -9
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedConfigModelDeserializer.kt +17 -6
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedConfigModelSerializer.kt +59 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedItemDetailsModel.kt +1 -5
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedPropsModel.kt +14 -15
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedPropsModelDeserializer.kt +14 -4
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedPropsModelSerializer.kt +56 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlaybackDetails.kt +11 -8
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerConfigModel.kt +11 -12
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerConfigModelDeserializer.kt +11 -7
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerConfigModelSerializer.kt +63 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoShoppingProduct.kt +4 -11
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoShoppingProductSerializer.kt +82 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWBadgeTextType.kt +18 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWCtaButtonTextValue.kt +18 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWCtaDelayType.kt +18 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/{FWEventName.kt → enums/FWEventName.kt} +1 -1
- package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWGradientDrawableOrientation.kt +24 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWPlayerLaunchBehavior.kt +18 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWPlayerStyle.kt +18 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWShoppingCtaResultRes.kt +19 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWSystemTypeface.kt +21 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWVideoCompleteAction.kt +18 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWVideoFeedMode.kt +19 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWVideoFeedSource.kt +22 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWVideoFeedTitlePosition.kt +19 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWVideoPlayerCTAWidth.kt +19 -0
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/FWReactNativeSDK.kt +22 -0
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/manager/FWStoryBlockManager.kt +61 -32
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/manager/FWVideoFeedManager.kt +3 -2
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/models/FWNavigatorInterface.kt +0 -1
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/models/FWVideoShoppingInterface.kt +0 -1
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/models/FireworkSDKInterface.kt +0 -2
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FWLiveStreamModule.kt +2 -2
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FWNavigatorModule.kt +0 -6
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FWVideoShoppingModule.kt +25 -32
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FireworkSDKModule.kt +24 -47
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/utils/FWEventUtils.kt +17 -44
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWBundleUtils.kt +46 -21
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWConfigUtil.kt +165 -86
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWFragmentUtil.kt +51 -0
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWGlobalDataUtil.kt +1 -5
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWLanguageUtil.kt +77 -80
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWLiveStreamUtil.kt +17 -0
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWSingletonHolder.kt +25 -0
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWStatusBarUtil.kt +28 -0
- package/android/src/main/res/layout/fw_bridge_story_block.xml +5 -12
- package/ios/Components/VideoFeed.swift +39 -19
- package/ios/Components/VideoFeedConfiguration.swift +4 -5
- package/ios/Components/VideoFeedManager.swift +1 -1
- package/ios/Components/VideoPlayerConfiguration.swift +17 -0
- package/ios/FireworkSdk.xcodeproj/project.pbxproj +197 -205
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/Foundation/Bundle+AppLanguage.swift +23 -8
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/Foundation/URLSession+AppLanguage.swift +1 -18
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/UIKit/UIImageView+AppLanguage.swift +4 -1
- package/ios/Models/NativeToRN/FireworkEventName.swift +0 -1
- package/ios/Models/NativeToRN/FireworkSDK+Json.swift +1 -1
- package/ios/Modules/FWNavigatorModule/FWNavigatorModule.swift +6 -157
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule+CTA.swift +1 -21
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule.m +1 -2
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule.swift +1 -12
- package/ios/Modules/LiveStream/LiveStreamModule.m +1 -1
- package/ios/Modules/LiveStream/LiveStreamModule.swift +4 -2
- package/ios/Modules/Shopping/FWCartViewController.swift +0 -75
- package/ios/Modules/Shopping/ShoppingModule.m +1 -3
- package/ios/Modules/Shopping/ShoppingModule.swift +12 -47
- package/ios/Utils/Extensions/Swizzle/UINavigationController+FWSwizzle.swift +1 -1
- package/lib/commonjs/FireworkSDK.js +31 -15
- package/lib/commonjs/FireworkSDK.js.map +1 -1
- package/lib/commonjs/LiveStream.js.map +1 -1
- package/lib/commonjs/VideoShopping.js +43 -30
- package/lib/commonjs/VideoShopping.js.map +1 -1
- package/lib/commonjs/components/StoryBlock.js +124 -82
- package/lib/commonjs/components/StoryBlock.js.map +1 -1
- package/lib/commonjs/components/VideoFeed.js +112 -24
- package/lib/commonjs/components/VideoFeed.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/GradientDrawable.js +2 -0
- package/lib/commonjs/models/GradientDrawable.js.map +1 -0
- package/lib/commonjs/models/StoryBlockConfiguration.js +6 -0
- package/lib/commonjs/models/StoryBlockConfiguration.js.map +1 -0
- package/lib/commonjs/models/VideoPlayerCTADelay.js +2 -0
- package/lib/commonjs/models/VideoPlayerCTADelay.js.map +1 -0
- package/lib/commonjs/models/VideoPlayerCTAStyle.js +6 -0
- package/lib/commonjs/models/VideoPlayerCTAStyle.js.map +1 -0
- package/lib/commonjs/models/VideoPlayerCTAWidth.js +2 -0
- package/lib/commonjs/models/VideoPlayerCTAWidth.js.map +1 -0
- package/lib/commonjs/models/VideoPlayerCompleteAction.js +2 -0
- package/lib/commonjs/models/VideoPlayerCompleteAction.js.map +1 -0
- package/lib/commonjs/models/VideoPlayerStyle.js +2 -0
- package/lib/commonjs/models/VideoPlayerStyle.js.map +1 -0
- package/lib/commonjs/modules/LiveStreamModule.js.map +1 -1
- package/lib/commonjs/modules/ShoppingModule.js.map +1 -1
- package/lib/commonjs/utils/FWGlobalState.js +47 -0
- package/lib/commonjs/utils/FWGlobalState.js.map +1 -0
- package/lib/module/FireworkSDK.js +30 -14
- package/lib/module/FireworkSDK.js.map +1 -1
- package/lib/module/LiveStream.js.map +1 -1
- package/lib/module/VideoShopping.js +43 -29
- package/lib/module/VideoShopping.js.map +1 -1
- package/lib/module/components/StoryBlock.js +113 -73
- package/lib/module/components/StoryBlock.js.map +1 -1
- package/lib/module/components/VideoFeed.js +113 -24
- package/lib/module/components/VideoFeed.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/GradientDrawable.js +2 -0
- package/lib/module/models/GradientDrawable.js.map +1 -0
- package/lib/module/models/StoryBlockConfiguration.js +2 -0
- package/lib/module/models/StoryBlockConfiguration.js.map +1 -0
- package/lib/module/models/VideoPlayerCTADelay.js +2 -0
- package/lib/module/models/VideoPlayerCTADelay.js.map +1 -0
- package/lib/module/models/VideoPlayerCTAStyle.js +2 -0
- package/lib/module/models/VideoPlayerCTAStyle.js.map +1 -0
- package/lib/module/models/VideoPlayerCTAWidth.js +2 -0
- package/lib/module/models/VideoPlayerCTAWidth.js.map +1 -0
- package/lib/module/models/VideoPlayerCompleteAction.js +2 -0
- package/lib/module/models/VideoPlayerCompleteAction.js.map +1 -0
- package/lib/module/models/VideoPlayerStyle.js +2 -0
- package/lib/module/models/VideoPlayerStyle.js.map +1 -0
- package/lib/module/modules/LiveStreamModule.js.map +1 -1
- package/lib/module/modules/ShoppingModule.js.map +1 -1
- package/lib/module/utils/FWGlobalState.js +39 -0
- package/lib/module/utils/FWGlobalState.js.map +1 -0
- package/lib/typescript/FireworkSDK.d.ts +7 -7
- package/lib/typescript/LiveStream.d.ts +2 -2
- package/lib/typescript/VideoShopping.d.ts +17 -18
- package/lib/typescript/components/StoryBlock.d.ts +2 -0
- package/lib/typescript/components/VideoFeed.d.ts +7 -3
- package/lib/typescript/index.d.ts +10 -3
- package/lib/typescript/models/AdBadgeConfiguration.d.ts +9 -2
- package/lib/typescript/models/FWEvents.d.ts +9 -9
- package/lib/typescript/models/GradientDrawable.d.ts +5 -0
- package/lib/typescript/models/IOSFontInfo.d.ts +2 -0
- package/lib/typescript/models/ProductInfoViewConfiguration.d.ts +1 -1
- package/lib/typescript/models/StoryBlockConfiguration.d.ts +37 -0
- package/lib/typescript/models/VideoFeedConfiguration.d.ts +25 -4
- package/lib/typescript/models/VideoPlaybackDetails.d.ts +1 -0
- package/lib/typescript/models/VideoPlayerCTADelay.d.ts +11 -0
- package/lib/typescript/models/VideoPlayerCTAStyle.d.ts +21 -0
- package/lib/typescript/models/VideoPlayerCTAWidth.d.ts +1 -0
- package/lib/typescript/models/VideoPlayerCompleteAction.d.ts +1 -0
- package/lib/typescript/models/VideoPlayerConfiguration.d.ts +9 -34
- package/lib/typescript/models/VideoPlayerStyle.d.ts +1 -0
- package/lib/typescript/modules/LiveStreamModule.d.ts +1 -1
- package/lib/typescript/modules/ShoppingModule.d.ts +2 -3
- package/lib/typescript/utils/FWGlobalState.d.ts +10 -0
- package/package.json +5 -3
- package/react-native-firework-sdk.podspec +2 -1
- package/src/FireworkSDK.ts +47 -19
- package/src/LiveStream.ts +4 -2
- package/src/VideoShopping.ts +47 -39
- package/src/components/StoryBlock.tsx +161 -98
- package/src/components/VideoFeed.tsx +147 -23
- package/src/index.ts +14 -6
- package/src/models/AdBadgeConfiguration.ts +10 -2
- package/src/models/FWEvents.ts +11 -11
- package/src/models/GradientDrawable.ts +14 -0
- package/src/models/IOSFontInfo.ts +2 -0
- package/src/models/ProductInfoViewConfiguration.ts +1 -1
- package/src/models/StoryBlockConfiguration.ts +38 -0
- package/src/models/VideoFeedConfiguration.ts +25 -4
- package/src/models/VideoPlaybackDetails.ts +1 -0
- package/src/models/VideoPlayerCTADelay.ts +11 -0
- package/src/models/VideoPlayerCTAStyle.ts +22 -0
- package/src/models/VideoPlayerCTAWidth.ts +1 -0
- package/src/models/VideoPlayerCompleteAction.ts +1 -0
- package/src/models/VideoPlayerConfiguration.ts +9 -36
- package/src/models/VideoPlayerStyle.ts +1 -0
- package/src/modules/LiveStreamModule.ts +1 -1
- package/src/modules/ShoppingModule.ts +2 -3
- package/src/utils/FWGlobalState.ts +31 -0
- package/android/publish.gradle +0 -66
- package/android/src/main/java/com/fireworksdk/bridge/components/videofeed/StoryBlockFragment.kt +0 -129
- package/android/src/main/java/com/fireworksdk/bridge/components/videofeed/StoryBlockFrameLayout.kt +0 -90
- package/android/src/main/java/com/fireworksdk/bridge/constants/FWVideoPlayerConstant.kt +0 -39
- package/android/src/main/java/com/fireworksdk/bridge/models/FWSystemTypeface.kt +0 -9
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedModel.kt +0 -7
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedSource.kt +0 -10
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedTitlePosition.kt +0 -7
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/pages/FWContainerActivity.kt +0 -53
- package/android/src/main/res/layout/fw_bridge_fragment_container.xml +0 -8
- package/ios/Modules/FWNavigatorModule/FWNavigatorContainerViewController.swift +0 -33
- package/ios/Modules/FWNavigatorModule/FWNavigatorProtocol.swift +0 -18
|
@@ -11,13 +11,14 @@ import {
|
|
|
11
11
|
} from 'react-native';
|
|
12
12
|
|
|
13
13
|
import FireworkSDK from '../FireworkSDK';
|
|
14
|
+
import type AdConfiguration from '../models/AdConfiguration';
|
|
14
15
|
import type FWError from '../models/FWError';
|
|
15
16
|
import { FWEventName } from '../models/FWEventName';
|
|
16
|
-
import type AdConfiguration from '../models/AdConfiguration';
|
|
17
17
|
import type VideoFeedConfiguration from '../models/VideoFeedConfiguration';
|
|
18
18
|
import type { VideoFeedSource } from '../models/VideoFeedSource';
|
|
19
19
|
import type VideoPlayerConfiguration from '../models/VideoPlayerConfiguration';
|
|
20
20
|
import { FireworkSDKModuleEventEmitter } from '../modules/FireworkSDKModule';
|
|
21
|
+
import FWGlobalState from '../utils/FWGlobalState';
|
|
21
22
|
import FWLoggerUtil from '../utils/FWLoggerUtil';
|
|
22
23
|
import FWVideoFeed from './FWVideoFeed';
|
|
23
24
|
|
|
@@ -84,12 +85,16 @@ export interface IVideoFeedProps {
|
|
|
84
85
|
onVideoFeedLoadFinished?: (error?: FWError) => void;
|
|
85
86
|
}
|
|
86
87
|
|
|
88
|
+
interface IVideoFeedState {
|
|
89
|
+
sdkInitCalled: boolean;
|
|
90
|
+
}
|
|
91
|
+
|
|
87
92
|
const NativeComponentName = 'FWVideoFeed';
|
|
88
93
|
|
|
89
94
|
/**
|
|
90
95
|
* VideoFeed component.
|
|
91
96
|
*/
|
|
92
|
-
class VideoFeed extends React.Component<IVideoFeedProps> {
|
|
97
|
+
class VideoFeed extends React.Component<IVideoFeedProps, IVideoFeedState> {
|
|
93
98
|
/**
|
|
94
99
|
* @ignore
|
|
95
100
|
*/
|
|
@@ -101,6 +106,13 @@ class VideoFeed extends React.Component<IVideoFeedProps> {
|
|
|
101
106
|
|
|
102
107
|
private _subscriptions: EmitterSubscription[] = [];
|
|
103
108
|
|
|
109
|
+
constructor(props: IVideoFeedProps) {
|
|
110
|
+
super(props);
|
|
111
|
+
this.state = {
|
|
112
|
+
sdkInitCalled: FWGlobalState.getInstance().sdkInitCalled,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
|
|
104
116
|
public refresh = () => {
|
|
105
117
|
FWLoggerUtil.log(`VideoFeed refresh ${JSON.stringify(this.props)}`);
|
|
106
118
|
|
|
@@ -148,6 +160,12 @@ class VideoFeed extends React.Component<IVideoFeedProps> {
|
|
|
148
160
|
`VideoFeed componentDidMount ${JSON.stringify(this.props)}`
|
|
149
161
|
);
|
|
150
162
|
|
|
163
|
+
if (!this.state.sdkInitCalled) {
|
|
164
|
+
FWGlobalState.getInstance().sdkInitCalledPromise.then(() => {
|
|
165
|
+
this.setState({ sdkInitCalled: true });
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
|
|
151
169
|
const subscriptionOfShareBaseURLUpdated =
|
|
152
170
|
FireworkSDKModuleEventEmitter.addListener(
|
|
153
171
|
FWEventName.ShareBaseURLUpdated,
|
|
@@ -210,16 +228,29 @@ class VideoFeed extends React.Component<IVideoFeedProps> {
|
|
|
210
228
|
* @ignore
|
|
211
229
|
*/
|
|
212
230
|
render() {
|
|
213
|
-
FWLoggerUtil.log(
|
|
231
|
+
FWLoggerUtil.log(
|
|
232
|
+
`VideoFeed render props ${JSON.stringify(
|
|
233
|
+
this.props
|
|
234
|
+
)} state ${JSON.stringify(this.state)}`
|
|
235
|
+
);
|
|
236
|
+
|
|
237
|
+
if (!this.state.sdkInitCalled) {
|
|
238
|
+
return null;
|
|
239
|
+
}
|
|
240
|
+
|
|
214
241
|
const gShareBaseURL = FireworkSDK.getInstance().shareBaseURL ?? '';
|
|
215
242
|
const appLanguage = FireworkSDK.getInstance().appLanguage ?? '';
|
|
243
|
+
const videoLaunchBehavior =
|
|
244
|
+
FireworkSDK.getInstance().videoLaunchBehavior ?? '';
|
|
216
245
|
const adBadgeConfiguration =
|
|
217
246
|
FireworkSDK.getInstance().adBadgeConfiguration ?? {};
|
|
218
247
|
const adBadgeTextType = adBadgeConfiguration.badgeTextType ?? '';
|
|
219
248
|
const backgroundColorOfAdBadge = adBadgeConfiguration.backgroundColor ?? '';
|
|
220
249
|
const textColorOfAdBadge = adBadgeConfiguration.textColor ?? '';
|
|
221
|
-
const
|
|
222
|
-
|
|
250
|
+
const androidFontIsCustomOfAdBadge =
|
|
251
|
+
adBadgeConfiguration.androidFontInfo?.isCustom?.toString() ?? '';
|
|
252
|
+
const androidFontTypefaceNameOfAdBadge =
|
|
253
|
+
adBadgeConfiguration.androidFontInfo?.typefaceName ?? '';
|
|
223
254
|
|
|
224
255
|
const {
|
|
225
256
|
source,
|
|
@@ -236,15 +267,50 @@ class VideoFeed extends React.Component<IVideoFeedProps> {
|
|
|
236
267
|
this._generateDynamicContentParametersString();
|
|
237
268
|
|
|
238
269
|
const videoFeedConfiguration = this._getVideoFeedConfiguration();
|
|
239
|
-
const
|
|
240
|
-
|
|
241
|
-
const
|
|
242
|
-
const
|
|
243
|
-
const
|
|
244
|
-
|
|
270
|
+
const cornerRadius = videoFeedConfiguration?.cornerRadius?.toFixed(5) ?? '';
|
|
271
|
+
|
|
272
|
+
const titleHidden = videoFeedConfiguration?.title?.hidden?.toString() ?? '';
|
|
273
|
+
const titleTextColor = videoFeedConfiguration?.title?.textColor ?? '';
|
|
274
|
+
const titleFontSize =
|
|
275
|
+
videoFeedConfiguration?.title?.fontSize?.toFixed(5) ?? '';
|
|
276
|
+
const titleAndroidFontInfo = videoFeedConfiguration?.title?.androidFontInfo;
|
|
277
|
+
const titleGradientDrawable =
|
|
278
|
+
videoFeedConfiguration?.title?.gradientDrawable;
|
|
279
|
+
const titlePosition = videoFeedConfiguration?.titlePosition ?? '';
|
|
280
|
+
const playIconHidden =
|
|
281
|
+
videoFeedConfiguration?.playIcon?.hidden?.toString() ?? '';
|
|
282
|
+
const playIconWidth =
|
|
283
|
+
videoFeedConfiguration?.playIcon?.iconWidth?.toFixed(5) ?? '';
|
|
284
|
+
const showAdBadge = videoFeedConfiguration?.showAdBadge?.toString() ?? '';
|
|
285
|
+
const enableAutoplay =
|
|
286
|
+
videoFeedConfiguration?.enableAutoplay?.toString() ?? '';
|
|
287
|
+
const gridColumns = videoFeedConfiguration?.gridColumns?.toFixed(5) ?? '';
|
|
288
|
+
const itemSpacing = videoFeedConfiguration?.itemSpacing?.toFixed(5) ?? '';
|
|
289
|
+
|
|
290
|
+
const playerStyle = videoPlayerConfiguration?.playerStyle ?? '';
|
|
291
|
+
const videoCompleteAction =
|
|
292
|
+
videoPlayerConfiguration?.videoCompleteAction ?? '';
|
|
293
|
+
const showShareButton =
|
|
294
|
+
videoPlayerConfiguration?.showShareButton?.toString() ?? '';
|
|
295
|
+
const showPlaybackButton =
|
|
296
|
+
videoPlayerConfiguration?.showPlaybackButton?.toString() ?? '';
|
|
297
|
+
const showMuteButton =
|
|
298
|
+
videoPlayerConfiguration?.showMuteButton?.toString() ?? '';
|
|
299
|
+
const showBranding =
|
|
300
|
+
videoPlayerConfiguration?.showBranding?.toString() ?? '';
|
|
301
|
+
const ctaDelayType = videoPlayerConfiguration?.ctaDelay?.type ?? '';
|
|
302
|
+
const ctaDelayValue = (
|
|
303
|
+
videoPlayerConfiguration?.ctaDelay?.value ?? 0
|
|
304
|
+
).toFixed(5);
|
|
305
|
+
const ctaHighlightDelayType =
|
|
306
|
+
videoPlayerConfiguration?.ctaHighlightDelay?.type ?? '';
|
|
307
|
+
const ctaHighlightDelayValue = (
|
|
308
|
+
videoPlayerConfiguration?.ctaHighlightDelay?.value ?? 0
|
|
309
|
+
).toFixed(5);
|
|
245
310
|
const shareBaseURL = videoPlayerConfiguration?.shareBaseURL ?? '';
|
|
311
|
+
const ctaWidth = videoPlayerConfiguration?.ctaWidth ?? '';
|
|
246
312
|
|
|
247
|
-
const requiresAds = adConfiguration?.requiresAds ??
|
|
313
|
+
const requiresAds = adConfiguration?.requiresAds?.toString() ?? '';
|
|
248
314
|
const adsFetchTimeout = adConfiguration?.adsFetchTimeout ?? 10;
|
|
249
315
|
const vastAttributesString = this._generateVastAttributesString();
|
|
250
316
|
|
|
@@ -252,10 +318,14 @@ class VideoFeed extends React.Component<IVideoFeedProps> {
|
|
|
252
318
|
if (Platform.OS === 'ios') {
|
|
253
319
|
key += `_appLanguage:${appLanguage}`;
|
|
254
320
|
}
|
|
321
|
+
key += `_videoLaunchBehavior:${videoLaunchBehavior}`;
|
|
255
322
|
key += `_adBadgeTextType:${adBadgeTextType}`;
|
|
256
323
|
key += `_backgroundColorOfAdBadge:${backgroundColorOfAdBadge}`;
|
|
257
324
|
key += `_textColorOfAdBadge:${textColorOfAdBadge}`;
|
|
258
|
-
|
|
325
|
+
if (Platform.OS === 'android') {
|
|
326
|
+
key += `_androidFontIsCustomOfAdBadge${androidFontIsCustomOfAdBadge}`;
|
|
327
|
+
key += `_androidFontTypefaceNameOfAdBadge${androidFontTypefaceNameOfAdBadge}`;
|
|
328
|
+
}
|
|
259
329
|
|
|
260
330
|
key += `_source:${source}`;
|
|
261
331
|
key += `_channel:${channel}`;
|
|
@@ -267,12 +337,46 @@ class VideoFeed extends React.Component<IVideoFeedProps> {
|
|
|
267
337
|
key += `_enablePictureInPicture:${enablePictureInPicture}`;
|
|
268
338
|
|
|
269
339
|
key += `_titleHidden:${titleHidden}`;
|
|
340
|
+
if (Platform.OS === 'android') {
|
|
341
|
+
key += `_cornerRadius:${cornerRadius}`;
|
|
342
|
+
key += `_titleTextColor:${titleTextColor}`;
|
|
343
|
+
key += `_titleFontSize:${titleFontSize}`;
|
|
344
|
+
key += `_titleAndroidFontInfo.isCustom:${
|
|
345
|
+
titleAndroidFontInfo?.isCustom?.toString() ?? ''
|
|
346
|
+
}`;
|
|
347
|
+
key += `_titleAndroidFontInfo.typefaceName:${
|
|
348
|
+
titleAndroidFontInfo?.typefaceName ?? ''
|
|
349
|
+
}`;
|
|
350
|
+
key += `_titleGradientDrawable.orientation:${
|
|
351
|
+
titleGradientDrawable?.orientation ?? ''
|
|
352
|
+
}`;
|
|
353
|
+
key += `_titleGradientDrawable.colors:${(
|
|
354
|
+
titleGradientDrawable?.colors ?? []
|
|
355
|
+
).join(',')}`;
|
|
356
|
+
key += `_playIconHidden:${playIconHidden}`;
|
|
357
|
+
key += `_playIconWidth:${playIconWidth}`;
|
|
358
|
+
key += `_showAdBadge:${showAdBadge}`;
|
|
359
|
+
}
|
|
360
|
+
|
|
270
361
|
key += `_titlePosition:${titlePosition}`;
|
|
271
362
|
key += `_enableAutoplay:${enableAutoplay}`;
|
|
272
363
|
key += `_gridColumns:${gridColumns}`;
|
|
273
|
-
key += `
|
|
364
|
+
key += `_itemSpacing:${itemSpacing}`;
|
|
274
365
|
|
|
275
366
|
key += `_shareBaseURL:${shareBaseURL}`;
|
|
367
|
+
if (Platform.OS === 'android') {
|
|
368
|
+
key += `_playerStyle:${playerStyle}`;
|
|
369
|
+
key += `_videoCompleteAction:${videoCompleteAction}`;
|
|
370
|
+
key += `_showShareButton:${showShareButton}`;
|
|
371
|
+
key += `_showPlaybackButton:${showPlaybackButton}`;
|
|
372
|
+
key += `_showMuteButton:${showMuteButton}`;
|
|
373
|
+
key += `_showBranding:${showBranding}`;
|
|
374
|
+
key += `_ctaDelayType:${ctaDelayType}`;
|
|
375
|
+
key += `_ctaDelayValue:${ctaDelayValue}`;
|
|
376
|
+
key += `_ctaHighlightDelayType:${ctaHighlightDelayType}`;
|
|
377
|
+
key += `_ctaHighlightDelayValue:${ctaHighlightDelayValue}`;
|
|
378
|
+
key += `_ctaWidth:${ctaWidth}`;
|
|
379
|
+
}
|
|
276
380
|
|
|
277
381
|
key += `_requiresAds:${requiresAds}`;
|
|
278
382
|
key += `_adsFetchTimeout:${adsFetchTimeout}`;
|
|
@@ -286,7 +390,6 @@ class VideoFeed extends React.Component<IVideoFeedProps> {
|
|
|
286
390
|
ref={this._nativeComponentRef}
|
|
287
391
|
onVideoFeedLoadFinished={this._onVideoFeedLoadFinished}
|
|
288
392
|
mode={mode}
|
|
289
|
-
style={Object.assign({}, this.props.style, { zIndex: -1 })}
|
|
290
393
|
/>
|
|
291
394
|
);
|
|
292
395
|
}
|
|
@@ -336,18 +439,39 @@ class VideoFeed extends React.Component<IVideoFeedProps> {
|
|
|
336
439
|
return videoFeedConfiguration;
|
|
337
440
|
}
|
|
338
441
|
|
|
442
|
+
let resultVideoFeedConfiguration = videoFeedConfiguration;
|
|
443
|
+
|
|
339
444
|
if (
|
|
340
|
-
|
|
341
|
-
Math.floor(
|
|
342
|
-
|
|
445
|
+
resultVideoFeedConfiguration.gridColumns &&
|
|
446
|
+
Math.floor(resultVideoFeedConfiguration.gridColumns) !==
|
|
447
|
+
resultVideoFeedConfiguration.gridColumns
|
|
343
448
|
) {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
449
|
+
const gridColumns = Math.floor(resultVideoFeedConfiguration.gridColumns);
|
|
450
|
+
resultVideoFeedConfiguration = {
|
|
451
|
+
...resultVideoFeedConfiguration,
|
|
452
|
+
gridColumns,
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
if (
|
|
457
|
+
resultVideoFeedConfiguration.title &&
|
|
458
|
+
resultVideoFeedConfiguration.title.numberOfLines &&
|
|
459
|
+
Math.floor(resultVideoFeedConfiguration.title.numberOfLines) !==
|
|
460
|
+
resultVideoFeedConfiguration.title.numberOfLines
|
|
461
|
+
) {
|
|
462
|
+
const numberOfLines = Math.floor(
|
|
463
|
+
resultVideoFeedConfiguration.title.numberOfLines
|
|
464
|
+
);
|
|
465
|
+
resultVideoFeedConfiguration = {
|
|
466
|
+
...resultVideoFeedConfiguration,
|
|
467
|
+
title: {
|
|
468
|
+
...resultVideoFeedConfiguration.title,
|
|
469
|
+
numberOfLines,
|
|
470
|
+
},
|
|
347
471
|
};
|
|
348
|
-
} else {
|
|
349
|
-
return videoFeedConfiguration;
|
|
350
472
|
}
|
|
473
|
+
|
|
474
|
+
return resultVideoFeedConfiguration;
|
|
351
475
|
}
|
|
352
476
|
}
|
|
353
477
|
|
package/src/index.ts
CHANGED
|
@@ -36,6 +36,8 @@ import type {
|
|
|
36
36
|
VideoFeedClickEvent,
|
|
37
37
|
VideoPlaybackEvent,
|
|
38
38
|
} from './models/FWEvents';
|
|
39
|
+
import type GradientDrawable from './models/GradientDrawable';
|
|
40
|
+
import type { GradientDrawableOrientation } from './models/GradientDrawable';
|
|
39
41
|
import type IOSFontInfo from './models/IOSFontInfo';
|
|
40
42
|
import type {
|
|
41
43
|
IOSSystemFontStyle,
|
|
@@ -57,11 +59,12 @@ import type { ProductPrice, ProductUnitOption } from './models/ProductUnit';
|
|
|
57
59
|
import type SDKInitOptions from './models/SDKInitOptions';
|
|
58
60
|
import type { VideoLaunchBehavior } from './models/SDKInitOptions';
|
|
59
61
|
import type ShoppingCTAResult from './models/ShoppingCTAResult';
|
|
62
|
+
import type { StoryBlockConfiguration } from './models/StoryBlockConfiguration';
|
|
60
63
|
import type { StoryBlockSource } from './models/StoryBlockSource';
|
|
61
64
|
import type TrackPurchaseParameters from './models/TrackPurchaseParameters';
|
|
62
65
|
import type VideoFeedConfiguration from './models/VideoFeedConfiguration';
|
|
63
66
|
import type {
|
|
64
|
-
|
|
67
|
+
VideoFeedPadding,
|
|
65
68
|
VideoFeedPlayIconConfiguration,
|
|
66
69
|
VideoFeedTitleConfiguration,
|
|
67
70
|
VideoFeedTitlePosition,
|
|
@@ -70,14 +73,15 @@ import type { VideoFeedSource } from './models/VideoFeedSource';
|
|
|
70
73
|
import type VideoPlaybackDetails from './models/VideoPlaybackDetails';
|
|
71
74
|
import type { VideoPlayerSize } from './models/VideoPlaybackDetails';
|
|
72
75
|
import VideoPlaybackEventName from './models/VideoPlaybackEventName';
|
|
76
|
+
import type { VideoPlayerCompleteAction } from './models/VideoPlayerCompleteAction';
|
|
73
77
|
import type VideoPlayerConfiguration from './models/VideoPlayerConfiguration';
|
|
74
78
|
import type {
|
|
75
|
-
VideoPlayerCompleteAction,
|
|
76
79
|
VideoPlayerCTADelay,
|
|
77
80
|
VideoPlayerCTADelayType,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
} from './models/
|
|
81
|
+
} from './models/VideoPlayerCTADelay';
|
|
82
|
+
import type { VideoPlayerCTAStyle } from './models/VideoPlayerCTAStyle';
|
|
83
|
+
import type { VideoPlayerCTAWidth } from './models/VideoPlayerCTAWidth';
|
|
84
|
+
import type { VideoPlayerStyle } from './models/VideoPlayerStyle';
|
|
81
85
|
import type {
|
|
82
86
|
CustomClickCartIconCallback,
|
|
83
87
|
CustomClickLinkButtonCallback,
|
|
@@ -102,6 +106,8 @@ export {
|
|
|
102
106
|
FireworkSDK,
|
|
103
107
|
FWError,
|
|
104
108
|
FWNavigator,
|
|
109
|
+
GradientDrawable,
|
|
110
|
+
GradientDrawableOrientation,
|
|
105
111
|
IOSFontInfo,
|
|
106
112
|
IOSSystemFontStyle,
|
|
107
113
|
IOSSystemFontWeight,
|
|
@@ -132,6 +138,7 @@ export {
|
|
|
132
138
|
ShoppingCTAEvent,
|
|
133
139
|
ShoppingCTAResult,
|
|
134
140
|
StoryBlock,
|
|
141
|
+
StoryBlockConfiguration,
|
|
135
142
|
StoryBlockSource,
|
|
136
143
|
TrackPurchaseParameters,
|
|
137
144
|
UpdateProductDetailsCallback,
|
|
@@ -141,8 +148,8 @@ export {
|
|
|
141
148
|
VideoFeedClickCallback,
|
|
142
149
|
VideoFeedClickEvent,
|
|
143
150
|
VideoFeedConfiguration,
|
|
144
|
-
VideoFeedContentPadding,
|
|
145
151
|
VideoFeedMode,
|
|
152
|
+
VideoFeedPadding,
|
|
146
153
|
VideoFeedPlayIconConfiguration,
|
|
147
154
|
VideoFeedSource,
|
|
148
155
|
VideoFeedTitleConfiguration,
|
|
@@ -157,6 +164,7 @@ export {
|
|
|
157
164
|
VideoPlayerCTADelay,
|
|
158
165
|
VideoPlayerCTADelayType,
|
|
159
166
|
VideoPlayerCTAStyle,
|
|
167
|
+
VideoPlayerCTAWidth,
|
|
160
168
|
VideoPlayerSize,
|
|
161
169
|
VideoPlayerStyle,
|
|
162
170
|
VideoShopping,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type AndroidFontInfo from './AndroidFontInfo';
|
|
2
|
+
|
|
1
3
|
export type AdBadgeTextType = 'ad' | 'sponsored';
|
|
2
4
|
|
|
3
5
|
export default interface AdBadgeConfiguration {
|
|
@@ -6,11 +8,17 @@ export default interface AdBadgeConfiguration {
|
|
|
6
8
|
*/
|
|
7
9
|
badgeTextType?: AdBadgeTextType;
|
|
8
10
|
/**
|
|
9
|
-
* The background color of the ad badge.
|
|
11
|
+
* The background color of the ad badge.
|
|
10
12
|
*/
|
|
11
13
|
backgroundColor?: string;
|
|
12
14
|
/**
|
|
13
|
-
* The color of the ad badge text.
|
|
15
|
+
* The color of the ad badge text.
|
|
14
16
|
*/
|
|
15
17
|
textColor?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The Android font info of ad badge.
|
|
20
|
+
* The property is ignored when fontSize is not set.
|
|
21
|
+
* Only supported on Android.
|
|
22
|
+
*/
|
|
23
|
+
androidFontInfo?: AndroidFontInfo;
|
|
16
24
|
}
|
package/src/models/FWEvents.ts
CHANGED
|
@@ -52,17 +52,6 @@ export interface UpdateProductDetailsEvent {
|
|
|
52
52
|
productIds: string[];
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
export interface LiveStreamEvent {
|
|
56
|
-
eventName: LiveStreamEventName;
|
|
57
|
-
info: LiveStreamEventDetails;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export interface LiveStreamChatEvent {
|
|
61
|
-
eventName: LiveStreamChatEventName;
|
|
62
|
-
message: LiveStreamMessageDetails;
|
|
63
|
-
liveStream: LiveStreamEventDetails;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
55
|
export interface CustomClickLinkButtonEvent {
|
|
67
56
|
/**
|
|
68
57
|
* The url for the product unit
|
|
@@ -77,3 +66,14 @@ export interface CustomClickLinkButtonEvent {
|
|
|
77
66
|
*/
|
|
78
67
|
unitId: string;
|
|
79
68
|
}
|
|
69
|
+
|
|
70
|
+
export interface LiveStreamEvent {
|
|
71
|
+
eventName: LiveStreamEventName;
|
|
72
|
+
info: LiveStreamEventDetails;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface LiveStreamChatEvent {
|
|
76
|
+
eventName: LiveStreamChatEventName;
|
|
77
|
+
message: LiveStreamMessageDetails;
|
|
78
|
+
liveStream: LiveStreamEventDetails;
|
|
79
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type GradientDrawableOrientation =
|
|
2
|
+
| 'TOP_BOTTOM'
|
|
3
|
+
| 'TR_BL'
|
|
4
|
+
| 'RIGHT_LEFT'
|
|
5
|
+
| 'BR_TL'
|
|
6
|
+
| 'BOTTOM_TOP'
|
|
7
|
+
| 'BL_TR'
|
|
8
|
+
| 'LEFT_RIGHT'
|
|
9
|
+
| 'TL_BR';
|
|
10
|
+
|
|
11
|
+
export default interface GradientDrawable {
|
|
12
|
+
orientation?: GradientDrawableOrientation;
|
|
13
|
+
colors?: string[];
|
|
14
|
+
}
|
|
@@ -19,11 +19,13 @@ export default interface IOSFontInfo {
|
|
|
19
19
|
/**
|
|
20
20
|
* The iOS system font style.
|
|
21
21
|
* The property is ignored when fontName is non-empty.
|
|
22
|
+
* Only supported on iOS.
|
|
22
23
|
*/
|
|
23
24
|
systemFontStyle?: IOSSystemFontStyle;
|
|
24
25
|
/**
|
|
25
26
|
* The iOS system font weight.
|
|
26
27
|
* The property is ignored when fontName is non-empty or systemFontStyle is italic.
|
|
28
|
+
* Only supported on iOS.
|
|
27
29
|
*/
|
|
28
30
|
systemFontWeight?: IOSSystemFontWeight;
|
|
29
31
|
}
|
|
@@ -36,7 +36,7 @@ export default interface ProductInfoViewConfiguration {
|
|
|
36
36
|
*/
|
|
37
37
|
ctaButton?: ShoppingCTAButtonConfiguration;
|
|
38
38
|
/**
|
|
39
|
-
* Configuration of link button next to
|
|
39
|
+
* Configuration of link button next to shopping CTA button.
|
|
40
40
|
*/
|
|
41
41
|
linkButton?: LinkButtonConfiguration;
|
|
42
42
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { VideoPlayerCTADelay } from './VideoPlayerCTADelay';
|
|
2
|
+
import type { VideoPlayerCTAWidth } from './VideoPlayerCTAWidth';
|
|
3
|
+
import type { VideoPlayerCompleteAction } from './VideoPlayerCompleteAction';
|
|
4
|
+
|
|
5
|
+
export interface StoryBlockConfiguration {
|
|
6
|
+
/**
|
|
7
|
+
* Behavior occurring after video is complete.
|
|
8
|
+
*/
|
|
9
|
+
videoCompleteAction?: VideoPlayerCompleteAction;
|
|
10
|
+
/**
|
|
11
|
+
* Indicates if the video player shows share button.
|
|
12
|
+
*/
|
|
13
|
+
showShareButton?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Indicates if the video player shows playback button.
|
|
16
|
+
*/
|
|
17
|
+
showPlaybackButton?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Indicates if Firework branding should be showed or not.
|
|
20
|
+
*/
|
|
21
|
+
showBranding?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Specifies the delay before showing the CTA.
|
|
24
|
+
*/
|
|
25
|
+
ctaDelay?: VideoPlayerCTADelay;
|
|
26
|
+
/**
|
|
27
|
+
* Specifies the delay before the highlight animation occurs. Only supported on iOS.
|
|
28
|
+
*/
|
|
29
|
+
ctaHighlightDelay?: VideoPlayerCTADelay;
|
|
30
|
+
/**
|
|
31
|
+
* The share base URL of the video.
|
|
32
|
+
*/
|
|
33
|
+
shareBaseURL?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Specifies the desired width for the Video Player CTA button.
|
|
36
|
+
*/
|
|
37
|
+
ctaWidth?: VideoPlayerCTAWidth;
|
|
38
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type IOSFontInfo from './IOSFontInfo';
|
|
2
2
|
import type AndroidFontInfo from './AndroidFontInfo';
|
|
3
|
+
import type GradientDrawable from './GradientDrawable';
|
|
3
4
|
|
|
4
5
|
export interface VideoFeedTitleConfiguration {
|
|
5
6
|
/**
|
|
@@ -14,6 +15,11 @@ export interface VideoFeedTitleConfiguration {
|
|
|
14
15
|
* The font size of video feed title.
|
|
15
16
|
*/
|
|
16
17
|
fontSize?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Specifies the number of allowed lines for the label.
|
|
20
|
+
* Only supported on iOS.
|
|
21
|
+
*/
|
|
22
|
+
numberOfLines?: number;
|
|
17
23
|
/**
|
|
18
24
|
* The iOS font info of video feed title.
|
|
19
25
|
* The property is ignored when fontSize is not set.
|
|
@@ -26,6 +32,17 @@ export interface VideoFeedTitleConfiguration {
|
|
|
26
32
|
* Only supported on Android.
|
|
27
33
|
*/
|
|
28
34
|
androidFontInfo?: AndroidFontInfo;
|
|
35
|
+
/**
|
|
36
|
+
* The background color of video feed title.
|
|
37
|
+
* The property is ignored when gradientDrawable is set.
|
|
38
|
+
* Only supported on Android.
|
|
39
|
+
*/
|
|
40
|
+
backgroundColor?: string;
|
|
41
|
+
/**
|
|
42
|
+
* The background drawable of video feed title.
|
|
43
|
+
* Only supported on Android.
|
|
44
|
+
*/
|
|
45
|
+
gradientDrawable?: GradientDrawable;
|
|
29
46
|
}
|
|
30
47
|
|
|
31
48
|
export interface VideoFeedPlayIconConfiguration {
|
|
@@ -35,7 +52,7 @@ export interface VideoFeedPlayIconConfiguration {
|
|
|
35
52
|
|
|
36
53
|
export type VideoFeedTitlePosition = 'stacked' | 'nested';
|
|
37
54
|
|
|
38
|
-
export interface
|
|
55
|
+
export interface VideoFeedPadding {
|
|
39
56
|
top?: number;
|
|
40
57
|
right?: number;
|
|
41
58
|
bottom?: number;
|
|
@@ -59,6 +76,10 @@ export default interface VideoFeedConfiguration {
|
|
|
59
76
|
* Title position of video feed item.
|
|
60
77
|
*/
|
|
61
78
|
titlePosition?: VideoFeedTitlePosition;
|
|
79
|
+
/**
|
|
80
|
+
* The padding of video feed title. Only supported on iOS.
|
|
81
|
+
*/
|
|
82
|
+
titlePadding?: VideoFeedPadding;
|
|
62
83
|
/**
|
|
63
84
|
* Configuration of video feed item play icon.
|
|
64
85
|
*/
|
|
@@ -72,11 +93,11 @@ export default interface VideoFeedConfiguration {
|
|
|
72
93
|
*/
|
|
73
94
|
aspectRatio?: number;
|
|
74
95
|
/**
|
|
75
|
-
* The
|
|
96
|
+
* The padding of video feed content. Only supported on iOS.
|
|
76
97
|
*/
|
|
77
|
-
contentPadding?:
|
|
98
|
+
contentPadding?: VideoFeedPadding;
|
|
78
99
|
/**
|
|
79
|
-
* The item spacing for video feed.
|
|
100
|
+
* The item spacing for video feed.
|
|
80
101
|
*/
|
|
81
102
|
itemSpacing?: number;
|
|
82
103
|
/**
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type VideoPlayerCTADelayType = 'constant' | 'percentage';
|
|
2
|
+
export interface VideoPlayerCTADelay {
|
|
3
|
+
type: VideoPlayerCTADelayType;
|
|
4
|
+
/**
|
|
5
|
+
* If type is constant, the value is the number of seconds of delay.
|
|
6
|
+
* Value should be greater than or equal to 0 and less than or equal to 10 when type is constant.
|
|
7
|
+
* If type is percentage, the value is a percentage based on the the total duration of the video length.
|
|
8
|
+
* Value must be greater than or equal to 0 and less than 1 when type is percentage.
|
|
9
|
+
*/
|
|
10
|
+
value: number;
|
|
11
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type IOSFontInfo from './IOSFontInfo';
|
|
2
|
+
|
|
3
|
+
export interface VideoPlayerCTAStyle {
|
|
4
|
+
/**
|
|
5
|
+
* The background color of CTA button.
|
|
6
|
+
*/
|
|
7
|
+
backgroundColor?: string;
|
|
8
|
+
/**
|
|
9
|
+
* The text color of CTA button.
|
|
10
|
+
*/
|
|
11
|
+
textColor?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The font size of CTA button.
|
|
14
|
+
*/
|
|
15
|
+
fontSize?: number;
|
|
16
|
+
/**
|
|
17
|
+
* The iOS font info of CTA button.
|
|
18
|
+
* The property is ignored when fontSize is not set.
|
|
19
|
+
* Only supported on iOS.
|
|
20
|
+
*/
|
|
21
|
+
iOSFontInfo?: IOSFontInfo;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type VideoPlayerCTAWidth = 'fullWidth' | 'compact' | 'sizeToFit';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type VideoPlayerCompleteAction = 'loop' | 'advanceToNext';
|
|
@@ -1,39 +1,8 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* The background color of CTA button.
|
|
8
|
-
*/
|
|
9
|
-
backgroundColor?: string;
|
|
10
|
-
/**
|
|
11
|
-
* The text color of CTA button.
|
|
12
|
-
*/
|
|
13
|
-
textColor?: string;
|
|
14
|
-
/**
|
|
15
|
-
* The font size of CTA button.
|
|
16
|
-
*/
|
|
17
|
-
fontSize?: number;
|
|
18
|
-
/**
|
|
19
|
-
* The iOS font info of CTA button.
|
|
20
|
-
* The property is ignored when fontSize is not set.
|
|
21
|
-
* Only supported on iOS.
|
|
22
|
-
*/
|
|
23
|
-
iOSFontInfo?: IOSFontInfo;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export type VideoPlayerCTADelayType = 'constant' | 'percentage';
|
|
27
|
-
export interface VideoPlayerCTADelay {
|
|
28
|
-
type: VideoPlayerCTADelayType;
|
|
29
|
-
/**
|
|
30
|
-
* If type is constant, the value is the number of seconds of delay.
|
|
31
|
-
* Value should be greater than or equal to 0 and less than or equal to 10 when type is constant.
|
|
32
|
-
* If type is percentage, the value is a percentage based on the the total duration of the video length.
|
|
33
|
-
* Value must be greater than or equal to 0 and less than 1 when type is percentage.
|
|
34
|
-
*/
|
|
35
|
-
value: number;
|
|
36
|
-
}
|
|
1
|
+
import type { VideoPlayerCTADelay } from './VideoPlayerCTADelay';
|
|
2
|
+
import type { VideoPlayerCTAStyle } from './VideoPlayerCTAStyle';
|
|
3
|
+
import type { VideoPlayerCTAWidth } from './VideoPlayerCTAWidth';
|
|
4
|
+
import type { VideoPlayerCompleteAction } from './VideoPlayerCompleteAction';
|
|
5
|
+
import type { VideoPlayerStyle } from './VideoPlayerStyle';
|
|
37
6
|
|
|
38
7
|
export default interface VideoPlayerConfiguration {
|
|
39
8
|
/**
|
|
@@ -76,4 +45,8 @@ export default interface VideoPlayerConfiguration {
|
|
|
76
45
|
* The share base URL of the video.
|
|
77
46
|
*/
|
|
78
47
|
shareBaseURL?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Specifies the desired width for the Video Player CTA button.
|
|
50
|
+
*/
|
|
51
|
+
ctaWidth?: VideoPlayerCTAWidth;
|
|
79
52
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type VideoPlayerStyle = 'full' | 'fit';
|
|
@@ -14,7 +14,7 @@ const LiveStreamModule = NativeModules.LiveStreamModule
|
|
|
14
14
|
);
|
|
15
15
|
|
|
16
16
|
interface ILiveStreamModule extends NativeModule {
|
|
17
|
-
init():
|
|
17
|
+
init(): Promise<any>;
|
|
18
18
|
}
|
|
19
19
|
const LiveStreamModuleEventEmitter = new NativeEventEmitter(LiveStreamModule);
|
|
20
20
|
export { LiveStreamModuleEventEmitter };
|