react-native-firework-sdk 2.3.1 → 2.4.0-beta.2
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 +24 -10
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios.private.swiftinterface +1 -1
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios.swiftinterface +1 -1
- 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 +24 -10
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +1 -1
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.swiftinterface +1 -1
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.abi.json +24 -10
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +1 -1
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +1 -1
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/_CodeSignature/CodeResources +21 -21
- package/android/gradle.properties +1 -1
- package/android/src/main/java/com/fireworksdk/bridge/components/storyblock/StoryBlockFragment.kt +20 -0
- package/android/src/main/java/com/fireworksdk/bridge/components/videofeed/FWVideoFeed.kt +1 -69
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedPropsModel.kt +3 -1
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedPropsModelDeserializer.kt +21 -4
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedPropsModelSerializer.kt +15 -3
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerConfigModel.kt +2 -1
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerConfigModelDeserializer.kt +3 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerConfigModelSerializer.kt +2 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWVideoFeedSource.kt +3 -1
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/FWReactNativeSDK.kt +6 -0
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/manager/FWStoryBlockManager.kt +20 -15
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/manager/FWVideoFeedManager.kt +45 -16
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FireworkSDKModule.kt +5 -0
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWConfigUtil.kt +11 -1
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWImageLoaderUtil.kt +16 -0
- package/ios/Components/StoryBlock.swift +9 -7
- package/ios/Components/StoryBlockConfiguration.swift +13 -0
- package/ios/Components/StoryBlockManager.m +6 -1
- package/ios/Components/VideoFeed.swift +5 -10
- package/ios/Components/VideoFeedManager.m +1 -2
- package/ios/Components/VideoPlayerConfiguration.swift +1 -0
- package/ios/FireworkSdk.xcodeproj/project.pbxproj +4 -26
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/AppLanguageManager.swift +13 -2
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/UIKit/UIImageView+AppLanguage.swift +0 -34
- package/ios/FireworkVideoUI/Podfile +1 -1
- package/ios/FireworkVideoUI/Podfile.lock +4 -4
- package/ios/Models/RNToNative/RCTConvert+FireworkSDKModule.swift +1 -0
- package/ios/Models/RNToNative/RCTConvert+StoryBlock.swift +16 -1
- package/ios/Models/RNToNative/RCTConvert+VideoFeed.swift +2 -1
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule.swift +8 -4
- package/ios/Modules/Shopping/ShoppingModule.swift +6 -5
- package/ios/react_native_firework_sdk.h +0 -1
- package/lib/commonjs/FireworkSDK.js.map +1 -1
- package/lib/commonjs/components/StoryBlock.js +71 -33
- package/lib/commonjs/components/StoryBlock.js.map +1 -1
- package/lib/commonjs/components/VideoFeed.js +83 -57
- package/lib/commonjs/components/VideoFeed.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/OpenVideoPlayerConfiguration.js +2 -0
- package/lib/commonjs/models/OpenVideoPlayerConfiguration.js.map +1 -0
- package/lib/commonjs/models/StoryBlockNativeConfiguration.js +2 -0
- package/lib/commonjs/models/StoryBlockNativeConfiguration.js.map +1 -0
- package/lib/commonjs/models/VideoPlayerNativeConfiguration.js +2 -0
- package/lib/commonjs/models/VideoPlayerNativeConfiguration.js.map +1 -0
- package/lib/commonjs/modules/FireworkSDKModule.js.map +1 -1
- package/lib/module/FireworkSDK.js.map +1 -1
- package/lib/module/components/StoryBlock.js +67 -33
- package/lib/module/components/StoryBlock.js.map +1 -1
- package/lib/module/components/VideoFeed.js +79 -57
- package/lib/module/components/VideoFeed.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/OpenVideoPlayerConfiguration.js +2 -0
- package/lib/module/models/OpenVideoPlayerConfiguration.js.map +1 -0
- package/lib/module/models/StoryBlockNativeConfiguration.js +2 -0
- package/lib/module/models/StoryBlockNativeConfiguration.js.map +1 -0
- package/lib/module/models/VideoPlayerNativeConfiguration.js +2 -0
- package/lib/module/models/VideoPlayerNativeConfiguration.js.map +1 -0
- package/lib/module/modules/FireworkSDKModule.js.map +1 -1
- package/lib/typescript/FireworkSDK.d.ts +2 -2
- package/lib/typescript/components/StoryBlock.d.ts +8 -0
- package/lib/typescript/components/VideoFeed.d.ts +8 -1
- package/lib/typescript/index.d.ts +2 -1
- package/lib/typescript/models/AdBadgeConfiguration.d.ts +3 -0
- package/lib/typescript/models/AndroidFontInfo.d.ts +1 -1
- package/lib/typescript/models/OpenVideoPlayerConfiguration.d.ts +7 -0
- package/lib/typescript/models/Product.d.ts +1 -1
- package/lib/typescript/models/ProductUnit.d.ts +1 -1
- package/lib/typescript/models/StoryBlockConfiguration.d.ts +1 -1
- package/lib/typescript/models/StoryBlockNativeConfiguration.d.ts +7 -0
- package/lib/typescript/models/StoryBlockSource.d.ts +1 -1
- package/lib/typescript/models/VideoFeedConfiguration.d.ts +29 -4
- package/lib/typescript/models/VideoFeedSource.d.ts +1 -1
- package/lib/typescript/models/VideoPlayerCTAStyle.d.ts +6 -0
- package/lib/typescript/models/VideoPlayerConfiguration.d.ts +10 -1
- package/lib/typescript/models/VideoPlayerNativeConfiguration.d.ts +7 -0
- package/lib/typescript/modules/FireworkSDKModule.d.ts +2 -2
- package/package.json +2 -2
- package/react-native-firework-sdk.podspec +1 -1
- package/src/FireworkSDK.ts +2 -2
- package/src/components/StoryBlock.tsx +65 -36
- package/src/components/VideoFeed.tsx +87 -74
- package/src/index.ts +2 -0
- package/src/models/AdBadgeConfiguration.ts +3 -0
- package/src/models/AndroidFontInfo.ts +1 -1
- package/src/models/OpenVideoPlayerConfiguration.ts +9 -0
- package/src/models/Product.ts +1 -1
- package/src/models/ProductUnit.ts +1 -1
- package/src/models/StoryBlockConfiguration.ts +1 -1
- package/src/models/StoryBlockNativeConfiguration.ts +9 -0
- package/src/models/StoryBlockSource.ts +2 -1
- package/src/models/VideoFeedConfiguration.ts +29 -4
- package/src/models/VideoFeedSource.ts +2 -1
- package/src/models/VideoPlayerCTAStyle.ts +6 -0
- package/src/models/VideoPlayerConfiguration.ts +10 -1
- package/src/models/VideoPlayerNativeConfiguration.ts +9 -0
- package/src/modules/FireworkSDKModule.ts +2 -2
- package/ios/Modules/Shopping/FWCartViewController.swift +0 -14
- package/ios/Utils/Extensions/Swizzle/UINavigationController+FWSwizzle.swift +0 -31
- package/ios/Utils/FWSwizzleLoader.h +0 -15
- package/ios/Utils/FWSwizzleLoader.m +0 -21
- package/ios/Utils/FWSwizzleLoader.swift +0 -13
|
@@ -34,14 +34,10 @@
|
|
|
34
34
|
897523A02817DEF80070EBB6 /* (null) in Sources */ = {isa = PBXBuildFile; };
|
|
35
35
|
898873462A0A8E7E0089CD1C /* UIViewController+AttachChild.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898873132A0A8E7E0089CD1C /* UIViewController+AttachChild.swift */; };
|
|
36
36
|
898873472A0A8E7E0089CD1C /* UIView+Constraints.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898873142A0A8E7E0089CD1C /* UIView+Constraints.swift */; };
|
|
37
|
-
898873482A0A8E7E0089CD1C /* UINavigationController+FWSwizzle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898873162A0A8E7E0089CD1C /* UINavigationController+FWSwizzle.swift */; };
|
|
38
37
|
898873492A0A8E7E0089CD1C /* String+Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898873172A0A8E7E0089CD1C /* String+Color.swift */; };
|
|
39
|
-
8988734A2A0A8E7E0089CD1C /* FWSwizzleLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 898873182A0A8E7E0089CD1C /* FWSwizzleLoader.m */; };
|
|
40
|
-
8988734B2A0A8E7E0089CD1C /* FWSwizzleLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898873192A0A8E7E0089CD1C /* FWSwizzleLoader.swift */; };
|
|
41
38
|
8988734D2A0A8E7E0089CD1C /* FWNavigatorModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8988731D2A0A8E7E0089CD1C /* FWNavigatorModule.swift */; };
|
|
42
39
|
8988734E2A0A8E7E0089CD1C /* FWNavigatorModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 8988731E2A0A8E7E0089CD1C /* FWNavigatorModule.m */; };
|
|
43
40
|
8988734F2A0A8E7E0089CD1C /* ShoppingModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 898873202A0A8E7E0089CD1C /* ShoppingModule.m */; };
|
|
44
|
-
898873502A0A8E7E0089CD1C /* FWCartViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898873212A0A8E7E0089CD1C /* FWCartViewController.swift */; };
|
|
45
41
|
898873512A0A8E7E0089CD1C /* ProductInfoViewConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898873222A0A8E7E0089CD1C /* ProductInfoViewConfiguration.swift */; };
|
|
46
42
|
898873522A0A8E7E0089CD1C /* ShoppingCTAResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898873232A0A8E7E0089CD1C /* ShoppingCTAResult.swift */; };
|
|
47
43
|
898873532A0A8E7E0089CD1C /* Product.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898873242A0A8E7E0089CD1C /* Product.swift */; };
|
|
@@ -71,6 +67,7 @@
|
|
|
71
67
|
8988736B2A0A8E7E0089CD1C /* VideoFeed.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898873432A0A8E7E0089CD1C /* VideoFeed.swift */; };
|
|
72
68
|
8988736C2A0A8E7E0089CD1C /* VideoPlayerConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898873442A0A8E7E0089CD1C /* VideoPlayerConfiguration.swift */; };
|
|
73
69
|
8988736D2A0A8E7E0089CD1C /* VideoFeedManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 898873452A0A8E7E0089CD1C /* VideoFeedManager.m */; };
|
|
70
|
+
89C4D6A62A494EB800EFB74A /* StoryBlockConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89C4D6A52A494EB800EFB74A /* StoryBlockConfiguration.swift */; };
|
|
74
71
|
89D6BBF929ACE2DC00C8AA2A /* (null) in Sources */ = {isa = PBXBuildFile; };
|
|
75
72
|
89DF27DD28A53A77003F3CCB /* (null) in Sources */ = {isa = PBXBuildFile; };
|
|
76
73
|
89DF27DE28A53A77003F3CCB /* (null) in Sources */ = {isa = PBXBuildFile; };
|
|
@@ -94,17 +91,12 @@
|
|
|
94
91
|
1F6F718A2771B48100224AF3 /* FireworkSdk-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "FireworkSdk-Bridging-Header.h"; sourceTree = "<group>"; };
|
|
95
92
|
894FADB229BAD571000FB51A /* libFireworkSdk.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libFireworkSdk.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
96
93
|
897523632817DEF80070EBB6 /* react_native_firework_sdk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = react_native_firework_sdk.h; sourceTree = "<group>"; };
|
|
97
|
-
898873112A0A8E7E0089CD1C /* FWSwizzleLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FWSwizzleLoader.h; sourceTree = "<group>"; };
|
|
98
94
|
898873132A0A8E7E0089CD1C /* UIViewController+AttachChild.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIViewController+AttachChild.swift"; sourceTree = "<group>"; };
|
|
99
95
|
898873142A0A8E7E0089CD1C /* UIView+Constraints.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+Constraints.swift"; sourceTree = "<group>"; };
|
|
100
|
-
898873162A0A8E7E0089CD1C /* UINavigationController+FWSwizzle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UINavigationController+FWSwizzle.swift"; sourceTree = "<group>"; };
|
|
101
96
|
898873172A0A8E7E0089CD1C /* String+Color.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+Color.swift"; sourceTree = "<group>"; };
|
|
102
|
-
898873182A0A8E7E0089CD1C /* FWSwizzleLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FWSwizzleLoader.m; sourceTree = "<group>"; };
|
|
103
|
-
898873192A0A8E7E0089CD1C /* FWSwizzleLoader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FWSwizzleLoader.swift; sourceTree = "<group>"; };
|
|
104
97
|
8988731D2A0A8E7E0089CD1C /* FWNavigatorModule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FWNavigatorModule.swift; sourceTree = "<group>"; };
|
|
105
98
|
8988731E2A0A8E7E0089CD1C /* FWNavigatorModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FWNavigatorModule.m; sourceTree = "<group>"; };
|
|
106
99
|
898873202A0A8E7E0089CD1C /* ShoppingModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShoppingModule.m; sourceTree = "<group>"; };
|
|
107
|
-
898873212A0A8E7E0089CD1C /* FWCartViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FWCartViewController.swift; sourceTree = "<group>"; };
|
|
108
100
|
898873222A0A8E7E0089CD1C /* ProductInfoViewConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProductInfoViewConfiguration.swift; sourceTree = "<group>"; };
|
|
109
101
|
898873232A0A8E7E0089CD1C /* ShoppingCTAResult.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ShoppingCTAResult.swift; sourceTree = "<group>"; };
|
|
110
102
|
898873242A0A8E7E0089CD1C /* Product.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Product.swift; sourceTree = "<group>"; };
|
|
@@ -134,6 +126,7 @@
|
|
|
134
126
|
898873432A0A8E7E0089CD1C /* VideoFeed.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VideoFeed.swift; sourceTree = "<group>"; };
|
|
135
127
|
898873442A0A8E7E0089CD1C /* VideoPlayerConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VideoPlayerConfiguration.swift; sourceTree = "<group>"; };
|
|
136
128
|
898873452A0A8E7E0089CD1C /* VideoFeedManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VideoFeedManager.m; sourceTree = "<group>"; };
|
|
129
|
+
89C4D6A52A494EB800EFB74A /* StoryBlockConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoryBlockConfiguration.swift; sourceTree = "<group>"; };
|
|
137
130
|
/* End PBXFileReference section */
|
|
138
131
|
|
|
139
132
|
/* Begin PBXFrameworksBuildPhase section */
|
|
@@ -163,10 +156,7 @@
|
|
|
163
156
|
898873102A0A8E7E0089CD1C /* Utils */ = {
|
|
164
157
|
isa = PBXGroup;
|
|
165
158
|
children = (
|
|
166
|
-
898873112A0A8E7E0089CD1C /* FWSwizzleLoader.h */,
|
|
167
159
|
898873122A0A8E7E0089CD1C /* Extensions */,
|
|
168
|
-
898873182A0A8E7E0089CD1C /* FWSwizzleLoader.m */,
|
|
169
|
-
898873192A0A8E7E0089CD1C /* FWSwizzleLoader.swift */,
|
|
170
160
|
);
|
|
171
161
|
path = Utils;
|
|
172
162
|
sourceTree = "<group>";
|
|
@@ -176,20 +166,11 @@
|
|
|
176
166
|
children = (
|
|
177
167
|
898873132A0A8E7E0089CD1C /* UIViewController+AttachChild.swift */,
|
|
178
168
|
898873142A0A8E7E0089CD1C /* UIView+Constraints.swift */,
|
|
179
|
-
898873152A0A8E7E0089CD1C /* Swizzle */,
|
|
180
169
|
898873172A0A8E7E0089CD1C /* String+Color.swift */,
|
|
181
170
|
);
|
|
182
171
|
path = Extensions;
|
|
183
172
|
sourceTree = "<group>";
|
|
184
173
|
};
|
|
185
|
-
898873152A0A8E7E0089CD1C /* Swizzle */ = {
|
|
186
|
-
isa = PBXGroup;
|
|
187
|
-
children = (
|
|
188
|
-
898873162A0A8E7E0089CD1C /* UINavigationController+FWSwizzle.swift */,
|
|
189
|
-
);
|
|
190
|
-
path = Swizzle;
|
|
191
|
-
sourceTree = "<group>";
|
|
192
|
-
};
|
|
193
174
|
8988731A2A0A8E7E0089CD1C /* Modules */ = {
|
|
194
175
|
isa = PBXGroup;
|
|
195
176
|
children = (
|
|
@@ -214,7 +195,6 @@
|
|
|
214
195
|
isa = PBXGroup;
|
|
215
196
|
children = (
|
|
216
197
|
898873202A0A8E7E0089CD1C /* ShoppingModule.m */,
|
|
217
|
-
898873212A0A8E7E0089CD1C /* FWCartViewController.swift */,
|
|
218
198
|
898873222A0A8E7E0089CD1C /* ProductInfoViewConfiguration.swift */,
|
|
219
199
|
898873232A0A8E7E0089CD1C /* ShoppingCTAResult.swift */,
|
|
220
200
|
898873242A0A8E7E0089CD1C /* Product.swift */,
|
|
@@ -296,6 +276,7 @@
|
|
|
296
276
|
898873432A0A8E7E0089CD1C /* VideoFeed.swift */,
|
|
297
277
|
898873442A0A8E7E0089CD1C /* VideoPlayerConfiguration.swift */,
|
|
298
278
|
898873452A0A8E7E0089CD1C /* VideoFeedManager.m */,
|
|
279
|
+
89C4D6A52A494EB800EFB74A /* StoryBlockConfiguration.swift */,
|
|
299
280
|
);
|
|
300
281
|
path = Components;
|
|
301
282
|
sourceTree = "<group>";
|
|
@@ -357,7 +338,6 @@
|
|
|
357
338
|
isa = PBXSourcesBuildPhase;
|
|
358
339
|
buildActionMask = 2147483647;
|
|
359
340
|
files = (
|
|
360
|
-
8988734B2A0A8E7E0089CD1C /* FWSwizzleLoader.swift in Sources */,
|
|
361
341
|
898873572A0A8E7E0089CD1C /* FireworkSDKModule+EventTracking.swift in Sources */,
|
|
362
342
|
8988734F2A0A8E7E0089CD1C /* ShoppingModule.m in Sources */,
|
|
363
343
|
898873612A0A8E7E0089CD1C /* RCTConvert+Shopping.swift in Sources */,
|
|
@@ -368,7 +348,6 @@
|
|
|
368
348
|
8988736C2A0A8E7E0089CD1C /* VideoPlayerConfiguration.swift in Sources */,
|
|
369
349
|
8988734D2A0A8E7E0089CD1C /* FWNavigatorModule.swift in Sources */,
|
|
370
350
|
898873692A0A8E7E0089CD1C /* StoryBlockManager.m in Sources */,
|
|
371
|
-
898873482A0A8E7E0089CD1C /* UINavigationController+FWSwizzle.swift in Sources */,
|
|
372
351
|
897523A02817DEF80070EBB6 /* (null) in Sources */,
|
|
373
352
|
8988735E2A0A8E7E0089CD1C /* FontInfo.swift in Sources */,
|
|
374
353
|
8975238E2817DEF80070EBB6 /* (null) in Sources */,
|
|
@@ -391,8 +370,8 @@
|
|
|
391
370
|
898873542A0A8E7E0089CD1C /* ShoppingModule.swift in Sources */,
|
|
392
371
|
898873622A0A8E7E0089CD1C /* RCTConvert+VideoFeed.swift in Sources */,
|
|
393
372
|
89DF27DF28A53A77003F3CCB /* (null) in Sources */,
|
|
373
|
+
89C4D6A62A494EB800EFB74A /* StoryBlockConfiguration.swift in Sources */,
|
|
394
374
|
897523932817DEF80070EBB6 /* (null) in Sources */,
|
|
395
|
-
8988734A2A0A8E7E0089CD1C /* FWSwizzleLoader.m in Sources */,
|
|
396
375
|
897523922817DEF80070EBB6 /* (null) in Sources */,
|
|
397
376
|
897523872817DEF80070EBB6 /* (null) in Sources */,
|
|
398
377
|
897523902817DEF80070EBB6 /* (null) in Sources */,
|
|
@@ -409,7 +388,6 @@
|
|
|
409
388
|
898873672A0A8E7E0089CD1C /* AdConfiguration.swift in Sources */,
|
|
410
389
|
8988735F2A0A8E7E0089CD1C /* RCTConvert+StoryBlock.swift in Sources */,
|
|
411
390
|
8975239E2817DEF80070EBB6 /* (null) in Sources */,
|
|
412
|
-
898873502A0A8E7E0089CD1C /* FWCartViewController.swift in Sources */,
|
|
413
391
|
897523962817DEF80070EBB6 /* (null) in Sources */,
|
|
414
392
|
8988735B2A0A8E7E0089CD1C /* FireworkSDKModule.m in Sources */,
|
|
415
393
|
8988736A2A0A8E7E0089CD1C /* VideoFeedConfiguration.swift in Sources */,
|
|
@@ -32,14 +32,17 @@ public class AppLanguageManager {
|
|
|
32
32
|
return LanguageUtil.getLanguageCode(language)
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
private var enableAutoHorizontalFlip: Bool = true
|
|
36
|
+
|
|
35
37
|
/// Get current app language.
|
|
36
38
|
public private(set) var appLanguage: String? {
|
|
37
39
|
didSet {
|
|
38
40
|
if appLanguage != nil {
|
|
39
41
|
AppLanguageManager.swizzelMethods()
|
|
40
|
-
LayoutFlipManager.shared.enableHorizontalFlip = shouldHorizontalFlip
|
|
41
42
|
}
|
|
42
43
|
|
|
44
|
+
LayoutFlipManager.shared.enableHorizontalFlip = shouldHorizontalFlip
|
|
45
|
+
|
|
43
46
|
if appLanguage != oldValue {
|
|
44
47
|
NotificationCenter.default.post(name: NotificationName.AppLanguageChanged, object: nil)
|
|
45
48
|
}
|
|
@@ -70,6 +73,10 @@ public class AppLanguageManager {
|
|
|
70
73
|
}
|
|
71
74
|
|
|
72
75
|
var shouldHorizontalFlip: Bool {
|
|
76
|
+
guard enableAutoHorizontalFlip else {
|
|
77
|
+
return false
|
|
78
|
+
}
|
|
79
|
+
|
|
73
80
|
guard let appLanguageCode = appLanguageCode else {
|
|
74
81
|
return false
|
|
75
82
|
}
|
|
@@ -125,9 +132,13 @@ public class AppLanguageManager {
|
|
|
125
132
|
///
|
|
126
133
|
/// - Parameters:
|
|
127
134
|
/// - language: app language. We will use system langauge when language is nil.
|
|
135
|
+
/// - enableAutoHorizontalFlip: Specifies if auto horizontal flip is enabled based
|
|
136
|
+
/// on app and system language. Defaults to true.
|
|
128
137
|
/// - Returns: The result of changing app language.
|
|
129
138
|
@discardableResult
|
|
130
|
-
public func changeAppLanguage(_ language: String
|
|
139
|
+
public func changeAppLanguage(_ language: String?, _ enableAutoHorizontalFlip: Bool = true) -> Bool {
|
|
140
|
+
self.enableAutoHorizontalFlip = enableAutoHorizontalFlip
|
|
141
|
+
|
|
131
142
|
guard let language = language, language.count > 0 else {
|
|
132
143
|
appLanguage = nil
|
|
133
144
|
UserDefaults.standard.removeObject(forKey: appLanguageStorageKey)
|
|
@@ -7,17 +7,6 @@
|
|
|
7
7
|
import UIKit
|
|
8
8
|
import FireworkVideo
|
|
9
9
|
|
|
10
|
-
private let FWImageNamesWithDirections: [String] = [
|
|
11
|
-
"shopping-cart",
|
|
12
|
-
"left-arrow",
|
|
13
|
-
"right-arrow",
|
|
14
|
-
"speaker-unmute",
|
|
15
|
-
"speaker-mute",
|
|
16
|
-
"mute",
|
|
17
|
-
"mute-off",
|
|
18
|
-
"mute-on"
|
|
19
|
-
]
|
|
20
|
-
|
|
21
10
|
extension UIImageView {
|
|
22
11
|
static func swizzleImageViewMethodsForAppLanguage() {
|
|
23
12
|
Swizzle.swizzleSelector(
|
|
@@ -60,29 +49,6 @@ extension UIImageView {
|
|
|
60
49
|
return false
|
|
61
50
|
}
|
|
62
51
|
|
|
63
|
-
if AppLanguageManager.shared.shouldHorizontalFlip, self.isIOSSDKView {
|
|
64
|
-
let iOSSDKBundle = Bundle(for: FireworkVideoSDK.self)
|
|
65
|
-
|
|
66
|
-
for imageName in FWImageNamesWithDirections {
|
|
67
|
-
let targetImage = UIImage(named: imageName, in: iOSSDKBundle, compatibleWith: nil)
|
|
68
|
-
if image.isEqual(targetImage) {
|
|
69
|
-
return true
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if let cgImage = image.cgImage,
|
|
73
|
-
let targetCgImage = targetImage?.cgImage,
|
|
74
|
-
cgImage == targetCgImage {
|
|
75
|
-
return true
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
if let ciImage = image.ciImage,
|
|
79
|
-
let targetCiImage = targetImage?.ciImage,
|
|
80
|
-
ciImage == targetCiImage {
|
|
81
|
-
return true
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
52
|
if AppLanguageManager.shared.shouldHorizontalFlip,
|
|
87
53
|
image.flipsForRightToLeftLayoutDirection == true,
|
|
88
54
|
self.isIOSSDKView {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
PODS:
|
|
2
|
-
- FireworkVideo (1.
|
|
2
|
+
- FireworkVideo (1.11.0)
|
|
3
3
|
|
|
4
4
|
DEPENDENCIES:
|
|
5
|
-
- FireworkVideo (= 1.
|
|
5
|
+
- FireworkVideo (= 1.11.0)
|
|
6
6
|
|
|
7
7
|
SPEC REPOS:
|
|
8
8
|
trunk:
|
|
9
9
|
- FireworkVideo
|
|
10
10
|
|
|
11
11
|
SPEC CHECKSUMS:
|
|
12
|
-
FireworkVideo:
|
|
12
|
+
FireworkVideo: d37d9b94d8bc8069c42a3f06b4b9da97ea3b7e60
|
|
13
13
|
|
|
14
|
-
PODFILE CHECKSUM:
|
|
14
|
+
PODFILE CHECKSUM: 19727e7fd482efd91e8a58ce9db72b1ded933875
|
|
15
15
|
|
|
16
16
|
COCOAPODS: 1.12.1
|
|
@@ -13,6 +13,7 @@ extension RCTConvert {
|
|
|
13
13
|
static func videoPlayerContentConfiguration(_ config: [String: AnyObject])
|
|
14
14
|
-> VideoPlayerContentConfiguration? {
|
|
15
15
|
let videoPlayerConfig = RCTConvert.videoPlayerConfiguration(config)
|
|
16
|
+
|
|
16
17
|
let finalConfig = VideoFeed.convertToVideoPlayerContentConfiguration(videoPlayerConfig)
|
|
17
18
|
|
|
18
19
|
return finalConfig
|
|
@@ -14,7 +14,8 @@ extension StoryBlockSourceType {
|
|
|
14
14
|
"channel": .channel,
|
|
15
15
|
"playlist": .playlist,
|
|
16
16
|
"dynamicContent": .dynamicContent,
|
|
17
|
-
"hashtagPlaylist": .hashtagPlaylist
|
|
17
|
+
"hashtagPlaylist": .hashtagPlaylist,
|
|
18
|
+
"sku": .sku
|
|
18
19
|
]
|
|
19
20
|
}
|
|
20
21
|
}
|
|
@@ -28,4 +29,18 @@ extension RCTConvert {
|
|
|
28
29
|
|
|
29
30
|
return StoryBlockSourceType.sourceTypeMapper[rType] ?? .discover
|
|
30
31
|
}
|
|
32
|
+
|
|
33
|
+
public static func storyBlockConfiguration(_ config: [String: AnyObject]?)
|
|
34
|
+
-> StoryBlockConfiguration? {
|
|
35
|
+
guard let rConfig = config else {
|
|
36
|
+
return nil
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
let jsonData = try? JSONSerialization.data(withJSONObject: rConfig, options: .prettyPrinted)
|
|
40
|
+
guard let rJsonData = jsonData else {
|
|
41
|
+
return nil
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return try? JSONDecoder().decode(StoryBlockConfiguration.self, from: rJsonData)
|
|
45
|
+
}
|
|
31
46
|
}
|
|
@@ -87,8 +87,8 @@ class FireworkSDKModule: RCTEventEmitter, FireworkVideoSDKDelegate {
|
|
|
87
87
|
guard let urlString = URL.init(string: url) else {
|
|
88
88
|
return
|
|
89
89
|
}
|
|
90
|
-
|
|
91
|
-
let vpcConfig =
|
|
90
|
+
let videoPlayerConfig = RCTConvert.videoPlayerConfiguration(config)
|
|
91
|
+
let vpcConfig = VideoFeed.convertToVideoPlayerContentConfiguration(videoPlayerConfig)
|
|
92
92
|
|
|
93
93
|
var feedContentConfig = VideoFeedContentConfiguration()
|
|
94
94
|
if let vpcConfig = vpcConfig {
|
|
@@ -103,9 +103,13 @@ class FireworkSDKModule: RCTEventEmitter, FireworkVideoSDKDelegate {
|
|
|
103
103
|
return
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
VideoFeedViewController.openVideoPlayer(
|
|
106
|
+
VideoFeedViewController.openVideoPlayer(
|
|
107
|
+
with: urlString,
|
|
108
|
+
feedContentConfig,
|
|
109
|
+
presentedVC,
|
|
110
|
+
videoPlayerConfig?.enablePictureInPicture ?? true) { _ in
|
|
107
111
|
|
|
108
|
-
|
|
112
|
+
}
|
|
109
113
|
}
|
|
110
114
|
|
|
111
115
|
@objc(setCustomCTAClickEnabled:)
|
|
@@ -11,7 +11,7 @@ import FireworkVideo
|
|
|
11
11
|
import Foundation
|
|
12
12
|
|
|
13
13
|
@objc(ShoppingModule)
|
|
14
|
-
class ShoppingModule: RCTEventEmitter, FireworkVideoShoppingDelegate
|
|
14
|
+
class ShoppingModule: RCTEventEmitter, FireworkVideoShoppingDelegate {
|
|
15
15
|
|
|
16
16
|
private var productInfoViewConfigurator: (Int, ProductInfoViewConfigurable)?
|
|
17
17
|
private var shoppingCTAHandlerMap: [Int: ShoppingCTAHandler] = [:]
|
|
@@ -47,7 +47,7 @@ class ShoppingModule: RCTEventEmitter, FireworkVideoShoppingDelegate, CartViewCo
|
|
|
47
47
|
func initializeSDK(_ resolver: RCTPromiseResolveBlock,
|
|
48
48
|
rejecter: RCTPromiseRejectBlock) {
|
|
49
49
|
FireworkVideoSDK.shopping.shoppingDelegate = self
|
|
50
|
-
FireworkVideoSDK.shopping.
|
|
50
|
+
FireworkVideoSDK.shopping.cartAction = .custom
|
|
51
51
|
resolver([:])
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -291,11 +291,12 @@ class ShoppingModule: RCTEventEmitter, FireworkVideoShoppingDelegate, CartViewCo
|
|
|
291
291
|
return customClickLinkButtonEnabled
|
|
292
292
|
}
|
|
293
293
|
|
|
294
|
-
|
|
295
|
-
|
|
294
|
+
func fireworkShopping(
|
|
295
|
+
_ fireworkShopping: FireworkVideoShopping,
|
|
296
|
+
didTapCartIconForVideo videoDetails: VideoDetails
|
|
297
|
+
) {
|
|
296
298
|
sendEvent(
|
|
297
299
|
withName: ShoppingEventName.clickCartIcon.rawValue, body: [:])
|
|
298
|
-
return FWCartViewController()
|
|
299
300
|
}
|
|
300
301
|
}
|
|
301
302
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["FireworkSDK.ts"],"names":["FireworkSDK","onCustomCTAClick","_onCustomCTAClick","value","FWLoggerUtil","log","FireworkSDKModule","setCustomCTAClickEnabled","onVideoPlayback","_onVideoPlayback","setVideoPlaybackEventEnabled","shareBaseURL","_shareBaseURL","updateInternalShareBaseURL","setShareBaseURL","adBadgeConfiguration","_adBadgeConfiguration","valueHasChanged","badgeTextType","backgroundColor","textColor","androidFontInfo","isCustom","typefaceName","eventEmitter","emit","FWEventName","AdBadgeConfigurationUpdated","setAdBadgeConfiguration","appLanguage","_appLanguage","debugLogsEnabled","enabled","videoLaunchBehavior","_videoLaunchBehavior","FireworkSDKModuleEventEmitter","shopping","_shopping","liveStream","_liveStream","navigator","_navigator","getInstance","_instance","constructor","VideoShopping","LiveStream","FWNavigator","addListener","SDKInit","event","error","onSDKInit","LogMessage","logNativeMessage","message","CustomCTAClick","url","VideoPlayback","eventName","VideoFeedClick","info","id","onVideoFeedClick","Platform","OS","NativeAppLanguageUpdated","language","updateInternalAppLanguage","init","options","videoLaunchBehaviorUpdated","VideoLaunchBehaviorUpdated","ShoppingModule","LiveStreamModule","FWGlobalState","resolveSdkInitCalled","openVideoPlayer","config","sdkInitCalled","sdkInitCalledPromise","trackPurchase","parameters","changeAppLanguage","result","languageChanged","stopFloatingPlayer","AppLanguageUpdated","shareBaseURLChanged","ShareBaseURLUpdated"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AAEA;;AAWA;;AAGA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAaA;AACA;AACA;AACA,MAAMA,WAAN,CAAkB;AAGhB;AACF;AACA;;AAGE;AACF;AACA;;AAGE;AACF;AACA;AAC6B,MAAhBC,gBAAgB,GAAuC;AAChE,WAAO,KAAKC,iBAAZ;AACD;;AAC0B,MAAhBD,gBAAgB,CAACE,KAAD,EAA4C;AACrEC,0BAAaC,GAAb,CAAkB,iCAAgC,CAAC,CAACF,KAAM,EAA1D;;AACA,SAAKD,iBAAL,GAAyBC,KAAzB;;AACAG,+BAAkBC,wBAAlB,CAA2CJ,KAAK,GAAG,IAAH,GAAU,KAA1D;AACD;;AAGD;AACF;AACA;AAC4B,MAAfK,eAAe,GAAsC;AAC9D,WAAO,KAAKC,gBAAZ;AACD;;AACyB,MAAfD,eAAe,CAACL,KAAD,EAA2C;AACnE,SAAKM,gBAAL,GAAwBN,KAAxB;;AACAG,+BAAkBI,4BAAlB,CAA+CP,KAAK,GAAG,IAAH,GAAU,KAA9D;AACD;;AAGD;AACF;AACA;AACA;AACyB,MAAZQ,YAAY,GAAuB;AAC5C,WAAO,KAAKC,aAAZ;AACD;;AACsB,MAAZD,YAAY,CAACR,KAAD,EAA4B;AACjD,SAAKU,0BAAL,CAAgCV,KAAhC;;AACAG,+BAAkBQ,eAAlB,CAAkCX,KAAlC,aAAkCA,KAAlC,cAAkCA,KAAlC,GAA2C,EAA3C;AACD;;AAGD;AACF;AACA;AACiC,MAApBY,oBAAoB,GAAqC;AAClE,WAAO,K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AgD;AAC9C,YAAMJ,uBAAcjC,WAAd,GAA4BsC,oBAAlC;AACD;;AACD,UAAMI,MAAM,GAAG,MAAM9E,2BAAkB6E,iBAAlB,CAAoChB,QAApC,CAArB;;AACA,QAAIiB,MAAJ,EAAY;AACV,YAAMC,eAAe,GAAG,KAAKvD,YAAL,KAAsBqC,QAA9C;;AACA,UAAIH,sBAASC,EAAT,KAAgB,KAAhB,IAAyBoB,eAA7B,EAA8C;AAC5C,cAAM,KAAK7C,SAAL,CAAe8C,kBAAf,EAAN;AACD;;AACD,WAAKlB,yBAAL,CAA+BD,QAA/B;AACD;;AACD,WAAOiB,MAAP;AACD;;AAEOhB,EAAAA,yBAAyB,CAACD,QAAD,EAA2B;AAC1D,UAAMlD,eAAe,GAAG,KAAKa,YAAL,KAAsBqC,QAA9C;AACA,SAAKrC,YAAL,GAAoBqC,QAApB;;AACA,QAAIlD,eAAJ,EAAqB;AACnB,WAAKO,YAAL,CAAkBC,IAAlB,CAAuBC,yBAAY6D,kBAAnC;AACD;AACF;;AAEO1E,EAAAA,0BAA0B,CAACF,YAAD,EAAwB;AACxD,UAAM6E,mBAAmB,GAAG,KAAK5E,aAAL,KAAuBD,YAAnD;AACA,SAAKC,aAAL,GAAqBD,YAArB;;AACA,QAAI6E,mBAAJ,EAAyB;AACvB,WAAKhE,YAAL,CAAkBC,IAAlB,CAAuBC,yBAAY+D,mBAAnC;AACD;AACF;;AArRe;;gBAAZzF,W;;eAwRSA,W","sourcesContent":["import { NativeEventEmitter, Platform } from 'react-native';\n\nimport FWNavigator from './FWNavigator';\nimport LiveStream from './LiveStream';\nimport type AdBadgeConfiguration from './models/AdBadgeConfiguration';\nimport { FWEventName } from './models/FWEventName';\nimport type {\n CustomCTAClickEvent,\n SDKInitEvent,\n VideoFeedClickEvent,\n VideoPlaybackEvent,\n} from './models/FWEvents';\nimport type SDKInitOptions from './models/SDKInitOptions';\nimport type { VideoLaunchBehavior } from './models/SDKInitOptions';\nimport type TrackPurchaseParameters from './models/TrackPurchaseParameters';\nimport type VideoPlayerConfiguration from './models/VideoPlayerConfiguration';\nimport FireworkSDKModule, {\n FireworkSDKModuleEventEmitter,\n} from './modules/FireworkSDKModule';\nimport LiveStreamModule from './modules/LiveStreamModule';\nimport ShoppingModule from './modules/ShoppingModule';\nimport FWLoggerUtil from './utils/FWLoggerUtil';\nimport VideoShopping from './VideoShopping';\nimport FWGlobalState from './utils/FWGlobalState';\n\nexport type SDKInitCallback = (event: SDKInitEvent) => Promise<void> | void;\nexport type CustomCTAClickCallback = (\n event: CustomCTAClickEvent\n) => Promise<void> | void;\nexport type VideoPlaybackCallback = (\n event: VideoPlaybackEvent\n) => Promise<void> | void;\nexport type VideoFeedClickCallback = (\n event: VideoFeedClickEvent\n) => Promise<void> | void;\n\n/**\n * Firework SDK.\n */\nclass FireworkSDK {\n private static _instance?: FireworkSDK;\n\n /**\n * The callback of SDK initialization.\n */\n public onSDKInit?: SDKInitCallback;\n\n /**\n * the callback of clicking Video Feed.\n */\n public onVideoFeedClick?: VideoFeedClickCallback;\n\n /**\n * The callback of clicking custom CTA.\n */\n public get onCustomCTAClick(): CustomCTAClickCallback | undefined {\n return this._onCustomCTAClick;\n }\n public set onCustomCTAClick(value: CustomCTAClickCallback | undefined) {\n FWLoggerUtil.log(`Set onCustomCTAClick callback ${!!value}`);\n this._onCustomCTAClick = value;\n FireworkSDKModule.setCustomCTAClickEnabled(value ? true : false);\n }\n private _onCustomCTAClick: CustomCTAClickCallback | undefined;\n\n /**\n * The callback of video playback.\n */\n public get onVideoPlayback(): VideoPlaybackCallback | undefined {\n return this._onVideoPlayback;\n }\n public set onVideoPlayback(value: VideoPlaybackCallback | undefined) {\n this._onVideoPlayback = value;\n FireworkSDKModule.setVideoPlaybackEventEnabled(value ? true : false);\n }\n private _onVideoPlayback?: VideoPlaybackCallback | undefined;\n\n /**\n * The global share base URL of the video.\n * The {@link VideoPlayerConfiguration.shareBaseURL} in {@link VideoPlayerConfiguration} will override this.\n */\n public get shareBaseURL(): string | undefined {\n return this._shareBaseURL;\n }\n public set shareBaseURL(value: string | undefined) {\n this.updateInternalShareBaseURL(value);\n FireworkSDKModule.setShareBaseURL(value ?? '');\n }\n private _shareBaseURL: string | undefined;\n\n /**\n * The configuration for ad badges.\n */\n public get adBadgeConfiguration(): AdBadgeConfiguration | undefined {\n return this._adBadgeConfiguration;\n }\n public set adBadgeConfiguration(value: AdBadgeConfiguration | undefined) {\n const valueHasChanged =\n this._adBadgeConfiguration?.badgeTextType !== value?.badgeTextType ||\n this._adBadgeConfiguration?.backgroundColor !== value?.backgroundColor ||\n this._adBadgeConfiguration?.textColor !== value?.textColor ||\n this._adBadgeConfiguration?.androidFontInfo?.isCustom !==\n value?.androidFontInfo?.isCustom ||\n this._adBadgeConfiguration?.androidFontInfo?.typefaceName !==\n value?.androidFontInfo?.typefaceName;\n this._adBadgeConfiguration = value;\n if (valueHasChanged) {\n this.eventEmitter.emit(FWEventName.AdBadgeConfigurationUpdated);\n }\n FireworkSDKModule.setAdBadgeConfiguration(value ?? {});\n }\n private _adBadgeConfiguration: AdBadgeConfiguration | undefined;\n\n public get appLanguage(): string | undefined | null {\n return this._appLanguage;\n }\n private _appLanguage: string | undefined | null;\n\n /**\n * Defaults to false.\n * You can enable debug logs by setting this property to true.\n */\n public get debugLogsEnabled(): boolean {\n return FWLoggerUtil.enabled;\n }\n public set debugLogsEnabled(value: boolean) {\n FWLoggerUtil.enabled = value;\n }\n\n /**\n * Get video launch behavior.\n */\n public get videoLaunchBehavior(): VideoLaunchBehavior | undefined {\n return this._videoLaunchBehavior;\n }\n private _videoLaunchBehavior: VideoLaunchBehavior | undefined;\n\n private get eventEmitter(): NativeEventEmitter {\n return FireworkSDKModuleEventEmitter;\n }\n\n /**\n * Get VideoShopping object.\n */\n public get shopping(): VideoShopping {\n return this._shopping;\n }\n private _shopping: VideoShopping = VideoShopping.getInstance();\n\n /**\n * Get LiveStream object.\n */\n public get liveStream(): LiveStream {\n return this._liveStream;\n }\n private _liveStream: LiveStream = LiveStream.getInstance();\n\n /**\n * Get FWNavigator object.\n */\n public get navigator(): FWNavigator {\n return this._navigator;\n }\n private _navigator: FWNavigator = FWNavigator.getInstance();\n\n /**\n * Get global single instance of FireworkSDK class.\n * @returns FireworkSDK\n */\n public static getInstance() {\n if (!FireworkSDK._instance) {\n FireworkSDK._instance = new FireworkSDK();\n }\n\n return FireworkSDK._instance!;\n }\n\n private constructor() {\n FWLoggerUtil.log('FireworkSDK constructor');\n\n this.eventEmitter.addListener(FWEventName.SDKInit, (event) => {\n FWLoggerUtil.log(`Receive SDKInit event ${event?.error}`);\n\n if (this.onSDKInit) {\n this.onSDKInit(event ?? {});\n }\n });\n\n this.eventEmitter.addListener(FWEventName.LogMessage, (event) => {\n FWLoggerUtil.logNativeMessage(event.message);\n });\n\n this.eventEmitter.addListener(FWEventName.CustomCTAClick, (event) => {\n FWLoggerUtil.log(`Receive CustomCTAClick url: ${event?.url}`);\n\n if (this.onCustomCTAClick) {\n this.onCustomCTAClick(event ?? {});\n }\n });\n\n this.eventEmitter.addListener(FWEventName.VideoPlayback, (event) => {\n FWLoggerUtil.log(\n `Receive VideoPlayback event eventName: ${event?.eventName}`\n );\n\n if (this.onVideoPlayback) {\n this.onVideoPlayback(event ?? {});\n }\n });\n\n this.eventEmitter.addListener(FWEventName.VideoFeedClick, (event) => {\n FWLoggerUtil.log(`Receive VideoFeedClick event id: ${event?.info.id}`);\n\n if (this.onVideoFeedClick) {\n this.onVideoFeedClick(event ?? {});\n }\n });\n\n if (Platform.OS === 'ios') {\n this.eventEmitter.addListener(\n FWEventName.NativeAppLanguageUpdated,\n (event) => {\n FWLoggerUtil.log(\n `Receive NativeAppLanguageUpdated event appLanguage: ${event.appLanguage}`\n );\n const language = event.appLanguage;\n this.updateInternalAppLanguage(language);\n }\n );\n }\n }\n\n /**\n * Initializes Firework SDK.\n * @param {SDKInitOptions?} options\n */\n public async init(options?: SDKInitOptions): Promise<void> {\n FWLoggerUtil.log('Call FireworkSDK init method');\n const videoLaunchBehaviorUpdated =\n this._videoLaunchBehavior !== options?.videoLaunchBehavior;\n this._videoLaunchBehavior = options?.videoLaunchBehavior;\n if (videoLaunchBehaviorUpdated) {\n this.eventEmitter.emit(FWEventName.VideoLaunchBehaviorUpdated);\n }\n await FireworkSDKModule.init(options);\n await ShoppingModule.init();\n await LiveStreamModule.init();\n\n FWGlobalState.getInstance().resolveSdkInitCalled();\n }\n\n /**\n * Open Video URL.\n * @param {string} url\n * @param {VideoPlayerConfiguration} config\n */\n public async openVideoPlayer(\n url: string,\n config?: VideoPlayerConfiguration\n ): Promise<void> {\n if (!FWGlobalState.getInstance().sdkInitCalled) {\n await FWGlobalState.getInstance().sdkInitCalledPromise;\n }\n FireworkSDKModule.openVideoPlayer(url, config ?? {});\n }\n\n /**\n * Records the user purchase. Only supported on iOS.\n * @param {TrackPurchaseParameters} parameters\n */\n public async trackPurchase(\n parameters: TrackPurchaseParameters\n ): Promise<void> {\n if (Platform.OS === 'ios') {\n if (!FWGlobalState.getInstance().sdkInitCalled) {\n await FWGlobalState.getInstance().sdkInitCalledPromise;\n }\n FireworkSDKModule.trackPurchase(parameters);\n }\n }\n\n /**\n * Change App level language.\n * @param {string | undefined | null} language Such as en, ar and en-US\n * If language is null or undefined or empty string, SDK will use system language.\n * @returns {Promise<boolean>} The result of changing app language.\n */\n public async changeAppLanguage(language?: string | null): Promise<boolean> {\n if (!FWGlobalState.getInstance().sdkInitCalled) {\n await FWGlobalState.getInstance().sdkInitCalledPromise;\n }\n const result = await FireworkSDKModule.changeAppLanguage(language);\n if (result) {\n const languageChanged = this._appLanguage !== language;\n if (Platform.OS === 'ios' && languageChanged) {\n await this.navigator.stopFloatingPlayer();\n }\n this.updateInternalAppLanguage(language);\n }\n return result;\n }\n\n private updateInternalAppLanguage(language?: string | null) {\n const valueHasChanged = this._appLanguage !== language;\n this._appLanguage = language;\n if (valueHasChanged) {\n this.eventEmitter.emit(FWEventName.AppLanguageUpdated);\n }\n }\n\n private updateInternalShareBaseURL(shareBaseURL?: string) {\n const shareBaseURLChanged = this._shareBaseURL !== shareBaseURL;\n this._shareBaseURL = shareBaseURL;\n if (shareBaseURLChanged) {\n this.eventEmitter.emit(FWEventName.ShareBaseURLUpdated);\n }\n }\n}\n\nexport default FireworkSDK;\n"]}
|
|
1
|
+
{"version":3,"sources":["FireworkSDK.ts"],"names":["FireworkSDK","onCustomCTAClick","_onCustomCTAClick","value","FWLoggerUtil","log","FireworkSDKModule","setCustomCTAClickEnabled","onVideoPlayback","_onVideoPlayback","setVideoPlaybackEventEnabled","shareBaseURL","_shareBaseURL","updateInternalShareBaseURL","setShareBaseURL","adBadgeConfiguration","_adBadgeConfiguration","valueHasChanged","badgeTextType","backgroundColor","textColor","androidFontInfo","isCustom","typefaceName","eventEmitter","emit","FWEventName","AdBadgeConfigurationUpdated","setAdBadgeConfiguration","appLanguage","_appLanguage","debugLogsEnabled","enabled","videoLaunchBehavior","_videoLaunchBehavior","FireworkSDKModuleEventEmitter","shopping","_shopping","liveStream","_liveStream","navigator","_navigator","getInstance","_instance","constructor","VideoShopping","LiveStream","FWNavigator","addListener","SDKInit","event","error","onSDKInit","LogMessage","logNativeMessage","message","CustomCTAClick","url","VideoPlayback","eventName","VideoFeedClick","info","id","onVideoFeedClick","Platform","OS","NativeAppLanguageUpdated","language","updateInternalAppLanguage","init","options","videoLaunchBehaviorUpdated","VideoLaunchBehaviorUpdated","ShoppingModule","LiveStreamModule","FWGlobalState","resolveSdkInitCalled","openVideoPlayer","config","sdkInitCalled","sdkInitCalledPromise","trackPurchase","parameters","changeAppLanguage","result","languageChanged","stopFloatingPlayer","AppLanguageUpdated","shareBaseURLChanged","ShareBaseURLUpdated"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AAEA;;AAUA;;AAGA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAcA;AACA;AACA;AACA,MAAMA,WAAN,CAAkB;AAGhB;AACF;AACA;;AAGE;AACF;AACA;;AAGE;AACF;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,yBAAyB,CAACD,QAAD,EAA2B;AAC1D,UAAMlD,eAAe,GAAG,KAAKa,YAAL,KAAsBqC,QAA9C;AACA,SAAKrC,YAAL,GAAoBqC,QAApB;;AACA,QAAIlD,eAAJ,EAAqB;AACnB,WAAKO,YAAL,CAAkBC,IAAlB,CAAuBC,yBAAY6D,kBAAnC;AACD;AACF;;AAEO1E,EAAAA,0BAA0B,CAACF,YAAD,EAAwB;AACxD,UAAM6E,mBAAmB,GAAG,KAAK5E,aAAL,KAAuBD,YAAnD;AACA,SAAKC,aAAL,GAAqBD,YAArB;;AACA,QAAI6E,mBAAJ,EAAyB;AACvB,WAAKhE,YAAL,CAAkBC,IAAlB,CAAuBC,yBAAY+D,mBAAnC;AACD;AACF;;AArRe;;gBAAZzF,W;;eAwRSA,W","sourcesContent":["import { NativeEventEmitter, Platform } from 'react-native';\n\nimport FWNavigator from './FWNavigator';\nimport LiveStream from './LiveStream';\nimport type AdBadgeConfiguration from './models/AdBadgeConfiguration';\nimport { FWEventName } from './models/FWEventName';\nimport type {\n CustomCTAClickEvent,\n SDKInitEvent,\n VideoFeedClickEvent,\n VideoPlaybackEvent,\n} from './models/FWEvents';\nimport type SDKInitOptions from './models/SDKInitOptions';\nimport type { VideoLaunchBehavior } from './models/SDKInitOptions';\nimport type TrackPurchaseParameters from './models/TrackPurchaseParameters';\nimport FireworkSDKModule, {\n FireworkSDKModuleEventEmitter,\n} from './modules/FireworkSDKModule';\nimport LiveStreamModule from './modules/LiveStreamModule';\nimport ShoppingModule from './modules/ShoppingModule';\nimport FWLoggerUtil from './utils/FWLoggerUtil';\nimport VideoShopping from './VideoShopping';\nimport FWGlobalState from './utils/FWGlobalState';\nimport type OpenVideoPlayerConfiguration from './models/OpenVideoPlayerConfiguration';\n\nexport type SDKInitCallback = (event: SDKInitEvent) => Promise<void> | void;\nexport type CustomCTAClickCallback = (\n event: CustomCTAClickEvent\n) => Promise<void> | void;\nexport type VideoPlaybackCallback = (\n event: VideoPlaybackEvent\n) => Promise<void> | void;\nexport type VideoFeedClickCallback = (\n event: VideoFeedClickEvent\n) => Promise<void> | void;\n\n/**\n * Firework SDK.\n */\nclass FireworkSDK {\n private static _instance?: FireworkSDK;\n\n /**\n * The callback of SDK initialization.\n */\n public onSDKInit?: SDKInitCallback;\n\n /**\n * the callback of clicking Video Feed.\n */\n public onVideoFeedClick?: VideoFeedClickCallback;\n\n /**\n * The callback of clicking custom CTA.\n */\n public get onCustomCTAClick(): CustomCTAClickCallback | undefined {\n return this._onCustomCTAClick;\n }\n public set onCustomCTAClick(value: CustomCTAClickCallback | undefined) {\n FWLoggerUtil.log(`Set onCustomCTAClick callback ${!!value}`);\n this._onCustomCTAClick = value;\n FireworkSDKModule.setCustomCTAClickEnabled(value ? true : false);\n }\n private _onCustomCTAClick: CustomCTAClickCallback | undefined;\n\n /**\n * The callback of video playback.\n */\n public get onVideoPlayback(): VideoPlaybackCallback | undefined {\n return this._onVideoPlayback;\n }\n public set onVideoPlayback(value: VideoPlaybackCallback | undefined) {\n this._onVideoPlayback = value;\n FireworkSDKModule.setVideoPlaybackEventEnabled(value ? true : false);\n }\n private _onVideoPlayback?: VideoPlaybackCallback | undefined;\n\n /**\n * The global share base URL of the video.\n * The {@link VideoPlayerConfiguration.shareBaseURL} in {@link VideoPlayerConfiguration} will override this.\n */\n public get shareBaseURL(): string | undefined {\n return this._shareBaseURL;\n }\n public set shareBaseURL(value: string | undefined) {\n this.updateInternalShareBaseURL(value);\n FireworkSDKModule.setShareBaseURL(value ?? '');\n }\n private _shareBaseURL: string | undefined;\n\n /**\n * The configuration for ad badges.\n */\n public get adBadgeConfiguration(): AdBadgeConfiguration | undefined {\n return this._adBadgeConfiguration;\n }\n public set adBadgeConfiguration(value: AdBadgeConfiguration | undefined) {\n const valueHasChanged =\n this._adBadgeConfiguration?.badgeTextType !== value?.badgeTextType ||\n this._adBadgeConfiguration?.backgroundColor !== value?.backgroundColor ||\n this._adBadgeConfiguration?.textColor !== value?.textColor ||\n this._adBadgeConfiguration?.androidFontInfo?.isCustom !==\n value?.androidFontInfo?.isCustom ||\n this._adBadgeConfiguration?.androidFontInfo?.typefaceName !==\n value?.androidFontInfo?.typefaceName;\n this._adBadgeConfiguration = value;\n if (valueHasChanged) {\n this.eventEmitter.emit(FWEventName.AdBadgeConfigurationUpdated);\n }\n FireworkSDKModule.setAdBadgeConfiguration(value ?? {});\n }\n private _adBadgeConfiguration: AdBadgeConfiguration | undefined;\n\n public get appLanguage(): string | undefined | null {\n return this._appLanguage;\n }\n private _appLanguage: string | undefined | null;\n\n /**\n * Defaults to false.\n * You can enable debug logs by setting this property to true.\n */\n public get debugLogsEnabled(): boolean {\n return FWLoggerUtil.enabled;\n }\n public set debugLogsEnabled(value: boolean) {\n FWLoggerUtil.enabled = value;\n }\n\n /**\n * Get video launch behavior.\n */\n public get videoLaunchBehavior(): VideoLaunchBehavior | undefined {\n return this._videoLaunchBehavior;\n }\n private _videoLaunchBehavior: VideoLaunchBehavior | undefined;\n\n private get eventEmitter(): NativeEventEmitter {\n return FireworkSDKModuleEventEmitter;\n }\n\n /**\n * Get VideoShopping object.\n */\n public get shopping(): VideoShopping {\n return this._shopping;\n }\n private _shopping: VideoShopping = VideoShopping.getInstance();\n\n /**\n * Get LiveStream object.\n */\n public get liveStream(): LiveStream {\n return this._liveStream;\n }\n private _liveStream: LiveStream = LiveStream.getInstance();\n\n /**\n * Get FWNavigator object.\n */\n public get navigator(): FWNavigator {\n return this._navigator;\n }\n private _navigator: FWNavigator = FWNavigator.getInstance();\n\n /**\n * Get global single instance of FireworkSDK class.\n * @returns FireworkSDK\n */\n public static getInstance() {\n if (!FireworkSDK._instance) {\n FireworkSDK._instance = new FireworkSDK();\n }\n\n return FireworkSDK._instance!;\n }\n\n private constructor() {\n FWLoggerUtil.log('FireworkSDK constructor');\n\n this.eventEmitter.addListener(FWEventName.SDKInit, (event) => {\n FWLoggerUtil.log(`Receive SDKInit event ${event?.error}`);\n\n if (this.onSDKInit) {\n this.onSDKInit(event ?? {});\n }\n });\n\n this.eventEmitter.addListener(FWEventName.LogMessage, (event) => {\n FWLoggerUtil.logNativeMessage(event.message);\n });\n\n this.eventEmitter.addListener(FWEventName.CustomCTAClick, (event) => {\n FWLoggerUtil.log(`Receive CustomCTAClick url: ${event?.url}`);\n\n if (this.onCustomCTAClick) {\n this.onCustomCTAClick(event ?? {});\n }\n });\n\n this.eventEmitter.addListener(FWEventName.VideoPlayback, (event) => {\n FWLoggerUtil.log(\n `Receive VideoPlayback event eventName: ${event?.eventName}`\n );\n\n if (this.onVideoPlayback) {\n this.onVideoPlayback(event ?? {});\n }\n });\n\n this.eventEmitter.addListener(FWEventName.VideoFeedClick, (event) => {\n FWLoggerUtil.log(`Receive VideoFeedClick event id: ${event?.info.id}`);\n\n if (this.onVideoFeedClick) {\n this.onVideoFeedClick(event ?? {});\n }\n });\n\n if (Platform.OS === 'ios') {\n this.eventEmitter.addListener(\n FWEventName.NativeAppLanguageUpdated,\n (event) => {\n FWLoggerUtil.log(\n `Receive NativeAppLanguageUpdated event appLanguage: ${event.appLanguage}`\n );\n const language = event.appLanguage;\n this.updateInternalAppLanguage(language);\n }\n );\n }\n }\n\n /**\n * Initializes Firework SDK.\n * @param {SDKInitOptions?} options\n */\n public async init(options?: SDKInitOptions): Promise<void> {\n FWLoggerUtil.log('Call FireworkSDK init method');\n const videoLaunchBehaviorUpdated =\n this._videoLaunchBehavior !== options?.videoLaunchBehavior;\n this._videoLaunchBehavior = options?.videoLaunchBehavior;\n if (videoLaunchBehaviorUpdated) {\n this.eventEmitter.emit(FWEventName.VideoLaunchBehaviorUpdated);\n }\n await FireworkSDKModule.init(options);\n await ShoppingModule.init();\n await LiveStreamModule.init();\n\n FWGlobalState.getInstance().resolveSdkInitCalled();\n }\n\n /**\n * Open Video URL.\n * @param {string} url\n * @param {VideoPlayerConfiguration} config\n */\n public async openVideoPlayer(\n url: string,\n config?: OpenVideoPlayerConfiguration\n ): Promise<void> {\n if (!FWGlobalState.getInstance().sdkInitCalled) {\n await FWGlobalState.getInstance().sdkInitCalledPromise;\n }\n FireworkSDKModule.openVideoPlayer(url, config ?? {});\n }\n\n /**\n * Records the user purchase. Only supported on iOS.\n * @param {TrackPurchaseParameters} parameters\n */\n public async trackPurchase(\n parameters: TrackPurchaseParameters\n ): Promise<void> {\n if (Platform.OS === 'ios') {\n if (!FWGlobalState.getInstance().sdkInitCalled) {\n await FWGlobalState.getInstance().sdkInitCalledPromise;\n }\n FireworkSDKModule.trackPurchase(parameters);\n }\n }\n\n /**\n * Change App level language.\n * @param {string | undefined | null} language Such as en, ar and en-US\n * If language is null or undefined or empty string, SDK will use system language.\n * @returns {Promise<boolean>} The result of changing app language.\n */\n public async changeAppLanguage(language?: string | null): Promise<boolean> {\n if (!FWGlobalState.getInstance().sdkInitCalled) {\n await FWGlobalState.getInstance().sdkInitCalledPromise;\n }\n const result = await FireworkSDKModule.changeAppLanguage(language);\n if (result) {\n const languageChanged = this._appLanguage !== language;\n if (Platform.OS === 'ios' && languageChanged) {\n await this.navigator.stopFloatingPlayer();\n }\n this.updateInternalAppLanguage(language);\n }\n return result;\n }\n\n private updateInternalAppLanguage(language?: string | null) {\n const valueHasChanged = this._appLanguage !== language;\n this._appLanguage = language;\n if (valueHasChanged) {\n this.eventEmitter.emit(FWEventName.AppLanguageUpdated);\n }\n }\n\n private updateInternalShareBaseURL(shareBaseURL?: string) {\n const shareBaseURLChanged = this._shareBaseURL !== shareBaseURL;\n this._shareBaseURL = shareBaseURL;\n if (shareBaseURLChanged) {\n this.eventEmitter.emit(FWEventName.ShareBaseURLUpdated);\n }\n }\n}\n\nexport default FireworkSDK;\n"]}
|
|
@@ -102,12 +102,10 @@ const StoryBlock = (props, forwardedRef) => {
|
|
|
102
102
|
};
|
|
103
103
|
|
|
104
104
|
const generateVastAttributesString = () => {
|
|
105
|
-
var _adConfiguration$vast;
|
|
106
|
-
|
|
107
105
|
const {
|
|
108
106
|
adConfiguration
|
|
109
107
|
} = props;
|
|
110
|
-
const vastAttributes =
|
|
108
|
+
const vastAttributes = adConfiguration === null || adConfiguration === void 0 ? void 0 : adConfiguration.vastAttributes;
|
|
111
109
|
|
|
112
110
|
if (!vastAttributes) {
|
|
113
111
|
return '';
|
|
@@ -128,40 +126,67 @@ const StoryBlock = (props, forwardedRef) => {
|
|
|
128
126
|
return resultString;
|
|
129
127
|
};
|
|
130
128
|
|
|
129
|
+
const getStoryBlockConfiguration = () => {
|
|
130
|
+
const {
|
|
131
|
+
storyBlockConfiguration,
|
|
132
|
+
enablePictureInPicture
|
|
133
|
+
} = props;
|
|
134
|
+
let resultStoryBlockConfiguration = storyBlockConfiguration;
|
|
135
|
+
|
|
136
|
+
if (typeof enablePictureInPicture === 'boolean') {
|
|
137
|
+
if (!resultStoryBlockConfiguration) {
|
|
138
|
+
resultStoryBlockConfiguration = {};
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
resultStoryBlockConfiguration = { ...resultStoryBlockConfiguration,
|
|
142
|
+
enablePictureInPicture
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return resultStoryBlockConfiguration;
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
const storyBlockConfiguration = getStoryBlockConfiguration();
|
|
150
|
+
|
|
131
151
|
const generateKey = () => {
|
|
132
|
-
var
|
|
133
|
-
|
|
134
|
-
const gShareBaseURL =
|
|
135
|
-
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
const
|
|
152
|
+
var _adBadgeConfiguration, _adBadgeConfiguration2, _storyBlockConfigurat, _storyBlockConfigurat2, _storyBlockConfigurat3, _storyBlockConfigurat4, _storyBlockConfigurat5, _storyBlockConfigurat6;
|
|
153
|
+
|
|
154
|
+
const gShareBaseURL = _FireworkSDK.default.getInstance().shareBaseURL;
|
|
155
|
+
|
|
156
|
+
const appLanguage = _FireworkSDK.default.getInstance().appLanguage;
|
|
157
|
+
|
|
158
|
+
const videoLaunchBehavior = _FireworkSDK.default.getInstance().videoLaunchBehavior;
|
|
159
|
+
|
|
160
|
+
const adBadgeConfiguration = _FireworkSDK.default.getInstance().adBadgeConfiguration;
|
|
161
|
+
|
|
162
|
+
const adBadgeTextType = adBadgeConfiguration === null || adBadgeConfiguration === void 0 ? void 0 : adBadgeConfiguration.badgeTextType;
|
|
163
|
+
const backgroundColorOfAdBadge = adBadgeConfiguration === null || adBadgeConfiguration === void 0 ? void 0 : adBadgeConfiguration.backgroundColor;
|
|
164
|
+
const textColorOfAdBadge = adBadgeConfiguration === null || adBadgeConfiguration === void 0 ? void 0 : adBadgeConfiguration.textColor;
|
|
165
|
+
const androidFontIsCustomOfAdBadge = adBadgeConfiguration === null || adBadgeConfiguration === void 0 ? void 0 : (_adBadgeConfiguration = adBadgeConfiguration.androidFontInfo) === null || _adBadgeConfiguration === void 0 ? void 0 : _adBadgeConfiguration.isCustom;
|
|
166
|
+
const androidFontTypefaceNameOfAdBadge = adBadgeConfiguration === null || adBadgeConfiguration === void 0 ? void 0 : (_adBadgeConfiguration2 = adBadgeConfiguration.androidFontInfo) === null || _adBadgeConfiguration2 === void 0 ? void 0 : _adBadgeConfiguration2.typefaceName;
|
|
143
167
|
const {
|
|
144
168
|
source,
|
|
145
|
-
channel
|
|
146
|
-
playlist
|
|
147
|
-
hashtagFilterExpression
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
169
|
+
channel,
|
|
170
|
+
playlist,
|
|
171
|
+
hashtagFilterExpression,
|
|
172
|
+
productIds,
|
|
173
|
+
enablePictureInPicture,
|
|
174
|
+
cornerRadius,
|
|
175
|
+
adConfiguration
|
|
151
176
|
} = props;
|
|
152
177
|
const dynamicContentParametersString = generateDynamicContentParametersString();
|
|
153
|
-
const videoCompleteAction =
|
|
154
|
-
const showShareButton =
|
|
155
|
-
const showPlaybackButton =
|
|
156
|
-
const showBranding =
|
|
157
|
-
const ctaDelayType =
|
|
158
|
-
const ctaDelayValue =
|
|
159
|
-
const ctaHighlightDelayType =
|
|
160
|
-
const ctaHighlightDelayValue =
|
|
161
|
-
const shareBaseURL =
|
|
162
|
-
const ctaWidth =
|
|
163
|
-
const requiresAds =
|
|
164
|
-
const adsFetchTimeout =
|
|
178
|
+
const videoCompleteAction = storyBlockConfiguration === null || storyBlockConfiguration === void 0 ? void 0 : storyBlockConfiguration.videoCompleteAction;
|
|
179
|
+
const showShareButton = storyBlockConfiguration === null || storyBlockConfiguration === void 0 ? void 0 : storyBlockConfiguration.showShareButton;
|
|
180
|
+
const showPlaybackButton = storyBlockConfiguration === null || storyBlockConfiguration === void 0 ? void 0 : storyBlockConfiguration.showPlaybackButton;
|
|
181
|
+
const showBranding = storyBlockConfiguration === null || storyBlockConfiguration === void 0 ? void 0 : storyBlockConfiguration.showBranding;
|
|
182
|
+
const ctaDelayType = storyBlockConfiguration === null || storyBlockConfiguration === void 0 ? void 0 : (_storyBlockConfigurat = storyBlockConfiguration.ctaDelay) === null || _storyBlockConfigurat === void 0 ? void 0 : _storyBlockConfigurat.type;
|
|
183
|
+
const ctaDelayValue = storyBlockConfiguration === null || storyBlockConfiguration === void 0 ? void 0 : (_storyBlockConfigurat2 = storyBlockConfiguration.ctaDelay) === null || _storyBlockConfigurat2 === void 0 ? void 0 : (_storyBlockConfigurat3 = _storyBlockConfigurat2.value) === null || _storyBlockConfigurat3 === void 0 ? void 0 : _storyBlockConfigurat3.toFixed(5);
|
|
184
|
+
const ctaHighlightDelayType = storyBlockConfiguration === null || storyBlockConfiguration === void 0 ? void 0 : (_storyBlockConfigurat4 = storyBlockConfiguration.ctaHighlightDelay) === null || _storyBlockConfigurat4 === void 0 ? void 0 : _storyBlockConfigurat4.type;
|
|
185
|
+
const ctaHighlightDelayValue = storyBlockConfiguration === null || storyBlockConfiguration === void 0 ? void 0 : (_storyBlockConfigurat5 = storyBlockConfiguration.ctaHighlightDelay) === null || _storyBlockConfigurat5 === void 0 ? void 0 : (_storyBlockConfigurat6 = _storyBlockConfigurat5.value) === null || _storyBlockConfigurat6 === void 0 ? void 0 : _storyBlockConfigurat6.toFixed(5);
|
|
186
|
+
const shareBaseURL = storyBlockConfiguration === null || storyBlockConfiguration === void 0 ? void 0 : storyBlockConfiguration.shareBaseURL;
|
|
187
|
+
const ctaWidth = storyBlockConfiguration === null || storyBlockConfiguration === void 0 ? void 0 : storyBlockConfiguration.ctaWidth;
|
|
188
|
+
const requiresAds = adConfiguration === null || adConfiguration === void 0 ? void 0 : adConfiguration.requiresAds;
|
|
189
|
+
const adsFetchTimeout = adConfiguration === null || adConfiguration === void 0 ? void 0 : adConfiguration.adsFetchTimeout;
|
|
165
190
|
const vastAttributesString = generateVastAttributesString();
|
|
166
191
|
let key = `gShareBaseURL:${gShareBaseURL}`;
|
|
167
192
|
|
|
@@ -184,7 +209,9 @@ const StoryBlock = (props, forwardedRef) => {
|
|
|
184
209
|
key += `_playlist:${playlist}`;
|
|
185
210
|
key += `_dynamicContentParameters:${dynamicContentParametersString}`;
|
|
186
211
|
key += `_hashtagFilterExpression:${hashtagFilterExpression}`;
|
|
212
|
+
key += `productIds:${productIds === null || productIds === void 0 ? void 0 : productIds.join(',')}`;
|
|
187
213
|
key += `_enablePictureInPicture:${enablePictureInPicture}`;
|
|
214
|
+
key += `_cornerRadius:${cornerRadius}`;
|
|
188
215
|
key += `_shareBaseURL:${shareBaseURL}`;
|
|
189
216
|
|
|
190
217
|
if (_reactNative.Platform.OS === 'android') {
|
|
@@ -304,10 +331,21 @@ const StoryBlock = (props, forwardedRef) => {
|
|
|
304
331
|
return null;
|
|
305
332
|
}
|
|
306
333
|
|
|
334
|
+
const {
|
|
335
|
+
style,
|
|
336
|
+
cornerRadius,
|
|
337
|
+
...otherProps
|
|
338
|
+
} = props;
|
|
307
339
|
return /*#__PURE__*/_react.default.createElement(_FWStoryBlock.default, _extends({
|
|
308
340
|
ref: nativeComponentRef,
|
|
309
341
|
key: key
|
|
310
|
-
},
|
|
342
|
+
}, otherProps, {
|
|
343
|
+
cornerRadius: cornerRadius,
|
|
344
|
+
style: Object.assign({
|
|
345
|
+
borderRadius: cornerRadius
|
|
346
|
+
}, style),
|
|
347
|
+
storyBlockConfiguration: storyBlockConfiguration,
|
|
348
|
+
enablePictureInPicture: undefined,
|
|
311
349
|
onStoryBlockLoadFinished: handleStoryBlockLoadFinished,
|
|
312
350
|
onStoryBlockFullScreenStateChanged: handleStoryBlockFullScreenStateChanged
|
|
313
351
|
}));
|