react-native-firework-sdk 2.3.1 → 2.4.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/FireworkVideoUI +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Info.plist +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios.abi.json +24 -10
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios.private.swiftinterface +1 -1
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios.swiftinterface +1 -1
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/FireworkVideoUI +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Info.plist +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.abi.json +24 -10
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +1 -1
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.swiftinterface +1 -1
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.abi.json +24 -10
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +1 -1
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +1 -1
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/_CodeSignature/CodeResources +21 -21
- package/android/gradle.properties +1 -1
- package/android/src/main/java/com/fireworksdk/bridge/components/storyblock/StoryBlockFragment.kt +20 -0
- package/android/src/main/java/com/fireworksdk/bridge/components/videofeed/FWVideoFeed.kt +1 -69
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedPropsModel.kt +3 -1
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedPropsModelDeserializer.kt +21 -4
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedPropsModelSerializer.kt +15 -3
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerConfigModel.kt +2 -1
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerConfigModelDeserializer.kt +3 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerConfigModelSerializer.kt +2 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWVideoFeedSource.kt +3 -1
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/FWReactNativeSDK.kt +6 -0
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/manager/FWStoryBlockManager.kt +20 -15
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/manager/FWVideoFeedManager.kt +45 -16
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FireworkSDKModule.kt +5 -0
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWConfigUtil.kt +11 -1
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWImageLoaderUtil.kt +16 -0
- package/ios/Components/StoryBlock.swift +9 -7
- package/ios/Components/StoryBlockConfiguration.swift +13 -0
- package/ios/Components/StoryBlockManager.m +6 -1
- package/ios/Components/VideoFeed.swift +5 -10
- package/ios/Components/VideoFeedManager.m +1 -2
- package/ios/Components/VideoPlayerConfiguration.swift +1 -0
- package/ios/FireworkSdk.xcodeproj/project.pbxproj +4 -26
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/AppLanguageManager.swift +13 -2
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/UIKit/UIImageView+AppLanguage.swift +0 -34
- package/ios/FireworkVideoUI/Podfile +1 -1
- package/ios/FireworkVideoUI/Podfile.lock +4 -4
- package/ios/Models/RNToNative/RCTConvert+FireworkSDKModule.swift +1 -0
- package/ios/Models/RNToNative/RCTConvert+StoryBlock.swift +16 -1
- package/ios/Models/RNToNative/RCTConvert+VideoFeed.swift +2 -1
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule.swift +8 -4
- package/ios/Modules/Shopping/ShoppingModule.swift +6 -5
- package/ios/react_native_firework_sdk.h +0 -1
- package/lib/commonjs/FireworkSDK.js.map +1 -1
- package/lib/commonjs/components/StoryBlock.js +71 -33
- package/lib/commonjs/components/StoryBlock.js.map +1 -1
- package/lib/commonjs/components/VideoFeed.js +83 -57
- package/lib/commonjs/components/VideoFeed.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/OpenVideoPlayerConfiguration.js +2 -0
- package/lib/commonjs/models/OpenVideoPlayerConfiguration.js.map +1 -0
- package/lib/commonjs/models/StoryBlockNativeConfiguration.js +2 -0
- package/lib/commonjs/models/StoryBlockNativeConfiguration.js.map +1 -0
- package/lib/commonjs/models/VideoPlayerNativeConfiguration.js +2 -0
- package/lib/commonjs/models/VideoPlayerNativeConfiguration.js.map +1 -0
- package/lib/commonjs/modules/FireworkSDKModule.js.map +1 -1
- package/lib/module/FireworkSDK.js.map +1 -1
- package/lib/module/components/StoryBlock.js +67 -33
- package/lib/module/components/StoryBlock.js.map +1 -1
- package/lib/module/components/VideoFeed.js +79 -57
- package/lib/module/components/VideoFeed.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/OpenVideoPlayerConfiguration.js +2 -0
- package/lib/module/models/OpenVideoPlayerConfiguration.js.map +1 -0
- package/lib/module/models/StoryBlockNativeConfiguration.js +2 -0
- package/lib/module/models/StoryBlockNativeConfiguration.js.map +1 -0
- package/lib/module/models/VideoPlayerNativeConfiguration.js +2 -0
- package/lib/module/models/VideoPlayerNativeConfiguration.js.map +1 -0
- package/lib/module/modules/FireworkSDKModule.js.map +1 -1
- package/lib/typescript/FireworkSDK.d.ts +2 -2
- package/lib/typescript/components/StoryBlock.d.ts +8 -0
- package/lib/typescript/components/VideoFeed.d.ts +8 -1
- package/lib/typescript/index.d.ts +2 -1
- package/lib/typescript/models/AdBadgeConfiguration.d.ts +3 -0
- package/lib/typescript/models/AndroidFontInfo.d.ts +1 -1
- package/lib/typescript/models/OpenVideoPlayerConfiguration.d.ts +7 -0
- package/lib/typescript/models/Product.d.ts +1 -1
- package/lib/typescript/models/ProductUnit.d.ts +1 -1
- package/lib/typescript/models/StoryBlockConfiguration.d.ts +1 -1
- package/lib/typescript/models/StoryBlockNativeConfiguration.d.ts +7 -0
- package/lib/typescript/models/StoryBlockSource.d.ts +1 -1
- package/lib/typescript/models/VideoFeedConfiguration.d.ts +29 -4
- package/lib/typescript/models/VideoFeedSource.d.ts +1 -1
- package/lib/typescript/models/VideoPlayerCTAStyle.d.ts +6 -0
- package/lib/typescript/models/VideoPlayerConfiguration.d.ts +10 -1
- package/lib/typescript/models/VideoPlayerNativeConfiguration.d.ts +7 -0
- package/lib/typescript/modules/FireworkSDKModule.d.ts +2 -2
- package/package.json +2 -2
- package/react-native-firework-sdk.podspec +1 -1
- package/src/FireworkSDK.ts +2 -2
- package/src/components/StoryBlock.tsx +65 -36
- package/src/components/VideoFeed.tsx +87 -74
- package/src/index.ts +2 -0
- package/src/models/AdBadgeConfiguration.ts +3 -0
- package/src/models/AndroidFontInfo.ts +1 -1
- package/src/models/OpenVideoPlayerConfiguration.ts +9 -0
- package/src/models/Product.ts +1 -1
- package/src/models/ProductUnit.ts +1 -1
- package/src/models/StoryBlockConfiguration.ts +1 -1
- package/src/models/StoryBlockNativeConfiguration.ts +9 -0
- package/src/models/StoryBlockSource.ts +2 -1
- package/src/models/VideoFeedConfiguration.ts +29 -4
- package/src/models/VideoFeedSource.ts +2 -1
- package/src/models/VideoPlayerCTAStyle.ts +6 -0
- package/src/models/VideoPlayerConfiguration.ts +10 -1
- package/src/models/VideoPlayerNativeConfiguration.ts +9 -0
- package/src/modules/FireworkSDKModule.ts +2 -2
- package/ios/Modules/Shopping/FWCartViewController.swift +0 -14
- package/ios/Utils/Extensions/Swizzle/UINavigationController+FWSwizzle.swift +0 -31
- package/ios/Utils/FWSwizzleLoader.h +0 -15
- package/ios/Utils/FWSwizzleLoader.m +0 -21
- package/ios/Utils/FWSwizzleLoader.swift +0 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["StoryBlock.tsx"],"names":["NativeComponentName","StoryBlock","props","forwardedRef","nativeComponentRef","isFullscreenState","setIsFullscreenState","sdkInitCalled","setSdkInitCalled","FWGlobalState","getInstance","forceUpdate","x","handleStoryBlockLoadFinished","event","FWLoggerUtil","log","nativeEvent","name","onStoryBlockLoadFinished","reason","handleStoryBlockFullScreenStateChanged","isFullScreen","generateDynamicContentParametersString","dynamicContentParameters","resultString","sortedKeyList","Object","keys","sort","key","value","valueString","join","length","generateVastAttributesString","adConfiguration","vastAttributes","attribute","generateKey","gShareBaseURL","FireworkSDK","shareBaseURL","appLanguage","videoLaunchBehavior","adBadgeConfiguration","adBadgeTextType","badgeTextType","backgroundColorOfAdBadge","backgroundColor","textColorOfAdBadge","textColor","androidFontIsCustomOfAdBadge","androidFontInfo","isCustom","toString","androidFontTypefaceNameOfAdBadge","typefaceName","source","channel","playlist","hashtagFilterExpression","enablePictureInPicture","storyBlockConfiguration","dynamicContentParametersString","videoCompleteAction","showShareButton","showPlaybackButton","showBranding","ctaDelayType","ctaDelay","type","ctaDelayValue","toFixed","ctaHighlightDelayType","ctaHighlightDelay","ctaHighlightDelayValue","ctaWidth","requiresAds","adsFetchTimeout","vastAttributesString","Platform","OS","sendCommand","command","nativeNodeHandle","current","commandId","UIManager","getViewManagerConfig","Commands","dispatchViewManagerCommand","play","pause","subscriptionOfShareBaseURLUpdated","FireworkSDKModuleEventEmitter","addListener","FWEventName","ShareBaseURLUpdated","subscriptionOfAdBadgeConfigurationUpdated","AdBadgeConfigurationUpdated","subscriptionOfVideoLaunchBehaviorUpdated","VideoLaunchBehaviorUpdated","subscriptionOfAppLanguageUpdated","AppLanguageUpdated","remove","setTimeout","viewId","create","sdkInitCalledPromise","then","onBackPress","navigator","popNativeContainer","subscription","BackHandler","addEventListener"],"mappings":";;;;;;;AACA;;AASA;;AAUA;;AAGA;;AAGA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,mBAAmB,GAAG,cAA5B;;AA8DA,MAAMC,UAGL,GAAG,CAACC,KAAD,EAA0BC,YAA1B,KAA2C;AAC7C,QAAMC,kBAAkB,GAAG,mBAAO,IAAP,CAA3B;AACA,QAAM,CAACC,iBAAD,EAAoBC,oBAApB,IAA4C,qBAAkB,KAAlB,CAAlD;AACA,QAAM,CAACC,aAAD,EAAgBC,gBAAhB,IAAoC,qBACxCC,uBAAcC,WAAd,GAA4BH,aADY,CAA1C;AAGA,QAAM,GAAGI,WAAH,IAAkB,uBAAYC,CAAD,IAAOA,CAAC,GAAG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MAAb;AACD,OAFD;AAGD;;AAED;AACD,GAnBD,EAmBG,CAACpG,iBAAD,CAnBH;;AAqBA,MAAI,CAACE,aAAL,EAAoB;AAClB,WAAO,IAAP;AACD;;AAED,sBACE,6BAAC,qBAAD;AACE,IAAA,GAAG,EAAEH,kBADP;AAEE,IAAA,GAAG,EAAE0B;AAFP,KAGM5B,KAHN;AAIE,IAAA,wBAAwB,EAAEW,4BAJ5B;AAKE,IAAA,kCAAkC,EAChCQ;AANJ,KADF;AAWD,CAnTD;;4BAqTe,uBAAWpB,UAAX,C","sourcesContent":["import type { ForwardRefRenderFunction } from 'react';\nimport React, {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useReducer,\n useRef,\n useState,\n} from 'react';\n\nimport {\n BackHandler,\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 { StoryBlockConfiguration } from '../models/StoryBlockConfiguration';\nimport type { StoryBlockSource } from '../models/StoryBlockSource';\nimport { FireworkSDKModuleEventEmitter } from '../modules/FireworkSDKModule';\nimport FWGlobalState from '../utils/FWGlobalState';\nimport FWLoggerUtil from '../utils/FWLoggerUtil';\nimport FWStoryBlock from './FWStoryBlock';\n\nconst NativeComponentName = 'FWStoryBlock';\n\nexport interface IStoryBlockMethods {\n /**\n * Play the story block.\n */\n play: () => void;\n /**\n * Pause the story block.\n */\n pause: () => void;\n}\n\n/**\n * The props type of StoryBlock component.\n */\nexport interface IStoryBlockProps {\n /**\n * Standard React Native View Style.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * One of four available story block sources.\n */\n source: StoryBlockSource;\n /**\n * Channel id of the story block. Required when the source is set as channel or playlist or dynamicContent.\n */\n channel?: string;\n /**\n * Playlist id of the story block. Please note channel id is necessary. Required when the source is set as playlist.\n */\n playlist?: string;\n /**\n * The dynamic content parameters of the story block. 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 */\n hashtagFilterExpression?: string;\n /**\n * Specifies if Picture in Picture is enabled. Only supported on iOS.\n */\n enablePictureInPicture?: boolean;\n /**\n * Ad configuration of the feed. Only supported on iOS.\n */\n adConfiguration?: AdConfiguration;\n\n /* The configuration of the story block.\n Only supported on Android.*/\n storyBlockConfiguration?: StoryBlockConfiguration;\n /**\n * The feed loading result callback. It means loading successfully when error equals to undefined.\n */\n onStoryBlockLoadFinished?: (error?: FWError) => void;\n}\n\nconst StoryBlock: ForwardRefRenderFunction<\n IStoryBlockMethods,\n IStoryBlockProps\n> = (props: IStoryBlockProps, forwardedRef) => {\n const nativeComponentRef = useRef(null);\n const [isFullscreenState, setIsFullscreenState] = useState<boolean>(false);\n const [sdkInitCalled, setSdkInitCalled] = useState<boolean>(\n FWGlobalState.getInstance().sdkInitCalled\n );\n const [, forceUpdate] = useReducer((x) => x + 1, 0);\n\n const handleStoryBlockLoadFinished = (event: NativeSyntheticEvent<any>) => {\n FWLoggerUtil.log(\n `StoryBlock handleStoryBlockLoadFinished ${event.nativeEvent.name}`\n );\n\n const { onStoryBlockLoadFinished } = props;\n const { name, reason } = event.nativeEvent;\n\n if (onStoryBlockLoadFinished) {\n if (name) {\n if (reason) {\n onStoryBlockLoadFinished({ name, reason });\n } else {\n onStoryBlockLoadFinished({ name });\n }\n } else {\n onStoryBlockLoadFinished();\n }\n }\n };\n\n const handleStoryBlockFullScreenStateChanged = (\n event: NativeSyntheticEvent<any>\n ) => {\n FWLoggerUtil.log(\n `StoryBlock handleStoryBlockFullScreenStateChanged ${event.nativeEvent.isFullScreen}`\n );\n const { isFullScreen } = event.nativeEvent;\n setIsFullscreenState(isFullScreen);\n };\n\n const generateDynamicContentParametersString = (): string => {\n const { dynamicContentParameters } = props;\n\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 const generateVastAttributesString = () => {\n const { adConfiguration } = 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 const generateKey = (): string => {\n const gShareBaseURL = FireworkSDK.getInstance().shareBaseURL ?? '';\n const appLanguage = FireworkSDK.getInstance().appLanguage ?? '';\n const videoLaunchBehavior =\n FireworkSDK.getInstance().videoLaunchBehavior ?? '';\n const adBadgeConfiguration =\n 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 hashtagFilterExpression = '',\n enablePictureInPicture = false,\n adConfiguration,\n storyBlockConfiguration,\n } = props;\n const dynamicContentParametersString =\n generateDynamicContentParametersString();\n\n const videoCompleteAction =\n storyBlockConfiguration?.videoCompleteAction ?? '';\n const showShareButton =\n storyBlockConfiguration?.showShareButton?.toString() ?? '';\n const showPlaybackButton =\n storyBlockConfiguration?.showPlaybackButton?.toString() ?? '';\n const showBranding =\n storyBlockConfiguration?.showBranding?.toString() ?? '';\n const ctaDelayType = storyBlockConfiguration?.ctaDelay?.type ?? '';\n const ctaDelayValue =\n storyBlockConfiguration?.ctaDelay?.value?.toFixed(5) ?? '';\n const ctaHighlightDelayType =\n storyBlockConfiguration?.ctaHighlightDelay?.type ?? '';\n const ctaHighlightDelayValue =\n storyBlockConfiguration?.ctaHighlightDelay?.value?.toFixed(5) ?? '';\n const shareBaseURL = storyBlockConfiguration?.shareBaseURL ?? '';\n const ctaWidth = storyBlockConfiguration?.ctaWidth ?? '';\n\n const requiresAds = adConfiguration?.requiresAds?.toString() ?? '';\n const adsFetchTimeout = adConfiguration?.adsFetchTimeout ?? 10;\n const vastAttributesString = 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 += `_dynamicContentParameters:${dynamicContentParametersString}`;\n key += `_hashtagFilterExpression:${hashtagFilterExpression}`;\n key += `_enablePictureInPicture:${enablePictureInPicture}`;\n\n key += `_shareBaseURL:${shareBaseURL}`;\n if (Platform.OS === 'android') {\n key += `_videoCompleteAction:${videoCompleteAction}`;\n key += `_showShareButton:${showShareButton}`;\n key += `_showPlaybackButton:${showPlaybackButton}`;\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 }\n\n key += `_requiresAds:${requiresAds}`;\n key += `_adsFetchTimeout:${adsFetchTimeout}`;\n key += `_vastAttributes:${vastAttributesString}`;\n\n return key;\n };\n\n const key = generateKey();\n\n useImperativeHandle(\n forwardedRef,\n () => {\n const sendCommand = (command: string) => {\n const nativeNodeHandle = findNodeHandle(nativeComponentRef.current);\n\n let commandId: string | number =\n UIManager.getViewManagerConfig(NativeComponentName).Commands[command];\n if (Platform.OS === 'android') {\n commandId = commandId.toString();\n }\n\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(nativeNodeHandle),\n commandId,\n []\n );\n };\n return {\n play: () => {\n sendCommand('play');\n },\n pause: () => {\n sendCommand('pause');\n },\n };\n },\n []\n );\n\n useEffect(() => {\n const subscriptionOfShareBaseURLUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.ShareBaseURLUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.ShareBaseURLUpdated');\n forceUpdate();\n }\n );\n const subscriptionOfAdBadgeConfigurationUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.AdBadgeConfigurationUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.AdBadgeConfigurationUpdated');\n forceUpdate();\n }\n );\n\n const subscriptionOfVideoLaunchBehaviorUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.VideoLaunchBehaviorUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.VideoLaunchBehaviorUpdated');\n forceUpdate();\n }\n );\n\n const subscriptionOfAppLanguageUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.AppLanguageUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.AppLanguageUpdated');\n if (Platform.OS === 'android') {\n forceUpdate();\n }\n }\n );\n\n return () => {\n subscriptionOfShareBaseURLUpdated.remove();\n subscriptionOfAdBadgeConfigurationUpdated.remove();\n subscriptionOfVideoLaunchBehaviorUpdated.remove();\n subscriptionOfAppLanguageUpdated.remove();\n };\n }, []);\n\n useEffect(() => {\n if (Platform.OS === 'android') {\n setTimeout(() => {\n const viewId = findNodeHandle(nativeComponentRef.current);\n FWLoggerUtil.log(`StoryBlock createFragment viewId: ${viewId}`);\n UIManager.dispatchViewManagerCommand(\n viewId,\n UIManager.getViewManagerConfig(\n NativeComponentName\n ).Commands.create.toString(),\n [viewId]\n );\n }, 500);\n }\n }, [key]);\n\n useEffect(() => {\n FWGlobalState.getInstance().sdkInitCalledPromise.then(() => {\n setSdkInitCalled(true);\n });\n }, []);\n\n useEffect(() => {\n if (Platform.OS === 'android') {\n const onBackPress = () => {\n if (isFullscreenState) {\n FireworkSDK.getInstance().navigator.popNativeContainer();\n return true;\n }\n return false;\n };\n const subscription = BackHandler.addEventListener(\n 'hardwareBackPress',\n onBackPress\n );\n return () => {\n subscription.remove();\n };\n }\n\n return;\n }, [isFullscreenState]);\n\n if (!sdkInitCalled) {\n return null;\n }\n\n return (\n <FWStoryBlock\n ref={nativeComponentRef}\n key={key}\n {...props}\n onStoryBlockLoadFinished={handleStoryBlockLoadFinished}\n onStoryBlockFullScreenStateChanged={\n handleStoryBlockFullScreenStateChanged\n }\n />\n );\n};\n\nexport default forwardRef(StoryBlock);\n"]}
|
|
1
|
+
{"version":3,"sources":["StoryBlock.tsx"],"names":["NativeComponentName","StoryBlock","props","forwardedRef","nativeComponentRef","isFullscreenState","setIsFullscreenState","sdkInitCalled","setSdkInitCalled","FWGlobalState","getInstance","forceUpdate","x","handleStoryBlockLoadFinished","event","FWLoggerUtil","log","nativeEvent","name","onStoryBlockLoadFinished","reason","handleStoryBlockFullScreenStateChanged","isFullScreen","generateDynamicContentParametersString","dynamicContentParameters","resultString","sortedKeyList","Object","keys","sort","key","value","valueString","join","length","generateVastAttributesString","adConfiguration","vastAttributes","attribute","getStoryBlockConfiguration","storyBlockConfiguration","enablePictureInPicture","resultStoryBlockConfiguration","generateKey","gShareBaseURL","FireworkSDK","shareBaseURL","appLanguage","videoLaunchBehavior","adBadgeConfiguration","adBadgeTextType","badgeTextType","backgroundColorOfAdBadge","backgroundColor","textColorOfAdBadge","textColor","androidFontIsCustomOfAdBadge","androidFontInfo","isCustom","androidFontTypefaceNameOfAdBadge","typefaceName","source","channel","playlist","hashtagFilterExpression","productIds","cornerRadius","dynamicContentParametersString","videoCompleteAction","showShareButton","showPlaybackButton","showBranding","ctaDelayType","ctaDelay","type","ctaDelayValue","toFixed","ctaHighlightDelayType","ctaHighlightDelay","ctaHighlightDelayValue","ctaWidth","requiresAds","adsFetchTimeout","vastAttributesString","Platform","OS","sendCommand","command","nativeNodeHandle","current","commandId","UIManager","getViewManagerConfig","Commands","toString","dispatchViewManagerCommand","play","pause","subscriptionOfShareBaseURLUpdated","FireworkSDKModuleEventEmitter","addListener","FWEventName","ShareBaseURLUpdated","subscriptionOfAdBadgeConfigurationUpdated","AdBadgeConfigurationUpdated","subscriptionOfVideoLaunchBehaviorUpdated","VideoLaunchBehaviorUpdated","subscriptionOfAppLanguageUpdated","AppLanguageUpdated","remove","setTimeout","viewId","create","sdkInitCalledPromise","then","onBackPress","navigator","popNativeContainer","subscription","BackHandler","addEventListener","style","otherProps","assign","borderRadius","undefined"],"mappings":";;;;;;;AACA;;AASA;;AAUA;;AAGA;;AAIA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,mBAAmB,GAAG,cAA5B;;AAsEA,MAAMC,UAGL,GAAG,CAACC,KAAD,EAA0BC,YAA1B,KAA2C;AAC7C,QAAMC,kBAAkB,GAAG,mBAAO,IAAP,CAA3B;AACA,QAAM,CAACC,iBAAD,EAAoBC,oBAApB,IAA4C,qBAAkB,KAAlB,CAAlD;AACA,QAAM,CAACC,aAAD,EAAgBC,gBAAhB,IAAoC,qBACx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AAI4E,sBAASC,EAAT,KAAgB,SAApB,EAA+B;AAC7B,YAAM8B,WAAW,GAAG,MAAM;AACxB,YAAI9G,iBAAJ,EAAuB;AACrBwC,+BAAYnC,WAAZ,GAA0B0G,SAA1B,CAAoCC,kBAApC;;AACA,iBAAO,IAAP;AACD;;AACD,eAAO,KAAP;AACD,OAND;;AAOA,YAAMC,YAAY,GAAGC,yBAAYC,gBAAZ,CACnB,mBADmB,EAEnBL,WAFmB,CAArB;;AAIA,aAAO,MAAM;AACXG,QAAAA,YAAY,CAACT,MAAb;AACD,OAFD;AAGD;;AAED;AACD,GAnBD,EAmBG,CAACxG,iBAAD,CAnBH;;AAqBA,MAAI,CAACE,aAAL,EAAoB;AAClB,WAAO,IAAP;AACD;;AACD,QAAM;AAAEkH,IAAAA,KAAF;AAASvD,IAAAA,YAAT;AAAuB,OAAGwD;AAA1B,MAAyCxH,KAA/C;AACA,sBACE,6BAAC,qBAAD;AACE,IAAA,GAAG,EAAEE,kBADP;AAEE,IAAA,GAAG,EAAE0B;AAFP,KAGM4F,UAHN;AAIE,IAAA,YAAY,EAAExD,YAJhB;AAKE,IAAA,KAAK,EAAEvC,MAAM,CAACgG,MAAP,CAAc;AAAEC,MAAAA,YAAY,EAAE1D;AAAhB,KAAd,EAA8CuD,KAA9C,CALT;AAME,IAAA,uBAAuB,EAAEjF,uBAN3B;AAOE,IAAA,sBAAsB,EAAEqF,SAP1B;AAQE,IAAA,wBAAwB,EAAEhH,4BAR5B;AASE,IAAA,kCAAkC,EAChCQ;AAVJ,KADF;AAeD,CAvUD;;4BAyUe,uBAAWpB,UAAX,C","sourcesContent":["import type { ForwardRefRenderFunction } from 'react';\nimport React, {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useReducer,\n useRef,\n useState,\n} from 'react';\n\nimport {\n BackHandler,\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 { StoryBlockConfiguration } from '../models/StoryBlockConfiguration';\nimport type StoryBlockNativeConfiguration from '../models/StoryBlockNativeConfiguration';\nimport type { StoryBlockSource } from '../models/StoryBlockSource';\nimport { FireworkSDKModuleEventEmitter } from '../modules/FireworkSDKModule';\nimport FWGlobalState from '../utils/FWGlobalState';\nimport FWLoggerUtil from '../utils/FWLoggerUtil';\nimport FWStoryBlock from './FWStoryBlock';\n\nconst NativeComponentName = 'FWStoryBlock';\n\nexport interface IStoryBlockMethods {\n /**\n * Play the story block.\n */\n play: () => void;\n /**\n * Pause the story block.\n */\n pause: () => void;\n}\n\n/**\n * The props type of StoryBlock component.\n */\nexport interface IStoryBlockProps {\n /**\n * Standard React Native View Style.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * One of four available story block sources.\n */\n source: StoryBlockSource;\n /**\n * Channel id of the story block. Required when the source is set as channel or playlist or dynamicContent.\n */\n channel?: string;\n /**\n * Playlist id of the story block. Please note channel id is necessary. Required when the source is set as playlist.\n */\n playlist?: string;\n /**\n * The dynamic content parameters of the story block. 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 */\n hashtagFilterExpression?: string;\n /**\n * Product ids used to generate the sku feed\n */\n productIds?: string[];\n /**\n * Specifies if Picture in Picture is enabled. Only supported on iOS.\n */\n enablePictureInPicture?: boolean;\n /**\n * The corner radius of story block.\n */\n cornerRadius?: number;\n /**\n * Ad configuration of the feed. Only supported on iOS.\n */\n adConfiguration?: AdConfiguration;\n\n /* The configuration of the story block.\n Only supported on Android.*/\n storyBlockConfiguration?: StoryBlockConfiguration;\n /**\n * The feed loading result callback. It means loading successfully when error equals to undefined.\n */\n onStoryBlockLoadFinished?: (error?: FWError) => void;\n}\n\nconst StoryBlock: ForwardRefRenderFunction<\n IStoryBlockMethods,\n IStoryBlockProps\n> = (props: IStoryBlockProps, forwardedRef) => {\n const nativeComponentRef = useRef(null);\n const [isFullscreenState, setIsFullscreenState] = useState<boolean>(false);\n const [sdkInitCalled, setSdkInitCalled] = useState<boolean>(\n FWGlobalState.getInstance().sdkInitCalled\n );\n const [, forceUpdate] = useReducer((x) => x + 1, 0);\n\n const handleStoryBlockLoadFinished = (event: NativeSyntheticEvent<any>) => {\n FWLoggerUtil.log(\n `StoryBlock handleStoryBlockLoadFinished ${event.nativeEvent.name}`\n );\n\n const { onStoryBlockLoadFinished } = props;\n const { name, reason } = event.nativeEvent;\n\n if (onStoryBlockLoadFinished) {\n if (name) {\n if (reason) {\n onStoryBlockLoadFinished({ name, reason });\n } else {\n onStoryBlockLoadFinished({ name });\n }\n } else {\n onStoryBlockLoadFinished();\n }\n }\n };\n\n const handleStoryBlockFullScreenStateChanged = (\n event: NativeSyntheticEvent<any>\n ) => {\n FWLoggerUtil.log(\n `StoryBlock handleStoryBlockFullScreenStateChanged ${event.nativeEvent.isFullScreen}`\n );\n const { isFullScreen } = event.nativeEvent;\n setIsFullscreenState(isFullScreen);\n };\n\n const generateDynamicContentParametersString = (): string => {\n const { dynamicContentParameters } = props;\n\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 const generateVastAttributesString = () => {\n const { adConfiguration } = 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 const getStoryBlockConfiguration: () =>\n | StoryBlockNativeConfiguration\n | undefined = () => {\n const { storyBlockConfiguration, enablePictureInPicture } = props;\n let resultStoryBlockConfiguration:\n | StoryBlockNativeConfiguration\n | undefined = storyBlockConfiguration;\n if (typeof enablePictureInPicture === 'boolean') {\n if (!resultStoryBlockConfiguration) {\n resultStoryBlockConfiguration = {};\n }\n resultStoryBlockConfiguration = {\n ...resultStoryBlockConfiguration,\n enablePictureInPicture,\n };\n }\n return resultStoryBlockConfiguration;\n };\n const storyBlockConfiguration = getStoryBlockConfiguration();\n\n const generateKey = (): string => {\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;\n const androidFontTypefaceNameOfAdBadge =\n adBadgeConfiguration?.androidFontInfo?.typefaceName;\n\n const {\n source,\n channel,\n playlist,\n hashtagFilterExpression,\n productIds,\n enablePictureInPicture,\n cornerRadius,\n adConfiguration,\n } = props;\n const dynamicContentParametersString =\n generateDynamicContentParametersString();\n\n const videoCompleteAction = storyBlockConfiguration?.videoCompleteAction;\n const showShareButton = storyBlockConfiguration?.showShareButton;\n const showPlaybackButton = storyBlockConfiguration?.showPlaybackButton;\n const showBranding = storyBlockConfiguration?.showBranding;\n const ctaDelayType = storyBlockConfiguration?.ctaDelay?.type;\n const ctaDelayValue = storyBlockConfiguration?.ctaDelay?.value?.toFixed(5);\n const ctaHighlightDelayType =\n storyBlockConfiguration?.ctaHighlightDelay?.type;\n const ctaHighlightDelayValue =\n storyBlockConfiguration?.ctaHighlightDelay?.value?.toFixed(5);\n const shareBaseURL = storyBlockConfiguration?.shareBaseURL;\n const ctaWidth = storyBlockConfiguration?.ctaWidth;\n\n const requiresAds = adConfiguration?.requiresAds;\n const adsFetchTimeout = adConfiguration?.adsFetchTimeout;\n const vastAttributesString = 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 += `_dynamicContentParameters:${dynamicContentParametersString}`;\n key += `_hashtagFilterExpression:${hashtagFilterExpression}`;\n key += `productIds:${productIds?.join(',')}`;\n key += `_enablePictureInPicture:${enablePictureInPicture}`;\n key += `_cornerRadius:${cornerRadius}`;\n\n key += `_shareBaseURL:${shareBaseURL}`;\n if (Platform.OS === 'android') {\n key += `_videoCompleteAction:${videoCompleteAction}`;\n key += `_showShareButton:${showShareButton}`;\n key += `_showPlaybackButton:${showPlaybackButton}`;\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 }\n\n key += `_requiresAds:${requiresAds}`;\n key += `_adsFetchTimeout:${adsFetchTimeout}`;\n key += `_vastAttributes:${vastAttributesString}`;\n\n return key;\n };\n\n const key = generateKey();\n\n useImperativeHandle(\n forwardedRef,\n () => {\n const sendCommand = (command: string) => {\n const nativeNodeHandle = findNodeHandle(nativeComponentRef.current);\n\n let commandId: string | number =\n UIManager.getViewManagerConfig(NativeComponentName).Commands[command];\n if (Platform.OS === 'android') {\n commandId = commandId.toString();\n }\n\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(nativeNodeHandle),\n commandId,\n []\n );\n };\n return {\n play: () => {\n sendCommand('play');\n },\n pause: () => {\n sendCommand('pause');\n },\n };\n },\n []\n );\n\n useEffect(() => {\n const subscriptionOfShareBaseURLUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.ShareBaseURLUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.ShareBaseURLUpdated');\n forceUpdate();\n }\n );\n const subscriptionOfAdBadgeConfigurationUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.AdBadgeConfigurationUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.AdBadgeConfigurationUpdated');\n forceUpdate();\n }\n );\n\n const subscriptionOfVideoLaunchBehaviorUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.VideoLaunchBehaviorUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.VideoLaunchBehaviorUpdated');\n forceUpdate();\n }\n );\n\n const subscriptionOfAppLanguageUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.AppLanguageUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.AppLanguageUpdated');\n if (Platform.OS === 'android') {\n forceUpdate();\n }\n }\n );\n\n return () => {\n subscriptionOfShareBaseURLUpdated.remove();\n subscriptionOfAdBadgeConfigurationUpdated.remove();\n subscriptionOfVideoLaunchBehaviorUpdated.remove();\n subscriptionOfAppLanguageUpdated.remove();\n };\n }, []);\n\n useEffect(() => {\n if (Platform.OS === 'android') {\n setTimeout(() => {\n const viewId = findNodeHandle(nativeComponentRef.current);\n FWLoggerUtil.log(`StoryBlock createFragment viewId: ${viewId}`);\n UIManager.dispatchViewManagerCommand(\n viewId,\n UIManager.getViewManagerConfig(\n NativeComponentName\n ).Commands.create.toString(),\n [viewId]\n );\n }, 500);\n }\n }, [key]);\n\n useEffect(() => {\n FWGlobalState.getInstance().sdkInitCalledPromise.then(() => {\n setSdkInitCalled(true);\n });\n }, []);\n\n useEffect(() => {\n if (Platform.OS === 'android') {\n const onBackPress = () => {\n if (isFullscreenState) {\n FireworkSDK.getInstance().navigator.popNativeContainer();\n return true;\n }\n return false;\n };\n const subscription = BackHandler.addEventListener(\n 'hardwareBackPress',\n onBackPress\n );\n return () => {\n subscription.remove();\n };\n }\n\n return;\n }, [isFullscreenState]);\n\n if (!sdkInitCalled) {\n return null;\n }\n const { style, cornerRadius, ...otherProps } = props;\n return (\n <FWStoryBlock\n ref={nativeComponentRef}\n key={key}\n {...otherProps}\n cornerRadius={cornerRadius}\n style={Object.assign({ borderRadius: cornerRadius }, style)}\n storyBlockConfiguration={storyBlockConfiguration}\n enablePictureInPicture={undefined}\n onStoryBlockLoadFinished={handleStoryBlockLoadFinished}\n onStoryBlockFullScreenStateChanged={\n handleStoryBlockFullScreenStateChanged\n }\n />\n );\n};\n\nexport default forwardRef(StoryBlock);\n"]}
|
|
@@ -159,7 +159,7 @@ class VideoFeed extends _react.default.Component {
|
|
|
159
159
|
|
|
160
160
|
|
|
161
161
|
render() {
|
|
162
|
-
var
|
|
162
|
+
var _adBadgeConfiguration, _adBadgeConfiguration2, _adBadgeConfiguration3, _videoFeedConfigurati, _videoFeedConfigurati2, _videoFeedConfigurati3, _videoFeedConfigurati4, _videoFeedConfigurati5, _videoFeedConfigurati6, _videoFeedConfigurati7, _videoFeedConfigurati8, _videoFeedConfigurati9, _videoFeedConfigurati10, _videoFeedConfigurati11, _videoFeedConfigurati12, _videoFeedConfigurati13, _videoFeedConfigurati14, _videoPlayerConfigura, _videoPlayerConfigura2, _videoPlayerConfigura3, _videoPlayerConfigura4, _videoPlayerConfigura5, _videoPlayerConfigura6;
|
|
163
163
|
|
|
164
164
|
_FWLoggerUtil.default.log(`VideoFeed render props ${JSON.stringify(this.props)} state ${JSON.stringify(this.state)}`);
|
|
165
165
|
|
|
@@ -167,58 +167,65 @@ class VideoFeed extends _react.default.Component {
|
|
|
167
167
|
return null;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
-
const gShareBaseURL =
|
|
171
|
-
|
|
172
|
-
const
|
|
173
|
-
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
const
|
|
170
|
+
const gShareBaseURL = _FireworkSDK.default.getInstance().shareBaseURL;
|
|
171
|
+
|
|
172
|
+
const appLanguage = _FireworkSDK.default.getInstance().appLanguage;
|
|
173
|
+
|
|
174
|
+
const videoLaunchBehavior = _FireworkSDK.default.getInstance().videoLaunchBehavior;
|
|
175
|
+
|
|
176
|
+
const adBadgeConfiguration = _FireworkSDK.default.getInstance().adBadgeConfiguration;
|
|
177
|
+
|
|
178
|
+
const adBadgeTextType = adBadgeConfiguration === null || adBadgeConfiguration === void 0 ? void 0 : adBadgeConfiguration.badgeTextType;
|
|
179
|
+
const backgroundColorOfAdBadge = adBadgeConfiguration === null || adBadgeConfiguration === void 0 ? void 0 : adBadgeConfiguration.backgroundColor;
|
|
180
|
+
const textColorOfAdBadge = adBadgeConfiguration === null || adBadgeConfiguration === void 0 ? void 0 : adBadgeConfiguration.textColor;
|
|
181
|
+
const androidFontIsCustomOfAdBadge = adBadgeConfiguration === null || adBadgeConfiguration === void 0 ? void 0 : (_adBadgeConfiguration = adBadgeConfiguration.androidFontInfo) === null || _adBadgeConfiguration === void 0 ? void 0 : (_adBadgeConfiguration2 = _adBadgeConfiguration.isCustom) === null || _adBadgeConfiguration2 === void 0 ? void 0 : _adBadgeConfiguration2.toString();
|
|
182
|
+
const androidFontTypefaceNameOfAdBadge = adBadgeConfiguration === null || adBadgeConfiguration === void 0 ? void 0 : (_adBadgeConfiguration3 = adBadgeConfiguration.androidFontInfo) === null || _adBadgeConfiguration3 === void 0 ? void 0 : _adBadgeConfiguration3.typefaceName;
|
|
179
183
|
const {
|
|
180
184
|
source,
|
|
181
|
-
channel
|
|
182
|
-
playlist
|
|
183
|
-
playlistGroup
|
|
184
|
-
hashtagFilterExpression
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
185
|
+
channel,
|
|
186
|
+
playlist,
|
|
187
|
+
playlistGroup,
|
|
188
|
+
hashtagFilterExpression,
|
|
189
|
+
productIds,
|
|
190
|
+
mode,
|
|
191
|
+
enablePictureInPicture,
|
|
192
|
+
adConfiguration
|
|
189
193
|
} = this.props;
|
|
190
194
|
|
|
191
195
|
const dynamicContentParametersString = this._generateDynamicContentParametersString();
|
|
192
196
|
|
|
193
197
|
const videoFeedConfiguration = this._getVideoFeedConfiguration();
|
|
194
198
|
|
|
195
|
-
const cornerRadius =
|
|
196
|
-
const titleHidden =
|
|
197
|
-
const titleTextColor =
|
|
198
|
-
const titleFontSize =
|
|
199
|
-
const titleAndroidFontInfo = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (
|
|
200
|
-
const titleGradientDrawable = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (
|
|
201
|
-
const titlePosition =
|
|
202
|
-
const playIconHidden =
|
|
203
|
-
const playIconWidth =
|
|
204
|
-
const showAdBadge =
|
|
205
|
-
const enableAutoplay =
|
|
206
|
-
const gridColumns =
|
|
207
|
-
const itemSpacing =
|
|
208
|
-
|
|
209
|
-
const
|
|
210
|
-
|
|
211
|
-
const
|
|
212
|
-
const
|
|
213
|
-
const
|
|
214
|
-
const
|
|
215
|
-
const
|
|
216
|
-
const
|
|
217
|
-
const
|
|
218
|
-
const
|
|
219
|
-
const
|
|
220
|
-
const
|
|
221
|
-
const
|
|
199
|
+
const cornerRadius = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati = videoFeedConfiguration.cornerRadius) === null || _videoFeedConfigurati === void 0 ? void 0 : _videoFeedConfigurati.toFixed(5);
|
|
200
|
+
const titleHidden = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati2 = videoFeedConfiguration.title) === null || _videoFeedConfigurati2 === void 0 ? void 0 : (_videoFeedConfigurati3 = _videoFeedConfigurati2.hidden) === null || _videoFeedConfigurati3 === void 0 ? void 0 : _videoFeedConfigurati3.toString();
|
|
201
|
+
const titleTextColor = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati4 = videoFeedConfiguration.title) === null || _videoFeedConfigurati4 === void 0 ? void 0 : _videoFeedConfigurati4.textColor;
|
|
202
|
+
const titleFontSize = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati5 = videoFeedConfiguration.title) === null || _videoFeedConfigurati5 === void 0 ? void 0 : (_videoFeedConfigurati6 = _videoFeedConfigurati5.fontSize) === null || _videoFeedConfigurati6 === void 0 ? void 0 : _videoFeedConfigurati6.toFixed(5);
|
|
203
|
+
const titleAndroidFontInfo = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati7 = videoFeedConfiguration.title) === null || _videoFeedConfigurati7 === void 0 ? void 0 : _videoFeedConfigurati7.androidFontInfo;
|
|
204
|
+
const titleGradientDrawable = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati8 = videoFeedConfiguration.title) === null || _videoFeedConfigurati8 === void 0 ? void 0 : _videoFeedConfigurati8.gradientDrawable;
|
|
205
|
+
const titlePosition = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : videoFeedConfiguration.titlePosition;
|
|
206
|
+
const playIconHidden = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati9 = videoFeedConfiguration.playIcon) === null || _videoFeedConfigurati9 === void 0 ? void 0 : _videoFeedConfigurati9.hidden;
|
|
207
|
+
const playIconWidth = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati10 = videoFeedConfiguration.playIcon) === null || _videoFeedConfigurati10 === void 0 ? void 0 : (_videoFeedConfigurati11 = _videoFeedConfigurati10.iconWidth) === null || _videoFeedConfigurati11 === void 0 ? void 0 : _videoFeedConfigurati11.toFixed(5);
|
|
208
|
+
const showAdBadge = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati12 = videoFeedConfiguration.showAdBadge) === null || _videoFeedConfigurati12 === void 0 ? void 0 : _videoFeedConfigurati12.toString();
|
|
209
|
+
const enableAutoplay = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : videoFeedConfiguration.enableAutoplay;
|
|
210
|
+
const gridColumns = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati13 = videoFeedConfiguration.gridColumns) === null || _videoFeedConfigurati13 === void 0 ? void 0 : _videoFeedConfigurati13.toFixed(5);
|
|
211
|
+
const itemSpacing = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati14 = videoFeedConfiguration.itemSpacing) === null || _videoFeedConfigurati14 === void 0 ? void 0 : _videoFeedConfigurati14.toFixed(5);
|
|
212
|
+
|
|
213
|
+
const videoPlayerConfiguration = this._getVideoPlayerConfiguration();
|
|
214
|
+
|
|
215
|
+
const playerStyle = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : videoPlayerConfiguration.playerStyle;
|
|
216
|
+
const videoCompleteAction = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : videoPlayerConfiguration.videoCompleteAction;
|
|
217
|
+
const showShareButton = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : videoPlayerConfiguration.showShareButton;
|
|
218
|
+
const showPlaybackButton = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : videoPlayerConfiguration.showPlaybackButton;
|
|
219
|
+
const showMuteButton = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : videoPlayerConfiguration.showMuteButton;
|
|
220
|
+
const showBranding = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : videoPlayerConfiguration.showBranding;
|
|
221
|
+
const ctaDelayType = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : (_videoPlayerConfigura = videoPlayerConfiguration.ctaDelay) === null || _videoPlayerConfigura === void 0 ? void 0 : _videoPlayerConfigura.type;
|
|
222
|
+
const ctaDelayValue = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : (_videoPlayerConfigura2 = videoPlayerConfiguration.ctaDelay) === null || _videoPlayerConfigura2 === void 0 ? void 0 : (_videoPlayerConfigura3 = _videoPlayerConfigura2.value) === null || _videoPlayerConfigura3 === void 0 ? void 0 : _videoPlayerConfigura3.toFixed(5);
|
|
223
|
+
const ctaHighlightDelayType = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : (_videoPlayerConfigura4 = videoPlayerConfiguration.ctaHighlightDelay) === null || _videoPlayerConfigura4 === void 0 ? void 0 : _videoPlayerConfigura4.type;
|
|
224
|
+
const ctaHighlightDelayValue = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : (_videoPlayerConfigura5 = videoPlayerConfiguration.ctaHighlightDelay) === null || _videoPlayerConfigura5 === void 0 ? void 0 : (_videoPlayerConfigura6 = _videoPlayerConfigura5.value) === null || _videoPlayerConfigura6 === void 0 ? void 0 : _videoPlayerConfigura6.toFixed(5);
|
|
225
|
+
const shareBaseURL = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : videoPlayerConfiguration.shareBaseURL;
|
|
226
|
+
const ctaWidth = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : videoPlayerConfiguration.ctaWidth;
|
|
227
|
+
const requiresAds = adConfiguration === null || adConfiguration === void 0 ? void 0 : adConfiguration.requiresAds;
|
|
228
|
+
const adsFetchTimeout = adConfiguration === null || adConfiguration === void 0 ? void 0 : adConfiguration.adsFetchTimeout;
|
|
222
229
|
|
|
223
230
|
const vastAttributesString = this._generateVastAttributesString();
|
|
224
231
|
|
|
@@ -244,20 +251,21 @@ class VideoFeed extends _react.default.Component {
|
|
|
244
251
|
key += `_playlistGroup:${playlistGroup}`;
|
|
245
252
|
key += `_dynamicContentParameters:${dynamicContentParametersString}`;
|
|
246
253
|
key += `_hashtagFilterExpression:${hashtagFilterExpression}`;
|
|
254
|
+
key += `_productIds:${productIds === null || productIds === void 0 ? void 0 : productIds.join(',')}`;
|
|
247
255
|
key += `_mode:${mode}`;
|
|
248
256
|
key += `_enablePictureInPicture:${enablePictureInPicture}`;
|
|
249
257
|
key += `_titleHidden:${titleHidden}`;
|
|
250
258
|
|
|
251
259
|
if (_reactNative.Platform.OS === 'android') {
|
|
252
|
-
var
|
|
260
|
+
var _titleGradientDrawabl;
|
|
253
261
|
|
|
254
262
|
key += `_cornerRadius:${cornerRadius}`;
|
|
255
263
|
key += `_titleTextColor:${titleTextColor}`;
|
|
256
264
|
key += `_titleFontSize:${titleFontSize}`;
|
|
257
|
-
key += `_titleAndroidFontInfo.isCustom:${
|
|
258
|
-
key += `_titleAndroidFontInfo.typefaceName:${
|
|
259
|
-
key += `_titleGradientDrawable.orientation:${
|
|
260
|
-
key += `_titleGradientDrawable.colors:${
|
|
265
|
+
key += `_titleAndroidFontInfo.isCustom:${titleAndroidFontInfo === null || titleAndroidFontInfo === void 0 ? void 0 : titleAndroidFontInfo.isCustom}`;
|
|
266
|
+
key += `_titleAndroidFontInfo.typefaceName:${titleAndroidFontInfo === null || titleAndroidFontInfo === void 0 ? void 0 : titleAndroidFontInfo.typefaceName}`;
|
|
267
|
+
key += `_titleGradientDrawable.orientation:${titleGradientDrawable === null || titleGradientDrawable === void 0 ? void 0 : titleGradientDrawable.orientation}`;
|
|
268
|
+
key += `_titleGradientDrawable.colors:${titleGradientDrawable === null || titleGradientDrawable === void 0 ? void 0 : (_titleGradientDrawabl = titleGradientDrawable.colors) === null || _titleGradientDrawabl === void 0 ? void 0 : _titleGradientDrawabl.join(',')}`;
|
|
261
269
|
key += `_playIconHidden:${playIconHidden}`;
|
|
262
270
|
key += `_playIconWidth:${playIconWidth}`;
|
|
263
271
|
key += `_showAdBadge:${showAdBadge}`;
|
|
@@ -289,10 +297,12 @@ class VideoFeed extends _react.default.Component {
|
|
|
289
297
|
return /*#__PURE__*/_react.default.createElement(_FWVideoFeed.default, _extends({
|
|
290
298
|
key: key
|
|
291
299
|
}, this.props, {
|
|
300
|
+
enablePictureInPicture: undefined,
|
|
292
301
|
videoFeedConfiguration: videoFeedConfiguration,
|
|
302
|
+
videoPlayerConfiguration: videoPlayerConfiguration,
|
|
293
303
|
ref: this._nativeComponentRef,
|
|
294
304
|
onVideoFeedLoadFinished: this._onVideoFeedLoadFinished,
|
|
295
|
-
mode: mode
|
|
305
|
+
mode: mode !== null && mode !== void 0 ? mode : 'row'
|
|
296
306
|
}));
|
|
297
307
|
}
|
|
298
308
|
|
|
@@ -323,12 +333,10 @@ class VideoFeed extends _react.default.Component {
|
|
|
323
333
|
}
|
|
324
334
|
|
|
325
335
|
_generateVastAttributesString() {
|
|
326
|
-
var _adConfiguration$vast;
|
|
327
|
-
|
|
328
336
|
const {
|
|
329
337
|
adConfiguration
|
|
330
338
|
} = this.props;
|
|
331
|
-
const vastAttributes =
|
|
339
|
+
const vastAttributes = adConfiguration === null || adConfiguration === void 0 ? void 0 : adConfiguration.vastAttributes;
|
|
332
340
|
|
|
333
341
|
if (!vastAttributes) {
|
|
334
342
|
return '';
|
|
@@ -337,13 +345,11 @@ class VideoFeed extends _react.default.Component {
|
|
|
337
345
|
let resultString = '';
|
|
338
346
|
|
|
339
347
|
for (const attribute of vastAttributes) {
|
|
340
|
-
var _attribute$name;
|
|
341
|
-
|
|
342
348
|
if (resultString.length > 0) {
|
|
343
349
|
resultString += '_';
|
|
344
350
|
}
|
|
345
351
|
|
|
346
|
-
resultString += `${
|
|
352
|
+
resultString += `${attribute.name}:${attribute.value}`;
|
|
347
353
|
}
|
|
348
354
|
|
|
349
355
|
return resultString;
|
|
@@ -379,6 +385,26 @@ class VideoFeed extends _react.default.Component {
|
|
|
379
385
|
return resultVideoFeedConfiguration;
|
|
380
386
|
}
|
|
381
387
|
|
|
388
|
+
_getVideoPlayerConfiguration() {
|
|
389
|
+
const {
|
|
390
|
+
videoPlayerConfiguration,
|
|
391
|
+
enablePictureInPicture
|
|
392
|
+
} = this.props;
|
|
393
|
+
let resultVideoPlayerConfiguration = videoPlayerConfiguration;
|
|
394
|
+
|
|
395
|
+
if (typeof enablePictureInPicture === 'boolean') {
|
|
396
|
+
if (!resultVideoPlayerConfiguration) {
|
|
397
|
+
resultVideoPlayerConfiguration = {};
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
resultVideoPlayerConfiguration = { ...resultVideoPlayerConfiguration,
|
|
401
|
+
enablePictureInPicture
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
return resultVideoPlayerConfiguration;
|
|
406
|
+
}
|
|
407
|
+
|
|
382
408
|
}
|
|
383
409
|
|
|
384
410
|
_defineProperty(VideoFeed, "defaultProps", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["VideoFeed.tsx"],"names":["NativeComponentName","VideoFeed","React","Component","constructor","props","createRef","FWLoggerUtil","log","JSON","stringify","nativeNodeHandle","_nativeComponentRef","current","commandId","UIManager","getViewManagerConfig","Commands","refresh","Platform","OS","toString","dispatchViewManagerCommand","event","nativeEvent","onVideoFeedLoadFinished","name","reason","state","sdkInitCalled","FWGlobalState","getInstance","componentDidMount","sdkInitCalledPromise","then","setState","subscriptionOfShareBaseURLUpdated","FireworkSDKModuleEventEmitter","addListener","FWEventName","ShareBaseURLUpdated","_subscriptions","push","subscriptionOfAdBadgeConfigurationUpdated","AdBadgeConfigurationUpdated","subscriptionOfVideoLaunchBehaviorUpdated","VideoLaunchBehaviorUpdated","subscriptionOfAppLanguageUpdated","AppLanguageUpdated","componentWillUnmount","forEach","value","remove","render","gShareBaseURL","FireworkSDK","shareBaseURL","appLanguage","videoLaunchBehavior","adBadgeConfiguration","adBadgeTextType","badgeTextType","backgroundColorOfAdBadge","backgroundColor","textColorOfAdBadge","textColor","androidFontIsCustomOfAdBadge","androidFontInfo","isCustom","androidFontTypefaceNameOfAdBadge","typefaceName","source","channel","playlist","playlistGroup","hashtagFilterExpression","mode","enablePictureInPicture","adConfiguration","videoPlayerConfiguration","dynamicContentParametersString","_generateDynamicContentParametersString","videoFeedConfiguration","_getVideoFeedConfiguration","cornerRadius","toFixed","titleHidden","title","hidden","titleTextColor","titleFontSize","fontSize","titleAndroidFontInfo","titleGradientDrawable","gradientDrawable","titlePosition","playIconHidden","playIcon","playIconWidth","iconWidth","showAdBadge","enableAutoplay","gridColumns","itemSpacing","playerStyle","videoCompleteAction","showShareButton","showPlaybackButton","showMuteButton","showBranding","ctaDelayType","ctaDelay","type","ctaDelayValue","ctaHighlightDelayType","ctaHighlightDelay","ctaHighlightDelayValue","ctaWidth","requiresAds","adsFetchTimeout","vastAttributesString","_generateVastAttributesString","key","orientation","colors","join","_onVideoFeedLoadFinished","dynamicContentParameters","resultString","sortedKeyList","Object","keys","sort","valueString","length","vastAttributes","attribute","resultVideoFeedConfiguration","Math","floor","numberOfLines"],"mappings":";;;;;;;AAAA;;AAEA;;AAUA;;AAGA;;AAIA;;AACA;;AACA;;AACA;;;;;;;;AAqEA,MAAMA,mBAAmB,GAAG,aAA5B;AAEA;AACA;AACA;;AACA,MAAMC,SAAN,SAAwBC,eAAMC,SAA9B,CAA0E;AACxE;AACF;AACA;AASEC,EAAAA,WAAW,CAACC,KAAD,EAAyB;AAClC,UAAMA,KAAN;;AADkC,8DAJNH,eAAMI,SAAN,EAIM;;AAAA,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AA7B,IACAkD,4BAA4B,CAAClD,KAA7B,CAAmCqD,aADnC,IAEAF,IAAI,CAACC,KAAL,CAAWF,4BAA4B,CAAClD,KAA7B,CAAmCqD,aAA9C,MACEH,4BAA4B,CAAClD,KAA7B,CAAmCqD,aAJvC,EAKE;AACA,YAAMA,aAAa,GAAGF,IAAI,CAACC,KAAL,CACpBF,4BAA4B,CAAClD,KAA7B,CAAmCqD,aADf,CAAtB;AAGAH,MAAAA,4BAA4B,GAAG,EAC7B,GAAGA,4BAD0B;AAE7BlD,QAAAA,KAAK,EAAE,EACL,GAAGkD,4BAA4B,CAAClD,KAD3B;AAELqD,UAAAA;AAFK;AAFsB,OAA/B;AAOD;;AAED,WAAOH,4BAAP;AACD;;AA1XuE;;gBAApExI,S,kBAIkB;AACpB2E,EAAAA,IAAI,EAAE;AADc,C;;eAyXT3E,S","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';\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 */\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 */\n hashtagFilterExpression?: 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. Only supported on iOS.\n */\n adConfiguration?: AdConfiguration;\n /**\n * The feed loading result callback. It means loading successfully when error equals to undefined. Only supported on iOS.\n */\n onVideoFeedLoadFinished?: (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 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 } = this.props;\n\n const { name, reason } = event.nativeEvent;\n\n if (onVideoFeedLoadFinished) {\n if (name) {\n if (reason) {\n onVideoFeedLoadFinished({ name, reason });\n } else {\n onVideoFeedLoadFinished({ name });\n }\n } else {\n onVideoFeedLoadFinished();\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 if (Platform.OS === 'ios') {\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 /**\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 FWLoggerUtil.log(\n `VideoFeed render props ${JSON.stringify(\n this.props\n )} state ${JSON.stringify(this.state)}`\n );\n\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 =\n FireworkSDK.getInstance().videoLaunchBehavior ?? '';\n const adBadgeConfiguration =\n 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 mode = 'row',\n enablePictureInPicture = false,\n adConfiguration,\n videoPlayerConfiguration,\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 =\n 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 =\n videoFeedConfiguration?.playIcon?.hidden?.toString() ?? '';\n const playIconWidth =\n videoFeedConfiguration?.playIcon?.iconWidth?.toFixed(5) ?? '';\n const showAdBadge = videoFeedConfiguration?.showAdBadge?.toString() ?? '';\n const enableAutoplay =\n videoFeedConfiguration?.enableAutoplay?.toString() ?? '';\n const gridColumns = videoFeedConfiguration?.gridColumns?.toFixed(5) ?? '';\n const itemSpacing = videoFeedConfiguration?.itemSpacing?.toFixed(5) ?? '';\n\n const playerStyle = videoPlayerConfiguration?.playerStyle ?? '';\n const videoCompleteAction =\n videoPlayerConfiguration?.videoCompleteAction ?? '';\n const showShareButton =\n videoPlayerConfiguration?.showShareButton?.toString() ?? '';\n const showPlaybackButton =\n videoPlayerConfiguration?.showPlaybackButton?.toString() ?? '';\n const showMuteButton =\n videoPlayerConfiguration?.showMuteButton?.toString() ?? '';\n const showBranding =\n videoPlayerConfiguration?.showBranding?.toString() ?? '';\n const ctaDelayType = videoPlayerConfiguration?.ctaDelay?.type ?? '';\n const ctaDelayValue = (\n videoPlayerConfiguration?.ctaDelay?.value ?? 0\n ).toFixed(5);\n const ctaHighlightDelayType =\n videoPlayerConfiguration?.ctaHighlightDelay?.type ?? '';\n const ctaHighlightDelayValue = (\n videoPlayerConfiguration?.ctaHighlightDelay?.value ?? 0\n ).toFixed(5);\n const shareBaseURL = videoPlayerConfiguration?.shareBaseURL ?? '';\n const ctaWidth = videoPlayerConfiguration?.ctaWidth ?? '';\n\n const requiresAds = adConfiguration?.requiresAds?.toString() ?? '';\n const adsFetchTimeout = adConfiguration?.adsFetchTimeout ?? 10;\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 += `_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:${\n titleAndroidFontInfo?.isCustom?.toString() ?? ''\n }`;\n key += `_titleAndroidFontInfo.typefaceName:${\n titleAndroidFontInfo?.typefaceName ?? ''\n }`;\n key += `_titleGradientDrawable.orientation:${\n titleGradientDrawable?.orientation ?? ''\n }`;\n key += `_titleGradientDrawable.colors:${(\n titleGradientDrawable?.colors ?? []\n ).join(',')}`;\n key += `_playIconHidden:${playIconHidden}`;\n key += `_playIconWidth:${playIconWidth}`;\n key += `_showAdBadge:${showAdBadge}`;\n }\n\n key += `_titlePosition:${titlePosition}`;\n key += `_enableAutoplay:${enableAutoplay}`;\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 }\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 videoFeedConfiguration={videoFeedConfiguration}\n ref={this._nativeComponentRef}\n onVideoFeedLoadFinished={this._onVideoFeedLoadFinished}\n mode={mode}\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 {\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 _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\nexport default VideoFeed;\n"]}
|
|
1
|
+
{"version":3,"sources":["VideoFeed.tsx"],"names":["NativeComponentName","VideoFeed","React","Component","constructor","props","createRef","FWLoggerUtil","log","JSON","stringify","nativeNodeHandle","_nativeComponentRef","current","commandId","UIManager","getViewManagerConfig","Commands","refresh","Platform","OS","toString","dispatchViewManagerCommand","event","nativeEvent","onVideoFeedLoadFinished","name","reason","state","sdkInitCalled","FWGlobalState","getInstance","componentDidMount","sdkInitCalledPromise","then","setState","subscriptionOfShareBaseURLUpdated","FireworkSDKModuleEventEmitter","addListener","FWEventName","ShareBaseURLUpdated","_subscriptions","push","subscriptionOfAdBadgeConfigurationUpdated","AdBadgeConfigurationUpdated","subscriptionOfVideoLaunchBehaviorUpdated","VideoLaunchBehaviorUpdated","subscriptionOfAppLanguageUpdated","AppLanguageUpdated","componentWillUnmount","forEach","value","remove","render","gShareBaseURL","FireworkSDK","shareBaseURL","appLanguage","videoLaunchBehavior","adBadgeConfiguration","adBadgeTextType","badgeTextType","backgroundColorOfAdBadge","backgroundColor","textColorOfAdBadge","textColor","androidFontIsCustomOfAdBadge","androidFontInfo","isCustom","androidFontTypefaceNameOfAdBadge","typefaceName","source","channel","playlist","playlistGroup","hashtagFilterExpression","productIds","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","requiresAds","adsFetchTimeout","vastAttributesString","_generateVastAttributesString","key","join","orientation","colors","undefined","_onVideoFeedLoadFinished","dynamicContentParameters","resultString","sortedKeyList","Object","keys","sort","valueString","length","vastAttributes","attribute","resultVideoFeedConfiguration","Math","floor","numberOfLines","resultVideoPlayerConfiguration"],"mappings":";;;;;;;AAAA;;AAEA;;AAUA;;AAGA;;AAIA;;AACA;;AACA;;AACA;;;;;;;;AA4EA,MAAMA,mBAAmB,GAAG,aAA5B;AAEA;AACA;AACA;;AACA,MAAMC,SAAN,SAAwBC,eAAMC,SAA9B,CAA0E;AACxE;AACF;AACA;AASEC,EAAAA,WAAW,CAACC,KAAD,EAAyB;AAClC,UAAMA,KAAN;;AADkC,8DAJNH,eAAMI,SAAN,EAIM;;AAAA,4CAFY,EAEZ;;AAAA,qCAOnB,MAAM;AACrBC,4BAAaC,GAAb,CAAkB,qBAAoBC,IAAI,CAACC,SAAL,CAAe,KAAKL,KAApB,CAA2B,EAAjE;;AAEA,YAAMM,gBAAgB,GAAG,iCAAe,KAAKC,mBAAL,CAAyBC,OAAxC,CAAzB;;AAEA,UAAIC,SAA0B,GAC5BC,uBAAUC,oBAAV,CAA+BhB,mBAA/B,EAAoDiB,QAApD,CA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AID;;AAED,WAAOkE,8BAAP;AACD;;AAhYuE;;gBAApE/I,S,kBAIkB;AACpB4E,EAAAA,IAAI,EAAE;AADc,C;;eA+XT5E,S","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';\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 * 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. Only supported on iOS.\n */\n adConfiguration?: AdConfiguration;\n /**\n * The feed loading result callback. It means loading successfully when error equals to undefined. Only supported on iOS.\n */\n onVideoFeedLoadFinished?: (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 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 } = this.props;\n\n const { name, reason } = event.nativeEvent;\n\n if (onVideoFeedLoadFinished) {\n if (name) {\n if (reason) {\n onVideoFeedLoadFinished({ name, reason });\n } else {\n onVideoFeedLoadFinished({ name });\n }\n } else {\n onVideoFeedLoadFinished();\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 if (Platform.OS === 'ios') {\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 /**\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 FWLoggerUtil.log(\n `VideoFeed render props ${JSON.stringify(\n this.props\n )} state ${JSON.stringify(this.state)}`\n );\n\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 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\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 += `_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 key += `_enableAutoplay:${enableAutoplay}`;\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 }\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 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 _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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"names":["FireworkSDK"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA;;AAEA;;AAOA;;AACA;;AAKA;;AA0BA;;AAEA;;
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":["FireworkSDK"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA;;AAEA;;AAOA;;AACA;;AAKA;;AA0BA;;AAEA;;AA4BA;;AAgBA;;;;eAEeA,oB","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 FeedItemDetails from './models/FeedItemDetails';\nimport type FWError from './models/FWError';\nimport type {\n CustomClickLinkButtonEvent,\n CustomCTAClickEvent,\n LiveStreamChatEvent,\n LiveStreamEvent,\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 ShoppingCTAButtonConfiguration,\n ShoppingCTAButtonText,\n} from './models/ProductInfoViewConfiguration';\nimport type ProductUnit from './models/ProductUnit';\nimport type { ProductPrice, ProductUnitOption } from './models/ProductUnit';\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 { 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 { VideoPlayerStyle } from './models/VideoPlayerStyle';\nimport type {\n CustomClickCartIconCallback,\n CustomClickLinkButtonCallback,\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 CustomClickCartIconCallback,\n CustomClickLinkButtonCallback,\n CustomClickLinkButtonEvent,\n CustomCTAClickCallback,\n CustomCTAClickEvent,\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 Product,\n ProductInfoViewConfiguration,\n ProductPrice,\n ProductUnit,\n ProductUnitOption,\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 VideoLaunchBehavior,\n VideoPlaybackCallback,\n VideoPlaybackDetails,\n VideoPlaybackEvent,\n VideoPlaybackEventName,\n VideoPlayerCompleteAction,\n VideoPlayerConfiguration,\n VideoPlayerCTADelay,\n VideoPlayerCTADelayType,\n VideoPlayerCTAStyle,\n VideoPlayerCTAWidth,\n VideoPlayerSize,\n VideoPlayerStyle,\n VideoShopping,\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["FireworkSDKModule.ts"],"names":["FireworkSDKModule","NativeModules","FireworkSDK","Proxy","get","Error","LINKING_ERROR","FireworkSDKModuleEventEmitter","NativeEventEmitter"],"mappings":";;;;;;;AAAA;;AAEA;;AAMA,MAAMA,iBAAiB,GAAGC,2BAAcC,WAAd,GACtBD,2BAAcC,WADQ,GAEtB,IAAIC,KAAJ,CACE,EADF,EAEE;AACEC,EAAAA,GAAG,GAAG;AACJ,UAAM,IAAIC,KAAJ,CAAUC,6BAAV,CAAN;AACD;;AAHH,CAFF,CAFJ;AAsBA,MAAMC,6BAA6B,GAAG,IAAIC,+BAAJ,CAAuBR,iBAAvB,CAAtC;;eAEeA,iB","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
|
|
1
|
+
{"version":3,"sources":["FireworkSDKModule.ts"],"names":["FireworkSDKModule","NativeModules","FireworkSDK","Proxy","get","Error","LINKING_ERROR","FireworkSDKModuleEventEmitter","NativeEventEmitter"],"mappings":";;;;;;;AAAA;;AAEA;;AAMA,MAAMA,iBAAiB,GAAGC,2BAAcC,WAAd,GACtBD,2BAAcC,WADQ,GAEtB,IAAIC,KAAJ,CACE,EADF,EAEE;AACEC,EAAAA,GAAG,GAAG;AACJ,UAAM,IAAIC,KAAJ,CAAUC,6BAAV,CAAN;AACD;;AAHH,CAFF,CAFJ;AAsBA,MAAMC,6BAA6B,GAAG,IAAIC,+BAAJ,CAAuBR,iBAAvB,CAAtC;;eAEeA,iB","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 openVideoPlayer(url: string, config?: VideoPlayerNativeConfiguration): void;\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}\n\nconst FireworkSDKModuleEventEmitter = new NativeEventEmitter(FireworkSDKModule);\nexport { FireworkSDKModuleEventEmitter };\nexport default FireworkSDKModule as IFireworkSDKModule;\n"]}
|