react-native-firework-sdk 2.0.0 → 2.2.0-beta.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 +40 -0
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/FireworkVideoUI +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Headers/FireworkVideoUI-Swift.h +280 -0
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Headers/FireworkVideoUI.h +18 -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 +1327 -0
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios.private.swiftinterface +41 -0
- 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 +41 -0
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Modules/module.modulemap +11 -0
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/FireworkVideoUI +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Headers/FireworkVideoUI-Swift.h +556 -0
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Headers/FireworkVideoUI.h +18 -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 +1327 -0
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +41 -0
- 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 +41 -0
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.abi.json +1327 -0
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +41 -0
- 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 +41 -0
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/module.modulemap +11 -0
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/_CodeSignature/CodeResources +245 -0
- package/README.md +1 -1
- package/android/build.gradle +5 -4
- package/android/src/main/java/com/fireworksdk/bridge/components/videofeed/FWVideoFeed.kt +6 -0
- package/android/src/main/java/com/fireworksdk/bridge/components/videofeed/StoryBlockFragment.kt +129 -0
- package/android/src/main/java/com/fireworksdk/bridge/components/videofeed/StoryBlockFrameLayout.kt +90 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWAdBadgeConfigModelDeserializer.kt +3 -3
- package/android/src/main/java/com/fireworksdk/bridge/models/FWEventName.kt +5 -1
- package/android/src/main/java/com/fireworksdk/bridge/models/FWFontInfoModelDeserializer.kt +1 -1
- package/android/src/main/java/com/fireworksdk/bridge/models/FWProductInfoViewConfiguration.kt +18 -5
- package/android/src/main/java/com/fireworksdk/bridge/models/FWProductInfoViewConfigurationDeserializer.kt +36 -8
- package/android/src/main/java/com/fireworksdk/bridge/models/FWSDKInitOptionsModelDeserializer.kt +3 -3
- package/android/src/main/java/com/fireworksdk/bridge/models/FWShoppingCtaResult.kt +17 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWShoppingCtaResultDeserializer.kt +33 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedConfigModelDeserializer.kt +14 -12
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedPropsModel.kt +1 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedPropsModelDeserializer.kt +11 -7
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedSource.kt +1 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlaybackDetails.kt +8 -8
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerConfigModel.kt +1 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerConfigModelDeserializer.kt +19 -12
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoShoppingProductDeserializer.kt +11 -11
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/manager/FWStoryBlockManager.kt +131 -45
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/manager/FWVideoFeedManager.kt +11 -3
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/models/FWVideoShoppingInterface.kt +2 -2
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FWLiveStreamModule.kt +45 -4
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FWNavigatorModule.kt +9 -1
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FWVideoShoppingModule.kt +83 -50
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FireworkSDKModule.kt +112 -36
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/utils/FWEventUtils.kt +16 -6
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWConfigUtil.kt +26 -32
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWGlobalDataUtil.kt +10 -0
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWLanguageUtil.kt +48 -16
- package/android/src/main/res/layout/fw_bridge_story_block.xml +24 -0
- package/ios/Components/StoryBlock.swift +32 -2
- package/ios/Components/StoryBlockManager.m +33 -0
- package/ios/Components/StoryBlockManager.swift +4 -0
- package/ios/Components/VideoFeed.swift +16 -32
- package/ios/Components/VideoFeedManager.m +12 -6
- package/ios/Components/VideoFeedManager.swift +4 -0
- package/ios/Components/VideoPlayerConfiguration.swift +1 -0
- package/ios/FireworkSdk.xcodeproj/project.pbxproj +276 -212
- package/ios/FireworkVideoUI/FireworkVideoUI/FireworkVideoUI.docc/FireworkVideoUI.md +13 -0
- package/ios/FireworkVideoUI/FireworkVideoUI/FireworkVideoUI.h +18 -0
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/AppLanguageManager.swift +147 -0
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/Foundation/Bundle+AppLanguage.swift +58 -0
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/Foundation/NumberFormatter+AppLanguage.swift +25 -0
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/Foundation/URLSession+AppLanguage.swift +69 -0
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/UIKit/UIImageView+AppLanguage.swift +91 -0
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/UIKit/UILabel+AppLanguage.swift +98 -0
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/UIKit/UITextField+AppLanguage.swift +97 -0
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/UIKit/UITextView+AppLanguage.swift +97 -0
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/UIKit/UIView+AppLanguage.swift +38 -0
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/UIKit/UIViewController+AppLanguage.swift +46 -0
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/UIKit/UIWindow+AppLanguage.swift +26 -0
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/LanguageUtil.swift +43 -0
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/LayoutFlip/Extensions/Foundation/NSObject+LayoutFlip.swift +42 -0
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/LayoutFlip/Extensions/UIKit/CALayer+LayoutFlip.swift +160 -0
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/LayoutFlip/Extensions/UIKit/UILabel+LayoutFlip.swift +35 -0
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/LayoutFlip/Extensions/UIKit/UIView+LayoutFlip.swift +199 -0
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/LayoutFlip/LayoutFlipManager.swift +59 -0
- package/ios/{Utils/DispatchQueue+FWOnce.swift → FireworkVideoUI/FireworkVideoUI/Sources/Utils/Extensions/Foundation/DispatchQueue+Once.swift} +5 -5
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/Utils/Extensions/Foundation/String+Base64.swift +18 -0
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/Utils/Extensions/UIKit/UIView+UIHierarchy.swift +46 -0
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/Utils/Swizzle.swift +37 -0
- package/ios/FireworkVideoUI/FireworkVideoUI.xcodeproj/project.pbxproj +766 -0
- package/ios/FireworkVideoUI/FireworkVideoUI.xcworkspace/contents.xcworkspacedata +10 -0
- package/ios/FireworkVideoUI/FireworkVideoUI.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/FireworkVideoUI/FireworkVideoUITests/FireworkVideoUITests.swift +37 -0
- package/ios/FireworkVideoUI/Podfile +15 -0
- package/ios/FireworkVideoUI/Podfile.lock +16 -0
- package/ios/Models/NativeToRN/FireworkEventName.swift +7 -1
- package/ios/Models/NativeToRN/FireworkSDK+Json.swift +5 -1
- package/ios/Models/RNToNative/RCTConvert+Shopping.swift +21 -0
- package/ios/Models/RNToNative/RCTConvert+StoryBlock.swift +2 -1
- package/ios/Models/RNToNative/RCTConvert+VideoFeed.swift +29 -1
- package/ios/Modules/FWNavigatorModule/FWNavigatorModule.swift +13 -101
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule+EventTracking.swift +34 -16
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule.m +1 -0
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule.swift +48 -2
- package/ios/Modules/FireworkSDKModule/SDKInitOptions.swift +0 -1
- package/ios/Modules/LiveStream/LiveStreamModule.swift +1 -0
- package/ios/Modules/Shopping/ProductInfoViewConfiguration.swift +7 -2
- package/ios/Modules/Shopping/ShoppingCTAResult.swift +16 -0
- package/ios/Modules/Shopping/ShoppingModule.m +2 -1
- package/ios/Modules/Shopping/ShoppingModule.swift +92 -34
- package/ios/Support/MultiHostStreaming/FWMultiHostStreaming.podspec +22 -0
- package/ios/Support/MultiHostStreaming/Sources/MultiHostStreamingSDK.swift +17 -0
- package/ios/Utils/{UINavigationController+FWSwizzle.swift → Extensions/Swizzle/UINavigationController+FWSwizzle.swift} +9 -8
- package/ios/Utils/FWSwizzleLoader.m +6 -1
- package/ios/Utils/FWSwizzleLoader.swift +13 -0
- package/ios/react_native_firework_sdk.h +1 -0
- package/ios/scripts/react_native_firework_sdk_pods.rb +27 -0
- package/lib/commonjs/FireworkSDK.js +55 -15
- package/lib/commonjs/FireworkSDK.js.map +1 -1
- package/lib/commonjs/LiveStream.js +2 -2
- package/lib/commonjs/LiveStream.js.map +1 -1
- package/lib/commonjs/VideoShopping.js +21 -38
- package/lib/commonjs/VideoShopping.js.map +1 -1
- package/lib/commonjs/components/StoryBlock.js +193 -128
- package/lib/commonjs/components/StoryBlock.js.map +1 -1
- package/lib/commonjs/components/VideoFeed.js +17 -5
- package/lib/commonjs/components/VideoFeed.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/FWEventName.js +3 -0
- package/lib/commonjs/models/FWEventName.js.map +1 -1
- package/lib/commonjs/models/ShoppingCTAResult.js +2 -0
- package/lib/commonjs/models/VideoPlaybackEventName.js +3 -0
- package/lib/commonjs/models/VideoPlaybackEventName.js.map +1 -1
- package/lib/commonjs/modules/FireworkSDKModule.js.map +1 -1
- package/lib/commonjs/modules/ShoppingModule.js.map +1 -1
- package/lib/module/FireworkSDK.js +54 -15
- package/lib/module/FireworkSDK.js.map +1 -1
- package/lib/module/LiveStream.js +2 -2
- package/lib/module/LiveStream.js.map +1 -1
- package/lib/module/VideoShopping.js +21 -40
- package/lib/module/VideoShopping.js.map +1 -1
- package/lib/module/components/StoryBlock.js +183 -133
- package/lib/module/components/StoryBlock.js.map +1 -1
- package/lib/module/components/VideoFeed.js +16 -5
- package/lib/module/components/VideoFeed.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/FWEventName.js +3 -0
- package/lib/module/models/FWEventName.js.map +1 -1
- package/lib/module/models/ShoppingCTAResult.js +2 -0
- package/lib/module/models/VideoPlaybackEventName.js +3 -0
- package/lib/module/models/VideoPlaybackEventName.js.map +1 -1
- package/lib/module/modules/FireworkSDKModule.js.map +1 -1
- package/lib/module/modules/ShoppingModule.js.map +1 -1
- package/lib/typescript/FireworkSDK.d.ts +15 -8
- package/lib/typescript/LiveStream.d.ts +2 -2
- package/lib/typescript/VideoShopping.d.ts +10 -12
- package/lib/typescript/components/StoryBlock.d.ts +25 -24
- package/lib/typescript/components/VideoFeed.d.ts +7 -0
- package/lib/typescript/index.d.ts +6 -6
- package/lib/typescript/models/FWEventName.d.ts +3 -0
- package/lib/typescript/models/FWEvents.d.ts +14 -1
- package/lib/typescript/models/ProductInfoViewConfiguration.d.ts +12 -8
- package/lib/typescript/models/SDKInitOptions.d.ts +6 -1
- package/lib/typescript/models/ShoppingCTAResult.d.ts +11 -0
- package/lib/typescript/models/StoryBlockSource.d.ts +1 -1
- package/lib/typescript/models/VideoFeedSource.d.ts +1 -1
- package/lib/typescript/models/VideoPlaybackDetails.d.ts +16 -0
- package/lib/typescript/models/VideoPlaybackEventName.d.ts +13 -1
- package/lib/typescript/models/VideoPlayerConfiguration.d.ts +4 -0
- package/lib/typescript/modules/FireworkSDKModule.d.ts +1 -2
- package/lib/typescript/modules/ShoppingModule.d.ts +2 -1
- package/package.json +8 -3
- package/react-native-firework-sdk.podspec +31 -24
- package/src/FireworkSDK.ts +54 -15
- package/src/LiveStream.ts +2 -2
- package/src/VideoShopping.ts +41 -54
- package/src/components/StoryBlock.tsx +210 -98
- package/src/components/VideoFeed.tsx +23 -4
- package/src/index.ts +15 -9
- package/src/models/FWEventName.ts +3 -0
- package/src/models/FWEvents.ts +14 -1
- package/src/models/ProductInfoViewConfiguration.ts +13 -8
- package/src/models/SDKInitOptions.ts +6 -1
- package/src/models/ShoppingCTAResult.ts +11 -0
- package/src/models/StoryBlockSource.ts +2 -1
- package/src/models/VideoFeedSource.ts +2 -1
- package/src/models/VideoPlaybackDetails.ts +16 -0
- package/src/models/VideoPlaybackEventName.ts +13 -1
- package/src/models/VideoPlayerConfiguration.ts +4 -0
- package/src/modules/FireworkSDKModule.ts +1 -2
- package/src/modules/ShoppingModule.ts +5 -5
- package/android/src/main/java/com/fireworksdk/bridge/constants/FWCommandConstant.kt +0 -6
- package/ios/Utils/FWSwizzleUtil.swift +0 -29
- package/ios/Utils/UIView+ParentViewController.swift +0 -21
- package/lib/commonjs/models/AddToCartResult.js +0 -2
- package/lib/module/models/AddToCartResult.js +0 -2
- package/lib/typescript/models/AddToCartResult.d.ts +0 -10
- package/src/models/AddToCartResult.ts +0 -10
- /package/ios/Utils/{String+Color.swift → Extensions/String+Color.swift} +0 -0
- /package/ios/Utils/{UIView+Constraints.swift → Extensions/UIView+Constraints.swift} +0 -0
- /package/ios/Utils/{UIViewController+AttachChild.swift → Extensions/UIViewController+AttachChild.swift} +0 -0
- /package/lib/commonjs/models/{AddToCartResult.js.map → ShoppingCTAResult.js.map} +0 -0
- /package/lib/module/models/{AddToCartResult.js.map → ShoppingCTAResult.js.map} +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// swift-interface-format-version: 1.0
|
|
2
|
+
// swift-compiler-version: Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)
|
|
3
|
+
// swift-module-flags: -target x86_64-apple-ios12.1-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name FireworkVideoUI
|
|
4
|
+
// swift-module-flags-ignorable: -enable-bare-slash-regex
|
|
5
|
+
import FireworkVideo
|
|
6
|
+
@_exported import FireworkVideoUI
|
|
7
|
+
import Foundation
|
|
8
|
+
import Swift
|
|
9
|
+
import UIKit
|
|
10
|
+
import WebKit
|
|
11
|
+
import _Concurrency
|
|
12
|
+
import _StringProcessing
|
|
13
|
+
extension Dispatch.DispatchQueue {
|
|
14
|
+
public class func once(file: Swift.String = #file, function: Swift.String = #function, line: Swift.Int = #line, block: () -> Swift.Void)
|
|
15
|
+
public class func once(token: Swift.String, block: () -> Swift.Void)
|
|
16
|
+
}
|
|
17
|
+
extension UIKit.UIView {
|
|
18
|
+
@_Concurrency.MainActor(unsafe) public var parentViewController: UIKit.UIViewController? {
|
|
19
|
+
get
|
|
20
|
+
}
|
|
21
|
+
@_Concurrency.MainActor(unsafe) public var isIOSSDKView: Swift.Bool {
|
|
22
|
+
get
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
@_hasMissingDesignatedInitializers public class Swizzle {
|
|
26
|
+
public static func swizzleSelector(cls: Swift.AnyClass, originalSelector: ObjectiveC.Selector, customSelector: ObjectiveC.Selector)
|
|
27
|
+
public static func swizzleClassSelector(cls: Swift.AnyClass, originalSelector: ObjectiveC.Selector, customSelector: ObjectiveC.Selector)
|
|
28
|
+
@objc deinit
|
|
29
|
+
}
|
|
30
|
+
@_hasMissingDesignatedInitializers public class AppLanguageManager {
|
|
31
|
+
public struct NotificationName {
|
|
32
|
+
public static let AppLanguageChanged: Foundation.Notification.Name
|
|
33
|
+
}
|
|
34
|
+
public static let shared: FireworkVideoUI.AppLanguageManager
|
|
35
|
+
public var appLanguage: Swift.String? {
|
|
36
|
+
get
|
|
37
|
+
}
|
|
38
|
+
@discardableResult
|
|
39
|
+
public func changeAppLanguage(_ language: Swift.String?) -> Swift.Bool
|
|
40
|
+
@objc deinit
|
|
41
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// swift-interface-format-version: 1.0
|
|
2
|
+
// swift-compiler-version: Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)
|
|
3
|
+
// swift-module-flags: -target x86_64-apple-ios12.1-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name FireworkVideoUI
|
|
4
|
+
// swift-module-flags-ignorable: -enable-bare-slash-regex
|
|
5
|
+
import FireworkVideo
|
|
6
|
+
@_exported import FireworkVideoUI
|
|
7
|
+
import Foundation
|
|
8
|
+
import Swift
|
|
9
|
+
import UIKit
|
|
10
|
+
import WebKit
|
|
11
|
+
import _Concurrency
|
|
12
|
+
import _StringProcessing
|
|
13
|
+
extension Dispatch.DispatchQueue {
|
|
14
|
+
public class func once(file: Swift.String = #file, function: Swift.String = #function, line: Swift.Int = #line, block: () -> Swift.Void)
|
|
15
|
+
public class func once(token: Swift.String, block: () -> Swift.Void)
|
|
16
|
+
}
|
|
17
|
+
extension UIKit.UIView {
|
|
18
|
+
@_Concurrency.MainActor(unsafe) public var parentViewController: UIKit.UIViewController? {
|
|
19
|
+
get
|
|
20
|
+
}
|
|
21
|
+
@_Concurrency.MainActor(unsafe) public var isIOSSDKView: Swift.Bool {
|
|
22
|
+
get
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
@_hasMissingDesignatedInitializers public class Swizzle {
|
|
26
|
+
public static func swizzleSelector(cls: Swift.AnyClass, originalSelector: ObjectiveC.Selector, customSelector: ObjectiveC.Selector)
|
|
27
|
+
public static func swizzleClassSelector(cls: Swift.AnyClass, originalSelector: ObjectiveC.Selector, customSelector: ObjectiveC.Selector)
|
|
28
|
+
@objc deinit
|
|
29
|
+
}
|
|
30
|
+
@_hasMissingDesignatedInitializers public class AppLanguageManager {
|
|
31
|
+
public struct NotificationName {
|
|
32
|
+
public static let AppLanguageChanged: Foundation.Notification.Name
|
|
33
|
+
}
|
|
34
|
+
public static let shared: FireworkVideoUI.AppLanguageManager
|
|
35
|
+
public var appLanguage: Swift.String? {
|
|
36
|
+
get
|
|
37
|
+
}
|
|
38
|
+
@discardableResult
|
|
39
|
+
public func changeAppLanguage(_ language: Swift.String?) -> Swift.Bool
|
|
40
|
+
@objc deinit
|
|
41
|
+
}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>files</key>
|
|
6
|
+
<dict>
|
|
7
|
+
<key>Headers/FireworkVideoUI-Swift.h</key>
|
|
8
|
+
<data>
|
|
9
|
+
i583HibrN7k0YmXoCN8LIDbmSt4=
|
|
10
|
+
</data>
|
|
11
|
+
<key>Headers/FireworkVideoUI.h</key>
|
|
12
|
+
<data>
|
|
13
|
+
NRZg85mNKv6PczcMet582mQjwKE=
|
|
14
|
+
</data>
|
|
15
|
+
<key>Info.plist</key>
|
|
16
|
+
<data>
|
|
17
|
+
n1uKz1HOP5lKIFyaa+M/WugPLpM=
|
|
18
|
+
</data>
|
|
19
|
+
<key>Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
20
|
+
<data>
|
|
21
|
+
Au+a1vc6m45SBkvfSdh3UT+uM2E=
|
|
22
|
+
</data>
|
|
23
|
+
<key>Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
24
|
+
<data>
|
|
25
|
+
h6vJW+NP0+gY51ZhP57nW392cYk=
|
|
26
|
+
</data>
|
|
27
|
+
<key>Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
28
|
+
<data>
|
|
29
|
+
atyRF4RCvp3Q7O/mp4rYXB1jE0Q=
|
|
30
|
+
</data>
|
|
31
|
+
<key>Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
32
|
+
<data>
|
|
33
|
+
h6vJW+NP0+gY51ZhP57nW392cYk=
|
|
34
|
+
</data>
|
|
35
|
+
<key>Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
36
|
+
<data>
|
|
37
|
+
GstdOocn005n9Y9BSuCOjaZ/KBo=
|
|
38
|
+
</data>
|
|
39
|
+
<key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
40
|
+
<data>
|
|
41
|
+
Au+a1vc6m45SBkvfSdh3UT+uM2E=
|
|
42
|
+
</data>
|
|
43
|
+
<key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
44
|
+
<data>
|
|
45
|
+
y0ggQlQYk8fPmRZJgyJe3Ma5o+w=
|
|
46
|
+
</data>
|
|
47
|
+
<key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
48
|
+
<data>
|
|
49
|
+
JazAtiVxFvmfMtiCcVLmAg7e1KM=
|
|
50
|
+
</data>
|
|
51
|
+
<key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
52
|
+
<data>
|
|
53
|
+
y0ggQlQYk8fPmRZJgyJe3Ma5o+w=
|
|
54
|
+
</data>
|
|
55
|
+
<key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
56
|
+
<data>
|
|
57
|
+
ufdIb2xdE4Uk5fET7rrUGlF8CFY=
|
|
58
|
+
</data>
|
|
59
|
+
<key>Modules/module.modulemap</key>
|
|
60
|
+
<data>
|
|
61
|
+
acpgMXnxtKZurb9LYb4tLOcX2cM=
|
|
62
|
+
</data>
|
|
63
|
+
</dict>
|
|
64
|
+
<key>files2</key>
|
|
65
|
+
<dict>
|
|
66
|
+
<key>Headers/FireworkVideoUI-Swift.h</key>
|
|
67
|
+
<dict>
|
|
68
|
+
<key>hash2</key>
|
|
69
|
+
<data>
|
|
70
|
+
xWiKQmcf3DHCgH9dBkmdlAsxIZiUklEHKL8VF5guI8w=
|
|
71
|
+
</data>
|
|
72
|
+
</dict>
|
|
73
|
+
<key>Headers/FireworkVideoUI.h</key>
|
|
74
|
+
<dict>
|
|
75
|
+
<key>hash2</key>
|
|
76
|
+
<data>
|
|
77
|
+
C2EMdBka9kS6ugy1NmcysmLzhwcZtW52x27D4Pi5P2Q=
|
|
78
|
+
</data>
|
|
79
|
+
</dict>
|
|
80
|
+
<key>Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
81
|
+
<dict>
|
|
82
|
+
<key>hash2</key>
|
|
83
|
+
<data>
|
|
84
|
+
A0FxvzFLyYWeXhK8cUOfscPrLasCqhaZNJhKluYu59k=
|
|
85
|
+
</data>
|
|
86
|
+
</dict>
|
|
87
|
+
<key>Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
88
|
+
<dict>
|
|
89
|
+
<key>hash2</key>
|
|
90
|
+
<data>
|
|
91
|
+
UkEtCk4njRXmEtNtWaE93q1xAPpSOkHeaFgW+Lz63CI=
|
|
92
|
+
</data>
|
|
93
|
+
</dict>
|
|
94
|
+
<key>Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
95
|
+
<dict>
|
|
96
|
+
<key>hash2</key>
|
|
97
|
+
<data>
|
|
98
|
+
ijGRDjteeQYBsYlAIa1ygEoPzdBUK0odDABdGpCdg6I=
|
|
99
|
+
</data>
|
|
100
|
+
</dict>
|
|
101
|
+
<key>Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
102
|
+
<dict>
|
|
103
|
+
<key>hash2</key>
|
|
104
|
+
<data>
|
|
105
|
+
UkEtCk4njRXmEtNtWaE93q1xAPpSOkHeaFgW+Lz63CI=
|
|
106
|
+
</data>
|
|
107
|
+
</dict>
|
|
108
|
+
<key>Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
109
|
+
<dict>
|
|
110
|
+
<key>hash2</key>
|
|
111
|
+
<data>
|
|
112
|
+
gHcFcwcr1aAv9W0SVThpQzKZ4iwioor9z8/+tAL9+5Q=
|
|
113
|
+
</data>
|
|
114
|
+
</dict>
|
|
115
|
+
<key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
116
|
+
<dict>
|
|
117
|
+
<key>hash2</key>
|
|
118
|
+
<data>
|
|
119
|
+
A0FxvzFLyYWeXhK8cUOfscPrLasCqhaZNJhKluYu59k=
|
|
120
|
+
</data>
|
|
121
|
+
</dict>
|
|
122
|
+
<key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
123
|
+
<dict>
|
|
124
|
+
<key>hash2</key>
|
|
125
|
+
<data>
|
|
126
|
+
Mzu7kL+XazpOcd2k3KQRRBTHmNTN7XErWwVGHsUJv7E=
|
|
127
|
+
</data>
|
|
128
|
+
</dict>
|
|
129
|
+
<key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
130
|
+
<dict>
|
|
131
|
+
<key>hash2</key>
|
|
132
|
+
<data>
|
|
133
|
+
/VtAsoSxZoVfhFW8ufywQGyBJU+cSfB3cI/rcVkUFGU=
|
|
134
|
+
</data>
|
|
135
|
+
</dict>
|
|
136
|
+
<key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
137
|
+
<dict>
|
|
138
|
+
<key>hash2</key>
|
|
139
|
+
<data>
|
|
140
|
+
Mzu7kL+XazpOcd2k3KQRRBTHmNTN7XErWwVGHsUJv7E=
|
|
141
|
+
</data>
|
|
142
|
+
</dict>
|
|
143
|
+
<key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
144
|
+
<dict>
|
|
145
|
+
<key>hash2</key>
|
|
146
|
+
<data>
|
|
147
|
+
3LgfAp0SD5Qb24w+Jt+yH3P1gvMKdtH25ZZQHYt25Os=
|
|
148
|
+
</data>
|
|
149
|
+
</dict>
|
|
150
|
+
<key>Modules/module.modulemap</key>
|
|
151
|
+
<dict>
|
|
152
|
+
<key>hash2</key>
|
|
153
|
+
<data>
|
|
154
|
+
e6XgRro0MbWm+Nu76XbtPBOQtqanmjktK8gkROMrsUo=
|
|
155
|
+
</data>
|
|
156
|
+
</dict>
|
|
157
|
+
</dict>
|
|
158
|
+
<key>rules</key>
|
|
159
|
+
<dict>
|
|
160
|
+
<key>^.*</key>
|
|
161
|
+
<true/>
|
|
162
|
+
<key>^.*\.lproj/</key>
|
|
163
|
+
<dict>
|
|
164
|
+
<key>optional</key>
|
|
165
|
+
<true/>
|
|
166
|
+
<key>weight</key>
|
|
167
|
+
<real>1000</real>
|
|
168
|
+
</dict>
|
|
169
|
+
<key>^.*\.lproj/locversion.plist$</key>
|
|
170
|
+
<dict>
|
|
171
|
+
<key>omit</key>
|
|
172
|
+
<true/>
|
|
173
|
+
<key>weight</key>
|
|
174
|
+
<real>1100</real>
|
|
175
|
+
</dict>
|
|
176
|
+
<key>^Base\.lproj/</key>
|
|
177
|
+
<dict>
|
|
178
|
+
<key>weight</key>
|
|
179
|
+
<real>1010</real>
|
|
180
|
+
</dict>
|
|
181
|
+
<key>^version.plist$</key>
|
|
182
|
+
<true/>
|
|
183
|
+
</dict>
|
|
184
|
+
<key>rules2</key>
|
|
185
|
+
<dict>
|
|
186
|
+
<key>.*\.dSYM($|/)</key>
|
|
187
|
+
<dict>
|
|
188
|
+
<key>weight</key>
|
|
189
|
+
<real>11</real>
|
|
190
|
+
</dict>
|
|
191
|
+
<key>^(.*/)?\.DS_Store$</key>
|
|
192
|
+
<dict>
|
|
193
|
+
<key>omit</key>
|
|
194
|
+
<true/>
|
|
195
|
+
<key>weight</key>
|
|
196
|
+
<real>2000</real>
|
|
197
|
+
</dict>
|
|
198
|
+
<key>^.*</key>
|
|
199
|
+
<true/>
|
|
200
|
+
<key>^.*\.lproj/</key>
|
|
201
|
+
<dict>
|
|
202
|
+
<key>optional</key>
|
|
203
|
+
<true/>
|
|
204
|
+
<key>weight</key>
|
|
205
|
+
<real>1000</real>
|
|
206
|
+
</dict>
|
|
207
|
+
<key>^.*\.lproj/locversion.plist$</key>
|
|
208
|
+
<dict>
|
|
209
|
+
<key>omit</key>
|
|
210
|
+
<true/>
|
|
211
|
+
<key>weight</key>
|
|
212
|
+
<real>1100</real>
|
|
213
|
+
</dict>
|
|
214
|
+
<key>^Base\.lproj/</key>
|
|
215
|
+
<dict>
|
|
216
|
+
<key>weight</key>
|
|
217
|
+
<real>1010</real>
|
|
218
|
+
</dict>
|
|
219
|
+
<key>^Info\.plist$</key>
|
|
220
|
+
<dict>
|
|
221
|
+
<key>omit</key>
|
|
222
|
+
<true/>
|
|
223
|
+
<key>weight</key>
|
|
224
|
+
<real>20</real>
|
|
225
|
+
</dict>
|
|
226
|
+
<key>^PkgInfo$</key>
|
|
227
|
+
<dict>
|
|
228
|
+
<key>omit</key>
|
|
229
|
+
<true/>
|
|
230
|
+
<key>weight</key>
|
|
231
|
+
<real>20</real>
|
|
232
|
+
</dict>
|
|
233
|
+
<key>^embedded\.provisionprofile$</key>
|
|
234
|
+
<dict>
|
|
235
|
+
<key>weight</key>
|
|
236
|
+
<real>20</real>
|
|
237
|
+
</dict>
|
|
238
|
+
<key>^version\.plist$</key>
|
|
239
|
+
<dict>
|
|
240
|
+
<key>weight</key>
|
|
241
|
+
<real>20</real>
|
|
242
|
+
</dict>
|
|
243
|
+
</dict>
|
|
244
|
+
</dict>
|
|
245
|
+
</plist>
|
package/README.md
CHANGED
package/android/build.gradle
CHANGED
|
@@ -50,8 +50,8 @@ android {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
buildFeatures {
|
|
54
|
+
viewBinding = true
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
lintOptions {
|
|
@@ -68,7 +68,6 @@ android {
|
|
|
68
68
|
repositories {
|
|
69
69
|
mavenCentral()
|
|
70
70
|
google()
|
|
71
|
-
maven { url 'https://jitpack.io' }
|
|
72
71
|
mavenLocal()
|
|
73
72
|
|
|
74
73
|
maven {
|
|
@@ -151,7 +150,7 @@ dependencies {
|
|
|
151
150
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
|
152
151
|
|
|
153
152
|
|
|
154
|
-
def fireworkSdkVersion = "6.
|
|
153
|
+
def fireworkSdkVersion = "6.2.1"
|
|
155
154
|
implementation "com.firework:sdk:$fireworkSdkVersion"
|
|
156
155
|
implementation "com.firework.external.imageloading:glide:$fireworkSdkVersion"
|
|
157
156
|
implementation "com.firework.external.livestream:singleHostPlayer:$fireworkSdkVersion"
|
|
@@ -165,6 +164,8 @@ dependencies {
|
|
|
165
164
|
|
|
166
165
|
// required to avoid crash on Android 12 API 31
|
|
167
166
|
implementation 'androidx.work:work-runtime-ktx:2.7.0'
|
|
167
|
+
|
|
168
|
+
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
|
168
169
|
}
|
|
169
170
|
|
|
170
171
|
configurations.all {
|
|
@@ -59,6 +59,12 @@ class FWVideoFeed(
|
|
|
59
59
|
)
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
fun setHashtagFilterExpressionProps(hashtagFilterExpression: String?) {
|
|
63
|
+
videoFeedPropsModel = videoFeedPropsModel.copy(
|
|
64
|
+
hashtagFilterExpression = hashtagFilterExpression
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
|
|
62
68
|
fun setModeProps(mode: String?) {
|
|
63
69
|
videoFeedPropsModel = videoFeedPropsModel.copy(
|
|
64
70
|
mode = mode
|
package/android/src/main/java/com/fireworksdk/bridge/components/videofeed/StoryBlockFragment.kt
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
package com.fireworksdk.bridge.components.videofeed
|
|
2
|
+
|
|
3
|
+
import android.os.Bundle
|
|
4
|
+
import android.view.LayoutInflater
|
|
5
|
+
import android.view.View
|
|
6
|
+
import android.view.ViewGroup
|
|
7
|
+
import androidx.activity.OnBackPressedCallback
|
|
8
|
+
import androidx.fragment.app.Fragment
|
|
9
|
+
import com.firework.storyblock.FeedLoadListener
|
|
10
|
+
import com.firework.storyblock.FwStoryBlockView
|
|
11
|
+
import com.fireworksdk.bridge.databinding.FwBridgeStoryBlockBinding
|
|
12
|
+
import com.fireworksdk.bridge.models.FWVideoFeedPropsModel
|
|
13
|
+
import com.fireworksdk.bridge.utils.FWConfigUtil
|
|
14
|
+
|
|
15
|
+
class StoryBlockFragment : Fragment() {
|
|
16
|
+
|
|
17
|
+
private var _binding: FwBridgeStoryBlockBinding? = null
|
|
18
|
+
private val binding: FwBridgeStoryBlockBinding get() = _binding!!
|
|
19
|
+
|
|
20
|
+
private var feedLoadListener: FeedLoadListener? = null
|
|
21
|
+
private var fullScreenStateChangeListener: FwStoryBlockView.OnFullscreenStateChangeListener? = null
|
|
22
|
+
private var videoFeedPropsModel: FWVideoFeedPropsModel = FWVideoFeedPropsModel()
|
|
23
|
+
|
|
24
|
+
override fun onCreateView(
|
|
25
|
+
inflater: LayoutInflater,
|
|
26
|
+
container: ViewGroup?,
|
|
27
|
+
savedInstanceState: Bundle?,
|
|
28
|
+
): View {
|
|
29
|
+
_binding = FwBridgeStoryBlockBinding.inflate(inflater)
|
|
30
|
+
return binding.root
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
|
34
|
+
super.onViewCreated(view, savedInstanceState)
|
|
35
|
+
afterUpdateTransaction()
|
|
36
|
+
// need to call it after init()
|
|
37
|
+
binding.storyBlock.setFeedLoadListener(feedLoadListener)
|
|
38
|
+
binding.storyBlock.setOnFullscreenStateChangeListener(fullScreenStateChangeListener)
|
|
39
|
+
// addBackPressedCallback()
|
|
40
|
+
// Handler(Looper.getMainLooper()).postDelayed({
|
|
41
|
+
// addBackPressedCallback()
|
|
42
|
+
// }, 10000)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
override fun onDestroyView() {
|
|
47
|
+
// removeBackPressedCallback()
|
|
48
|
+
_binding = null
|
|
49
|
+
super.onDestroyView()
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
private fun afterUpdateTransaction() {
|
|
53
|
+
val viewOptionsBuilder = FWConfigUtil.generateViewOptionsBuilder(videoFeedPropsModel)
|
|
54
|
+
binding.storyBlock.init(
|
|
55
|
+
childFragmentManager,
|
|
56
|
+
requireActivity().lifecycle,
|
|
57
|
+
viewOptionsBuilder.build(),
|
|
58
|
+
binding.storyBlockContainer,
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
fun setProps(props: FWVideoFeedPropsModel?) {
|
|
63
|
+
props ?: return
|
|
64
|
+
videoFeedPropsModel = props
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
fun play() {
|
|
68
|
+
binding.storyBlock.play()
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
fun pause() {
|
|
72
|
+
binding.storyBlock.pause()
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
fun toggleFullScreen() {
|
|
76
|
+
binding.storyBlock.toggleFullscreen()
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
fun setFeedLoadListener(feedLoadListener: FeedLoadListener?) {
|
|
80
|
+
this.feedLoadListener = feedLoadListener
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
fun setOnFullScreenStateChangedListener(listener: FwStoryBlockView.OnFullscreenStateChangeListener?) {
|
|
84
|
+
this.fullScreenStateChangeListener = listener
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
fun isFullScreen(): Boolean {
|
|
88
|
+
return binding.storyBlock.isFullscreen()
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
private val mBackPressedCallback: OnBackPressedCallback by lazy {
|
|
92
|
+
object : OnBackPressedCallback(true) {
|
|
93
|
+
override fun handleOnBackPressed() {
|
|
94
|
+
if (binding.storyBlock.isFullscreen()) {
|
|
95
|
+
binding.storyBlock.toggleFullscreen()
|
|
96
|
+
} else {
|
|
97
|
+
isEnabled = false
|
|
98
|
+
requireActivity().onBackPressed()
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
private fun addBackPressedCallback() {
|
|
105
|
+
requireActivity()
|
|
106
|
+
.onBackPressedDispatcher
|
|
107
|
+
.addCallback(
|
|
108
|
+
viewLifecycleOwner,
|
|
109
|
+
mBackPressedCallback
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
private fun removeBackPressedCallback() {
|
|
114
|
+
mBackPressedCallback.remove()
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
override fun onPause() {
|
|
118
|
+
super.onPause()
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
override fun onResume() {
|
|
122
|
+
super.onResume()
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
override fun onDestroy() {
|
|
126
|
+
super.onDestroy()
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
}
|
package/android/src/main/java/com/fireworksdk/bridge/components/videofeed/StoryBlockFrameLayout.kt
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
package com.fireworksdk.bridge.components.videofeed
|
|
2
|
+
|
|
3
|
+
import android.content.Context
|
|
4
|
+
import android.util.AttributeSet
|
|
5
|
+
import android.widget.FrameLayout
|
|
6
|
+
import com.fireworksdk.bridge.models.*
|
|
7
|
+
|
|
8
|
+
class StoryBlockFrameLayout(
|
|
9
|
+
context: Context,
|
|
10
|
+
attrs: AttributeSet?
|
|
11
|
+
) : FrameLayout(context, attrs) {
|
|
12
|
+
|
|
13
|
+
constructor(context: Context) : this(context, null)
|
|
14
|
+
|
|
15
|
+
private var videoFeedPropsModel: FWVideoFeedPropsModel = FWVideoFeedPropsModel()
|
|
16
|
+
private var storyBlockFragment by weakProperty<StoryBlockFragment?>()
|
|
17
|
+
|
|
18
|
+
fun setSource(source: String?) {
|
|
19
|
+
videoFeedPropsModel = videoFeedPropsModel.copy(
|
|
20
|
+
source = source
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
fun setChannel(channel: String?) {
|
|
25
|
+
videoFeedPropsModel = videoFeedPropsModel.copy(
|
|
26
|
+
channel = channel
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
fun setPlaylist(playlist: String?) {
|
|
31
|
+
videoFeedPropsModel = videoFeedPropsModel.copy(
|
|
32
|
+
playlist = playlist
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
fun setHashtagFilterExpressionProps(hashtagFilterExpression: String?) {
|
|
37
|
+
videoFeedPropsModel = videoFeedPropsModel.copy(
|
|
38
|
+
hashtagFilterExpression = hashtagFilterExpression
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
fun setDynamicContentParameters(parametersMap: HashMap<String, List<String>>?) {
|
|
43
|
+
videoFeedPropsModel = videoFeedPropsModel.copy(
|
|
44
|
+
dynamicContentParameters = parametersMap
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
fun setEnablePictureInPicture(enablePictureInPicture: Boolean?) {
|
|
49
|
+
videoFeedPropsModel = videoFeedPropsModel.copy(
|
|
50
|
+
enablePictureInPicture = enablePictureInPicture
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
fun setVideoFeedConfig(config: FWVideoFeedConfigModel?) {
|
|
55
|
+
videoFeedPropsModel = videoFeedPropsModel.copy(
|
|
56
|
+
videoFeedConfiguration = config
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
fun setVideoPlayerConfig(config: FWVideoPlayerConfigModel?) {
|
|
61
|
+
videoFeedPropsModel = videoFeedPropsModel.copy(
|
|
62
|
+
videoPlayerConfiguration = config
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
fun setFragment(fragment: StoryBlockFragment) {
|
|
67
|
+
this.storyBlockFragment = fragment
|
|
68
|
+
fragment.setProps(videoFeedPropsModel)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
fun getFragment(): StoryBlockFragment? {
|
|
72
|
+
return storyBlockFragment
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
fun play() {
|
|
76
|
+
storyBlockFragment?.play()
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
fun pause() {
|
|
80
|
+
storyBlockFragment?.pause()
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
fun toggleFullScreen() {
|
|
84
|
+
storyBlockFragment?.toggleFullScreen()
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
fun destroy() {
|
|
88
|
+
storyBlockFragment = null
|
|
89
|
+
}
|
|
90
|
+
}
|
package/android/src/main/java/com/fireworksdk/bridge/models/FWAdBadgeConfigModelDeserializer.kt
CHANGED
|
@@ -11,9 +11,9 @@ object FWAdBadgeConfigModelDeserializer {
|
|
|
11
11
|
fun deserialize(responseJson: JSONObject?): FWAdBadgeConfigModel? {
|
|
12
12
|
responseJson ?: return null
|
|
13
13
|
|
|
14
|
-
val badgeTextType = responseJson.optString(BADGE_TEXT_TYPE_KEY)
|
|
15
|
-
val backgroundColor = responseJson.optString(BACKGROUND_COLOR_KEY)
|
|
16
|
-
val textColor = responseJson.optString(TEXT_COLOR_KEY)
|
|
14
|
+
val badgeTextType = if (responseJson.has(BADGE_TEXT_TYPE_KEY)) responseJson.optString(BADGE_TEXT_TYPE_KEY) else null
|
|
15
|
+
val backgroundColor = if (responseJson.has(BACKGROUND_COLOR_KEY)) responseJson.optString(BACKGROUND_COLOR_KEY) else null
|
|
16
|
+
val textColor = if (responseJson.has(TEXT_COLOR_KEY)) responseJson.optString(TEXT_COLOR_KEY) else null
|
|
17
17
|
|
|
18
18
|
return FWAdBadgeConfigModel(
|
|
19
19
|
badgeTextType = badgeTextType,
|
|
@@ -21,17 +21,20 @@ enum class FWFeedViewEventName(val rawValue: String) {
|
|
|
21
21
|
enum class FWVideoPlaybackSubEventName(val rawValue: String) {
|
|
22
22
|
Impression("fw:video:impression"),
|
|
23
23
|
Start("fw:video:start"),
|
|
24
|
+
Pause("fw:video:pause"),
|
|
25
|
+
Resume("fw:video:resume"),
|
|
24
26
|
FirstQuartile("fw:video:first-quartile"),
|
|
25
27
|
Midpoint("fw:video:midpoint"),
|
|
26
28
|
ThirdQuartile("fw:video:third-quartile"),
|
|
27
29
|
Complete("fw:video:complete"),
|
|
30
|
+
AdStart("fw:video:ad-start"),
|
|
28
31
|
AdEnd("fw:video:ad-end"),
|
|
29
32
|
ClickCTA("fw:video:click-cta"),
|
|
30
33
|
ClickShare("fw:video:click-share"),
|
|
31
34
|
}
|
|
32
35
|
|
|
33
36
|
enum class FWVideoShoppingEventName(val rawValue: String) {
|
|
34
|
-
|
|
37
|
+
CtaButtonClick("fw:shopping:cta-button-click"),
|
|
35
38
|
ClickCartIcon("fw:shopping:click-cart-icon"),
|
|
36
39
|
UpdateProductDetails("fw:shopping:update-product-details"),
|
|
37
40
|
WillDisplayProduct("fw:shopping:will-display-product"),
|
|
@@ -47,4 +50,5 @@ enum class FWLiveStreamEventName(val rawValue: String) {
|
|
|
47
50
|
|
|
48
51
|
enum class FWStoryBlockEventName(val rawValue: String) {
|
|
49
52
|
StoryBlockLoadFinished("onStoryBlockLoadFinished"),
|
|
53
|
+
StoryBlockFullScreenStateChanged("onStoryBlockFullScreenStateChanged"),
|
|
50
54
|
}
|
|
@@ -11,7 +11,7 @@ object FWFontInfoModelDeserializer {
|
|
|
11
11
|
responseJson ?: return null
|
|
12
12
|
|
|
13
13
|
val isCustom = responseJson.optBoolean(IS_CUSTOM_KEY, false)
|
|
14
|
-
val typefaceName = responseJson.optString(TYPEFACE_NAME_KEY)
|
|
14
|
+
val typefaceName = if (responseJson.has(TYPEFACE_NAME_KEY)) responseJson.optString(TYPEFACE_NAME_KEY) else null
|
|
15
15
|
|
|
16
16
|
return FWFontInfoModel(
|
|
17
17
|
isCustom = isCustom,
|