react-native-firework-sdk 2.10.1 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/gradle.properties +1 -1
- package/android/src/main/java/com/fireworksdk/bridge/components/storyblock/StoryBlockFragment.kt +18 -1
- package/android/src/main/java/com/fireworksdk/bridge/components/videofeed/FWVideoFeed.kt +4 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWSDKInitOptionsModel.kt +0 -1
- package/android/src/main/java/com/fireworksdk/bridge/models/FWSDKInitOptionsModelDeserializer.kt +0 -3
- package/android/src/main/java/com/fireworksdk/bridge/models/FWSDKInitOptionsModelSerializer.kt +0 -2
- package/android/src/main/java/com/fireworksdk/bridge/models/FWSdkInitResultModel.kt +6 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWTrackPurchaseModel.kt +9 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWTrackPurchaseModelDeserializer.kt +45 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWTrackPurchaseModelSerializer.kt +34 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedItemDetailsModel.kt +1 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlaybackDetails.kt +1 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerConfigModel.kt +2 -1
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerConfigModelDeserializer.kt +4 -1
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerConfigModelSerializer.kt +2 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerLogoConfigurationModel.kt +8 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerLogoConfigurationModelDeserializer.kt +23 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerLogoConfigurationModelSerializer.kt +18 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWEventName.kt +2 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWVideoPlayerLogoOption.kt +19 -0
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/FWReactNativeSDK.kt +103 -0
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/manager/FWStoryBlockManager.kt +12 -0
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/manager/FWVideoFeedManager.kt +8 -0
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/models/FireworkSDKInterface.kt +2 -0
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FWVideoShoppingModule.kt +22 -9
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FireworkSDKModule.kt +74 -122
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/utils/FWEventUtils.kt +34 -9
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWConfigUtil.kt +13 -0
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWFragmentUtil.kt +3 -3
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWGlobalDataUtil.kt +5 -2
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWModelUtils.kt +64 -0
- package/ios/Components/ReplayBadgeConfiguration.swift +12 -0
- package/ios/Components/StoryBlock.swift +31 -0
- package/ios/Components/StoryBlockConfiguration.swift +1 -0
- package/ios/Components/StoryBlockManager.m +24 -0
- package/ios/Components/StoryBlockManager.swift +6 -3
- package/ios/Components/VideoFeed.swift +18 -3
- package/ios/Components/VideoFeedConfiguration.swift +1 -0
- package/ios/Components/VideoFeedManager.m +4 -1
- package/ios/Components/VideoFeedManager.swift +6 -3
- package/ios/Components/VideoPlayerConfiguration.swift +1 -0
- package/ios/FWReactNativeSDK.swift +14 -0
- package/ios/FireworkSdk.xcodeproj/project.pbxproj +4 -0
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule+CTA.swift +17 -15
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule+EventTracking.swift +1 -11
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule.m +1 -0
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule.swift +80 -81
- package/ios/Modules/FireworkSDKModule/SDKInitOptions.swift +9 -5
- package/ios/Modules/Shopping/ShoppingModule.swift +10 -74
- package/lib/commonjs/FireworkSDK.js +30 -25
- package/lib/commonjs/FireworkSDK.js.map +1 -1
- package/lib/commonjs/VideoShopping.js +6 -12
- package/lib/commonjs/VideoShopping.js.map +1 -1
- package/lib/commonjs/components/StoryBlock.js +54 -3
- package/lib/commonjs/components/StoryBlock.js.map +1 -1
- package/lib/commonjs/components/VideoFeed.js +46 -4
- package/lib/commonjs/components/VideoFeed.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/FWNativeErrorAction.js +14 -0
- package/lib/commonjs/models/FWNativeErrorAction.js.map +1 -0
- package/lib/commonjs/models/ReplayBadgeConfiguration.js +2 -0
- package/lib/commonjs/models/ReplayBadgeConfiguration.js.map +1 -0
- package/lib/commonjs/modules/FireworkSDKModule.js.map +1 -1
- package/lib/module/FireworkSDK.js +29 -25
- package/lib/module/FireworkSDK.js.map +1 -1
- package/lib/module/VideoShopping.js +6 -12
- package/lib/module/VideoShopping.js.map +1 -1
- package/lib/module/components/StoryBlock.js +53 -3
- package/lib/module/components/StoryBlock.js.map +1 -1
- package/lib/module/components/VideoFeed.js +42 -4
- package/lib/module/components/VideoFeed.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/FWNativeErrorAction.js +7 -0
- package/lib/module/models/FWNativeErrorAction.js.map +1 -0
- package/lib/module/models/ReplayBadgeConfiguration.js +2 -0
- package/lib/module/models/ReplayBadgeConfiguration.js.map +1 -0
- package/lib/module/modules/FireworkSDKModule.js.map +1 -1
- package/lib/typescript/VideoShopping.d.ts +2 -2
- package/lib/typescript/components/StoryBlock.d.ts +18 -1
- package/lib/typescript/components/VideoFeed.d.ts +7 -1
- package/lib/typescript/index.d.ts +2 -2
- package/lib/typescript/models/FWEvents.d.ts +26 -3
- package/lib/typescript/models/FWNativeErrorAction.d.ts +4 -0
- package/lib/typescript/models/FeedItemDetails.d.ts +6 -1
- package/lib/typescript/models/ReplayBadgeConfiguration.d.ts +7 -0
- package/lib/typescript/models/StoryBlockConfiguration.d.ts +6 -1
- package/lib/typescript/models/VideoFeedConfiguration.d.ts +6 -0
- package/lib/typescript/models/VideoPlayerConfiguration.d.ts +6 -1
- package/lib/typescript/modules/FireworkSDKModule.d.ts +1 -0
- package/package.json +1 -5
- package/react-native-firework-sdk.podspec +3 -5
- package/src/FireworkSDK.ts +27 -24
- package/src/VideoShopping.ts +9 -11
- package/src/components/StoryBlock.tsx +69 -7
- package/src/components/VideoFeed.tsx +57 -12
- package/src/index.ts +2 -0
- package/src/models/FWEvents.ts +28 -3
- package/src/models/FWNativeErrorAction.ts +4 -0
- package/src/models/FeedItemDetails.ts +7 -1
- package/src/models/ReplayBadgeConfiguration.ts +7 -0
- package/src/models/StoryBlockConfiguration.ts +6 -1
- package/src/models/VideoFeedConfiguration.ts +6 -0
- package/src/models/VideoPlayerConfiguration.ts +6 -1
- package/src/modules/FireworkSDKModule.ts +1 -0
- package/FireworkVideoUI.xcframework/Info.plist +0 -40
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/FireworkVideoUI +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Headers/FireworkVideoUI-Swift.h +0 -280
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Headers/FireworkVideoUI.h +0 -18
- 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 +0 -1313
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios.private.swiftinterface +0 -42
- 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 +0 -42
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Modules/module.modulemap +0 -11
- 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 +0 -556
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Headers/FireworkVideoUI.h +0 -18
- 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 +0 -1313
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +0 -42
- 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 +0 -42
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.abi.json +0 -1313
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +0 -42
- 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 +0 -42
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/module.modulemap +0 -11
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/_CodeSignature/CodeResources +0 -245
- package/ios/FireworkVideoUI/FireworkVideoUI/FireworkVideoUI.docc/FireworkVideoUI.md +0 -13
- package/ios/FireworkVideoUI/FireworkVideoUI/FireworkVideoUI.h +0 -18
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/AppLanguageManager.swift +0 -154
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/Foundation/Bundle+AppLanguage.swift +0 -73
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/Foundation/NumberFormatter+AppLanguage.swift +0 -25
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/Foundation/URLSession+AppLanguage.swift +0 -52
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/UIKit/UIImageView+AppLanguage.swift +0 -60
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/UIKit/UILabel+AppLanguage.swift +0 -98
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/UIKit/UITextField+AppLanguage.swift +0 -97
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/UIKit/UITextView+AppLanguage.swift +0 -97
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/UIKit/UIView+AppLanguage.swift +0 -71
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/UIKit/UIViewController+AppLanguage.swift +0 -48
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/UIKit/UIWindow+AppLanguage.swift +0 -26
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/LanguageUtil.swift +0 -43
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/LayoutFlip/Extensions/Foundation/NSObject+LayoutFlip.swift +0 -42
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/LayoutFlip/Extensions/UIKit/CALayer+LayoutFlip.swift +0 -149
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/LayoutFlip/Extensions/UIKit/UILabel+LayoutFlip.swift +0 -35
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/LayoutFlip/Extensions/UIKit/UIView+LayoutFlip.swift +0 -202
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/LayoutFlip/LayoutFlipManager.swift +0 -59
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/Utils/Extensions/Foundation/DispatchQueue+Once.swift +0 -32
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/Utils/Extensions/Foundation/String+Base64.swift +0 -18
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/Utils/Extensions/UIKit/UIView+UIHierarchy.swift +0 -46
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/Utils/Swizzle.swift +0 -37
- package/ios/FireworkVideoUI/FireworkVideoUI.xcodeproj/project.pbxproj +0 -766
- package/ios/FireworkVideoUI/FireworkVideoUI.xcworkspace/contents.xcworkspacedata +0 -10
- package/ios/FireworkVideoUI/FireworkVideoUI.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/ios/FireworkVideoUI/FireworkVideoUITests/FireworkVideoUITests.swift +0 -37
- package/ios/FireworkVideoUI/Podfile +0 -15
- package/ios/FireworkVideoUI/Podfile.lock +0 -16
- package/ios/scripts/react_native_firework_sdk_pods.rb +0 -27
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["VideoFeed.tsx"],"names":["React","findNodeHandle","Platform","UIManager","FireworkSDK","FWEventName","FireworkSDKModuleEventEmitter","FWGlobalState","FWLoggerUtil","FWVideoFeed","NativeComponentName","VideoFeed","Component","constructor","props","createRef","log","JSON","stringify","nativeNodeHandle","_nativeComponentRef","current","commandId","getViewManagerConfig","Commands","refresh","OS","toString","dispatchViewManagerCommand","event","nativeEvent","onVideoFeedLoadFinished","onVideoFeedEmpty","name","reason","error","_loaded","onVideoFeedDidStartPictureInPicture","onVideoFeedDidStopPictureInPicture","state","sdkInitCalled","getInstance","componentDidMount","sdkInitCalledPromise","then","setState","subscriptionOfShareBaseURLUpdated","addListener","ShareBaseURLUpdated","_subscriptions","push","subscriptionOfAdBadgeConfigurationUpdated","AdBadgeConfigurationUpdated","subscriptionOfVideoLaunchBehaviorUpdated","VideoLaunchBehaviorUpdated","subscriptionOfAppLanguageUpdated","AppLanguageUpdated","componentWillUnmount","forEach","value","remove","render","gShareBaseURL","shareBaseURL","appLanguage","videoLaunchBehavior","adBadgeConfiguration","adBadgeTextType","badgeTextType","backgroundColorOfAdBadge","backgroundColor","textColorOfAdBadge","textColor","androidFontIsCustomOfAdBadge","androidFontInfo","isCustom","androidFontTypefaceNameOfAdBadge","typefaceName","source","channel","playlist","playlistGroup","hashtagFilterExpression","productIds","contentId","mode","enablePictureInPicture","adConfiguration","dynamicContentParametersString","_generateDynamicContentParametersString","videoFeedConfiguration","_getVideoFeedConfiguration","cornerRadius","toFixed","titleHidden","title","hidden","titleTextColor","titleFontSize","fontSize","titleAndroidFontInfo","titleGradientDrawable","gradientDrawable","titlePosition","playIconHidden","playIcon","playIconWidth","iconWidth","showAdBadge","enableAutoplay","gridColumns","itemSpacing","videoPlayerConfiguration","_getVideoPlayerConfiguration","playerStyle","videoCompleteAction","showShareButton","showPlaybackButton","showMuteButton","showBranding","ctaDelayType","ctaDelay","type","ctaDelayValue","ctaHighlightDelayType","ctaHighlightDelay","ctaHighlightDelayValue","ctaWidth","buttonConfiguration","showVideoDetailTitle","requiresAds","adsFetchTimeout","vastAttributesString","_generateVastAttributesString","key","join","orientation","colors","_generateButtonInfoString","videoDetailButton","closeButton","muteButton","unmuteButton","playButton","pauseButton","undefined","_onVideoFeedLoadFinished","_onVideoFeedEmpty","_onVideoFeedDidStartPictureInPicture","_onVideoFeedDidStopPictureInPicture","dynamicContentParameters","resultString","sortedKeyList","Object","keys","sort","valueString","length","vastAttributes","attribute","buttonInfo","imageName","systemImageName","tintColor","resultVideoFeedConfiguration","Math","floor","numberOfLines","resultVideoPlayerConfiguration"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAEEC,cAFF,EAIEC,QAJF,EAMEC,SANF,QAQO,cARP;AAUA,OAAOC,WAAP,MAAwB,gBAAxB;AAGA,SAASC,WAAT,QAA4B,uBAA5B;AAIA,SAASC,6BAAT,QAA8C,8BAA9C;AACA,OAAOC,aAAP,MAA0B,wBAA1B;AACA,OAAOC,YAAP,MAAyB,uBAAzB;AACA,OAAOC,WAAP,MAAwB,eAAxB;AAkGA,MAAMC,mBAAmB,GAAG,aAA5B;AAEA;AACA;AACA;;AACA,MAAMC,SAAN,SAAwBX,KAAK,CAACY,SAA9B,CAA0E;AACxE;AACF;AACA;AAWEC,EAAAA,WAAW,CAACC,KAAD,EAAyB;AAClC,UAAMA,KAAN;;AADkC,8DANNd,KAAK,CAACe,SAAN,EAMM;;AAAA,4CAJY,EAIZ;;AAAA,qCAFT,KAES;;AAAA,qCAOnB,MAAM;AACrBP,MAAAA,YAAY,CAACQ,GAAb,CAAkB,qBAAoBC,IAAI,CAACC,SAAL,CAAe,KAAKJ,KAApB,CAA2B,EAAjE;AAEA,YAAMK,gBAAgB,GAAGlB,cAAc,CAAC,KAAKmB,mBAAL,CAAyBC,OAA1B,CAAvC;AAEA,UAAIC,SAA0B,GAC5BnB,SAAS,CAACoB,oBAAV,CAA+Bb,mBAA/B,EA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B,CAAmCwE,aAJvC,EAKE;AACA,YAAMA,aAAa,GAAGF,IAAI,CAACC,KAAL,CACpBF,4BAA4B,CAACrE,KAA7B,CAAmCwE,aADf,CAAtB;AAGAH,MAAAA,4BAA4B,GAAG,EAC7B,GAAGA,4BAD0B;AAE7BrE,QAAAA,KAAK,EAAE,EACL,GAAGqE,4BAA4B,CAACrE,KAD3B;AAELwE,UAAAA;AAFK;AAFsB,OAA/B;AAOD;;AAED,WAAOH,4BAAP;AACD;;AAEOnD,EAAAA,4BAA4B,GAEtB;AACZ,UAAM;AAAED,MAAAA,wBAAF;AAA4B1B,MAAAA;AAA5B,QAAuD,KAAKxE,KAAlE;AAEA,QAAI0J,8BAES,GAAGxD,wBAFhB;;AAGA,QAAI,OAAO1B,sBAAP,KAAkC,SAAtC,EAAiD;AAC/C,UAAI,CAACkF,8BAAL,EAAqC;AACnCA,QAAAA,8BAA8B,GAAG,EAAjC;AACD;;AACDA,MAAAA,8BAA8B,GAAG,EAC/B,GAAGA,8BAD4B;AAE/BlF,QAAAA;AAF+B,OAAjC;AAID;;AAED,WAAOkF,8BAAP;AACD;;AA9duE;;gBAApE7J,S,kBAIkB;AACpB0E,EAAAA,IAAI,EAAE;AADc,C;;AA6dxB,eAAe1E,SAAf","sourcesContent":["import React from 'react';\n\nimport {\n EmitterSubscription,\n findNodeHandle,\n NativeSyntheticEvent,\n Platform,\n StyleProp,\n UIManager,\n ViewStyle,\n} from 'react-native';\n\nimport FireworkSDK from '../FireworkSDK';\nimport type AdConfiguration from '../models/AdConfiguration';\nimport type FWError from '../models/FWError';\nimport { FWEventName } from '../models/FWEventName';\nimport type VideoFeedConfiguration from '../models/VideoFeedConfiguration';\nimport type { VideoFeedSource } from '../models/VideoFeedSource';\nimport type VideoPlayerConfiguration from '../models/VideoPlayerConfiguration';\nimport { FireworkSDKModuleEventEmitter } from '../modules/FireworkSDKModule';\nimport FWGlobalState from '../utils/FWGlobalState';\nimport FWLoggerUtil from '../utils/FWLoggerUtil';\nimport FWVideoFeed from './FWVideoFeed';\nimport type VideoPlayerNativeConfiguration from '../models/VideoPlayerNativeConfiguration';\nimport type ButtonInfo from '../models/ButtonInfo';\n\nexport type VideoFeedMode = 'row' | 'column' | 'grid';\n\n/**\n * The props of VideoFeed component.\n */\nexport interface IVideoFeedProps {\n /**\n * Standard React Native View Style.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * One of five available video feed sources.The playlistGroup is only supported on iOS.\n * Defaults to discover.\n */\n source: VideoFeedSource;\n /**\n * Channel id of the feed. Required when the source is set as channel or playlist or dynamicContent.\n */\n channel?: string;\n /**\n * Playlist id of the feed. Please note channel id is necessary. Required when the source is set as playlist.\n */\n playlist?: string;\n /**\n * PlaylistGroup id of the feed. Required when the source is set as playlistGroup. Only supported on iOS.\n */\n playlistGroup?: string;\n /**\n * The dynamic content parameters of the feed. Required when the source is set as dynamicContent.\n */\n dynamicContentParameters?: { [key: string]: string[] };\n /**\n * Hashtag filter expression is an s-expression used to provide feeds filtered by hashtags with specified criteria.\n * Queries are specified with boolean predicates on what hashtags are there on the video.\n * For instance, (and sport food) (or sport food) (and sport (or food comedy)) sport are all valid expressions.\n * Non-UTF-8 characters are not allowed. If using boolean predicates, the expression needs to be wrapped with parenthesis.\n * Required when the source is set as hashtagPlaylist.\n */\n hashtagFilterExpression?: string;\n /**\n * Product ids used to generate the sku feed\n */\n productIds?: string[];\n /**\n * The video or live stream id. Only supported on iOS.\n */\n contentId?: string;\n /**\n * One of three available display modes. Defaults to row.\n */\n mode?: VideoFeedMode;\n /**\n * Specifies if Picture in Picture is enabled.\n */\n enablePictureInPicture?: boolean;\n /**\n * Configuration of the feed.\n */\n videoFeedConfiguration?: VideoFeedConfiguration;\n /**\n * Configuration of the player.\n */\n videoPlayerConfiguration?: VideoPlayerConfiguration;\n /**\n * Ad configuration of the feed.\n */\n adConfiguration?: AdConfiguration;\n /**\n * The feed loading result callback. It means loading successfully when error equals to undefined.\n */\n onVideoFeedLoadFinished?: (error?: FWError) => void;\n /**\n * The callback is triggered when there are no items in the story block.\n * The callback is triggered in the following cases:\n * 1. Loading successfully but the back end returns an empty list.\n * 2. The load failed and list is empty.\n * onVideoFeedLoadFinished will also be triggered when onVideoFeedEmpty is triggered.\n * Only supported on Android.\n */\n onVideoFeedEmpty?: (error?: FWError) => void;\n /**\n * Start Picture in Picture callback. Only supported on iOS.\n */\n onVideoFeedDidStartPictureInPicture?: (error?: FWError) => void;\n /**\n * Stop Picture in Picture callback. Only supported on iOS.\n */\n onVideoFeedDidStopPictureInPicture?: (error?: FWError) => void;\n}\n\ninterface IVideoFeedState {\n sdkInitCalled: boolean;\n}\n\nconst NativeComponentName = 'FWVideoFeed';\n\n/**\n * VideoFeed component.\n */\nclass VideoFeed extends React.Component<IVideoFeedProps, IVideoFeedState> {\n /**\n * @ignore\n */\n static defaultProps = {\n mode: 'row',\n };\n\n private _nativeComponentRef = React.createRef<any>();\n\n private _subscriptions: EmitterSubscription[] = [];\n\n private _loaded: boolean = false;\n\n constructor(props: IVideoFeedProps) {\n super(props);\n this.state = {\n sdkInitCalled: FWGlobalState.getInstance().sdkInitCalled,\n };\n }\n\n public refresh = () => {\n FWLoggerUtil.log(`VideoFeed refresh ${JSON.stringify(this.props)}`);\n\n const nativeNodeHandle = findNodeHandle(this._nativeComponentRef.current);\n\n let commandId: string | number =\n UIManager.getViewManagerConfig(NativeComponentName).Commands.refresh;\n if (Platform.OS === 'android') {\n commandId = commandId.toString();\n }\n\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(nativeNodeHandle),\n commandId,\n []\n );\n };\n\n private _onVideoFeedLoadFinished = (event: NativeSyntheticEvent<any>) => {\n FWLoggerUtil.log(\n `VideoFeed _onVideoFeedLoadFinished ${JSON.stringify(event.nativeEvent)}`\n );\n const { onVideoFeedLoadFinished, onVideoFeedEmpty } = this.props;\n\n const { name, reason } = event.nativeEvent;\n\n if (onVideoFeedLoadFinished) {\n if (name) {\n let error: FWError = { name };\n if (reason) {\n error.reason = reason;\n }\n onVideoFeedLoadFinished(error);\n if (!this._loaded) {\n onVideoFeedEmpty?.(error);\n }\n } else {\n onVideoFeedLoadFinished();\n this._loaded = true;\n }\n }\n };\n\n private _onVideoFeedEmpty = (event: NativeSyntheticEvent<any>) => {\n FWLoggerUtil.log(\n `VideoFeed _onVideoFeedLoadFinished ${JSON.stringify(event.nativeEvent)}`\n );\n const { onVideoFeedEmpty } = this.props;\n\n if (onVideoFeedEmpty) {\n onVideoFeedEmpty();\n }\n };\n\n private _onVideoFeedDidStartPictureInPicture = (\n event: NativeSyntheticEvent<any>\n ) => {\n FWLoggerUtil.log(\n `VideoFeed _onVideoFeedDidStartPictureInPicture ${JSON.stringify(\n event.nativeEvent\n )}`\n );\n const { onVideoFeedDidStartPictureInPicture } = this.props;\n\n const { name, reason } = event.nativeEvent;\n\n if (onVideoFeedDidStartPictureInPicture) {\n if (name) {\n if (reason) {\n onVideoFeedDidStartPictureInPicture({ name, reason });\n } else {\n onVideoFeedDidStartPictureInPicture({ name });\n }\n } else {\n onVideoFeedDidStartPictureInPicture();\n }\n }\n };\n\n private _onVideoFeedDidStopPictureInPicture = (\n event: NativeSyntheticEvent<any>\n ) => {\n FWLoggerUtil.log(\n `VideoFeed _onVideoFeedDidStopPictureInPicture ${JSON.stringify(\n event.nativeEvent\n )}`\n );\n const { onVideoFeedDidStopPictureInPicture } = this.props;\n\n const { name, reason } = event.nativeEvent;\n\n if (onVideoFeedDidStopPictureInPicture) {\n if (name) {\n if (reason) {\n onVideoFeedDidStopPictureInPicture({ name, reason });\n } else {\n onVideoFeedDidStopPictureInPicture({ name });\n }\n } else {\n onVideoFeedDidStopPictureInPicture();\n }\n }\n };\n\n /**\n * @ignore\n */\n componentDidMount() {\n FWLoggerUtil.log(\n `VideoFeed componentDidMount ${JSON.stringify(this.props)}`\n );\n\n if (!this.state.sdkInitCalled) {\n FWGlobalState.getInstance().sdkInitCalledPromise.then(() => {\n this.setState({ sdkInitCalled: true });\n });\n }\n\n const subscriptionOfShareBaseURLUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.ShareBaseURLUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.ShareBaseURLUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfShareBaseURLUpdated);\n\n const subscriptionOfAdBadgeConfigurationUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.AdBadgeConfigurationUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.AdBadgeConfigurationUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfAdBadgeConfigurationUpdated);\n\n const subscriptionOfVideoLaunchBehaviorUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.VideoLaunchBehaviorUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.VideoLaunchBehaviorUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfVideoLaunchBehaviorUpdated);\n\n const subscriptionOfAppLanguageUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.AppLanguageUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.AppLanguageUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfAppLanguageUpdated);\n }\n\n /**\n * @ignore\n */\n componentWillUnmount() {\n FWLoggerUtil.log(\n `VideoFeed componentWillUnmount ${JSON.stringify(this.props)}`\n );\n\n this._subscriptions.forEach((value) => {\n value.remove();\n });\n\n this._subscriptions = [];\n }\n\n /**\n * @ignore\n */\n render() {\n if (!this.state.sdkInitCalled) {\n return null;\n }\n\n const gShareBaseURL = FireworkSDK.getInstance().shareBaseURL;\n const appLanguage = FireworkSDK.getInstance().appLanguage;\n const videoLaunchBehavior = FireworkSDK.getInstance().videoLaunchBehavior;\n const adBadgeConfiguration = FireworkSDK.getInstance().adBadgeConfiguration;\n const adBadgeTextType = adBadgeConfiguration?.badgeTextType;\n const backgroundColorOfAdBadge = adBadgeConfiguration?.backgroundColor;\n const textColorOfAdBadge = adBadgeConfiguration?.textColor;\n const androidFontIsCustomOfAdBadge =\n adBadgeConfiguration?.androidFontInfo?.isCustom?.toString();\n const androidFontTypefaceNameOfAdBadge =\n adBadgeConfiguration?.androidFontInfo?.typefaceName;\n\n const {\n source,\n channel,\n playlist,\n playlistGroup,\n hashtagFilterExpression,\n productIds,\n contentId,\n mode,\n enablePictureInPicture,\n adConfiguration,\n } = this.props;\n const dynamicContentParametersString =\n this._generateDynamicContentParametersString();\n\n const videoFeedConfiguration = this._getVideoFeedConfiguration();\n const cornerRadius = videoFeedConfiguration?.cornerRadius?.toFixed(5);\n\n const titleHidden = videoFeedConfiguration?.title?.hidden?.toString();\n const titleTextColor = videoFeedConfiguration?.title?.textColor;\n const titleFontSize = videoFeedConfiguration?.title?.fontSize?.toFixed(5);\n const titleAndroidFontInfo = videoFeedConfiguration?.title?.androidFontInfo;\n const titleGradientDrawable =\n videoFeedConfiguration?.title?.gradientDrawable;\n const titlePosition = videoFeedConfiguration?.titlePosition;\n const playIconHidden = videoFeedConfiguration?.playIcon?.hidden;\n const playIconWidth =\n videoFeedConfiguration?.playIcon?.iconWidth?.toFixed(5);\n const showAdBadge = videoFeedConfiguration?.showAdBadge?.toString();\n const enableAutoplay = videoFeedConfiguration?.enableAutoplay;\n const gridColumns = videoFeedConfiguration?.gridColumns?.toFixed(5);\n const itemSpacing = videoFeedConfiguration?.itemSpacing?.toFixed(5);\n\n const videoPlayerConfiguration = this._getVideoPlayerConfiguration();\n const playerStyle = videoPlayerConfiguration?.playerStyle;\n const videoCompleteAction = videoPlayerConfiguration?.videoCompleteAction;\n const showShareButton = videoPlayerConfiguration?.showShareButton;\n const showPlaybackButton = videoPlayerConfiguration?.showPlaybackButton;\n const showMuteButton = videoPlayerConfiguration?.showMuteButton;\n const showBranding = videoPlayerConfiguration?.showBranding;\n const ctaDelayType = videoPlayerConfiguration?.ctaDelay?.type;\n const ctaDelayValue = videoPlayerConfiguration?.ctaDelay?.value?.toFixed(5);\n const ctaHighlightDelayType =\n videoPlayerConfiguration?.ctaHighlightDelay?.type;\n const ctaHighlightDelayValue =\n videoPlayerConfiguration?.ctaHighlightDelay?.value?.toFixed(5);\n const shareBaseURL = videoPlayerConfiguration?.shareBaseURL;\n const ctaWidth = videoPlayerConfiguration?.ctaWidth;\n const buttonConfiguration = videoPlayerConfiguration?.buttonConfiguration;\n const showVideoDetailTitle = videoPlayerConfiguration?.showVideoDetailTitle;\n const requiresAds = adConfiguration?.requiresAds;\n const adsFetchTimeout = adConfiguration?.adsFetchTimeout;\n const vastAttributesString = this._generateVastAttributesString();\n\n let key = `gShareBaseURL:${gShareBaseURL}`;\n if (Platform.OS === 'ios') {\n key += `_appLanguage:${appLanguage}`;\n }\n key += `_videoLaunchBehavior:${videoLaunchBehavior}`;\n key += `_adBadgeTextType:${adBadgeTextType}`;\n key += `_backgroundColorOfAdBadge:${backgroundColorOfAdBadge}`;\n key += `_textColorOfAdBadge:${textColorOfAdBadge}`;\n if (Platform.OS === 'android') {\n key += `_androidFontIsCustomOfAdBadge${androidFontIsCustomOfAdBadge}`;\n key += `_androidFontTypefaceNameOfAdBadge${androidFontTypefaceNameOfAdBadge}`;\n }\n\n key += `_source:${source}`;\n key += `_channel:${channel}`;\n key += `_playlist:${playlist}`;\n key += `_playlistGroup:${playlistGroup}`;\n key += `_dynamicContentParameters:${dynamicContentParametersString}`;\n key += `_hashtagFilterExpression:${hashtagFilterExpression}`;\n key += `_productIds:${productIds?.join(',')}`;\n key += `_contentId:${contentId}`;\n key += `_mode:${mode}`;\n key += `_enablePictureInPicture:${enablePictureInPicture}`;\n\n key += `_titleHidden:${titleHidden}`;\n if (Platform.OS === 'android') {\n key += `_cornerRadius:${cornerRadius}`;\n key += `_titleTextColor:${titleTextColor}`;\n key += `_titleFontSize:${titleFontSize}`;\n key += `_titleAndroidFontInfo.isCustom:${titleAndroidFontInfo?.isCustom}`;\n key += `_titleAndroidFontInfo.typefaceName:${titleAndroidFontInfo?.typefaceName}`;\n key += `_titleGradientDrawable.orientation:${titleGradientDrawable?.orientation}`;\n key += `_titleGradientDrawable.colors:${titleGradientDrawable?.colors?.join(\n ','\n )}`;\n key += `_playIconHidden:${playIconHidden}`;\n key += `_playIconWidth:${playIconWidth}`;\n key += `_showAdBadge:${showAdBadge}`;\n }\n\n key += `_titlePosition:${titlePosition}`;\n if (Platform.OS === 'android') {\n key += `_enableAutoplay:${enableAutoplay}`;\n }\n key += `_gridColumns:${gridColumns}`;\n key += `_itemSpacing:${itemSpacing}`;\n\n key += `_shareBaseURL:${shareBaseURL}`;\n if (Platform.OS === 'android') {\n key += `_playerStyle:${playerStyle}`;\n key += `_videoCompleteAction:${videoCompleteAction}`;\n key += `_showShareButton:${showShareButton}`;\n key += `_showPlaybackButton:${showPlaybackButton}`;\n key += `_showMuteButton:${showMuteButton}`;\n key += `_showBranding:${showBranding}`;\n key += `_ctaDelayType:${ctaDelayType}`;\n key += `_ctaDelayValue:${ctaDelayValue}`;\n key += `_ctaHighlightDelayType:${ctaHighlightDelayType}`;\n key += `_ctaHighlightDelayValue:${ctaHighlightDelayValue}`;\n key += `_ctaWidth:${ctaWidth}`;\n key += `_buttonConfiguration.videoDetailButton:${this._generateButtonInfoString(\n buttonConfiguration?.videoDetailButton\n )}`;\n key += `_buttonConfiguration.closeButton:${this._generateButtonInfoString(\n buttonConfiguration?.closeButton\n )}`;\n key += `_buttonConfiguration.muteButton:${this._generateButtonInfoString(\n buttonConfiguration?.muteButton\n )}`;\n key += `_buttonConfiguration.unmuteButton:${this._generateButtonInfoString(\n buttonConfiguration?.unmuteButton\n )}`;\n key += `_buttonConfiguration.playButton:${this._generateButtonInfoString(\n buttonConfiguration?.playButton\n )}`;\n key += `_buttonConfiguration.pauseButton:${this._generateButtonInfoString(\n buttonConfiguration?.pauseButton\n )}`;\n key += `_showVideoDetailTitle:${showVideoDetailTitle}`;\n }\n\n key += `_requiresAds:${requiresAds}`;\n key += `_adsFetchTimeout:${adsFetchTimeout}`;\n key += `_vastAttributes:${vastAttributesString}`;\n\n return (\n <FWVideoFeed\n key={key}\n {...this.props}\n enablePictureInPicture={undefined}\n videoFeedConfiguration={videoFeedConfiguration}\n videoPlayerConfiguration={videoPlayerConfiguration}\n ref={this._nativeComponentRef}\n onVideoFeedLoadFinished={this._onVideoFeedLoadFinished}\n onVideoFeedEmpty={this._onVideoFeedEmpty}\n onVideoFeedDidStartPictureInPicture={\n this._onVideoFeedDidStartPictureInPicture\n }\n onVideoFeedDidStopPictureInPicture={\n this._onVideoFeedDidStopPictureInPicture\n }\n mode={mode ?? 'row'}\n />\n );\n }\n\n private _generateDynamicContentParametersString(): string {\n const { dynamicContentParameters } = this.props;\n if (!dynamicContentParameters) {\n return '';\n }\n\n let resultString = '';\n const sortedKeyList = Object.keys(dynamicContentParameters).sort();\n for (const key of sortedKeyList) {\n const value = dynamicContentParameters[key];\n const valueString = value.join(',');\n if (resultString.length > 0) {\n resultString += '_';\n }\n\n resultString += `${key}:${valueString}`;\n }\n\n return resultString;\n }\n\n private _generateVastAttributesString(): string | undefined {\n const { adConfiguration } = this.props;\n const vastAttributes = adConfiguration?.vastAttributes;\n if (!vastAttributes) {\n return '';\n }\n\n let resultString = '';\n for (const attribute of vastAttributes) {\n if (resultString.length > 0) {\n resultString += '_';\n }\n resultString += `${attribute.name}:${attribute.value}`;\n }\n\n return resultString;\n }\n\n private _generateButtonInfoString(buttonInfo?: ButtonInfo): string {\n return `imageName:${buttonInfo?.imageName}_systemImageName:${buttonInfo?.systemImageName}_tintColor:${buttonInfo?.tintColor}`;\n }\n\n private _getVideoFeedConfiguration(): VideoFeedConfiguration | undefined {\n const { videoFeedConfiguration } = this.props;\n if (!videoFeedConfiguration) {\n return videoFeedConfiguration;\n }\n\n let resultVideoFeedConfiguration = videoFeedConfiguration;\n\n if (\n resultVideoFeedConfiguration.gridColumns &&\n Math.floor(resultVideoFeedConfiguration.gridColumns) !==\n resultVideoFeedConfiguration.gridColumns\n ) {\n const gridColumns = Math.floor(resultVideoFeedConfiguration.gridColumns);\n resultVideoFeedConfiguration = {\n ...resultVideoFeedConfiguration,\n gridColumns,\n };\n }\n\n if (\n resultVideoFeedConfiguration.title &&\n resultVideoFeedConfiguration.title.numberOfLines &&\n Math.floor(resultVideoFeedConfiguration.title.numberOfLines) !==\n resultVideoFeedConfiguration.title.numberOfLines\n ) {\n const numberOfLines = Math.floor(\n resultVideoFeedConfiguration.title.numberOfLines\n );\n resultVideoFeedConfiguration = {\n ...resultVideoFeedConfiguration,\n title: {\n ...resultVideoFeedConfiguration.title,\n numberOfLines,\n },\n };\n }\n\n return resultVideoFeedConfiguration;\n }\n\n private _getVideoPlayerConfiguration():\n | VideoPlayerNativeConfiguration\n | undefined {\n const { videoPlayerConfiguration, enablePictureInPicture } = this.props;\n\n let resultVideoPlayerConfiguration:\n | VideoPlayerNativeConfiguration\n | undefined = videoPlayerConfiguration;\n if (typeof enablePictureInPicture === 'boolean') {\n if (!resultVideoPlayerConfiguration) {\n resultVideoPlayerConfiguration = {};\n }\n resultVideoPlayerConfiguration = {\n ...resultVideoPlayerConfiguration,\n enablePictureInPicture,\n };\n }\n\n return resultVideoPlayerConfiguration;\n }\n}\n\nexport default VideoFeed;\n"]}
|
|
1
|
+
{"version":3,"sources":["VideoFeed.tsx"],"names":["React","findNodeHandle","Platform","UIManager","FireworkSDK","FWEventName","FWNativeErrorAction","FireworkSDKModuleEventEmitter","FWGlobalState","gennerateJsonKey","FWLoggerUtil","FWVideoFeed","NativeComponentName","VideoFeed","Component","constructor","props","createRef","log","JSON","stringify","nativeNodeHandle","_nativeComponentRef","current","commandId","getViewManagerConfig","Commands","refresh","OS","toString","reactTag","dispatchViewManagerCommand","event","nativeEvent","onVideoFeedLoadFinished","onVideoFeedEmpty","name","reason","action","error","loadingFirstPage","_loaded","onVideoFeedDidStartPictureInPicture","onVideoFeedDidStopPictureInPicture","onVideoFeedGetFeedId","feedId","state","sdkInitCalled","getInstance","componentDidMount","sdkInitCalledPromise","then","setState","subscriptionOfShareBaseURLUpdated","addListener","ShareBaseURLUpdated","_subscriptions","push","subscriptionOfAdBadgeConfigurationUpdated","AdBadgeConfigurationUpdated","subscriptionOfVideoLaunchBehaviorUpdated","VideoLaunchBehaviorUpdated","subscriptionOfAppLanguageUpdated","AppLanguageUpdated","componentWillUnmount","forEach","value","remove","render","gShareBaseURL","shareBaseURL","appLanguage","videoLaunchBehavior","adBadgeConfiguration","adBadgeTextType","badgeTextType","backgroundColorOfAdBadge","backgroundColor","textColorOfAdBadge","textColor","androidFontIsCustomOfAdBadge","androidFontInfo","isCustom","androidFontTypefaceNameOfAdBadge","typefaceName","source","channel","playlist","playlistGroup","hashtagFilterExpression","productIds","contentId","mode","enablePictureInPicture","adConfiguration","dynamicContentParametersString","_generateDynamicContentParametersString","videoFeedConfiguration","_getVideoFeedConfiguration","cornerRadius","toFixed","titleHidden","title","hidden","titleTextColor","titleFontSize","fontSize","titleAndroidFontInfo","titleGradientDrawable","gradientDrawable","titlePosition","playIconHidden","playIcon","playIconWidth","iconWidth","showAdBadge","enableAutoplay","gridColumns","itemSpacing","videoPlayerConfiguration","_getVideoPlayerConfiguration","playerStyle","videoCompleteAction","showShareButton","showPlaybackButton","showMuteButton","showBranding","ctaDelayType","ctaDelay","type","ctaDelayValue","ctaHighlightDelayType","ctaHighlightDelay","ctaHighlightDelayValue","ctaWidth","buttonConfiguration","videoPlayerLogoConfigurationJsonKey","videoPlayerLogoConfiguration","showVideoDetailTitle","requiresAds","adsFetchTimeout","vastAttributesString","_generateVastAttributesString","replayBadgeVideoFeedConfigurationJsonKey","replayBadge","replayBadgeVideoPlayerConfigurationJsonKey","replayBadgeConfiguration","key","join","orientation","colors","_generateButtonInfoString","videoDetailButton","closeButton","muteButton","unmuteButton","playButton","pauseButton","console","undefined","_onVideoFeedLoadFinished","_onVideoFeedEmpty","_onVideoFeedDidStartPictureInPicture","_onVideoFeedDidStopPictureInPicture","_onVideoFeedGetFeedId","dynamicContentParameters","resultString","sortedKeyList","Object","keys","sort","valueString","length","vastAttributes","attribute","buttonInfo","imageName","systemImageName","tintColor","resultVideoFeedConfiguration","Math","floor","numberOfLines","resultVideoPlayerConfiguration"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAEEC,cAFF,EAIEC,QAJF,EAMEC,SANF,QAQO,cARP;AAUA,OAAOC,WAAP,MAAwB,gBAAxB;AAIA,SAASC,WAAT,QAA4B,uBAA5B;AACA,SAASC,mBAAT,QAAoC,+BAApC;AAKA,SAASC,6BAAT,QAA8C,8BAA9C;AACA,OAAOC,aAAP,MAA0B,wBAA1B;AACA,OAAOC,gBAAP,MAA6B,qBAA7B;AACA,OAAOC,YAAP,MAAyB,uBAAzB;AACA,OAAOC,WAAP,MAAwB,eAAxB;AAqGA,MAAMC,mBAAmB,GAAG,aAA5B;AAEA;AACA;AACA;;AACA,MAAMC,SAAN,SAAwBb,KAAK,CAACc,SAA9B,CAA0E;AACxE;AACF;AACA;AAWEC,EAAAA,WAAW,CAACC,KAAD,EAAyB;AAClC,UAAMA,KAAN;;AADkC,8DANNhB,KAAK,CAACiB,SAAN,EAMM;;AAAA,4CAJY,EAIZ;;AAAA,qCAFT,KAES;;AAAA,qCAOnB,MAAM;AACrBP,MAAAA,YAAY,CAACQ,GAAb,CAAkB,qBAAoBC,IAAI,CAACC,SAAL,CAAe,KAAKJ,KAApB,CAA2B,EAAjE;AAEA,YAAMK,gBAAgB,GAAGpB,cAAc,CAAC,KAAKqB,mBAAL,CAAyBC,OAA1B,CAAvC;AAEA,UAAIC,SAA0B,GAC5BrB,SAAS,CAACsB,oBAAV,CAA+Bb,mBAA/B,EAAoDc,QAApD,CAA6DC,OAD/D;;AAEA,UAAIzB,QAAQ,CAAC0B,EAAT,KAAgB,SAApB,EAA+B;AAC7BJ,QAAAA,SAAS,GAAGA,SAAS,CAACK,QAAV,EAAZ;AACD;;AACD,UAAIC,QAAuB,GAAG7B,cAAc,CAACoB,gBAAD,CAA5C;AACAX,MAAAA,YAAY,CAACQ,GAA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,4BAA4B,CAAC7E,KAA7B,CAAmCgF,aAJvC,EAKE;AACA,YAAMA,aAAa,GAAGF,IAAI,CAACC,KAAL,CACpBF,4BAA4B,CAAC7E,KAA7B,CAAmCgF,aADf,CAAtB;AAGAH,MAAAA,4BAA4B,GAAG,EAC7B,GAAGA,4BAD0B;AAE7B7E,QAAAA,KAAK,EAAE,EACL,GAAG6E,4BAA4B,CAAC7E,KAD3B;AAELgF,UAAAA;AAFK;AAFsB,OAA/B;AAOD;;AAED,WAAOH,4BAAP;AACD;;AAEO3D,EAAAA,4BAA4B,GAEtB;AACZ,UAAM;AAAED,MAAAA,wBAAF;AAA4B1B,MAAAA;AAA5B,QAAuD,KAAK7E,KAAlE;AAEA,QAAIuK,8BAES,GAAGhE,wBAFhB;;AAGA,QAAI,OAAO1B,sBAAP,KAAkC,SAAtC,EAAiD;AAC/C,UAAI,CAAC0F,8BAAL,EAAqC;AACnCA,QAAAA,8BAA8B,GAAG,EAAjC;AACD;;AACDA,MAAAA,8BAA8B,GAAG,EAC/B,GAAGA,8BAD4B;AAE/B1F,QAAAA;AAF+B,OAAjC;AAID;;AAED,WAAO0F,8BAAP;AACD;;AApgBuE;;gBAApE1K,S,kBAIkB;AACpB+E,EAAAA,IAAI,EAAE;AADc,C;;AAmgBxB,eAAe/E,SAAf","sourcesContent":["import React from 'react';\n\nimport {\n EmitterSubscription,\n findNodeHandle,\n NativeSyntheticEvent,\n Platform,\n StyleProp,\n UIManager,\n ViewStyle,\n} from 'react-native';\n\nimport FireworkSDK from '../FireworkSDK';\nimport type AdConfiguration from '../models/AdConfiguration';\nimport type ButtonInfo from '../models/ButtonInfo';\nimport type FWError from '../models/FWError';\nimport { FWEventName } from '../models/FWEventName';\nimport { FWNativeErrorAction } from '../models/FWNativeErrorAction';\nimport type VideoFeedConfiguration from '../models/VideoFeedConfiguration';\nimport type { VideoFeedSource } from '../models/VideoFeedSource';\nimport type VideoPlayerConfiguration from '../models/VideoPlayerConfiguration';\nimport type VideoPlayerNativeConfiguration from '../models/VideoPlayerNativeConfiguration';\nimport { FireworkSDKModuleEventEmitter } from '../modules/FireworkSDKModule';\nimport FWGlobalState from '../utils/FWGlobalState';\nimport gennerateJsonKey from '../utils/FWJsonUtil';\nimport FWLoggerUtil from '../utils/FWLoggerUtil';\nimport FWVideoFeed from './FWVideoFeed';\n\nexport type VideoFeedMode = 'row' | 'column' | 'grid';\n\n/**\n * The props of VideoFeed component.\n */\nexport interface IVideoFeedProps {\n /**\n * Standard React Native View Style.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * One of five available video feed sources.The playlistGroup is only supported on iOS.\n * Defaults to discover.\n */\n source: VideoFeedSource;\n /**\n * Channel id of the feed. Required when the source is set as channel or playlist or dynamicContent.\n */\n channel?: string;\n /**\n * Playlist id of the feed. Please note channel id is necessary. Required when the source is set as playlist.\n */\n playlist?: string;\n /**\n * PlaylistGroup id of the feed. Required when the source is set as playlistGroup. Only supported on iOS.\n */\n playlistGroup?: string;\n /**\n * The dynamic content parameters of the feed. Required when the source is set as dynamicContent.\n */\n dynamicContentParameters?: { [key: string]: string[] };\n /**\n * Hashtag filter expression is an s-expression used to provide feeds filtered by hashtags with specified criteria.\n * Queries are specified with boolean predicates on what hashtags are there on the video.\n * For instance, (and sport food) (or sport food) (and sport (or food comedy)) sport are all valid expressions.\n * Non-UTF-8 characters are not allowed. If using boolean predicates, the expression needs to be wrapped with parenthesis.\n * Required when the source is set as hashtagPlaylist.\n */\n hashtagFilterExpression?: string;\n /**\n * Product ids used to generate the sku feed\n */\n productIds?: string[];\n /**\n * The video or live stream id. Only supported on iOS.\n */\n contentId?: string;\n /**\n * One of three available display modes. Defaults to row.\n */\n mode?: VideoFeedMode;\n /**\n * Specifies if Picture in Picture is enabled.\n */\n enablePictureInPicture?: boolean;\n /**\n * Configuration of the feed.\n */\n videoFeedConfiguration?: VideoFeedConfiguration;\n /**\n * Configuration of the player.\n */\n videoPlayerConfiguration?: VideoPlayerConfiguration;\n /**\n * Ad configuration of the feed.\n */\n adConfiguration?: AdConfiguration;\n /**\n * The feed loading result callback. It means loading successfully when error equals to undefined.\n */\n onVideoFeedLoadFinished?: (error?: FWError) => void;\n /**\n * The callback is triggered when there are no items in the story block.\n * The callback is triggered in the following cases:\n * 1. Loading successfully but the back end returns an empty list.\n * 2. The load failed and list is empty.\n * onVideoFeedLoadFinished will also be triggered when onVideoFeedEmpty is triggered.\n */\n onVideoFeedEmpty?: (error?: FWError) => void;\n /**\n * Start Picture in Picture callback. Only supported on iOS.\n */\n onVideoFeedDidStartPictureInPicture?: (error?: FWError) => void;\n /**\n * Stop Picture in Picture callback. Only supported on iOS.\n */\n onVideoFeedDidStopPictureInPicture?: (error?: FWError) => void;\n /**\n *\n * The host app could use this callback to get feed id.\n * The feed id can be used for conversion tracking.\n */\n onVideoFeedGetFeedId?: (feedId: string) => void;\n}\n\ninterface IVideoFeedState {\n sdkInitCalled: boolean;\n}\n\nconst NativeComponentName = 'FWVideoFeed';\n\n/**\n * VideoFeed component.\n */\nclass VideoFeed extends React.Component<IVideoFeedProps, IVideoFeedState> {\n /**\n * @ignore\n */\n static defaultProps = {\n mode: 'row',\n };\n\n private _nativeComponentRef = React.createRef<any>();\n\n private _subscriptions: EmitterSubscription[] = [];\n\n private _loaded: boolean = false;\n\n constructor(props: IVideoFeedProps) {\n super(props);\n this.state = {\n sdkInitCalled: FWGlobalState.getInstance().sdkInitCalled,\n };\n }\n\n public refresh = () => {\n FWLoggerUtil.log(`VideoFeed refresh ${JSON.stringify(this.props)}`);\n\n const nativeNodeHandle = findNodeHandle(this._nativeComponentRef.current);\n\n let commandId: string | number =\n UIManager.getViewManagerConfig(NativeComponentName).Commands.refresh;\n if (Platform.OS === 'android') {\n commandId = commandId.toString();\n }\n let reactTag: number | null = findNodeHandle(nativeNodeHandle);\n FWLoggerUtil.log(\n `StoryBlock refresh commandId: ${commandId} nativeNodeHandle: ${nativeNodeHandle} reactTag: ${reactTag}`\n );\n if (!nativeNodeHandle || !reactTag) {\n return;\n }\n UIManager.dispatchViewManagerCommand(reactTag, commandId, []);\n };\n\n private _onVideoFeedLoadFinished = (event: NativeSyntheticEvent<any>) => {\n FWLoggerUtil.log(\n `VideoFeed _onVideoFeedLoadFinished ${JSON.stringify(event.nativeEvent)}`\n );\n const { onVideoFeedLoadFinished, onVideoFeedEmpty } = this.props;\n\n const { name, reason, action } = event.nativeEvent;\n\n if (onVideoFeedLoadFinished) {\n if (name) {\n let error: FWError = { name };\n if (reason) {\n error.reason = reason;\n }\n onVideoFeedLoadFinished(error);\n if (Platform.OS === 'android') {\n if (\n action === FWNativeErrorAction.loadingFirstPage ||\n !this._loaded\n ) {\n onVideoFeedEmpty?.(error);\n }\n } else {\n if (!this._loaded) {\n onVideoFeedEmpty?.(error);\n }\n }\n } else {\n onVideoFeedLoadFinished();\n this._loaded = true;\n }\n }\n };\n\n private _onVideoFeedEmpty = (event: NativeSyntheticEvent<any>) => {\n FWLoggerUtil.log(\n `VideoFeed _onVideoFeedLoadFinished ${JSON.stringify(event.nativeEvent)}`\n );\n const { onVideoFeedEmpty } = this.props;\n\n if (onVideoFeedEmpty) {\n onVideoFeedEmpty();\n }\n };\n\n private _onVideoFeedDidStartPictureInPicture = (\n event: NativeSyntheticEvent<any>\n ) => {\n FWLoggerUtil.log(\n `VideoFeed _onVideoFeedDidStartPictureInPicture ${JSON.stringify(\n event.nativeEvent\n )}`\n );\n const { onVideoFeedDidStartPictureInPicture } = this.props;\n\n const { name, reason } = event.nativeEvent;\n\n if (onVideoFeedDidStartPictureInPicture) {\n if (name) {\n if (reason) {\n onVideoFeedDidStartPictureInPicture({ name, reason });\n } else {\n onVideoFeedDidStartPictureInPicture({ name });\n }\n } else {\n onVideoFeedDidStartPictureInPicture();\n }\n }\n };\n\n private _onVideoFeedDidStopPictureInPicture = (\n event: NativeSyntheticEvent<any>\n ) => {\n FWLoggerUtil.log(\n `VideoFeed _onVideoFeedDidStopPictureInPicture ${JSON.stringify(\n event.nativeEvent\n )}`\n );\n const { onVideoFeedDidStopPictureInPicture } = this.props;\n\n const { name, reason } = event.nativeEvent;\n\n if (onVideoFeedDidStopPictureInPicture) {\n if (name) {\n if (reason) {\n onVideoFeedDidStopPictureInPicture({ name, reason });\n } else {\n onVideoFeedDidStopPictureInPicture({ name });\n }\n } else {\n onVideoFeedDidStopPictureInPicture();\n }\n }\n };\n\n private _onVideoFeedGetFeedId = (event: NativeSyntheticEvent<any>) => {\n FWLoggerUtil.log(\n `VideoFeed onVideoFeedGetFeedId ${JSON.stringify(event.nativeEvent)}`\n );\n const { onVideoFeedGetFeedId } = this.props;\n\n const { feedId } = event.nativeEvent;\n\n if (onVideoFeedGetFeedId) {\n onVideoFeedGetFeedId(feedId ?? '');\n }\n };\n\n /**\n * @ignore\n */\n componentDidMount() {\n FWLoggerUtil.log(\n `VideoFeed componentDidMount ${JSON.stringify(this.props)}`\n );\n\n if (!this.state.sdkInitCalled) {\n FWGlobalState.getInstance().sdkInitCalledPromise.then(() => {\n this.setState({ sdkInitCalled: true });\n });\n }\n\n const subscriptionOfShareBaseURLUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.ShareBaseURLUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.ShareBaseURLUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfShareBaseURLUpdated);\n\n const subscriptionOfAdBadgeConfigurationUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.AdBadgeConfigurationUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.AdBadgeConfigurationUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfAdBadgeConfigurationUpdated);\n\n const subscriptionOfVideoLaunchBehaviorUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.VideoLaunchBehaviorUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.VideoLaunchBehaviorUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfVideoLaunchBehaviorUpdated);\n\n const subscriptionOfAppLanguageUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.AppLanguageUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.AppLanguageUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfAppLanguageUpdated);\n }\n\n /**\n * @ignore\n */\n componentWillUnmount() {\n FWLoggerUtil.log(\n `VideoFeed componentWillUnmount ${JSON.stringify(this.props)}`\n );\n\n this._subscriptions.forEach((value) => {\n value.remove();\n });\n\n this._subscriptions = [];\n }\n\n /**\n * @ignore\n */\n render() {\n if (!this.state.sdkInitCalled) {\n return null;\n }\n\n const gShareBaseURL = FireworkSDK.getInstance().shareBaseURL;\n const appLanguage = FireworkSDK.getInstance().appLanguage;\n const videoLaunchBehavior = FireworkSDK.getInstance().videoLaunchBehavior;\n const adBadgeConfiguration = FireworkSDK.getInstance().adBadgeConfiguration;\n const adBadgeTextType = adBadgeConfiguration?.badgeTextType;\n const backgroundColorOfAdBadge = adBadgeConfiguration?.backgroundColor;\n const textColorOfAdBadge = adBadgeConfiguration?.textColor;\n const androidFontIsCustomOfAdBadge =\n adBadgeConfiguration?.androidFontInfo?.isCustom?.toString();\n const androidFontTypefaceNameOfAdBadge =\n adBadgeConfiguration?.androidFontInfo?.typefaceName;\n\n const {\n source,\n channel,\n playlist,\n playlistGroup,\n hashtagFilterExpression,\n productIds,\n contentId,\n mode,\n enablePictureInPicture,\n adConfiguration,\n } = this.props;\n const dynamicContentParametersString =\n this._generateDynamicContentParametersString();\n\n const videoFeedConfiguration = this._getVideoFeedConfiguration();\n const cornerRadius = videoFeedConfiguration?.cornerRadius?.toFixed(5);\n\n const titleHidden = videoFeedConfiguration?.title?.hidden?.toString();\n const titleTextColor = videoFeedConfiguration?.title?.textColor;\n const titleFontSize = videoFeedConfiguration?.title?.fontSize?.toFixed(5);\n const titleAndroidFontInfo = videoFeedConfiguration?.title?.androidFontInfo;\n const titleGradientDrawable =\n videoFeedConfiguration?.title?.gradientDrawable;\n const titlePosition = videoFeedConfiguration?.titlePosition;\n const playIconHidden = videoFeedConfiguration?.playIcon?.hidden;\n const playIconWidth =\n videoFeedConfiguration?.playIcon?.iconWidth?.toFixed(5);\n const showAdBadge = videoFeedConfiguration?.showAdBadge?.toString();\n const enableAutoplay = videoFeedConfiguration?.enableAutoplay;\n const gridColumns = videoFeedConfiguration?.gridColumns?.toFixed(5);\n const itemSpacing = videoFeedConfiguration?.itemSpacing?.toFixed(5);\n\n const videoPlayerConfiguration = this._getVideoPlayerConfiguration();\n const playerStyle = videoPlayerConfiguration?.playerStyle;\n const videoCompleteAction = videoPlayerConfiguration?.videoCompleteAction;\n const showShareButton = videoPlayerConfiguration?.showShareButton;\n const showPlaybackButton = videoPlayerConfiguration?.showPlaybackButton;\n const showMuteButton = videoPlayerConfiguration?.showMuteButton;\n const showBranding = videoPlayerConfiguration?.showBranding;\n const ctaDelayType = videoPlayerConfiguration?.ctaDelay?.type;\n const ctaDelayValue = videoPlayerConfiguration?.ctaDelay?.value?.toFixed(5);\n const ctaHighlightDelayType =\n videoPlayerConfiguration?.ctaHighlightDelay?.type;\n const ctaHighlightDelayValue =\n videoPlayerConfiguration?.ctaHighlightDelay?.value?.toFixed(5);\n const shareBaseURL = videoPlayerConfiguration?.shareBaseURL;\n const ctaWidth = videoPlayerConfiguration?.ctaWidth;\n const buttonConfiguration = videoPlayerConfiguration?.buttonConfiguration;\n const videoPlayerLogoConfigurationJsonKey = gennerateJsonKey(\n videoPlayerConfiguration?.videoPlayerLogoConfiguration\n );\n const showVideoDetailTitle = videoPlayerConfiguration?.showVideoDetailTitle;\n const requiresAds = adConfiguration?.requiresAds;\n const adsFetchTimeout = adConfiguration?.adsFetchTimeout;\n const vastAttributesString = this._generateVastAttributesString();\n const replayBadgeVideoFeedConfigurationJsonKey = gennerateJsonKey(\n videoFeedConfiguration?.replayBadge\n );\n const replayBadgeVideoPlayerConfigurationJsonKey = gennerateJsonKey(\n videoPlayerConfiguration?.replayBadgeConfiguration\n );\n let key = `gShareBaseURL:${gShareBaseURL}`;\n if (Platform.OS === 'ios') {\n key += `_appLanguage:${appLanguage}`;\n }\n key += `_videoLaunchBehavior:${videoLaunchBehavior}`;\n key += `_adBadgeTextType:${adBadgeTextType}`;\n key += `_backgroundColorOfAdBadge:${backgroundColorOfAdBadge}`;\n key += `_textColorOfAdBadge:${textColorOfAdBadge}`;\n if (Platform.OS === 'android') {\n key += `_androidFontIsCustomOfAdBadge${androidFontIsCustomOfAdBadge}`;\n key += `_androidFontTypefaceNameOfAdBadge${androidFontTypefaceNameOfAdBadge}`;\n }\n\n key += `_source:${source}`;\n key += `_channel:${channel}`;\n key += `_playlist:${playlist}`;\n key += `_playlistGroup:${playlistGroup}`;\n key += `_dynamicContentParameters:${dynamicContentParametersString}`;\n key += `_hashtagFilterExpression:${hashtagFilterExpression}`;\n key += `_productIds:${productIds?.join(',')}`;\n key += `_contentId:${contentId}`;\n key += `_mode:${mode}`;\n key += `_enablePictureInPicture:${enablePictureInPicture}`;\n\n key += `_titleHidden:${titleHidden}`;\n if (Platform.OS === 'android') {\n key += `_cornerRadius:${cornerRadius}`;\n key += `_titleTextColor:${titleTextColor}`;\n key += `_titleFontSize:${titleFontSize}`;\n key += `_titleAndroidFontInfo.isCustom:${titleAndroidFontInfo?.isCustom}`;\n key += `_titleAndroidFontInfo.typefaceName:${titleAndroidFontInfo?.typefaceName}`;\n key += `_titleGradientDrawable.orientation:${titleGradientDrawable?.orientation}`;\n key += `_titleGradientDrawable.colors:${titleGradientDrawable?.colors?.join(\n ','\n )}`;\n key += `_playIconHidden:${playIconHidden}`;\n key += `_playIconWidth:${playIconWidth}`;\n key += `_showAdBadge:${showAdBadge}`;\n }\n\n key += `_titlePosition:${titlePosition}`;\n if (Platform.OS === 'android') {\n key += `_enableAutoplay:${enableAutoplay}`;\n }\n key += `_gridColumns:${gridColumns}`;\n key += `_itemSpacing:${itemSpacing}`;\n\n key += `_shareBaseURL:${shareBaseURL}`;\n if (Platform.OS === 'android') {\n key += `_playerStyle:${playerStyle}`;\n key += `_videoCompleteAction:${videoCompleteAction}`;\n key += `_showShareButton:${showShareButton}`;\n key += `_showPlaybackButton:${showPlaybackButton}`;\n key += `_showMuteButton:${showMuteButton}`;\n key += `_showBranding:${showBranding}`;\n key += `_ctaDelayType:${ctaDelayType}`;\n key += `_ctaDelayValue:${ctaDelayValue}`;\n key += `_ctaHighlightDelayType:${ctaHighlightDelayType}`;\n key += `_ctaHighlightDelayValue:${ctaHighlightDelayValue}`;\n key += `_ctaWidth:${ctaWidth}`;\n key += `_buttonConfiguration.videoDetailButton:${this._generateButtonInfoString(\n buttonConfiguration?.videoDetailButton\n )}`;\n key += `_buttonConfiguration.closeButton:${this._generateButtonInfoString(\n buttonConfiguration?.closeButton\n )}`;\n key += `_buttonConfiguration.muteButton:${this._generateButtonInfoString(\n buttonConfiguration?.muteButton\n )}`;\n key += `_buttonConfiguration.unmuteButton:${this._generateButtonInfoString(\n buttonConfiguration?.unmuteButton\n )}`;\n key += `_buttonConfiguration.playButton:${this._generateButtonInfoString(\n buttonConfiguration?.playButton\n )}`;\n key += `_buttonConfiguration.pauseButton:${this._generateButtonInfoString(\n buttonConfiguration?.pauseButton\n )}`;\n key += `_videoPlayerLogoConfiguration:${videoPlayerLogoConfigurationJsonKey}`;\n key += `_showVideoDetailTitle:${showVideoDetailTitle}`;\n }\n\n key += `_requiresAds:${requiresAds}`;\n key += `_adsFetchTimeout:${adsFetchTimeout}`;\n key += `_vastAttributes:${vastAttributesString}`;\n key += `_replayBadgeVideoFeedConfiguration:${replayBadgeVideoFeedConfigurationJsonKey}`;\n key += `_replayBadgeVideoPlayerConfiguration:${replayBadgeVideoPlayerConfigurationJsonKey}`;\n\n console.log('video feed key', key);\n\n return (\n <FWVideoFeed\n key={key}\n {...this.props}\n enablePictureInPicture={undefined}\n videoFeedConfiguration={videoFeedConfiguration}\n videoPlayerConfiguration={videoPlayerConfiguration}\n ref={this._nativeComponentRef}\n onVideoFeedLoadFinished={this._onVideoFeedLoadFinished}\n onVideoFeedEmpty={this._onVideoFeedEmpty}\n onVideoFeedDidStartPictureInPicture={\n this._onVideoFeedDidStartPictureInPicture\n }\n onVideoFeedDidStopPictureInPicture={\n this._onVideoFeedDidStopPictureInPicture\n }\n onVideoFeedGetFeedId={this._onVideoFeedGetFeedId}\n mode={mode ?? 'row'}\n />\n );\n }\n\n private _generateDynamicContentParametersString(): string {\n const { dynamicContentParameters } = this.props;\n if (!dynamicContentParameters) {\n return '';\n }\n\n let resultString = '';\n const sortedKeyList = Object.keys(dynamicContentParameters).sort();\n for (const key of sortedKeyList) {\n const value = dynamicContentParameters[key];\n const valueString = value.join(',');\n if (resultString.length > 0) {\n resultString += '_';\n }\n\n resultString += `${key}:${valueString}`;\n }\n\n return resultString;\n }\n\n private _generateVastAttributesString(): string | undefined {\n const { adConfiguration } = this.props;\n const vastAttributes = adConfiguration?.vastAttributes;\n if (!vastAttributes) {\n return '';\n }\n\n let resultString = '';\n for (const attribute of vastAttributes) {\n if (resultString.length > 0) {\n resultString += '_';\n }\n resultString += `${attribute.name}:${attribute.value}`;\n }\n\n return resultString;\n }\n\n private _generateButtonInfoString(buttonInfo?: ButtonInfo): string {\n return `imageName:${buttonInfo?.imageName}_systemImageName:${buttonInfo?.systemImageName}_tintColor:${buttonInfo?.tintColor}`;\n }\n\n private _getVideoFeedConfiguration(): VideoFeedConfiguration | undefined {\n const { videoFeedConfiguration } = this.props;\n if (!videoFeedConfiguration) {\n return videoFeedConfiguration;\n }\n\n let resultVideoFeedConfiguration = videoFeedConfiguration;\n\n if (\n resultVideoFeedConfiguration.gridColumns &&\n Math.floor(resultVideoFeedConfiguration.gridColumns) !==\n resultVideoFeedConfiguration.gridColumns\n ) {\n const gridColumns = Math.floor(resultVideoFeedConfiguration.gridColumns);\n resultVideoFeedConfiguration = {\n ...resultVideoFeedConfiguration,\n gridColumns,\n };\n }\n\n if (\n resultVideoFeedConfiguration.title &&\n resultVideoFeedConfiguration.title.numberOfLines &&\n Math.floor(resultVideoFeedConfiguration.title.numberOfLines) !==\n resultVideoFeedConfiguration.title.numberOfLines\n ) {\n const numberOfLines = Math.floor(\n resultVideoFeedConfiguration.title.numberOfLines\n );\n resultVideoFeedConfiguration = {\n ...resultVideoFeedConfiguration,\n title: {\n ...resultVideoFeedConfiguration.title,\n numberOfLines,\n },\n };\n }\n\n return resultVideoFeedConfiguration;\n }\n\n private _getVideoPlayerConfiguration():\n | VideoPlayerNativeConfiguration\n | undefined {\n const { videoPlayerConfiguration, enablePictureInPicture } = this.props;\n\n let resultVideoPlayerConfiguration:\n | VideoPlayerNativeConfiguration\n | undefined = videoPlayerConfiguration;\n if (typeof enablePictureInPicture === 'boolean') {\n if (!resultVideoPlayerConfiguration) {\n resultVideoPlayerConfiguration = {};\n }\n resultVideoPlayerConfiguration = {\n ...resultVideoPlayerConfiguration,\n enablePictureInPicture,\n };\n }\n\n return resultVideoPlayerConfiguration;\n }\n}\n\nexport default VideoFeed;\n"]}
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"names":["StoryBlock","VideoFeed","FireworkSDK","FWNavigator","LiveStream","LiveStreamChatEventName","LiveStreamEventName","VideoPlaybackEventName","VideoFeedUtil","VideoShopping"],"mappings":"AAIA,OAAOA,UAAP,MAAuB,yBAAvB;AAEA,OAAOC,SAAP,MAAsB,wBAAtB;AAOA,OAAOC,WAAP,MAAwB,eAAxB;AACA,OAAOC,WAAP,MAAwB,eAAxB;AAKA,OAAOC,UAAP,MAAuB,cAAvB;
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":["StoryBlock","VideoFeed","FireworkSDK","FWNavigator","LiveStream","LiveStreamChatEventName","LiveStreamEventName","VideoPlaybackEventName","VideoFeedUtil","VideoShopping"],"mappings":"AAIA,OAAOA,UAAP,MAAuB,yBAAvB;AAEA,OAAOC,SAAP,MAAsB,wBAAtB;AAOA,OAAOC,WAAP,MAAwB,eAAxB;AACA,OAAOC,WAAP,MAAwB,eAAxB;AAKA,OAAOC,UAAP,MAAuB,cAAvB;AA8BA,OAAOC,uBAAP,MAAoC,kCAApC;AAEA,OAAOC,mBAAP,MAAgC,8BAAhC;AAsCA,OAAOC,sBAAP,MAAmC,iCAAnC;AAeA,OAAOC,aAAP,MAA0B,uBAA1B;AAQA,OAAOC,aAAP,MAA0B,iBAA1B;AAEA,eAAeP,WAAf;AAEA,SAeEA,WAfF,EAiBEC,WAjBF,EA2BEC,UA3BF,EA6BEC,uBA7BF,EAgCEC,mBAhCF,EA6DEN,UA7DF,EAoEEC,SApEF,EA8EEO,aA9EF,EAmFED,sBAnFF,EA+FEE,aA/FF","sourcesContent":["import type {\n IStoryBlockMethods,\n IStoryBlockProps,\n} from './components/StoryBlock';\nimport StoryBlock from './components/StoryBlock';\nimport type { IVideoFeedProps, VideoFeedMode } from './components/VideoFeed';\nimport VideoFeed from './components/VideoFeed';\nimport type {\n CustomCTAClickCallback,\n SDKInitCallback,\n VideoFeedClickCallback,\n VideoPlaybackCallback,\n} from './FireworkSDK';\nimport FireworkSDK from './FireworkSDK';\nimport FWNavigator from './FWNavigator';\nimport type {\n onLiveStreamChatEventCallback,\n onLiveStreamEventCallback,\n} from './LiveStream';\nimport LiveStream from './LiveStream';\nimport type AdBadgeConfiguration from './models/AdBadgeConfiguration';\nimport type { AdBadgeTextType } from './models/AdBadgeConfiguration';\nimport type AdConfiguration from './models/AdConfiguration';\nimport type { VastAttribute } from './models/AdConfiguration';\nimport type AndroidFontInfo from './models/AndroidFontInfo';\nimport type ButtonInfo from './models/ButtonInfo';\nimport type FeedItemDetails from './models/FeedItemDetails';\nimport type FWError from './models/FWError';\nimport type {\n CustomClickCartIconEvent,\n CustomClickLinkButtonEvent,\n CustomCTAClickEvent,\n CustomTapProductCardEvent,\n LiveStreamChatEvent,\n LiveStreamEvent,\n PlayerHandler,\n SDKInitEvent,\n ShoppingCTAEvent,\n UpdateProductDetailsEvent,\n VideoFeedClickEvent,\n VideoPlaybackEvent,\n} from './models/FWEvents';\nimport type GradientDrawable from './models/GradientDrawable';\nimport type { GradientDrawableOrientation } from './models/GradientDrawable';\nimport type IOSFontInfo from './models/IOSFontInfo';\nimport type {\n IOSSystemFontStyle,\n IOSSystemFontWeight,\n} from './models/IOSFontInfo';\nimport LiveStreamChatEventName from './models/LiveStreamChatEventName';\nimport type LiveStreamEventDetails from './models/LiveStreamEventDetails';\nimport LiveStreamEventName from './models/LiveStreamEventName';\nimport type LiveStreamMessageDetails from './models/LiveStreamMessageDetails';\nimport type OpenVideoPlayerConfiguration from './models/OpenVideoPlayerConfiguration';\nimport type Product from './models/Product';\nimport type ProductInfoViewConfiguration from './models/ProductInfoViewConfiguration';\nimport type {\n LinkButtonConfiguration,\n ProductCardConfiguration,\n ProductCardCTAButtonStyle,\n ProductCardCTAButtonText,\n ProductCardIconConfiguration,\n ProductCardLabelConfiguration,\n ProductCardPriceConfiguration,\n ProductCardPriceLabelAxis,\n ProductCardTheme,\n ShoppingCTAButtonConfiguration,\n ShoppingCTAButtonText,\n} from './models/ProductInfoViewConfiguration';\nimport type ProductUnit from './models/ProductUnit';\nimport type { ProductPrice, ProductUnitOption } from './models/ProductUnit';\nimport type PushRNContainerParams from './models/PushRNContainerParams';\nimport type { RNAppProps } from './models/PushRNContainerParams';\nimport type SDKInitOptions from './models/SDKInitOptions';\nimport type { VideoLaunchBehavior } from './models/SDKInitOptions';\nimport type ShoppingCTAResult from './models/ShoppingCTAResult';\nimport type { StoryBlockConfiguration } from './models/StoryBlockConfiguration';\nimport type { StoryBlockSource } from './models/StoryBlockSource';\nimport type TrackPurchaseParameters from './models/TrackPurchaseParameters';\nimport type VideoFeedConfiguration from './models/VideoFeedConfiguration';\nimport type {\n VideoFeedPadding,\n VideoFeedPlayIconConfiguration,\n VideoFeedTitleConfiguration,\n VideoFeedTitlePosition,\n} from './models/VideoFeedConfiguration';\nimport type { VideoFeedSource } from './models/VideoFeedSource';\nimport type VideoPlaybackDetails from './models/VideoPlaybackDetails';\nimport type { VideoPlayerSize } from './models/VideoPlaybackDetails';\nimport VideoPlaybackEventName from './models/VideoPlaybackEventName';\nimport type VideoPlayerButtonConfiguration from './models/VideoPlayerButtonConfiguration';\nimport type { VideoPlayerCompleteAction } from './models/VideoPlayerCompleteAction';\nimport type VideoPlayerConfiguration from './models/VideoPlayerConfiguration';\nimport type {\n VideoPlayerCTADelay,\n VideoPlayerCTADelayType,\n} from './models/VideoPlayerCTADelay';\nimport type { VideoPlayerCTAStyle } from './models/VideoPlayerCTAStyle';\nimport type { VideoPlayerCTAWidth } from './models/VideoPlayerCTAWidth';\nimport type {\n VideoPlayerLogoConfiguration,\n VideoPlayerLogoOption,\n} from './models/VideoPlayerLogoConfiguration';\nimport type { VideoPlayerStyle } from './models/VideoPlayerStyle';\nimport VideoFeedUtil from './utils/VideoFeedUtil';\nimport type {\n CustomClickCartIconCallback,\n CustomClickLinkButtonCallback,\n CustomTapProductCardCallback,\n ShoppingCTACallback,\n UpdateProductDetailsCallback,\n} from './VideoShopping';\nimport VideoShopping from './VideoShopping';\n\nexport default FireworkSDK;\n\nexport {\n AdBadgeConfiguration,\n AdBadgeTextType,\n AdConfiguration,\n AndroidFontInfo,\n ButtonInfo,\n CustomClickCartIconCallback,\n CustomClickCartIconEvent,\n CustomClickLinkButtonCallback,\n CustomClickLinkButtonEvent,\n CustomCTAClickCallback,\n CustomCTAClickEvent,\n CustomTapProductCardCallback,\n CustomTapProductCardEvent,\n FeedItemDetails,\n FireworkSDK,\n FWError,\n FWNavigator,\n GradientDrawable,\n GradientDrawableOrientation,\n IOSFontInfo,\n IOSSystemFontStyle,\n IOSSystemFontWeight,\n IStoryBlockMethods,\n IStoryBlockProps,\n IVideoFeedProps,\n LinkButtonConfiguration,\n LiveStream,\n LiveStreamChatEvent,\n LiveStreamChatEventName,\n LiveStreamEvent,\n LiveStreamEventDetails,\n LiveStreamEventName,\n LiveStreamMessageDetails,\n onLiveStreamChatEventCallback,\n onLiveStreamEventCallback,\n OpenVideoPlayerConfiguration,\n PlayerHandler,\n Product,\n ProductCardConfiguration,\n ProductCardCTAButtonStyle,\n ProductCardCTAButtonText,\n ProductCardIconConfiguration,\n ProductCardLabelConfiguration,\n ProductCardPriceConfiguration,\n ProductCardPriceLabelAxis,\n ProductCardTheme,\n ProductInfoViewConfiguration,\n ProductPrice,\n ProductUnit,\n ProductUnitOption,\n PushRNContainerParams,\n RNAppProps,\n SDKInitCallback,\n SDKInitEvent,\n SDKInitOptions,\n ShoppingCTAButtonConfiguration,\n ShoppingCTAButtonText,\n ShoppingCTACallback,\n ShoppingCTAEvent,\n ShoppingCTAResult,\n StoryBlock,\n StoryBlockConfiguration,\n StoryBlockSource,\n TrackPurchaseParameters,\n UpdateProductDetailsCallback,\n UpdateProductDetailsEvent,\n VastAttribute,\n VideoFeed,\n VideoFeedClickCallback,\n VideoFeedClickEvent,\n VideoFeedConfiguration,\n VideoFeedMode,\n VideoFeedPadding,\n VideoFeedPlayIconConfiguration,\n VideoFeedSource,\n VideoFeedTitleConfiguration,\n VideoFeedTitlePosition,\n VideoFeedUtil,\n VideoLaunchBehavior,\n VideoPlaybackCallback,\n VideoPlaybackDetails,\n VideoPlaybackEvent,\n VideoPlaybackEventName,\n VideoPlayerButtonConfiguration,\n VideoPlayerCompleteAction,\n VideoPlayerConfiguration,\n VideoPlayerCTADelay,\n VideoPlayerCTADelayType,\n VideoPlayerCTAStyle,\n VideoPlayerCTAWidth,\n VideoPlayerLogoConfiguration,\n VideoPlayerLogoOption,\n VideoPlayerSize,\n VideoPlayerStyle,\n VideoShopping,\n};\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export let FWNativeErrorAction;
|
|
2
|
+
|
|
3
|
+
(function (FWNativeErrorAction) {
|
|
4
|
+
FWNativeErrorAction["loadingFirstPage"] = "loadingFirstPage";
|
|
5
|
+
FWNativeErrorAction["loadingNextPage"] = "loadingNextPage";
|
|
6
|
+
})(FWNativeErrorAction || (FWNativeErrorAction = {}));
|
|
7
|
+
//# sourceMappingURL=FWNativeErrorAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["FWNativeErrorAction.ts"],"names":["FWNativeErrorAction"],"mappings":"AAAA,WAAYA,mBAAZ;;WAAYA,mB;AAAAA,EAAAA,mB;AAAAA,EAAAA,mB;GAAAA,mB,KAAAA,mB","sourcesContent":["export enum FWNativeErrorAction {\n loadingFirstPage = 'loadingFirstPage',\n loadingNextPage = 'loadingNextPage',\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["FireworkSDKModule.ts"],"names":["NativeEventEmitter","NativeModules","LINKING_ERROR","FireworkSDKModule","FireworkSDK","Proxy","get","Error","FireworkSDKModuleEventEmitter"],"mappings":"AAAA,SAASA,kBAAT,EAA2CC,aAA3C,QAAgE,cAAhE;AAEA,SAASC,aAAT,QAA8B,6BAA9B;AAMA,MAAMC,iBAAiB,GAAGF,aAAa,CAACG,WAAd,GACtBH,aAAa,CAACG,WADQ,GAEtB,IAAIC,KAAJ,CACE,EADF,EAEE;AACEC,EAAAA,GAAG,GAAG;AACJ,UAAM,IAAIC,KAAJ,CAAUL,aAAV,CAAN;AACD;;AAHH,CAFF,CAFJ;
|
|
1
|
+
{"version":3,"sources":["FireworkSDKModule.ts"],"names":["NativeEventEmitter","NativeModules","LINKING_ERROR","FireworkSDKModule","FireworkSDK","Proxy","get","Error","FireworkSDKModuleEventEmitter"],"mappings":"AAAA,SAASA,kBAAT,EAA2CC,aAA3C,QAAgE,cAAhE;AAEA,SAASC,aAAT,QAA8B,6BAA9B;AAMA,MAAMC,iBAAiB,GAAGF,aAAa,CAACG,WAAd,GACtBH,aAAa,CAACG,WADQ,GAEtB,IAAIC,KAAJ,CACE,EADF,EAEE;AACEC,EAAAA,GAAG,GAAG;AACJ,UAAM,IAAIC,KAAJ,CAAUL,aAAV,CAAN;AACD;;AAHH,CAFF,CAFJ;AA0BA,MAAMM,6BAA6B,GAAG,IAAIR,kBAAJ,CAAuBG,iBAAvB,CAAtC;AACA,SAASK,6BAAT;AACA,eAAeL,iBAAf","sourcesContent":["import { NativeEventEmitter, NativeModule, NativeModules } from 'react-native';\n\nimport { LINKING_ERROR } from '../constants/FWErrorMessage';\nimport type AdBadgeConfiguration from '../models/AdBadgeConfiguration';\nimport type SDKInitOptions from '../models/SDKInitOptions';\nimport type TrackPurchaseParameters from '../models/TrackPurchaseParameters';\nimport type VideoPlayerNativeConfiguration from '../models/VideoPlayerNativeConfiguration';\n\nconst FireworkSDKModule = NativeModules.FireworkSDK\n ? NativeModules.FireworkSDK\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\ninterface IFireworkSDKModule extends NativeModule {\n init(options?: SDKInitOptions): Promise<any>;\n markInitCalled(): Promise<boolean>;\n openVideoPlayer(url: string, config?: VideoPlayerNativeConfiguration): void;\n setVideoFeedClickCallbackEnabled(enabled: boolean): void; // Only supported on iOS\n setCustomCTAClickEnabled(enabled: boolean): void;\n setShareBaseURL(url?: string): Promise<any>;\n setVideoPlaybackEventEnabled(enabled: boolean): void;\n setAdBadgeConfiguration(config?: AdBadgeConfiguration): Promise<any>;\n trackPurchase(parameters: TrackPurchaseParameters): void;\n changeAppLanguage(language?: string | null): Promise<boolean>;\n pausePlayer(callbackId: number | string): void; // Only supported on iOS\n resumePlayer(callbackId: number | string): void; // Only supported on iOS\n}\n\nconst FireworkSDKModuleEventEmitter = new NativeEventEmitter(FireworkSDKModule);\nexport { FireworkSDKModuleEventEmitter };\nexport default FireworkSDKModule as IFireworkSDKModule;\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { CustomClickLinkButtonEvent, CustomTapProductCardEvent, ShoppingCTAEvent, UpdateProductDetailsEvent } from './models/FWEvents';
|
|
1
|
+
import type { CustomClickCartIconEvent, CustomClickLinkButtonEvent, CustomTapProductCardEvent, ShoppingCTAEvent, UpdateProductDetailsEvent } from './models/FWEvents';
|
|
2
2
|
import type Product from './models/Product';
|
|
3
3
|
import type ProductInfoViewConfiguration from './models/ProductInfoViewConfiguration';
|
|
4
4
|
import type ShoppingCTAResult from './models/ShoppingCTAResult';
|
|
5
5
|
export type ShoppingCTACallback = (event: ShoppingCTAEvent) => Promise<ShoppingCTAResult> | ShoppingCTAResult;
|
|
6
|
-
export type CustomClickCartIconCallback = () => Promise<void> | void;
|
|
6
|
+
export type CustomClickCartIconCallback = (event: CustomClickCartIconEvent) => Promise<void> | void;
|
|
7
7
|
export type UpdateProductDetailsCallbackResult = Product[] | undefined | null;
|
|
8
8
|
export type UpdateProductDetailsCallback = (event: UpdateProductDetailsEvent) => Promise<UpdateProductDetailsCallbackResult> | UpdateProductDetailsCallbackResult;
|
|
9
9
|
export type CustomClickLinkButtonCallback = (event: CustomClickLinkButtonEvent) => Promise<void> | void;
|
|
@@ -18,6 +18,18 @@ export interface IStoryBlockMethods {
|
|
|
18
18
|
* Only supported on Android.
|
|
19
19
|
*/
|
|
20
20
|
openFullscreen: () => void;
|
|
21
|
+
/**
|
|
22
|
+
* Triggered when the story block enters the viewport.
|
|
23
|
+
* Only supported on iOS.
|
|
24
|
+
* It is recommended that the host app is triggered when listening for scrolling.
|
|
25
|
+
*/
|
|
26
|
+
onViewportEntered: () => void;
|
|
27
|
+
/**
|
|
28
|
+
* Triggered when the story block leaves the viewport.
|
|
29
|
+
* Only supported on iOS.
|
|
30
|
+
* It is recommended that the host app is triggered when listening for scrolling.
|
|
31
|
+
*/
|
|
32
|
+
onViewportLeft: () => void;
|
|
21
33
|
}
|
|
22
34
|
/**
|
|
23
35
|
* The props type of StoryBlock component.
|
|
@@ -83,7 +95,6 @@ export interface IStoryBlockProps {
|
|
|
83
95
|
* 1. Loading successfully but the back end returns an empty list.
|
|
84
96
|
* 2. The load failed and list is empty.
|
|
85
97
|
* onStoryBlockLoadFinished will also be triggered when onStoryBlockEmpty is triggered.
|
|
86
|
-
* Only supported on Android.
|
|
87
98
|
*/
|
|
88
99
|
onStoryBlockEmpty?: (error?: FWError) => void;
|
|
89
100
|
/**
|
|
@@ -94,6 +105,12 @@ export interface IStoryBlockProps {
|
|
|
94
105
|
* Stop Picture in Picture callback. Only supported on iOS.
|
|
95
106
|
*/
|
|
96
107
|
onStoryBlockDidStopPictureInPicture?: (error?: FWError) => void;
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* The host app could use this callback to get feed id.
|
|
111
|
+
* The feed id can be used for conversion tracking.
|
|
112
|
+
*/
|
|
113
|
+
onStoryBlockGetFeedId?: (feedId: string) => void;
|
|
97
114
|
}
|
|
98
115
|
declare const _default: React.ForwardRefExoticComponent<IStoryBlockProps & React.RefAttributes<IStoryBlockMethods>>;
|
|
99
116
|
export default _default;
|
|
@@ -83,7 +83,6 @@ export interface IVideoFeedProps {
|
|
|
83
83
|
* 1. Loading successfully but the back end returns an empty list.
|
|
84
84
|
* 2. The load failed and list is empty.
|
|
85
85
|
* onVideoFeedLoadFinished will also be triggered when onVideoFeedEmpty is triggered.
|
|
86
|
-
* Only supported on Android.
|
|
87
86
|
*/
|
|
88
87
|
onVideoFeedEmpty?: (error?: FWError) => void;
|
|
89
88
|
/**
|
|
@@ -94,6 +93,12 @@ export interface IVideoFeedProps {
|
|
|
94
93
|
* Stop Picture in Picture callback. Only supported on iOS.
|
|
95
94
|
*/
|
|
96
95
|
onVideoFeedDidStopPictureInPicture?: (error?: FWError) => void;
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* The host app could use this callback to get feed id.
|
|
99
|
+
* The feed id can be used for conversion tracking.
|
|
100
|
+
*/
|
|
101
|
+
onVideoFeedGetFeedId?: (feedId: string) => void;
|
|
97
102
|
}
|
|
98
103
|
interface IVideoFeedState {
|
|
99
104
|
sdkInitCalled: boolean;
|
|
@@ -117,6 +122,7 @@ declare class VideoFeed extends React.Component<IVideoFeedProps, IVideoFeedState
|
|
|
117
122
|
private _onVideoFeedEmpty;
|
|
118
123
|
private _onVideoFeedDidStartPictureInPicture;
|
|
119
124
|
private _onVideoFeedDidStopPictureInPicture;
|
|
125
|
+
private _onVideoFeedGetFeedId;
|
|
120
126
|
/**
|
|
121
127
|
* @ignore
|
|
122
128
|
*/
|
|
@@ -15,7 +15,7 @@ import type AndroidFontInfo from './models/AndroidFontInfo';
|
|
|
15
15
|
import type ButtonInfo from './models/ButtonInfo';
|
|
16
16
|
import type FeedItemDetails from './models/FeedItemDetails';
|
|
17
17
|
import type FWError from './models/FWError';
|
|
18
|
-
import type { CustomClickLinkButtonEvent, CustomCTAClickEvent, CustomTapProductCardEvent, LiveStreamChatEvent, LiveStreamEvent, PlayerHandler, SDKInitEvent, ShoppingCTAEvent, UpdateProductDetailsEvent, VideoFeedClickEvent, VideoPlaybackEvent } from './models/FWEvents';
|
|
18
|
+
import type { CustomClickCartIconEvent, CustomClickLinkButtonEvent, CustomCTAClickEvent, CustomTapProductCardEvent, LiveStreamChatEvent, LiveStreamEvent, PlayerHandler, SDKInitEvent, ShoppingCTAEvent, UpdateProductDetailsEvent, VideoFeedClickEvent, VideoPlaybackEvent } from './models/FWEvents';
|
|
19
19
|
import type GradientDrawable from './models/GradientDrawable';
|
|
20
20
|
import type { GradientDrawableOrientation } from './models/GradientDrawable';
|
|
21
21
|
import type IOSFontInfo from './models/IOSFontInfo';
|
|
@@ -56,4 +56,4 @@ import VideoFeedUtil from './utils/VideoFeedUtil';
|
|
|
56
56
|
import type { CustomClickCartIconCallback, CustomClickLinkButtonCallback, CustomTapProductCardCallback, ShoppingCTACallback, UpdateProductDetailsCallback } from './VideoShopping';
|
|
57
57
|
import VideoShopping from './VideoShopping';
|
|
58
58
|
export default FireworkSDK;
|
|
59
|
-
export { AdBadgeConfiguration, AdBadgeTextType, AdConfiguration, AndroidFontInfo, ButtonInfo, CustomClickCartIconCallback, CustomClickLinkButtonCallback, CustomClickLinkButtonEvent, CustomCTAClickCallback, CustomCTAClickEvent, CustomTapProductCardCallback, CustomTapProductCardEvent, FeedItemDetails, FireworkSDK, FWError, FWNavigator, GradientDrawable, GradientDrawableOrientation, IOSFontInfo, IOSSystemFontStyle, IOSSystemFontWeight, IStoryBlockMethods, IStoryBlockProps, IVideoFeedProps, LinkButtonConfiguration, LiveStream, LiveStreamChatEvent, LiveStreamChatEventName, LiveStreamEvent, LiveStreamEventDetails, LiveStreamEventName, LiveStreamMessageDetails, onLiveStreamChatEventCallback, onLiveStreamEventCallback, OpenVideoPlayerConfiguration, PlayerHandler, Product, ProductCardConfiguration, ProductCardCTAButtonStyle, ProductCardCTAButtonText, ProductCardIconConfiguration, ProductCardLabelConfiguration, ProductCardPriceConfiguration, ProductCardPriceLabelAxis, ProductCardTheme, ProductInfoViewConfiguration, ProductPrice, ProductUnit, ProductUnitOption, PushRNContainerParams, RNAppProps, SDKInitCallback, SDKInitEvent, SDKInitOptions, ShoppingCTAButtonConfiguration, ShoppingCTAButtonText, ShoppingCTACallback, ShoppingCTAEvent, ShoppingCTAResult, StoryBlock, StoryBlockConfiguration, StoryBlockSource, TrackPurchaseParameters, UpdateProductDetailsCallback, UpdateProductDetailsEvent, VastAttribute, VideoFeed, VideoFeedClickCallback, VideoFeedClickEvent, VideoFeedConfiguration, VideoFeedMode, VideoFeedPadding, VideoFeedPlayIconConfiguration, VideoFeedSource, VideoFeedTitleConfiguration, VideoFeedTitlePosition, VideoFeedUtil, VideoLaunchBehavior, VideoPlaybackCallback, VideoPlaybackDetails, VideoPlaybackEvent, VideoPlaybackEventName, VideoPlayerButtonConfiguration, VideoPlayerCompleteAction, VideoPlayerConfiguration, VideoPlayerCTADelay, VideoPlayerCTADelayType, VideoPlayerCTAStyle, VideoPlayerCTAWidth, VideoPlayerLogoConfiguration, VideoPlayerLogoOption, VideoPlayerSize, VideoPlayerStyle, VideoShopping, };
|
|
59
|
+
export { AdBadgeConfiguration, AdBadgeTextType, AdConfiguration, AndroidFontInfo, ButtonInfo, CustomClickCartIconCallback, CustomClickCartIconEvent, CustomClickLinkButtonCallback, CustomClickLinkButtonEvent, CustomCTAClickCallback, CustomCTAClickEvent, CustomTapProductCardCallback, CustomTapProductCardEvent, FeedItemDetails, FireworkSDK, FWError, FWNavigator, GradientDrawable, GradientDrawableOrientation, IOSFontInfo, IOSSystemFontStyle, IOSSystemFontWeight, IStoryBlockMethods, IStoryBlockProps, IVideoFeedProps, LinkButtonConfiguration, LiveStream, LiveStreamChatEvent, LiveStreamChatEventName, LiveStreamEvent, LiveStreamEventDetails, LiveStreamEventName, LiveStreamMessageDetails, onLiveStreamChatEventCallback, onLiveStreamEventCallback, OpenVideoPlayerConfiguration, PlayerHandler, Product, ProductCardConfiguration, ProductCardCTAButtonStyle, ProductCardCTAButtonText, ProductCardIconConfiguration, ProductCardLabelConfiguration, ProductCardPriceConfiguration, ProductCardPriceLabelAxis, ProductCardTheme, ProductInfoViewConfiguration, ProductPrice, ProductUnit, ProductUnitOption, PushRNContainerParams, RNAppProps, SDKInitCallback, SDKInitEvent, SDKInitOptions, ShoppingCTAButtonConfiguration, ShoppingCTAButtonText, ShoppingCTACallback, ShoppingCTAEvent, ShoppingCTAResult, StoryBlock, StoryBlockConfiguration, StoryBlockSource, TrackPurchaseParameters, UpdateProductDetailsCallback, UpdateProductDetailsEvent, VastAttribute, VideoFeed, VideoFeedClickCallback, VideoFeedClickEvent, VideoFeedConfiguration, VideoFeedMode, VideoFeedPadding, VideoFeedPlayIconConfiguration, VideoFeedSource, VideoFeedTitleConfiguration, VideoFeedTitlePosition, VideoFeedUtil, VideoLaunchBehavior, VideoPlaybackCallback, VideoPlaybackDetails, VideoPlaybackEvent, VideoPlaybackEventName, VideoPlayerButtonConfiguration, VideoPlayerCompleteAction, VideoPlayerConfiguration, VideoPlayerCTADelay, VideoPlayerCTADelayType, VideoPlayerCTAStyle, VideoPlayerCTAWidth, VideoPlayerLogoConfiguration, VideoPlayerLogoOption, VideoPlayerSize, VideoPlayerStyle, VideoShopping, };
|
|
@@ -14,12 +14,12 @@ export interface SDKInitEvent {
|
|
|
14
14
|
}
|
|
15
15
|
export interface PlayerHandler {
|
|
16
16
|
/**
|
|
17
|
-
* Pause
|
|
17
|
+
* Pause The video playback associated with this CTA.
|
|
18
18
|
* Only supported on iOS
|
|
19
19
|
*/
|
|
20
20
|
pause: () => void;
|
|
21
21
|
/**
|
|
22
|
-
* Resume
|
|
22
|
+
* Resume The video playback associated with this CTA.
|
|
23
23
|
* Only supported on iOS
|
|
24
24
|
*/
|
|
25
25
|
resume: () => void;
|
|
@@ -34,6 +34,10 @@ export interface CustomCTAClickEvent {
|
|
|
34
34
|
* Only supported on iOS
|
|
35
35
|
*/
|
|
36
36
|
playerHandler?: PlayerHandler;
|
|
37
|
+
/**
|
|
38
|
+
* The video playback details for the event.
|
|
39
|
+
*/
|
|
40
|
+
video: VideoPlaybackDetails;
|
|
37
41
|
}
|
|
38
42
|
export interface VideoPlaybackEvent {
|
|
39
43
|
eventName: VideoPlaybackEventName;
|
|
@@ -55,12 +59,20 @@ export interface ShoppingCTAEvent {
|
|
|
55
59
|
* A unique identifier of the product unit.
|
|
56
60
|
*/
|
|
57
61
|
unitId: string;
|
|
62
|
+
/**
|
|
63
|
+
* The video playback details for the event.
|
|
64
|
+
*/
|
|
65
|
+
video: VideoPlaybackDetails;
|
|
58
66
|
}
|
|
59
67
|
export interface UpdateProductDetailsEvent {
|
|
60
68
|
/**
|
|
61
69
|
* A unique identifier list of the products.
|
|
62
70
|
*/
|
|
63
71
|
productIds: string[];
|
|
72
|
+
/**
|
|
73
|
+
* The video playback details for the event.
|
|
74
|
+
*/
|
|
75
|
+
video: VideoPlaybackDetails;
|
|
64
76
|
}
|
|
65
77
|
export interface CustomClickLinkButtonEvent {
|
|
66
78
|
/**
|
|
@@ -75,6 +87,11 @@ export interface CustomClickLinkButtonEvent {
|
|
|
75
87
|
* A unique identifier of the product unit.
|
|
76
88
|
*/
|
|
77
89
|
unitId: string;
|
|
90
|
+
/**
|
|
91
|
+
* The video playback details for the event.
|
|
92
|
+
* Only supported on Android.
|
|
93
|
+
*/
|
|
94
|
+
video?: VideoPlaybackDetails;
|
|
78
95
|
}
|
|
79
96
|
export interface CustomTapProductCardEvent {
|
|
80
97
|
/**
|
|
@@ -90,7 +107,7 @@ export interface CustomTapProductCardEvent {
|
|
|
90
107
|
*/
|
|
91
108
|
unitId: string;
|
|
92
109
|
/**
|
|
93
|
-
*
|
|
110
|
+
* The video playback details for the event.
|
|
94
111
|
*/
|
|
95
112
|
video: VideoPlaybackDetails;
|
|
96
113
|
/**
|
|
@@ -107,3 +124,9 @@ export interface LiveStreamChatEvent {
|
|
|
107
124
|
message: LiveStreamMessageDetails;
|
|
108
125
|
liveStream: LiveStreamEventDetails;
|
|
109
126
|
}
|
|
127
|
+
export interface CustomClickCartIconEvent {
|
|
128
|
+
/**
|
|
129
|
+
* The video playback details for the event.
|
|
130
|
+
*/
|
|
131
|
+
video: VideoPlaybackDetails;
|
|
132
|
+
}
|
|
@@ -50,5 +50,10 @@ export default interface FeedItemDetails {
|
|
|
50
50
|
* For instance, (and sport food) (or sport food) (and sport (or food comedy)) sport are all valid expressions.
|
|
51
51
|
* Non-UTF-8 characters are not allowed. If using boolean predicates, the expression needs to be wrapped with parenthesis.
|
|
52
52
|
*/
|
|
53
|
-
hashtagFilterExpression?: string;
|
|
53
|
+
hashtagFilterExpression?: string | null;
|
|
54
|
+
/**
|
|
55
|
+
* The feed id for the item.
|
|
56
|
+
* Only supported on Android.
|
|
57
|
+
*/
|
|
58
|
+
feedId?: string | null;
|
|
54
59
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ReplayBadgeConfiguration } from './ReplayBadgeConfiguration';
|
|
1
2
|
import type VideoPlayerButtonConfiguration from './VideoPlayerButtonConfiguration';
|
|
2
3
|
import type { VideoPlayerCTADelay } from './VideoPlayerCTADelay';
|
|
3
4
|
import type { VideoPlayerCTAStyle } from './VideoPlayerCTAStyle';
|
|
@@ -72,7 +73,11 @@ export interface StoryBlockConfiguration {
|
|
|
72
73
|
/**
|
|
73
74
|
* Specifies the logo configuration
|
|
74
75
|
* Defaults to { option: 'disabled' }
|
|
75
|
-
* Only supported on iOS.
|
|
76
76
|
*/
|
|
77
77
|
videoPlayerLogoConfiguration?: VideoPlayerLogoConfiguration;
|
|
78
|
+
/**
|
|
79
|
+
* The configuration of replay badge.
|
|
80
|
+
* Only supported on iOS.
|
|
81
|
+
*/
|
|
82
|
+
replayBadgeConfiguration?: ReplayBadgeConfiguration;
|
|
78
83
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type IOSFontInfo from './IOSFontInfo';
|
|
2
2
|
import type AndroidFontInfo from './AndroidFontInfo';
|
|
3
3
|
import type GradientDrawable from './GradientDrawable';
|
|
4
|
+
import type { ReplayBadgeConfiguration } from './ReplayBadgeConfiguration';
|
|
4
5
|
export interface VideoFeedTitleConfiguration {
|
|
5
6
|
/**
|
|
6
7
|
* Specifies if the video feed title is hidden.
|
|
@@ -130,4 +131,9 @@ export default interface VideoFeedConfiguration {
|
|
|
130
131
|
* Defaults to 2.
|
|
131
132
|
*/
|
|
132
133
|
gridColumns?: number;
|
|
134
|
+
/**
|
|
135
|
+
* The configuration of replay badge.
|
|
136
|
+
* Only supported on iOS.
|
|
137
|
+
*/
|
|
138
|
+
replayBadge?: ReplayBadgeConfiguration;
|
|
133
139
|
}
|
|
@@ -5,6 +5,7 @@ import type { VideoPlayerCTAWidth } from './VideoPlayerCTAWidth';
|
|
|
5
5
|
import type { VideoPlayerCompleteAction } from './VideoPlayerCompleteAction';
|
|
6
6
|
import type { VideoPlayerStyle } from './VideoPlayerStyle';
|
|
7
7
|
import type { VideoPlayerLogoConfiguration } from './VideoPlayerLogoConfiguration';
|
|
8
|
+
import type { ReplayBadgeConfiguration } from './ReplayBadgeConfiguration';
|
|
8
9
|
export default interface VideoPlayerConfiguration {
|
|
9
10
|
/**
|
|
10
11
|
* Sets the proportion of the video player to its container.
|
|
@@ -70,7 +71,11 @@ export default interface VideoPlayerConfiguration {
|
|
|
70
71
|
/**
|
|
71
72
|
* Specifies the logo configuration
|
|
72
73
|
* Defaults to { option: 'disabled' }
|
|
73
|
-
* Only supported on iOS.
|
|
74
74
|
*/
|
|
75
75
|
videoPlayerLogoConfiguration?: VideoPlayerLogoConfiguration;
|
|
76
|
+
/**
|
|
77
|
+
* The configuration of replay badge.
|
|
78
|
+
* Only supported on iOS.
|
|
79
|
+
*/
|
|
80
|
+
replayBadgeConfiguration?: ReplayBadgeConfiguration;
|
|
76
81
|
}
|
|
@@ -5,6 +5,7 @@ import type TrackPurchaseParameters from '../models/TrackPurchaseParameters';
|
|
|
5
5
|
import type VideoPlayerNativeConfiguration from '../models/VideoPlayerNativeConfiguration';
|
|
6
6
|
interface IFireworkSDKModule extends NativeModule {
|
|
7
7
|
init(options?: SDKInitOptions): Promise<any>;
|
|
8
|
+
markInitCalled(): Promise<boolean>;
|
|
8
9
|
openVideoPlayer(url: string, config?: VideoPlayerNativeConfiguration): void;
|
|
9
10
|
setVideoFeedClickCallbackEnabled(enabled: boolean): void;
|
|
10
11
|
setCustomCTAClickEnabled(enabled: boolean): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-firework-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.0",
|
|
4
4
|
"description": "Firework React Native SDK",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -13,13 +13,9 @@
|
|
|
13
13
|
"ios",
|
|
14
14
|
"cpp",
|
|
15
15
|
"react-native-firework-sdk.podspec",
|
|
16
|
-
"FireworkVideoUI.xcframework",
|
|
17
16
|
"!lib/typescript/example",
|
|
18
17
|
"!android/build",
|
|
19
18
|
"!ios/build",
|
|
20
|
-
"!ios/FireworkVideoUI/build",
|
|
21
|
-
"!ios/FireworkVideoUI/Pods",
|
|
22
|
-
"!ios/FireworkVideoUI/scripts",
|
|
23
19
|
"!**/__tests__",
|
|
24
20
|
"!**/__fixtures__",
|
|
25
21
|
"!**/__mocks__",
|
|
@@ -27,13 +27,11 @@ fi
|
|
|
27
27
|
|
|
28
28
|
s.source_files = 'ios/**/*.{h,m,mm,swift}'
|
|
29
29
|
s.exclude_files = [
|
|
30
|
-
'ios/Support/**/*'
|
|
31
|
-
'ios/FireworkVideoUI/**/*'
|
|
30
|
+
'ios/Support/**/*'
|
|
32
31
|
]
|
|
33
|
-
s.preserve_paths = "FireworkVideoUI.xcframework"
|
|
34
|
-
s.vendored_frameworks = "FireworkVideoUI.xcframework"
|
|
35
32
|
|
|
36
33
|
s.static_framework = true
|
|
37
34
|
s.dependency 'React-Core'
|
|
38
|
-
s.dependency '
|
|
35
|
+
s.dependency 'FireworkVideoUI', '0.1.0'
|
|
36
|
+
s.dependency 'FireworkVideo', '1.18.0'
|
|
39
37
|
end
|