react-native-firework-sdk 2.2.5 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/FireworkVideoUI.xcframework/Info.plist +5 -5
- 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/FireworkVideoUI/Podfile +1 -1
- package/ios/FireworkVideoUI/Podfile.lock +4 -4
- 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 +55 -15
- 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 +54 -15
- 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 +66 -9
- 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
|
@@ -6,30 +6,30 @@
|
|
|
6
6
|
<array>
|
|
7
7
|
<dict>
|
|
8
8
|
<key>LibraryIdentifier</key>
|
|
9
|
-
<string>ios-
|
|
9
|
+
<string>ios-arm64</string>
|
|
10
10
|
<key>LibraryPath</key>
|
|
11
11
|
<string>FireworkVideoUI.framework</string>
|
|
12
12
|
<key>SupportedArchitectures</key>
|
|
13
13
|
<array>
|
|
14
14
|
<string>arm64</string>
|
|
15
|
-
<string>x86_64</string>
|
|
16
15
|
</array>
|
|
17
16
|
<key>SupportedPlatform</key>
|
|
18
17
|
<string>ios</string>
|
|
19
|
-
<key>SupportedPlatformVariant</key>
|
|
20
|
-
<string>simulator</string>
|
|
21
18
|
</dict>
|
|
22
19
|
<dict>
|
|
23
20
|
<key>LibraryIdentifier</key>
|
|
24
|
-
<string>ios-
|
|
21
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
25
22
|
<key>LibraryPath</key>
|
|
26
23
|
<string>FireworkVideoUI.framework</string>
|
|
27
24
|
<key>SupportedArchitectures</key>
|
|
28
25
|
<array>
|
|
29
26
|
<string>arm64</string>
|
|
27
|
+
<string>x86_64</string>
|
|
30
28
|
</array>
|
|
31
29
|
<key>SupportedPlatform</key>
|
|
32
30
|
<string>ios</string>
|
|
31
|
+
<key>SupportedPlatformVariant</key>
|
|
32
|
+
<string>simulator</string>
|
|
33
33
|
</dict>
|
|
34
34
|
</array>
|
|
35
35
|
<key>CFBundlePackageType</key>
|
|
Binary file
|
|
Binary file
|
|
@@ -1008,13 +1008,6 @@
|
|
|
1008
1008
|
"json_format_version": 8
|
|
1009
1009
|
},
|
|
1010
1010
|
"ConstValues": [
|
|
1011
|
-
{
|
|
1012
|
-
"filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/Extensions\/Foundation\/URLSession+AppLanguage.swift",
|
|
1013
|
-
"kind": "Array",
|
|
1014
|
-
"offset": 141,
|
|
1015
|
-
"length": 47,
|
|
1016
|
-
"value": "[\"api.firework.tv\", \"p2.fwpixel.com\"]"
|
|
1017
|
-
},
|
|
1018
1011
|
{
|
|
1019
1012
|
"filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/LayoutFlip\/LayoutFlipManager.swift",
|
|
1020
1013
|
"kind": "BooleanLiteral",
|
|
@@ -1075,8 +1068,8 @@
|
|
|
1075
1068
|
"filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/Extensions\/UIKit\/UIImageView+AppLanguage.swift",
|
|
1076
1069
|
"kind": "Array",
|
|
1077
1070
|
"offset": 172,
|
|
1078
|
-
"length":
|
|
1079
|
-
"value": "[\"shopping-cart\", \"left-arrow\", \"right-arrow\", \"speaker-unmute\", \"speaker-mute\"]"
|
|
1071
|
+
"length": 145,
|
|
1072
|
+
"value": "[\"shopping-cart\", \"left-arrow\", \"right-arrow\", \"speaker-unmute\", \"speaker-mute\", \"mute\", \"mute-off\", \"mute-on\"]"
|
|
1080
1073
|
},
|
|
1081
1074
|
{
|
|
1082
1075
|
"filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/Extensions\/UIKit\/UITextField+AppLanguage.swift",
|
|
Binary file
|
package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Info.plist
CHANGED
|
Binary file
|
|
@@ -1008,13 +1008,6 @@
|
|
|
1008
1008
|
"json_format_version": 8
|
|
1009
1009
|
},
|
|
1010
1010
|
"ConstValues": [
|
|
1011
|
-
{
|
|
1012
|
-
"filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/Extensions\/Foundation\/URLSession+AppLanguage.swift",
|
|
1013
|
-
"kind": "Array",
|
|
1014
|
-
"offset": 141,
|
|
1015
|
-
"length": 47,
|
|
1016
|
-
"value": "[\"api.firework.tv\", \"p2.fwpixel.com\"]"
|
|
1017
|
-
},
|
|
1018
1011
|
{
|
|
1019
1012
|
"filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/LayoutFlip\/LayoutFlipManager.swift",
|
|
1020
1013
|
"kind": "BooleanLiteral",
|
|
@@ -1075,8 +1068,8 @@
|
|
|
1075
1068
|
"filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/Extensions\/UIKit\/UIImageView+AppLanguage.swift",
|
|
1076
1069
|
"kind": "Array",
|
|
1077
1070
|
"offset": 172,
|
|
1078
|
-
"length":
|
|
1079
|
-
"value": "[\"shopping-cart\", \"left-arrow\", \"right-arrow\", \"speaker-unmute\", \"speaker-mute\"]"
|
|
1071
|
+
"length": 145,
|
|
1072
|
+
"value": "[\"shopping-cart\", \"left-arrow\", \"right-arrow\", \"speaker-unmute\", \"speaker-mute\", \"mute\", \"mute-off\", \"mute-on\"]"
|
|
1080
1073
|
},
|
|
1081
1074
|
{
|
|
1082
1075
|
"filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/Extensions\/UIKit\/UITextField+AppLanguage.swift",
|
|
@@ -1008,13 +1008,6 @@
|
|
|
1008
1008
|
"json_format_version": 8
|
|
1009
1009
|
},
|
|
1010
1010
|
"ConstValues": [
|
|
1011
|
-
{
|
|
1012
|
-
"filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/Extensions\/Foundation\/URLSession+AppLanguage.swift",
|
|
1013
|
-
"kind": "Array",
|
|
1014
|
-
"offset": 141,
|
|
1015
|
-
"length": 47,
|
|
1016
|
-
"value": "[\"api.firework.tv\", \"p2.fwpixel.com\"]"
|
|
1017
|
-
},
|
|
1018
1011
|
{
|
|
1019
1012
|
"filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/LayoutFlip\/LayoutFlipManager.swift",
|
|
1020
1013
|
"kind": "BooleanLiteral",
|
|
@@ -1075,8 +1068,8 @@
|
|
|
1075
1068
|
"filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/Extensions\/UIKit\/UIImageView+AppLanguage.swift",
|
|
1076
1069
|
"kind": "Array",
|
|
1077
1070
|
"offset": 172,
|
|
1078
|
-
"length":
|
|
1079
|
-
"value": "[\"shopping-cart\", \"left-arrow\", \"right-arrow\", \"speaker-unmute\", \"speaker-mute\"]"
|
|
1071
|
+
"length": 145,
|
|
1072
|
+
"value": "[\"shopping-cart\", \"left-arrow\", \"right-arrow\", \"speaker-unmute\", \"speaker-mute\", \"mute\", \"mute-off\", \"mute-on\"]"
|
|
1080
1073
|
},
|
|
1081
1074
|
{
|
|
1082
1075
|
"filePath": "\/Users\/runner\/work\/bogano\/bogano\/ios\/FireworkVideoUI\/FireworkVideoUI\/Sources\/AppLanguage\/Extensions\/UIKit\/UITextField+AppLanguage.swift",
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
</data>
|
|
15
15
|
<key>Info.plist</key>
|
|
16
16
|
<data>
|
|
17
|
-
|
|
17
|
+
bJBEvOE+WJbSoSkR6Xh6+u4bfOs=
|
|
18
18
|
</data>
|
|
19
19
|
<key>Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
20
20
|
<data>
|
|
21
|
-
|
|
21
|
+
lQx5YtEpXss7I8lfCQehqabnXgo=
|
|
22
22
|
</data>
|
|
23
23
|
<key>Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
24
24
|
<data>
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
</data>
|
|
35
35
|
<key>Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
36
36
|
<data>
|
|
37
|
-
|
|
37
|
+
qRfrL9mXazL6J5BnSlWDYMeoUac=
|
|
38
38
|
</data>
|
|
39
39
|
<key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
40
40
|
<data>
|
|
41
|
-
|
|
41
|
+
lQx5YtEpXss7I8lfCQehqabnXgo=
|
|
42
42
|
</data>
|
|
43
43
|
<key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
44
44
|
<data>
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
</data>
|
|
55
55
|
<key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
56
56
|
<data>
|
|
57
|
-
|
|
57
|
+
cZABauPlCz6cG08CTLoue1d6SDU=
|
|
58
58
|
</data>
|
|
59
59
|
<key>Modules/module.modulemap</key>
|
|
60
60
|
<data>
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
<dict>
|
|
82
82
|
<key>hash2</key>
|
|
83
83
|
<data>
|
|
84
|
-
|
|
84
|
+
8/CE+s8YrIvyr2EMm7MB1wpvwF/m4lFyf/192ZqQeqI=
|
|
85
85
|
</data>
|
|
86
86
|
</dict>
|
|
87
87
|
<key>Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
@@ -109,14 +109,14 @@
|
|
|
109
109
|
<dict>
|
|
110
110
|
<key>hash2</key>
|
|
111
111
|
<data>
|
|
112
|
-
|
|
112
|
+
C+ZSYS37c1XWrJdfi9CjMAv6kfZ0/nRr3Xsm+jCmWT8=
|
|
113
113
|
</data>
|
|
114
114
|
</dict>
|
|
115
115
|
<key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
116
116
|
<dict>
|
|
117
117
|
<key>hash2</key>
|
|
118
118
|
<data>
|
|
119
|
-
|
|
119
|
+
8/CE+s8YrIvyr2EMm7MB1wpvwF/m4lFyf/192ZqQeqI=
|
|
120
120
|
</data>
|
|
121
121
|
</dict>
|
|
122
122
|
<key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
<dict>
|
|
145
145
|
<key>hash2</key>
|
|
146
146
|
<data>
|
|
147
|
-
|
|
147
|
+
8Nb8KKhfffu+q3nPAgfXOc1Jp/m9uLncYeYthtqbqkE=
|
|
148
148
|
</data>
|
|
149
149
|
</dict>
|
|
150
150
|
<key>Modules/module.modulemap</key>
|
package/android/build.gradle
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
buildscript {
|
|
2
2
|
// Buildscript is evaluated before everything else so we can't use getExtOrDefault
|
|
3
|
-
def
|
|
3
|
+
def kotlinVersion = rootProject.ext.has('kotlinVersion') ? rootProject.ext.get('kotlinVersion') : project.properties['FireworkSDK_kotlinVersion']
|
|
4
4
|
|
|
5
5
|
repositories {
|
|
6
6
|
google()
|
|
@@ -9,16 +9,14 @@ buildscript {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
dependencies {
|
|
12
|
-
classpath
|
|
12
|
+
classpath("com.android.tools.build:gradle:7.3.1")
|
|
13
13
|
// noinspection DifferentKotlinGradleVersion
|
|
14
|
-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$
|
|
14
|
+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
apply plugin: 'com.android.library'
|
|
19
19
|
apply plugin: 'kotlin-android'
|
|
20
|
-
apply plugin: 'kotlin-android-extensions'
|
|
21
|
-
apply from:'publish.gradle'
|
|
22
20
|
|
|
23
21
|
def getExtOrDefault(name) {
|
|
24
22
|
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['FireworkSDK_' + name]
|
|
@@ -28,13 +26,15 @@ def getExtOrIntegerDefault(name) {
|
|
|
28
26
|
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['FireworkSDK_' + name]).toInteger()
|
|
29
27
|
}
|
|
30
28
|
|
|
29
|
+
rootProject.ext {
|
|
30
|
+
fwNativeVersion = getExtOrDefault("fwNativeVersion")
|
|
31
|
+
}
|
|
32
|
+
|
|
31
33
|
android {
|
|
32
34
|
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
|
|
33
35
|
defaultConfig {
|
|
34
|
-
minSdkVersion
|
|
36
|
+
minSdkVersion getExtOrIntegerDefault('minSdkVersion')
|
|
35
37
|
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
|
|
36
|
-
versionCode 1
|
|
37
|
-
versionName "1.0.0"
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
// LOG_LEVEL: VERBOSE(2), DEBUG(3), INFO(4), WARN(5), ERROR(6), ASSERT(7)
|
|
@@ -58,11 +58,6 @@ android {
|
|
|
58
58
|
disable 'GradleCompatible'
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
compileOptions {
|
|
62
|
-
sourceCompatibility JavaVersion.VERSION_1_8
|
|
63
|
-
targetCompatibility JavaVersion.VERSION_1_8
|
|
64
|
-
}
|
|
65
|
-
|
|
66
61
|
}
|
|
67
62
|
|
|
68
63
|
repositories {
|
|
@@ -143,35 +138,10 @@ repositories {
|
|
|
143
138
|
}
|
|
144
139
|
}
|
|
145
140
|
|
|
146
|
-
def kotlin_version = getExtOrDefault('kotlinVersion')
|
|
147
|
-
|
|
148
141
|
dependencies {
|
|
149
142
|
api 'com.facebook.react:react-native:+'
|
|
150
|
-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
|
151
|
-
|
|
152
143
|
|
|
153
|
-
def fireworkSdkVersion =
|
|
144
|
+
def fireworkSdkVersion = getExtOrDefault('fwNativeVersion')
|
|
154
145
|
implementation "com.firework:sdk:$fireworkSdkVersion"
|
|
155
|
-
implementation "com.firework.external.imageloading:glide:$fireworkSdkVersion"
|
|
156
|
-
implementation "com.firework.external.livestream:singleHostPlayer:$fireworkSdkVersion"
|
|
157
|
-
implementation "com.firework.external.livestream:multiHostPlayer:$fireworkSdkVersion"
|
|
158
|
-
|
|
159
|
-
// def fireworkSdkVersion = "unspecified"
|
|
160
|
-
// implementation "firework_sdk_v2:fireworkSdk:$fireworkSdkVersion"
|
|
161
|
-
// implementation "firework_sdk_v2.external:glideImageLoader:$fireworkSdkVersion"
|
|
162
|
-
// implementation "firework_sdk_v2.external:singleHostLivestreamPlayer:$fireworkSdkVersion"
|
|
163
|
-
// implementation "firework_sdk_v2.external:multiHostLivestreamPlayer:$fireworkSdkVersion"
|
|
164
|
-
|
|
165
|
-
// required to avoid crash on Android 12 API 31
|
|
166
|
-
implementation 'androidx.work:work-runtime-ktx:2.7.0'
|
|
167
|
-
|
|
168
|
-
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
configurations.all {
|
|
172
|
-
resolutionStrategy {
|
|
173
|
-
force 'androidx.core:core-ktx:1.6.0'
|
|
174
|
-
force 'androidx.core:core:1.6.0'
|
|
175
|
-
}
|
|
176
146
|
}
|
|
177
147
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
distributionBase=GRADLE_USER_HOME
|
|
2
2
|
distributionPath=wrapper/dists
|
|
3
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-
|
|
3
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
|
|
4
4
|
zipStoreBase=GRADLE_USER_HOME
|
|
5
5
|
zipStorePath=wrapper/dists
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
org.gradle.jvmargs=-Xmx1536M
|
|
2
|
-
android.enableJetifier=true
|
|
3
|
-
FireworkSDK_kotlinVersion=1.5.10
|
|
4
|
-
FireworkSDK_compileSdkVersion=28
|
|
5
|
-
FireworkSDK_targetSdkVersion=28
|
|
6
1
|
android.useAndroidX=true
|
|
2
|
+
android.enableJetifier=true
|
|
3
|
+
org.gradle.jvmargs=-Xmx1536M
|
|
4
|
+
FireworkSDK_kotlinVersion=1.6.10
|
|
5
|
+
FireworkSDK_minSdkVersion=21
|
|
6
|
+
FireworkSDK_compileSdkVersion=33
|
|
7
|
+
FireworkSDK_targetSdkVersion=33
|
|
8
|
+
FireworkSDK_fwNativeVersion=6.3.2
|
|
@@ -1,31 +1,10 @@
|
|
|
1
1
|
# Add project specific ProGuard rules here.
|
|
2
|
-
#
|
|
3
|
-
#
|
|
2
|
+
# By default, the flags in this file are appended to flags specified
|
|
3
|
+
# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
|
|
4
|
+
# You can edit the include path and order by changing the proguardFiles
|
|
5
|
+
# directive in build.gradle.
|
|
4
6
|
#
|
|
5
7
|
# For more details, see
|
|
6
8
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
|
7
9
|
|
|
8
|
-
#
|
|
9
|
-
# and specify the fully qualified class name to the JavaScript interface
|
|
10
|
-
# class:
|
|
11
|
-
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
|
12
|
-
# public *;
|
|
13
|
-
#}
|
|
14
|
-
|
|
15
|
-
# Uncomment this to preserve the line number information for
|
|
16
|
-
# debugging stack traces.
|
|
17
|
-
#-keepattributes SourceFile,LineNumberTable
|
|
18
|
-
|
|
19
|
-
# If you keep the line number information, uncomment this to
|
|
20
|
-
# hide the original source file name.
|
|
21
|
-
#-renamesourcefileattribute SourceFile
|
|
22
|
-
-keep class com.fireworksdk.bridge.** { <fields>; }
|
|
23
|
-
-keep class com.fireworksdk.bridge.**
|
|
24
|
-
|
|
25
|
-
# Firework SDK
|
|
26
|
-
-keep public class * extends androidx.lifecycle.ViewModelProvider.Factory
|
|
27
|
-
-keep class com.loopnow.fireworklibrary.**
|
|
28
|
-
-keepclassmembers public class * extends androidx.lifecycle.ViewModel { public <init>(...); }
|
|
29
|
-
-keepclassmembers class com.loopnow.fireworklibrary.** { <fields>; }
|
|
30
|
-
-keep class com.google.gson.examples.android.model.** { *; }
|
|
31
|
-
-dontoptimize
|
|
10
|
+
# Add any project specific keep options here:
|
|
@@ -25,7 +25,7 @@ class FireworkSDKPackage : ReactPackage {
|
|
|
25
25
|
override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
|
|
26
26
|
return listOf(
|
|
27
27
|
FWVideoFeedManager(),
|
|
28
|
-
FWStoryBlockManager(
|
|
28
|
+
FWStoryBlockManager(),
|
|
29
29
|
)
|
|
30
30
|
}
|
|
31
31
|
}
|
package/android/src/main/java/com/fireworksdk/bridge/components/storyblock/StoryBlockFragment.kt
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
package com.fireworksdk.bridge.components.storyblock
|
|
2
|
+
|
|
3
|
+
import android.os.Bundle
|
|
4
|
+
import android.view.LayoutInflater
|
|
5
|
+
import android.view.View
|
|
6
|
+
import android.view.View.LAYOUT_DIRECTION_LOCALE
|
|
7
|
+
import android.view.ViewGroup
|
|
8
|
+
import android.widget.FrameLayout
|
|
9
|
+
import com.firework.storyblock.FeedLoadListener
|
|
10
|
+
import com.firework.storyblock.FwStoryBlockView
|
|
11
|
+
import com.fireworksdk.bridge.components.base.FWBaseFragment
|
|
12
|
+
import com.fireworksdk.bridge.databinding.FwBridgeStoryBlockBinding
|
|
13
|
+
import com.fireworksdk.bridge.models.FWVideoFeedPropsModel
|
|
14
|
+
import com.fireworksdk.bridge.models.FWVideoFeedPropsModelDeserializer
|
|
15
|
+
import com.fireworksdk.bridge.models.FWVideoFeedPropsModelSerializer
|
|
16
|
+
import com.fireworksdk.bridge.utils.FWCommonUtil
|
|
17
|
+
import com.fireworksdk.bridge.utils.FWConfigUtil
|
|
18
|
+
import com.fireworksdk.bridge.utils.FWLanguageUtil
|
|
19
|
+
import org.json.JSONObject
|
|
20
|
+
|
|
21
|
+
class StoryBlockFragment : FWBaseFragment() {
|
|
22
|
+
|
|
23
|
+
private var _binding: FwBridgeStoryBlockBinding? = null
|
|
24
|
+
private val binding: FwBridgeStoryBlockBinding get() = _binding!!
|
|
25
|
+
|
|
26
|
+
private var feedLoadListener: FeedLoadListener? = null
|
|
27
|
+
private var fullScreenStateChangeListener: FwStoryBlockView.OnFullscreenStateChangeListener? = null
|
|
28
|
+
private var videoFeedPropsModel: FWVideoFeedPropsModel? = null
|
|
29
|
+
|
|
30
|
+
private var isStoryBlockInitializer = false
|
|
31
|
+
private var storyBlockLayoutParams: FrameLayout.LayoutParams? = null
|
|
32
|
+
|
|
33
|
+
private var fwStoryBlockView: FwStoryBlockView? = null
|
|
34
|
+
|
|
35
|
+
override fun onCreateView(
|
|
36
|
+
inflater: LayoutInflater,
|
|
37
|
+
container: ViewGroup?,
|
|
38
|
+
savedInstanceState: Bundle?,
|
|
39
|
+
): View {
|
|
40
|
+
_binding = FwBridgeStoryBlockBinding.inflate(inflater)
|
|
41
|
+
|
|
42
|
+
val videoFeedPropsModelJsonString = arguments?.getString(VIDEO_FEED_PROPS_MODEL)
|
|
43
|
+
videoFeedPropsModelJsonString?.let {
|
|
44
|
+
val videoFeedPropsModelJsonObject = JSONObject(it)
|
|
45
|
+
val model = FWVideoFeedPropsModelDeserializer.deserialize(videoFeedPropsModelJsonObject)
|
|
46
|
+
videoFeedPropsModel = model
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
val right = videoFeedPropsModel?.marginRight
|
|
50
|
+
if (right != null && right > 0) {
|
|
51
|
+
val layoutParams = FrameLayout.LayoutParams(
|
|
52
|
+
ViewGroup.LayoutParams.MATCH_PARENT,
|
|
53
|
+
ViewGroup.LayoutParams.MATCH_PARENT
|
|
54
|
+
)
|
|
55
|
+
layoutParams.setMargins(0, 0, FWCommonUtil.dpToPx(right.toFloat(), requireContext()), 0)
|
|
56
|
+
binding.storyBlockContainer.layoutParams = layoutParams
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
FWLanguageUtil.getInstance(requireContext()).updateBaseContextLocale(requireContext())
|
|
60
|
+
binding.storyBlock.layoutDirection = LAYOUT_DIRECTION_LOCALE
|
|
61
|
+
|
|
62
|
+
fwStoryBlockView = binding.storyBlock
|
|
63
|
+
return binding.root
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
|
67
|
+
super.onViewCreated(view, savedInstanceState)
|
|
68
|
+
initStoryBlock()
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
override fun onDestroyView() {
|
|
73
|
+
_binding = null
|
|
74
|
+
super.onDestroyView()
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
private fun initStoryBlock() {
|
|
78
|
+
val viewOptionsBuilder = FWConfigUtil.generateViewOptionsBuilder(context, videoFeedPropsModel)
|
|
79
|
+
fwStoryBlockView?.init(
|
|
80
|
+
childFragmentManager,
|
|
81
|
+
lifecycle,
|
|
82
|
+
viewOptionsBuilder.build(),
|
|
83
|
+
binding.storyBlockContainer,
|
|
84
|
+
)
|
|
85
|
+
isStoryBlockInitializer = true
|
|
86
|
+
|
|
87
|
+
if (storyBlockLayoutParams != null) {
|
|
88
|
+
binding.storyBlockContainer.layoutParams = storyBlockLayoutParams
|
|
89
|
+
binding.root.requestLayout()
|
|
90
|
+
}
|
|
91
|
+
// must call it after init()
|
|
92
|
+
fwStoryBlockView?.setFeedLoadListener(feedLoadListener)
|
|
93
|
+
fwStoryBlockView?.setOnFullscreenStateChangeListener(fullScreenStateChangeListener)
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// may be called before onCreateView
|
|
97
|
+
fun setStoryBlockLayoutParams(l: FrameLayout.LayoutParams?) {
|
|
98
|
+
l?: return
|
|
99
|
+
storyBlockLayoutParams = l
|
|
100
|
+
if (isStoryBlockInitializer) {
|
|
101
|
+
binding.storyBlockContainer.layoutParams = l
|
|
102
|
+
binding.root.requestLayout()
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// may be called before onCreateView
|
|
107
|
+
fun setFeedLoadListener(feedLoadListener: FeedLoadListener?) {
|
|
108
|
+
this.feedLoadListener = feedLoadListener
|
|
109
|
+
if (isStoryBlockInitializer) {
|
|
110
|
+
fwStoryBlockView?.setFeedLoadListener(feedLoadListener)
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// may be called before onCreateView
|
|
115
|
+
fun setOnFullScreenStateChangedListener(listener: FwStoryBlockView.OnFullscreenStateChangeListener?) {
|
|
116
|
+
this.fullScreenStateChangeListener = listener
|
|
117
|
+
if (isStoryBlockInitializer) {
|
|
118
|
+
fwStoryBlockView?.setOnFullscreenStateChangeListener(fullScreenStateChangeListener)
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
fun play() {
|
|
123
|
+
fwStoryBlockView?.play()
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
fun pause() {
|
|
127
|
+
fwStoryBlockView?.pause()
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
fun toggleFullScreen() {
|
|
131
|
+
fwStoryBlockView?.toggleFullscreen()
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
fun isFullScreen(): Boolean {
|
|
135
|
+
return fwStoryBlockView?.isFullscreen() ?: false
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
fun getStoryBlockView(): FwStoryBlockView? {
|
|
139
|
+
return fwStoryBlockView
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
companion object {
|
|
143
|
+
private const val VIDEO_FEED_PROPS_MODEL = "videoFeedPropsModel"
|
|
144
|
+
|
|
145
|
+
fun newInstance(
|
|
146
|
+
videoFeedPropsModel: FWVideoFeedPropsModel?,
|
|
147
|
+
): StoryBlockFragment {
|
|
148
|
+
return StoryBlockFragment().apply {
|
|
149
|
+
arguments = Bundle().apply {
|
|
150
|
+
videoFeedPropsModel?.let {
|
|
151
|
+
putString(VIDEO_FEED_PROPS_MODEL, FWVideoFeedPropsModelSerializer.serialize(it).toString())
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
package/android/src/main/java/com/fireworksdk/bridge/components/storyblock/StoryBlockFrameLayout.kt
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
package com.fireworksdk.bridge.components.storyblock
|
|
2
|
+
|
|
3
|
+
import android.content.Context
|
|
4
|
+
import android.util.AttributeSet
|
|
5
|
+
import android.widget.FrameLayout
|
|
6
|
+
import com.fireworksdk.bridge.models.FWVideoFeedPropsModel
|
|
7
|
+
|
|
8
|
+
class StoryBlockFrameLayout(
|
|
9
|
+
context: Context,
|
|
10
|
+
attrs: AttributeSet?
|
|
11
|
+
) : FrameLayout(context, attrs) {
|
|
12
|
+
|
|
13
|
+
var storyBlockFragment: StoryBlockFragment? = null
|
|
14
|
+
var videoFeedPropsModel: FWVideoFeedPropsModel = FWVideoFeedPropsModel()
|
|
15
|
+
|
|
16
|
+
constructor(context: Context) : this(context, null)
|
|
17
|
+
|
|
18
|
+
fun destroy() {}
|
|
19
|
+
}
|
|
@@ -3,16 +3,19 @@ package com.fireworksdk.bridge.components.videofeed
|
|
|
3
3
|
import android.content.Context
|
|
4
4
|
import android.util.AttributeSet
|
|
5
5
|
import android.view.ViewGroup
|
|
6
|
-
import android.widget.
|
|
6
|
+
import android.widget.FrameLayout
|
|
7
7
|
import com.firework.videofeed.FwVideoFeedView
|
|
8
8
|
import com.fireworksdk.bridge.models.*
|
|
9
|
+
import com.fireworksdk.bridge.models.enums.FWVideoFeedMode
|
|
10
|
+
import com.fireworksdk.bridge.models.enums.FWVideoFeedSource
|
|
9
11
|
import com.fireworksdk.bridge.utils.FWConfigUtil
|
|
12
|
+
import com.fireworksdk.bridge.utils.FWLanguageUtil
|
|
10
13
|
|
|
11
14
|
|
|
12
15
|
class FWVideoFeed(
|
|
13
16
|
context: Context,
|
|
14
17
|
attrs: AttributeSet?
|
|
15
|
-
) :
|
|
18
|
+
) : FrameLayout(context, attrs) {
|
|
16
19
|
|
|
17
20
|
constructor(context: Context) : this(context, null)
|
|
18
21
|
|
|
@@ -20,12 +23,19 @@ class FWVideoFeed(
|
|
|
20
23
|
var videoFeedPropsModel: FWVideoFeedPropsModel = FWVideoFeedPropsModel()
|
|
21
24
|
|
|
22
25
|
init {
|
|
26
|
+
FWLanguageUtil.getInstance(context).updateBaseContextLocale(context)
|
|
23
27
|
videoFeedView.layoutDirection = LAYOUT_DIRECTION_LOCALE
|
|
24
28
|
addView(videoFeedView, LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT))
|
|
25
29
|
}
|
|
26
30
|
|
|
31
|
+
fun setVideoFeedLayoutParams(l: LayoutParams?) {
|
|
32
|
+
l ?: return
|
|
33
|
+
videoFeedView.layoutParams = l
|
|
34
|
+
requestLayout()
|
|
35
|
+
}
|
|
36
|
+
|
|
27
37
|
fun afterUpdateTransaction() {
|
|
28
|
-
val viewOptionsBuilder = FWConfigUtil.generateViewOptionsBuilder(videoFeedPropsModel)
|
|
38
|
+
val viewOptionsBuilder = FWConfigUtil.generateViewOptionsBuilder(context, videoFeedPropsModel)
|
|
29
39
|
videoFeedView.init(viewOptionsBuilder.build())
|
|
30
40
|
}
|
|
31
41
|
|
|
@@ -37,7 +47,7 @@ class FWVideoFeed(
|
|
|
37
47
|
|
|
38
48
|
fun setSourceProps(source: String?) {
|
|
39
49
|
videoFeedPropsModel = videoFeedPropsModel.copy(
|
|
40
|
-
source = source
|
|
50
|
+
source = if (!source.isNullOrBlank()) FWVideoFeedSource.deserialize(source) else null
|
|
41
51
|
)
|
|
42
52
|
}
|
|
43
53
|
|
|
@@ -67,7 +77,7 @@ class FWVideoFeed(
|
|
|
67
77
|
|
|
68
78
|
fun setModeProps(mode: String?) {
|
|
69
79
|
videoFeedPropsModel = videoFeedPropsModel.copy(
|
|
70
|
-
mode = mode
|
|
80
|
+
mode = if (!mode.isNullOrBlank()) FWVideoFeedMode.deserialize(mode) else null
|
|
71
81
|
)
|
|
72
82
|
}
|
|
73
83
|
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
package com.fireworksdk.bridge.models
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import kotlinx.android.parcel.Parcelize
|
|
3
|
+
import com.fireworksdk.bridge.models.enums.FWBadgeTextType
|
|
5
4
|
|
|
6
|
-
@Parcelize
|
|
7
5
|
data class FWAdBadgeConfigModel(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
val badgeTextType: FWBadgeTextType? = null,
|
|
7
|
+
val backgroundColor: String? = null,
|
|
8
|
+
val textColor: String? = null,
|
|
9
|
+
val fontInfo: FWFontInfoModel? = null,
|
|
10
|
+
)
|
package/android/src/main/java/com/fireworksdk/bridge/models/FWAdBadgeConfigModelDeserializer.kt
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
package com.fireworksdk.bridge.models
|
|
2
2
|
|
|
3
|
+
import com.fireworksdk.bridge.models.enums.FWBadgeTextType
|
|
3
4
|
import org.json.JSONObject
|
|
4
5
|
|
|
5
6
|
object FWAdBadgeConfigModelDeserializer {
|
|
@@ -7,6 +8,7 @@ object FWAdBadgeConfigModelDeserializer {
|
|
|
7
8
|
private const val BADGE_TEXT_TYPE_KEY = "badgeTextType"
|
|
8
9
|
private const val BACKGROUND_COLOR_KEY = "backgroundColor"
|
|
9
10
|
private const val TEXT_COLOR_KEY = "textColor"
|
|
11
|
+
private const val FONT_INFO_KEY = "androidFontInfo"
|
|
10
12
|
|
|
11
13
|
fun deserialize(responseJson: JSONObject?): FWAdBadgeConfigModel? {
|
|
12
14
|
responseJson ?: return null
|
|
@@ -14,11 +16,13 @@ object FWAdBadgeConfigModelDeserializer {
|
|
|
14
16
|
val badgeTextType = if (responseJson.has(BADGE_TEXT_TYPE_KEY)) responseJson.optString(BADGE_TEXT_TYPE_KEY) else null
|
|
15
17
|
val backgroundColor = if (responseJson.has(BACKGROUND_COLOR_KEY)) responseJson.optString(BACKGROUND_COLOR_KEY) else null
|
|
16
18
|
val textColor = if (responseJson.has(TEXT_COLOR_KEY)) responseJson.optString(TEXT_COLOR_KEY) else null
|
|
19
|
+
val fontInfo = FWFontInfoModelDeserializer.deserialize(responseJson.optJSONObject(FONT_INFO_KEY))
|
|
17
20
|
|
|
18
21
|
return FWAdBadgeConfigModel(
|
|
19
|
-
badgeTextType = badgeTextType,
|
|
22
|
+
badgeTextType = if (!badgeTextType.isNullOrBlank()) FWBadgeTextType.deserialize(badgeTextType) else null,
|
|
20
23
|
backgroundColor = backgroundColor,
|
|
21
24
|
textColor = textColor,
|
|
25
|
+
fontInfo = fontInfo,
|
|
22
26
|
)
|
|
23
27
|
}
|
|
24
28
|
}
|