react-native-firework-sdk 2.11.0 → 2.11.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/android/gradle.properties +1 -1
- package/android/src/main/java/com/fireworksdk/bridge/components/storyblock/StoryBlockFragment.kt +3 -1
- package/android/src/main/java/com/fireworksdk/bridge/models/FWCountdownTimerConfigurationModel.kt +8 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWCountdownTimerConfigurationModelDeserializer.kt +22 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWCountdownTimerConfigurationModelSerializer.kt +18 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWFontInfoModel.kt +2 -2
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerConfigModel.kt +1 -0
- 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/FWAppearanceMode.kt +18 -0
- package/ios/Components/CountdownTimerConfiguration.swift +43 -0
- package/ios/Components/StoryBlock.swift +6 -0
- package/ios/Components/StoryBlockConfiguration.swift +1 -0
- package/ios/Components/VideoFeed.swift +5 -0
- package/ios/Components/VideoPlayerConfiguration.swift +1 -0
- package/ios/FireworkSdk.xcodeproj/project.pbxproj +12 -0
- package/lib/commonjs/components/StoryBlock.js +2 -0
- package/lib/commonjs/components/StoryBlock.js.map +1 -1
- package/lib/commonjs/components/VideoFeed.js +2 -0
- package/lib/commonjs/components/VideoFeed.js.map +1 -1
- package/lib/commonjs/index.js +7 -7
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/CountdownTimerConfiguration.js +2 -0
- package/lib/commonjs/models/CountdownTimerConfiguration.js.map +1 -0
- package/lib/module/components/StoryBlock.js +2 -0
- package/lib/module/components/StoryBlock.js.map +1 -1
- package/lib/module/components/VideoFeed.js +2 -0
- package/lib/module/components/VideoFeed.js.map +1 -1
- package/lib/module/index.js +5 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/CountdownTimerConfiguration.js +2 -0
- package/lib/module/models/CountdownTimerConfiguration.js.map +1 -0
- package/lib/typescript/index.d.ts +15 -13
- package/lib/typescript/models/CountdownTimerConfiguration.d.ts +12 -0
- package/lib/typescript/models/StoryBlockConfiguration.d.ts +7 -0
- package/lib/typescript/models/VideoPlayerConfiguration.d.ts +6 -0
- package/package.json +1 -1
- package/src/components/StoryBlock.tsx +4 -0
- package/src/components/VideoFeed.tsx +4 -0
- package/src/index.ts +34 -30
- package/src/models/CountdownTimerConfiguration.ts +12 -0
- package/src/models/StoryBlockConfiguration.ts +7 -0
- package/src/models/VideoPlayerConfiguration.ts +6 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["VideoFeed.tsx"],"names":["React","findNodeHandle","Platform","UIManager","FireworkSDK","FWEventName","FWNativeErrorAction","FireworkSDKModuleEventEmitter","FWGlobalState","gennerateJsonKey","FWLoggerUtil","FWVideoFeed","NativeComponentName","VideoFeed","Component","constructor","props","createRef","log","JSON","stringify","nativeNodeHandle","_nativeComponentRef","current","commandId","getViewManagerConfig","Commands","refresh","OS","toString","reactTag","dispatchViewManagerCommand","event","nativeEvent","onVideoFeedLoadFinished","onVideoFeedEmpty","name","reason","action","error","loadingFirstPage","_loaded","onVideoFeedDidStartPictureInPicture","onVideoFeedDidStopPictureInPicture","onVideoFeedGetFeedId","feedId","state","sdkInitCalled","getInstance","componentDidMount","sdkInitCalledPromise","then","setState","subscriptionOfShareBaseURLUpdated","addListener","ShareBaseURLUpdated","_subscriptions","push","subscriptionOfAdBadgeConfigurationUpdated","AdBadgeConfigurationUpdated","subscriptionOfVideoLaunchBehaviorUpdated","VideoLaunchBehaviorUpdated","subscriptionOfAppLanguageUpdated","AppLanguageUpdated","componentWillUnmount","forEach","value","remove","render","gShareBaseURL","shareBaseURL","appLanguage","videoLaunchBehavior","adBadgeConfiguration","adBadgeTextType","badgeTextType","backgroundColorOfAdBadge","backgroundColor","textColorOfAdBadge","textColor","androidFontIsCustomOfAdBadge","androidFontInfo","isCustom","androidFontTypefaceNameOfAdBadge","typefaceName","source","channel","playlist","playlistGroup","hashtagFilterExpression","productIds","contentId","mode","enablePictureInPicture","adConfiguration","dynamicContentParametersString","_generateDynamicContentParametersString","videoFeedConfiguration","_getVideoFeedConfiguration","cornerRadius","toFixed","titleHidden","title","hidden","titleTextColor","titleFontSize","fontSize","titleAndroidFontInfo","titleGradientDrawable","gradientDrawable","titlePosition","playIconHidden","playIcon","playIconWidth","iconWidth","showAdBadge","enableAutoplay","gridColumns","itemSpacing","videoPlayerConfiguration","_getVideoPlayerConfiguration","playerStyle","videoCompleteAction","showShareButton","showPlaybackButton","showMuteButton","showBranding","ctaDelayType","ctaDelay","type","ctaDelayValue","ctaHighlightDelayType","ctaHighlightDelay","ctaHighlightDelayValue","ctaWidth","buttonConfiguration","videoPlayerLogoConfigurationJsonKey","videoPlayerLogoConfiguration","showVideoDetailTitle","requiresAds","adsFetchTimeout","vastAttributesString","_generateVastAttributesString","replayBadgeVideoFeedConfigurationJsonKey","replayBadge","replayBadgeVideoPlayerConfigurationJsonKey","replayBadgeConfiguration","key","join","orientation","colors","_generateButtonInfoString","videoDetailButton","closeButton","muteButton","unmuteButton","playButton","pauseButton","console","undefined","_onVideoFeedLoadFinished","_onVideoFeedEmpty","_onVideoFeedDidStartPictureInPicture","_onVideoFeedDidStopPictureInPicture","_onVideoFeedGetFeedId","dynamicContentParameters","resultString","sortedKeyList","Object","keys","sort","valueString","length","vastAttributes","attribute","buttonInfo","imageName","systemImageName","tintColor","resultVideoFeedConfiguration","Math","floor","numberOfLines","resultVideoPlayerConfiguration"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAEEC,cAFF,EAIEC,QAJF,EAMEC,SANF,QAQO,cARP;AAUA,OAAOC,WAAP,MAAwB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AK,EAAE,EACL,GAAG6E,4BAA4B,CAAC7E,KAD3B;AAELgF,UAAAA;AAFK;AAFsB,OAA/B;AAOD;;AAED,WAAOH,4BAAP;AACD;;AAEO3D,EAAAA,4BAA4B,GAEtB;AACZ,UAAM;AAAED,MAAAA,wBAAF;AAA4B1B,MAAAA;AAA5B,QAAuD,KAAK7E,KAAlE;AAEA,QAAIuK,8BAES,GAAGhE,wBAFhB;;AAGA,QAAI,OAAO1B,sBAAP,KAAkC,SAAtC,EAAiD;AAC/C,UAAI,CAAC0F,8BAAL,EAAqC;AACnCA,QAAAA,8BAA8B,GAAG,EAAjC;AACD;;AACDA,MAAAA,8BAA8B,GAAG,EAC/B,GAAGA,8BAD4B;AAE/B1F,QAAAA;AAF+B,OAAjC;AAID;;AAED,WAAO0F,8BAAP;AACD;;AApgBuE;;gBAApE1K,S,kBAIkB;AACpB+E,EAAAA,IAAI,EAAE;AADc,C;;AAmgBxB,eAAe/E,SAAf","sourcesContent":["import React from 'react';\n\nimport {\n EmitterSubscription,\n findNodeHandle,\n NativeSyntheticEvent,\n Platform,\n StyleProp,\n UIManager,\n ViewStyle,\n} from 'react-native';\n\nimport FireworkSDK from '../FireworkSDK';\nimport type AdConfiguration from '../models/AdConfiguration';\nimport type ButtonInfo from '../models/ButtonInfo';\nimport type FWError from '../models/FWError';\nimport { FWEventName } from '../models/FWEventName';\nimport { FWNativeErrorAction } from '../models/FWNativeErrorAction';\nimport type VideoFeedConfiguration from '../models/VideoFeedConfiguration';\nimport type { VideoFeedSource } from '../models/VideoFeedSource';\nimport type VideoPlayerConfiguration from '../models/VideoPlayerConfiguration';\nimport type VideoPlayerNativeConfiguration from '../models/VideoPlayerNativeConfiguration';\nimport { FireworkSDKModuleEventEmitter } from '../modules/FireworkSDKModule';\nimport FWGlobalState from '../utils/FWGlobalState';\nimport gennerateJsonKey from '../utils/FWJsonUtil';\nimport FWLoggerUtil from '../utils/FWLoggerUtil';\nimport FWVideoFeed from './FWVideoFeed';\n\nexport type VideoFeedMode = 'row' | 'column' | 'grid';\n\n/**\n * The props of VideoFeed component.\n */\nexport interface IVideoFeedProps {\n /**\n * Standard React Native View Style.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * One of five available video feed sources.The playlistGroup is only supported on iOS.\n * Defaults to discover.\n */\n source: VideoFeedSource;\n /**\n * Channel id of the feed. Required when the source is set as channel or playlist or dynamicContent.\n */\n channel?: string;\n /**\n * Playlist id of the feed. Please note channel id is necessary. Required when the source is set as playlist.\n */\n playlist?: string;\n /**\n * PlaylistGroup id of the feed. Required when the source is set as playlistGroup. Only supported on iOS.\n */\n playlistGroup?: string;\n /**\n * The dynamic content parameters of the feed. Required when the source is set as dynamicContent.\n */\n dynamicContentParameters?: { [key: string]: string[] };\n /**\n * Hashtag filter expression is an s-expression used to provide feeds filtered by hashtags with specified criteria.\n * Queries are specified with boolean predicates on what hashtags are there on the video.\n * For instance, (and sport food) (or sport food) (and sport (or food comedy)) sport are all valid expressions.\n * Non-UTF-8 characters are not allowed. If using boolean predicates, the expression needs to be wrapped with parenthesis.\n * Required when the source is set as hashtagPlaylist.\n */\n hashtagFilterExpression?: string;\n /**\n * Product ids used to generate the sku feed\n */\n productIds?: string[];\n /**\n * The video or live stream id. Only supported on iOS.\n */\n contentId?: string;\n /**\n * One of three available display modes. Defaults to row.\n */\n mode?: VideoFeedMode;\n /**\n * Specifies if Picture in Picture is enabled.\n */\n enablePictureInPicture?: boolean;\n /**\n * Configuration of the feed.\n */\n videoFeedConfiguration?: VideoFeedConfiguration;\n /**\n * Configuration of the player.\n */\n videoPlayerConfiguration?: VideoPlayerConfiguration;\n /**\n * Ad configuration of the feed.\n */\n adConfiguration?: AdConfiguration;\n /**\n * The feed loading result callback. It means loading successfully when error equals to undefined.\n */\n onVideoFeedLoadFinished?: (error?: FWError) => void;\n /**\n * The callback is triggered when there are no items in the story block.\n * The callback is triggered in the following cases:\n * 1. Loading successfully but the back end returns an empty list.\n * 2. The load failed and list is empty.\n * onVideoFeedLoadFinished will also be triggered when onVideoFeedEmpty is triggered.\n */\n onVideoFeedEmpty?: (error?: FWError) => void;\n /**\n * Start Picture in Picture callback. Only supported on iOS.\n */\n onVideoFeedDidStartPictureInPicture?: (error?: FWError) => void;\n /**\n * Stop Picture in Picture callback. Only supported on iOS.\n */\n onVideoFeedDidStopPictureInPicture?: (error?: FWError) => void;\n /**\n *\n * The host app could use this callback to get feed id.\n * The feed id can be used for conversion tracking.\n */\n onVideoFeedGetFeedId?: (feedId: string) => void;\n}\n\ninterface IVideoFeedState {\n sdkInitCalled: boolean;\n}\n\nconst NativeComponentName = 'FWVideoFeed';\n\n/**\n * VideoFeed component.\n */\nclass VideoFeed extends React.Component<IVideoFeedProps, IVideoFeedState> {\n /**\n * @ignore\n */\n static defaultProps = {\n mode: 'row',\n };\n\n private _nativeComponentRef = React.createRef<any>();\n\n private _subscriptions: EmitterSubscription[] = [];\n\n private _loaded: boolean = false;\n\n constructor(props: IVideoFeedProps) {\n super(props);\n this.state = {\n sdkInitCalled: FWGlobalState.getInstance().sdkInitCalled,\n };\n }\n\n public refresh = () => {\n FWLoggerUtil.log(`VideoFeed refresh ${JSON.stringify(this.props)}`);\n\n const nativeNodeHandle = findNodeHandle(this._nativeComponentRef.current);\n\n let commandId: string | number =\n UIManager.getViewManagerConfig(NativeComponentName).Commands.refresh;\n if (Platform.OS === 'android') {\n commandId = commandId.toString();\n }\n let reactTag: number | null = findNodeHandle(nativeNodeHandle);\n FWLoggerUtil.log(\n `StoryBlock refresh commandId: ${commandId} nativeNodeHandle: ${nativeNodeHandle} reactTag: ${reactTag}`\n );\n if (!nativeNodeHandle || !reactTag) {\n return;\n }\n UIManager.dispatchViewManagerCommand(reactTag, commandId, []);\n };\n\n private _onVideoFeedLoadFinished = (event: NativeSyntheticEvent<any>) => {\n FWLoggerUtil.log(\n `VideoFeed _onVideoFeedLoadFinished ${JSON.stringify(event.nativeEvent)}`\n );\n const { onVideoFeedLoadFinished, onVideoFeedEmpty } = this.props;\n\n const { name, reason, action } = event.nativeEvent;\n\n if (onVideoFeedLoadFinished) {\n if (name) {\n let error: FWError = { name };\n if (reason) {\n error.reason = reason;\n }\n onVideoFeedLoadFinished(error);\n if (Platform.OS === 'android') {\n if (\n action === FWNativeErrorAction.loadingFirstPage ||\n !this._loaded\n ) {\n onVideoFeedEmpty?.(error);\n }\n } else {\n if (!this._loaded) {\n onVideoFeedEmpty?.(error);\n }\n }\n } else {\n onVideoFeedLoadFinished();\n this._loaded = true;\n }\n }\n };\n\n private _onVideoFeedEmpty = (event: NativeSyntheticEvent<any>) => {\n FWLoggerUtil.log(\n `VideoFeed _onVideoFeedLoadFinished ${JSON.stringify(event.nativeEvent)}`\n );\n const { onVideoFeedEmpty } = this.props;\n\n if (onVideoFeedEmpty) {\n onVideoFeedEmpty();\n }\n };\n\n private _onVideoFeedDidStartPictureInPicture = (\n event: NativeSyntheticEvent<any>\n ) => {\n FWLoggerUtil.log(\n `VideoFeed _onVideoFeedDidStartPictureInPicture ${JSON.stringify(\n event.nativeEvent\n )}`\n );\n const { onVideoFeedDidStartPictureInPicture } = this.props;\n\n const { name, reason } = event.nativeEvent;\n\n if (onVideoFeedDidStartPictureInPicture) {\n if (name) {\n if (reason) {\n onVideoFeedDidStartPictureInPicture({ name, reason });\n } else {\n onVideoFeedDidStartPictureInPicture({ name });\n }\n } else {\n onVideoFeedDidStartPictureInPicture();\n }\n }\n };\n\n private _onVideoFeedDidStopPictureInPicture = (\n event: NativeSyntheticEvent<any>\n ) => {\n FWLoggerUtil.log(\n `VideoFeed _onVideoFeedDidStopPictureInPicture ${JSON.stringify(\n event.nativeEvent\n )}`\n );\n const { onVideoFeedDidStopPictureInPicture } = this.props;\n\n const { name, reason } = event.nativeEvent;\n\n if (onVideoFeedDidStopPictureInPicture) {\n if (name) {\n if (reason) {\n onVideoFeedDidStopPictureInPicture({ name, reason });\n } else {\n onVideoFeedDidStopPictureInPicture({ name });\n }\n } else {\n onVideoFeedDidStopPictureInPicture();\n }\n }\n };\n\n private _onVideoFeedGetFeedId = (event: NativeSyntheticEvent<any>) => {\n FWLoggerUtil.log(\n `VideoFeed onVideoFeedGetFeedId ${JSON.stringify(event.nativeEvent)}`\n );\n const { onVideoFeedGetFeedId } = this.props;\n\n const { feedId } = event.nativeEvent;\n\n if (onVideoFeedGetFeedId) {\n onVideoFeedGetFeedId(feedId ?? '');\n }\n };\n\n /**\n * @ignore\n */\n componentDidMount() {\n FWLoggerUtil.log(\n `VideoFeed componentDidMount ${JSON.stringify(this.props)}`\n );\n\n if (!this.state.sdkInitCalled) {\n FWGlobalState.getInstance().sdkInitCalledPromise.then(() => {\n this.setState({ sdkInitCalled: true });\n });\n }\n\n const subscriptionOfShareBaseURLUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.ShareBaseURLUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.ShareBaseURLUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfShareBaseURLUpdated);\n\n const subscriptionOfAdBadgeConfigurationUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.AdBadgeConfigurationUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.AdBadgeConfigurationUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfAdBadgeConfigurationUpdated);\n\n const subscriptionOfVideoLaunchBehaviorUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.VideoLaunchBehaviorUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.VideoLaunchBehaviorUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfVideoLaunchBehaviorUpdated);\n\n const subscriptionOfAppLanguageUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.AppLanguageUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.AppLanguageUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfAppLanguageUpdated);\n }\n\n /**\n * @ignore\n */\n componentWillUnmount() {\n FWLoggerUtil.log(\n `VideoFeed componentWillUnmount ${JSON.stringify(this.props)}`\n );\n\n this._subscriptions.forEach((value) => {\n value.remove();\n });\n\n this._subscriptions = [];\n }\n\n /**\n * @ignore\n */\n render() {\n if (!this.state.sdkInitCalled) {\n return null;\n }\n\n const gShareBaseURL = FireworkSDK.getInstance().shareBaseURL;\n const appLanguage = FireworkSDK.getInstance().appLanguage;\n const videoLaunchBehavior = FireworkSDK.getInstance().videoLaunchBehavior;\n const adBadgeConfiguration = FireworkSDK.getInstance().adBadgeConfiguration;\n const adBadgeTextType = adBadgeConfiguration?.badgeTextType;\n const backgroundColorOfAdBadge = adBadgeConfiguration?.backgroundColor;\n const textColorOfAdBadge = adBadgeConfiguration?.textColor;\n const androidFontIsCustomOfAdBadge =\n adBadgeConfiguration?.androidFontInfo?.isCustom?.toString();\n const androidFontTypefaceNameOfAdBadge =\n adBadgeConfiguration?.androidFontInfo?.typefaceName;\n\n const {\n source,\n channel,\n playlist,\n playlistGroup,\n hashtagFilterExpression,\n productIds,\n contentId,\n mode,\n enablePictureInPicture,\n adConfiguration,\n } = this.props;\n const dynamicContentParametersString =\n this._generateDynamicContentParametersString();\n\n const videoFeedConfiguration = this._getVideoFeedConfiguration();\n const cornerRadius = videoFeedConfiguration?.cornerRadius?.toFixed(5);\n\n const titleHidden = videoFeedConfiguration?.title?.hidden?.toString();\n const titleTextColor = videoFeedConfiguration?.title?.textColor;\n const titleFontSize = videoFeedConfiguration?.title?.fontSize?.toFixed(5);\n const titleAndroidFontInfo = videoFeedConfiguration?.title?.androidFontInfo;\n const titleGradientDrawable =\n videoFeedConfiguration?.title?.gradientDrawable;\n const titlePosition = videoFeedConfiguration?.titlePosition;\n const playIconHidden = videoFeedConfiguration?.playIcon?.hidden;\n const playIconWidth =\n videoFeedConfiguration?.playIcon?.iconWidth?.toFixed(5);\n const showAdBadge = videoFeedConfiguration?.showAdBadge?.toString();\n const enableAutoplay = videoFeedConfiguration?.enableAutoplay;\n const gridColumns = videoFeedConfiguration?.gridColumns?.toFixed(5);\n const itemSpacing = videoFeedConfiguration?.itemSpacing?.toFixed(5);\n\n const videoPlayerConfiguration = this._getVideoPlayerConfiguration();\n const playerStyle = videoPlayerConfiguration?.playerStyle;\n const videoCompleteAction = videoPlayerConfiguration?.videoCompleteAction;\n const showShareButton = videoPlayerConfiguration?.showShareButton;\n const showPlaybackButton = videoPlayerConfiguration?.showPlaybackButton;\n const showMuteButton = videoPlayerConfiguration?.showMuteButton;\n const showBranding = videoPlayerConfiguration?.showBranding;\n const ctaDelayType = videoPlayerConfiguration?.ctaDelay?.type;\n const ctaDelayValue = videoPlayerConfiguration?.ctaDelay?.value?.toFixed(5);\n const ctaHighlightDelayType =\n videoPlayerConfiguration?.ctaHighlightDelay?.type;\n const ctaHighlightDelayValue =\n videoPlayerConfiguration?.ctaHighlightDelay?.value?.toFixed(5);\n const shareBaseURL = videoPlayerConfiguration?.shareBaseURL;\n const ctaWidth = videoPlayerConfiguration?.ctaWidth;\n const buttonConfiguration = videoPlayerConfiguration?.buttonConfiguration;\n const videoPlayerLogoConfigurationJsonKey = gennerateJsonKey(\n videoPlayerConfiguration?.videoPlayerLogoConfiguration\n );\n const showVideoDetailTitle = videoPlayerConfiguration?.showVideoDetailTitle;\n const requiresAds = adConfiguration?.requiresAds;\n const adsFetchTimeout = adConfiguration?.adsFetchTimeout;\n const vastAttributesString = this._generateVastAttributesString();\n const replayBadgeVideoFeedConfigurationJsonKey = gennerateJsonKey(\n videoFeedConfiguration?.replayBadge\n );\n const replayBadgeVideoPlayerConfigurationJsonKey = gennerateJsonKey(\n videoPlayerConfiguration?.replayBadgeConfiguration\n );\n let key = `gShareBaseURL:${gShareBaseURL}`;\n if (Platform.OS === 'ios') {\n key += `_appLanguage:${appLanguage}`;\n }\n key += `_videoLaunchBehavior:${videoLaunchBehavior}`;\n key += `_adBadgeTextType:${adBadgeTextType}`;\n key += `_backgroundColorOfAdBadge:${backgroundColorOfAdBadge}`;\n key += `_textColorOfAdBadge:${textColorOfAdBadge}`;\n if (Platform.OS === 'android') {\n key += `_androidFontIsCustomOfAdBadge${androidFontIsCustomOfAdBadge}`;\n key += `_androidFontTypefaceNameOfAdBadge${androidFontTypefaceNameOfAdBadge}`;\n }\n\n key += `_source:${source}`;\n key += `_channel:${channel}`;\n key += `_playlist:${playlist}`;\n key += `_playlistGroup:${playlistGroup}`;\n key += `_dynamicContentParameters:${dynamicContentParametersString}`;\n key += `_hashtagFilterExpression:${hashtagFilterExpression}`;\n key += `_productIds:${productIds?.join(',')}`;\n key += `_contentId:${contentId}`;\n key += `_mode:${mode}`;\n key += `_enablePictureInPicture:${enablePictureInPicture}`;\n\n key += `_titleHidden:${titleHidden}`;\n if (Platform.OS === 'android') {\n key += `_cornerRadius:${cornerRadius}`;\n key += `_titleTextColor:${titleTextColor}`;\n key += `_titleFontSize:${titleFontSize}`;\n key += `_titleAndroidFontInfo.isCustom:${titleAndroidFontInfo?.isCustom}`;\n key += `_titleAndroidFontInfo.typefaceName:${titleAndroidFontInfo?.typefaceName}`;\n key += `_titleGradientDrawable.orientation:${titleGradientDrawable?.orientation}`;\n key += `_titleGradientDrawable.colors:${titleGradientDrawable?.colors?.join(\n ','\n )}`;\n key += `_playIconHidden:${playIconHidden}`;\n key += `_playIconWidth:${playIconWidth}`;\n key += `_showAdBadge:${showAdBadge}`;\n }\n\n key += `_titlePosition:${titlePosition}`;\n if (Platform.OS === 'android') {\n key += `_enableAutoplay:${enableAutoplay}`;\n }\n key += `_gridColumns:${gridColumns}`;\n key += `_itemSpacing:${itemSpacing}`;\n\n key += `_shareBaseURL:${shareBaseURL}`;\n if (Platform.OS === 'android') {\n key += `_playerStyle:${playerStyle}`;\n key += `_videoCompleteAction:${videoCompleteAction}`;\n key += `_showShareButton:${showShareButton}`;\n key += `_showPlaybackButton:${showPlaybackButton}`;\n key += `_showMuteButton:${showMuteButton}`;\n key += `_showBranding:${showBranding}`;\n key += `_ctaDelayType:${ctaDelayType}`;\n key += `_ctaDelayValue:${ctaDelayValue}`;\n key += `_ctaHighlightDelayType:${ctaHighlightDelayType}`;\n key += `_ctaHighlightDelayValue:${ctaHighlightDelayValue}`;\n key += `_ctaWidth:${ctaWidth}`;\n key += `_buttonConfiguration.videoDetailButton:${this._generateButtonInfoString(\n buttonConfiguration?.videoDetailButton\n )}`;\n key += `_buttonConfiguration.closeButton:${this._generateButtonInfoString(\n buttonConfiguration?.closeButton\n )}`;\n key += `_buttonConfiguration.muteButton:${this._generateButtonInfoString(\n buttonConfiguration?.muteButton\n )}`;\n key += `_buttonConfiguration.unmuteButton:${this._generateButtonInfoString(\n buttonConfiguration?.unmuteButton\n )}`;\n key += `_buttonConfiguration.playButton:${this._generateButtonInfoString(\n buttonConfiguration?.playButton\n )}`;\n key += `_buttonConfiguration.pauseButton:${this._generateButtonInfoString(\n buttonConfiguration?.pauseButton\n )}`;\n key += `_videoPlayerLogoConfiguration:${videoPlayerLogoConfigurationJsonKey}`;\n key += `_showVideoDetailTitle:${showVideoDetailTitle}`;\n }\n\n key += `_requiresAds:${requiresAds}`;\n key += `_adsFetchTimeout:${adsFetchTimeout}`;\n key += `_vastAttributes:${vastAttributesString}`;\n key += `_replayBadgeVideoFeedConfiguration:${replayBadgeVideoFeedConfigurationJsonKey}`;\n key += `_replayBadgeVideoPlayerConfiguration:${replayBadgeVideoPlayerConfigurationJsonKey}`;\n\n console.log('video feed key', key);\n\n return (\n <FWVideoFeed\n key={key}\n {...this.props}\n enablePictureInPicture={undefined}\n videoFeedConfiguration={videoFeedConfiguration}\n videoPlayerConfiguration={videoPlayerConfiguration}\n ref={this._nativeComponentRef}\n onVideoFeedLoadFinished={this._onVideoFeedLoadFinished}\n onVideoFeedEmpty={this._onVideoFeedEmpty}\n onVideoFeedDidStartPictureInPicture={\n this._onVideoFeedDidStartPictureInPicture\n }\n onVideoFeedDidStopPictureInPicture={\n this._onVideoFeedDidStopPictureInPicture\n }\n onVideoFeedGetFeedId={this._onVideoFeedGetFeedId}\n mode={mode ?? 'row'}\n />\n );\n }\n\n private _generateDynamicContentParametersString(): string {\n const { dynamicContentParameters } = this.props;\n if (!dynamicContentParameters) {\n return '';\n }\n\n let resultString = '';\n const sortedKeyList = Object.keys(dynamicContentParameters).sort();\n for (const key of sortedKeyList) {\n const value = dynamicContentParameters[key];\n const valueString = value.join(',');\n if (resultString.length > 0) {\n resultString += '_';\n }\n\n resultString += `${key}:${valueString}`;\n }\n\n return resultString;\n }\n\n private _generateVastAttributesString(): string | undefined {\n const { adConfiguration } = this.props;\n const vastAttributes = adConfiguration?.vastAttributes;\n if (!vastAttributes) {\n return '';\n }\n\n let resultString = '';\n for (const attribute of vastAttributes) {\n if (resultString.length > 0) {\n resultString += '_';\n }\n resultString += `${attribute.name}:${attribute.value}`;\n }\n\n return resultString;\n }\n\n private _generateButtonInfoString(buttonInfo?: ButtonInfo): string {\n return `imageName:${buttonInfo?.imageName}_systemImageName:${buttonInfo?.systemImageName}_tintColor:${buttonInfo?.tintColor}`;\n }\n\n private _getVideoFeedConfiguration(): VideoFeedConfiguration | undefined {\n const { videoFeedConfiguration } = this.props;\n if (!videoFeedConfiguration) {\n return videoFeedConfiguration;\n }\n\n let resultVideoFeedConfiguration = videoFeedConfiguration;\n\n if (\n resultVideoFeedConfiguration.gridColumns &&\n Math.floor(resultVideoFeedConfiguration.gridColumns) !==\n resultVideoFeedConfiguration.gridColumns\n ) {\n const gridColumns = Math.floor(resultVideoFeedConfiguration.gridColumns);\n resultVideoFeedConfiguration = {\n ...resultVideoFeedConfiguration,\n gridColumns,\n };\n }\n\n if (\n resultVideoFeedConfiguration.title &&\n resultVideoFeedConfiguration.title.numberOfLines &&\n Math.floor(resultVideoFeedConfiguration.title.numberOfLines) !==\n resultVideoFeedConfiguration.title.numberOfLines\n ) {\n const numberOfLines = Math.floor(\n resultVideoFeedConfiguration.title.numberOfLines\n );\n resultVideoFeedConfiguration = {\n ...resultVideoFeedConfiguration,\n title: {\n ...resultVideoFeedConfiguration.title,\n numberOfLines,\n },\n };\n }\n\n return resultVideoFeedConfiguration;\n }\n\n private _getVideoPlayerConfiguration():\n | VideoPlayerNativeConfiguration\n | undefined {\n const { videoPlayerConfiguration, enablePictureInPicture } = this.props;\n\n let resultVideoPlayerConfiguration:\n | VideoPlayerNativeConfiguration\n | undefined = videoPlayerConfiguration;\n if (typeof enablePictureInPicture === 'boolean') {\n if (!resultVideoPlayerConfiguration) {\n resultVideoPlayerConfiguration = {};\n }\n resultVideoPlayerConfiguration = {\n ...resultVideoPlayerConfiguration,\n enablePictureInPicture,\n };\n }\n\n return resultVideoPlayerConfiguration;\n }\n}\n\nexport default VideoFeed;\n"]}
|
|
1
|
+
{"version":3,"sources":["VideoFeed.tsx"],"names":["React","findNodeHandle","Platform","UIManager","FireworkSDK","FWEventName","FWNativeErrorAction","FireworkSDKModuleEventEmitter","FWGlobalState","gennerateJsonKey","FWLoggerUtil","FWVideoFeed","NativeComponentName","VideoFeed","Component","constructor","props","createRef","log","JSON","stringify","nativeNodeHandle","_nativeComponentRef","current","commandId","getViewManagerConfig","Commands","refresh","OS","toString","reactTag","dispatchViewManagerCommand","event","nativeEvent","onVideoFeedLoadFinished","onVideoFeedEmpty","name","reason","action","error","loadingFirstPage","_loaded","onVideoFeedDidStartPictureInPicture","onVideoFeedDidStopPictureInPicture","onVideoFeedGetFeedId","feedId","state","sdkInitCalled","getInstance","componentDidMount","sdkInitCalledPromise","then","setState","subscriptionOfShareBaseURLUpdated","addListener","ShareBaseURLUpdated","_subscriptions","push","subscriptionOfAdBadgeConfigurationUpdated","AdBadgeConfigurationUpdated","subscriptionOfVideoLaunchBehaviorUpdated","VideoLaunchBehaviorUpdated","subscriptionOfAppLanguageUpdated","AppLanguageUpdated","componentWillUnmount","forEach","value","remove","render","gShareBaseURL","shareBaseURL","appLanguage","videoLaunchBehavior","adBadgeConfiguration","adBadgeTextType","badgeTextType","backgroundColorOfAdBadge","backgroundColor","textColorOfAdBadge","textColor","androidFontIsCustomOfAdBadge","androidFontInfo","isCustom","androidFontTypefaceNameOfAdBadge","typefaceName","source","channel","playlist","playlistGroup","hashtagFilterExpression","productIds","contentId","mode","enablePictureInPicture","adConfiguration","dynamicContentParametersString","_generateDynamicContentParametersString","videoFeedConfiguration","_getVideoFeedConfiguration","cornerRadius","toFixed","titleHidden","title","hidden","titleTextColor","titleFontSize","fontSize","titleAndroidFontInfo","titleGradientDrawable","gradientDrawable","titlePosition","playIconHidden","playIcon","playIconWidth","iconWidth","showAdBadge","enableAutoplay","gridColumns","itemSpacing","videoPlayerConfiguration","_getVideoPlayerConfiguration","playerStyle","videoCompleteAction","showShareButton","showPlaybackButton","showMuteButton","showBranding","ctaDelayType","ctaDelay","type","ctaDelayValue","ctaHighlightDelayType","ctaHighlightDelay","ctaHighlightDelayValue","ctaWidth","buttonConfiguration","videoPlayerLogoConfigurationJsonKey","videoPlayerLogoConfiguration","countdownTimerConfigurationJsonKey","countdownTimerConfiguration","showVideoDetailTitle","requiresAds","adsFetchTimeout","vastAttributesString","_generateVastAttributesString","replayBadgeVideoFeedConfigurationJsonKey","replayBadge","replayBadgeVideoPlayerConfigurationJsonKey","replayBadgeConfiguration","key","join","orientation","colors","_generateButtonInfoString","videoDetailButton","closeButton","muteButton","unmuteButton","playButton","pauseButton","console","undefined","_onVideoFeedLoadFinished","_onVideoFeedEmpty","_onVideoFeedDidStartPictureInPicture","_onVideoFeedDidStopPictureInPicture","_onVideoFeedGetFeedId","dynamicContentParameters","resultString","sortedKeyList","Object","keys","sort","valueString","length","vastAttributes","attribute","buttonInfo","imageName","systemImageName","tintColor","resultVideoFeedConfiguration","Math","floor","numberOfLines","resultVideoPlayerConfiguration"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAEEC,cAFF,EAIEC,QAJF,EAMEC,SANF,QAQO,cARP;AAUA,OAAOC,WAAP,MAAwB,gBAAxB;AAIA,SAASC,WAAT,QAA4B,uBAA5B;AACA,SAASC,mBAAT,QAAoC,+BAApC;AAKA,SAASC,6BAA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AAAA,4BAA4B,GAAG,EAC7B,GAAGA,4BAD0B;AAE7B/E,QAAAA,KAAK,EAAE,EACL,GAAG+E,4BAA4B,CAAC/E,KAD3B;AAELkF,UAAAA;AAFK;AAFsB,OAA/B;AAOD;;AAED,WAAOH,4BAAP;AACD;;AAEO7D,EAAAA,4BAA4B,GAEtB;AACZ,UAAM;AAAED,MAAAA,wBAAF;AAA4B1B,MAAAA;AAA5B,QAAuD,KAAK7E,KAAlE;AAEA,QAAIyK,8BAES,GAAGlE,wBAFhB;;AAGA,QAAI,OAAO1B,sBAAP,KAAkC,SAAtC,EAAiD;AAC/C,UAAI,CAAC4F,8BAAL,EAAqC;AACnCA,QAAAA,8BAA8B,GAAG,EAAjC;AACD;;AACDA,MAAAA,8BAA8B,GAAG,EAC/B,GAAGA,8BAD4B;AAE/B5F,QAAAA;AAF+B,OAAjC;AAID;;AAED,WAAO4F,8BAAP;AACD;;AAxgBuE;;gBAApE5K,S,kBAIkB;AACpB+E,EAAAA,IAAI,EAAE;AADc,C;;AAugBxB,eAAe/E,SAAf","sourcesContent":["import React from 'react';\n\nimport {\n EmitterSubscription,\n findNodeHandle,\n NativeSyntheticEvent,\n Platform,\n StyleProp,\n UIManager,\n ViewStyle,\n} from 'react-native';\n\nimport FireworkSDK from '../FireworkSDK';\nimport type AdConfiguration from '../models/AdConfiguration';\nimport type ButtonInfo from '../models/ButtonInfo';\nimport type FWError from '../models/FWError';\nimport { FWEventName } from '../models/FWEventName';\nimport { FWNativeErrorAction } from '../models/FWNativeErrorAction';\nimport type VideoFeedConfiguration from '../models/VideoFeedConfiguration';\nimport type { VideoFeedSource } from '../models/VideoFeedSource';\nimport type VideoPlayerConfiguration from '../models/VideoPlayerConfiguration';\nimport type VideoPlayerNativeConfiguration from '../models/VideoPlayerNativeConfiguration';\nimport { FireworkSDKModuleEventEmitter } from '../modules/FireworkSDKModule';\nimport FWGlobalState from '../utils/FWGlobalState';\nimport gennerateJsonKey from '../utils/FWJsonUtil';\nimport FWLoggerUtil from '../utils/FWLoggerUtil';\nimport FWVideoFeed from './FWVideoFeed';\n\nexport type VideoFeedMode = 'row' | 'column' | 'grid';\n\n/**\n * The props of VideoFeed component.\n */\nexport interface IVideoFeedProps {\n /**\n * Standard React Native View Style.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * One of five available video feed sources.The playlistGroup is only supported on iOS.\n * Defaults to discover.\n */\n source: VideoFeedSource;\n /**\n * Channel id of the feed. Required when the source is set as channel or playlist or dynamicContent.\n */\n channel?: string;\n /**\n * Playlist id of the feed. Please note channel id is necessary. Required when the source is set as playlist.\n */\n playlist?: string;\n /**\n * PlaylistGroup id of the feed. Required when the source is set as playlistGroup. Only supported on iOS.\n */\n playlistGroup?: string;\n /**\n * The dynamic content parameters of the feed. Required when the source is set as dynamicContent.\n */\n dynamicContentParameters?: { [key: string]: string[] };\n /**\n * Hashtag filter expression is an s-expression used to provide feeds filtered by hashtags with specified criteria.\n * Queries are specified with boolean predicates on what hashtags are there on the video.\n * For instance, (and sport food) (or sport food) (and sport (or food comedy)) sport are all valid expressions.\n * Non-UTF-8 characters are not allowed. If using boolean predicates, the expression needs to be wrapped with parenthesis.\n * Required when the source is set as hashtagPlaylist.\n */\n hashtagFilterExpression?: string;\n /**\n * Product ids used to generate the sku feed\n */\n productIds?: string[];\n /**\n * The video or live stream id. Only supported on iOS.\n */\n contentId?: string;\n /**\n * One of three available display modes. Defaults to row.\n */\n mode?: VideoFeedMode;\n /**\n * Specifies if Picture in Picture is enabled.\n */\n enablePictureInPicture?: boolean;\n /**\n * Configuration of the feed.\n */\n videoFeedConfiguration?: VideoFeedConfiguration;\n /**\n * Configuration of the player.\n */\n videoPlayerConfiguration?: VideoPlayerConfiguration;\n /**\n * Ad configuration of the feed.\n */\n adConfiguration?: AdConfiguration;\n /**\n * The feed loading result callback. It means loading successfully when error equals to undefined.\n */\n onVideoFeedLoadFinished?: (error?: FWError) => void;\n /**\n * The callback is triggered when there are no items in the story block.\n * The callback is triggered in the following cases:\n * 1. Loading successfully but the back end returns an empty list.\n * 2. The load failed and list is empty.\n * onVideoFeedLoadFinished will also be triggered when onVideoFeedEmpty is triggered.\n */\n onVideoFeedEmpty?: (error?: FWError) => void;\n /**\n * Start Picture in Picture callback. Only supported on iOS.\n */\n onVideoFeedDidStartPictureInPicture?: (error?: FWError) => void;\n /**\n * Stop Picture in Picture callback. Only supported on iOS.\n */\n onVideoFeedDidStopPictureInPicture?: (error?: FWError) => void;\n /**\n *\n * The host app could use this callback to get feed id.\n * The feed id can be used for conversion tracking.\n */\n onVideoFeedGetFeedId?: (feedId: string) => void;\n}\n\ninterface IVideoFeedState {\n sdkInitCalled: boolean;\n}\n\nconst NativeComponentName = 'FWVideoFeed';\n\n/**\n * VideoFeed component.\n */\nclass VideoFeed extends React.Component<IVideoFeedProps, IVideoFeedState> {\n /**\n * @ignore\n */\n static defaultProps = {\n mode: 'row',\n };\n\n private _nativeComponentRef = React.createRef<any>();\n\n private _subscriptions: EmitterSubscription[] = [];\n\n private _loaded: boolean = false;\n\n constructor(props: IVideoFeedProps) {\n super(props);\n this.state = {\n sdkInitCalled: FWGlobalState.getInstance().sdkInitCalled,\n };\n }\n\n public refresh = () => {\n FWLoggerUtil.log(`VideoFeed refresh ${JSON.stringify(this.props)}`);\n\n const nativeNodeHandle = findNodeHandle(this._nativeComponentRef.current);\n\n let commandId: string | number =\n UIManager.getViewManagerConfig(NativeComponentName).Commands.refresh;\n if (Platform.OS === 'android') {\n commandId = commandId.toString();\n }\n let reactTag: number | null = findNodeHandle(nativeNodeHandle);\n FWLoggerUtil.log(\n `StoryBlock refresh commandId: ${commandId} nativeNodeHandle: ${nativeNodeHandle} reactTag: ${reactTag}`\n );\n if (!nativeNodeHandle || !reactTag) {\n return;\n }\n UIManager.dispatchViewManagerCommand(reactTag, commandId, []);\n };\n\n private _onVideoFeedLoadFinished = (event: NativeSyntheticEvent<any>) => {\n FWLoggerUtil.log(\n `VideoFeed _onVideoFeedLoadFinished ${JSON.stringify(event.nativeEvent)}`\n );\n const { onVideoFeedLoadFinished, onVideoFeedEmpty } = this.props;\n\n const { name, reason, action } = event.nativeEvent;\n\n if (onVideoFeedLoadFinished) {\n if (name) {\n let error: FWError = { name };\n if (reason) {\n error.reason = reason;\n }\n onVideoFeedLoadFinished(error);\n if (Platform.OS === 'android') {\n if (\n action === FWNativeErrorAction.loadingFirstPage ||\n !this._loaded\n ) {\n onVideoFeedEmpty?.(error);\n }\n } else {\n if (!this._loaded) {\n onVideoFeedEmpty?.(error);\n }\n }\n } else {\n onVideoFeedLoadFinished();\n this._loaded = true;\n }\n }\n };\n\n private _onVideoFeedEmpty = (event: NativeSyntheticEvent<any>) => {\n FWLoggerUtil.log(\n `VideoFeed _onVideoFeedLoadFinished ${JSON.stringify(event.nativeEvent)}`\n );\n const { onVideoFeedEmpty } = this.props;\n\n if (onVideoFeedEmpty) {\n onVideoFeedEmpty();\n }\n };\n\n private _onVideoFeedDidStartPictureInPicture = (\n event: NativeSyntheticEvent<any>\n ) => {\n FWLoggerUtil.log(\n `VideoFeed _onVideoFeedDidStartPictureInPicture ${JSON.stringify(\n event.nativeEvent\n )}`\n );\n const { onVideoFeedDidStartPictureInPicture } = this.props;\n\n const { name, reason } = event.nativeEvent;\n\n if (onVideoFeedDidStartPictureInPicture) {\n if (name) {\n if (reason) {\n onVideoFeedDidStartPictureInPicture({ name, reason });\n } else {\n onVideoFeedDidStartPictureInPicture({ name });\n }\n } else {\n onVideoFeedDidStartPictureInPicture();\n }\n }\n };\n\n private _onVideoFeedDidStopPictureInPicture = (\n event: NativeSyntheticEvent<any>\n ) => {\n FWLoggerUtil.log(\n `VideoFeed _onVideoFeedDidStopPictureInPicture ${JSON.stringify(\n event.nativeEvent\n )}`\n );\n const { onVideoFeedDidStopPictureInPicture } = this.props;\n\n const { name, reason } = event.nativeEvent;\n\n if (onVideoFeedDidStopPictureInPicture) {\n if (name) {\n if (reason) {\n onVideoFeedDidStopPictureInPicture({ name, reason });\n } else {\n onVideoFeedDidStopPictureInPicture({ name });\n }\n } else {\n onVideoFeedDidStopPictureInPicture();\n }\n }\n };\n\n private _onVideoFeedGetFeedId = (event: NativeSyntheticEvent<any>) => {\n FWLoggerUtil.log(\n `VideoFeed onVideoFeedGetFeedId ${JSON.stringify(event.nativeEvent)}`\n );\n const { onVideoFeedGetFeedId } = this.props;\n\n const { feedId } = event.nativeEvent;\n\n if (onVideoFeedGetFeedId) {\n onVideoFeedGetFeedId(feedId ?? '');\n }\n };\n\n /**\n * @ignore\n */\n componentDidMount() {\n FWLoggerUtil.log(\n `VideoFeed componentDidMount ${JSON.stringify(this.props)}`\n );\n\n if (!this.state.sdkInitCalled) {\n FWGlobalState.getInstance().sdkInitCalledPromise.then(() => {\n this.setState({ sdkInitCalled: true });\n });\n }\n\n const subscriptionOfShareBaseURLUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.ShareBaseURLUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.ShareBaseURLUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfShareBaseURLUpdated);\n\n const subscriptionOfAdBadgeConfigurationUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.AdBadgeConfigurationUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.AdBadgeConfigurationUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfAdBadgeConfigurationUpdated);\n\n const subscriptionOfVideoLaunchBehaviorUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.VideoLaunchBehaviorUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.VideoLaunchBehaviorUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfVideoLaunchBehaviorUpdated);\n\n const subscriptionOfAppLanguageUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.AppLanguageUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.AppLanguageUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfAppLanguageUpdated);\n }\n\n /**\n * @ignore\n */\n componentWillUnmount() {\n FWLoggerUtil.log(\n `VideoFeed componentWillUnmount ${JSON.stringify(this.props)}`\n );\n\n this._subscriptions.forEach((value) => {\n value.remove();\n });\n\n this._subscriptions = [];\n }\n\n /**\n * @ignore\n */\n render() {\n if (!this.state.sdkInitCalled) {\n return null;\n }\n\n const gShareBaseURL = FireworkSDK.getInstance().shareBaseURL;\n const appLanguage = FireworkSDK.getInstance().appLanguage;\n const videoLaunchBehavior = FireworkSDK.getInstance().videoLaunchBehavior;\n const adBadgeConfiguration = FireworkSDK.getInstance().adBadgeConfiguration;\n const adBadgeTextType = adBadgeConfiguration?.badgeTextType;\n const backgroundColorOfAdBadge = adBadgeConfiguration?.backgroundColor;\n const textColorOfAdBadge = adBadgeConfiguration?.textColor;\n const androidFontIsCustomOfAdBadge =\n adBadgeConfiguration?.androidFontInfo?.isCustom?.toString();\n const androidFontTypefaceNameOfAdBadge =\n adBadgeConfiguration?.androidFontInfo?.typefaceName;\n\n const {\n source,\n channel,\n playlist,\n playlistGroup,\n hashtagFilterExpression,\n productIds,\n contentId,\n mode,\n enablePictureInPicture,\n adConfiguration,\n } = this.props;\n const dynamicContentParametersString =\n this._generateDynamicContentParametersString();\n\n const videoFeedConfiguration = this._getVideoFeedConfiguration();\n const cornerRadius = videoFeedConfiguration?.cornerRadius?.toFixed(5);\n\n const titleHidden = videoFeedConfiguration?.title?.hidden?.toString();\n const titleTextColor = videoFeedConfiguration?.title?.textColor;\n const titleFontSize = videoFeedConfiguration?.title?.fontSize?.toFixed(5);\n const titleAndroidFontInfo = videoFeedConfiguration?.title?.androidFontInfo;\n const titleGradientDrawable =\n videoFeedConfiguration?.title?.gradientDrawable;\n const titlePosition = videoFeedConfiguration?.titlePosition;\n const playIconHidden = videoFeedConfiguration?.playIcon?.hidden;\n const playIconWidth =\n videoFeedConfiguration?.playIcon?.iconWidth?.toFixed(5);\n const showAdBadge = videoFeedConfiguration?.showAdBadge?.toString();\n const enableAutoplay = videoFeedConfiguration?.enableAutoplay;\n const gridColumns = videoFeedConfiguration?.gridColumns?.toFixed(5);\n const itemSpacing = videoFeedConfiguration?.itemSpacing?.toFixed(5);\n\n const videoPlayerConfiguration = this._getVideoPlayerConfiguration();\n const playerStyle = videoPlayerConfiguration?.playerStyle;\n const videoCompleteAction = videoPlayerConfiguration?.videoCompleteAction;\n const showShareButton = videoPlayerConfiguration?.showShareButton;\n const showPlaybackButton = videoPlayerConfiguration?.showPlaybackButton;\n const showMuteButton = videoPlayerConfiguration?.showMuteButton;\n const showBranding = videoPlayerConfiguration?.showBranding;\n const ctaDelayType = videoPlayerConfiguration?.ctaDelay?.type;\n const ctaDelayValue = videoPlayerConfiguration?.ctaDelay?.value?.toFixed(5);\n const ctaHighlightDelayType =\n videoPlayerConfiguration?.ctaHighlightDelay?.type;\n const ctaHighlightDelayValue =\n videoPlayerConfiguration?.ctaHighlightDelay?.value?.toFixed(5);\n const shareBaseURL = videoPlayerConfiguration?.shareBaseURL;\n const ctaWidth = videoPlayerConfiguration?.ctaWidth;\n const buttonConfiguration = videoPlayerConfiguration?.buttonConfiguration;\n const videoPlayerLogoConfigurationJsonKey = gennerateJsonKey(\n videoPlayerConfiguration?.videoPlayerLogoConfiguration\n );\n const countdownTimerConfigurationJsonKey = gennerateJsonKey(\n videoPlayerConfiguration?.countdownTimerConfiguration\n );\n const showVideoDetailTitle = videoPlayerConfiguration?.showVideoDetailTitle;\n const requiresAds = adConfiguration?.requiresAds;\n const adsFetchTimeout = adConfiguration?.adsFetchTimeout;\n const vastAttributesString = this._generateVastAttributesString();\n const replayBadgeVideoFeedConfigurationJsonKey = gennerateJsonKey(\n videoFeedConfiguration?.replayBadge\n );\n const replayBadgeVideoPlayerConfigurationJsonKey = gennerateJsonKey(\n videoPlayerConfiguration?.replayBadgeConfiguration\n );\n let key = `gShareBaseURL:${gShareBaseURL}`;\n if (Platform.OS === 'ios') {\n key += `_appLanguage:${appLanguage}`;\n }\n key += `_videoLaunchBehavior:${videoLaunchBehavior}`;\n key += `_adBadgeTextType:${adBadgeTextType}`;\n key += `_backgroundColorOfAdBadge:${backgroundColorOfAdBadge}`;\n key += `_textColorOfAdBadge:${textColorOfAdBadge}`;\n if (Platform.OS === 'android') {\n key += `_androidFontIsCustomOfAdBadge${androidFontIsCustomOfAdBadge}`;\n key += `_androidFontTypefaceNameOfAdBadge${androidFontTypefaceNameOfAdBadge}`;\n }\n\n key += `_source:${source}`;\n key += `_channel:${channel}`;\n key += `_playlist:${playlist}`;\n key += `_playlistGroup:${playlistGroup}`;\n key += `_dynamicContentParameters:${dynamicContentParametersString}`;\n key += `_hashtagFilterExpression:${hashtagFilterExpression}`;\n key += `_productIds:${productIds?.join(',')}`;\n key += `_contentId:${contentId}`;\n key += `_mode:${mode}`;\n key += `_enablePictureInPicture:${enablePictureInPicture}`;\n\n key += `_titleHidden:${titleHidden}`;\n if (Platform.OS === 'android') {\n key += `_cornerRadius:${cornerRadius}`;\n key += `_titleTextColor:${titleTextColor}`;\n key += `_titleFontSize:${titleFontSize}`;\n key += `_titleAndroidFontInfo.isCustom:${titleAndroidFontInfo?.isCustom}`;\n key += `_titleAndroidFontInfo.typefaceName:${titleAndroidFontInfo?.typefaceName}`;\n key += `_titleGradientDrawable.orientation:${titleGradientDrawable?.orientation}`;\n key += `_titleGradientDrawable.colors:${titleGradientDrawable?.colors?.join(\n ','\n )}`;\n key += `_playIconHidden:${playIconHidden}`;\n key += `_playIconWidth:${playIconWidth}`;\n key += `_showAdBadge:${showAdBadge}`;\n }\n\n key += `_titlePosition:${titlePosition}`;\n if (Platform.OS === 'android') {\n key += `_enableAutoplay:${enableAutoplay}`;\n }\n key += `_gridColumns:${gridColumns}`;\n key += `_itemSpacing:${itemSpacing}`;\n\n key += `_shareBaseURL:${shareBaseURL}`;\n if (Platform.OS === 'android') {\n key += `_playerStyle:${playerStyle}`;\n key += `_videoCompleteAction:${videoCompleteAction}`;\n key += `_showShareButton:${showShareButton}`;\n key += `_showPlaybackButton:${showPlaybackButton}`;\n key += `_showMuteButton:${showMuteButton}`;\n key += `_showBranding:${showBranding}`;\n key += `_ctaDelayType:${ctaDelayType}`;\n key += `_ctaDelayValue:${ctaDelayValue}`;\n key += `_ctaHighlightDelayType:${ctaHighlightDelayType}`;\n key += `_ctaHighlightDelayValue:${ctaHighlightDelayValue}`;\n key += `_ctaWidth:${ctaWidth}`;\n key += `_buttonConfiguration.videoDetailButton:${this._generateButtonInfoString(\n buttonConfiguration?.videoDetailButton\n )}`;\n key += `_buttonConfiguration.closeButton:${this._generateButtonInfoString(\n buttonConfiguration?.closeButton\n )}`;\n key += `_buttonConfiguration.muteButton:${this._generateButtonInfoString(\n buttonConfiguration?.muteButton\n )}`;\n key += `_buttonConfiguration.unmuteButton:${this._generateButtonInfoString(\n buttonConfiguration?.unmuteButton\n )}`;\n key += `_buttonConfiguration.playButton:${this._generateButtonInfoString(\n buttonConfiguration?.playButton\n )}`;\n key += `_buttonConfiguration.pauseButton:${this._generateButtonInfoString(\n buttonConfiguration?.pauseButton\n )}`;\n key += `_videoPlayerLogoConfiguration:${videoPlayerLogoConfigurationJsonKey}`;\n key += `_countdownTimerConfiguration:${countdownTimerConfigurationJsonKey}`;\n key += `_showVideoDetailTitle:${showVideoDetailTitle}`;\n }\n\n key += `_requiresAds:${requiresAds}`;\n key += `_adsFetchTimeout:${adsFetchTimeout}`;\n key += `_vastAttributes:${vastAttributesString}`;\n key += `_replayBadgeVideoFeedConfiguration:${replayBadgeVideoFeedConfigurationJsonKey}`;\n key += `_replayBadgeVideoPlayerConfiguration:${replayBadgeVideoPlayerConfigurationJsonKey}`;\n\n console.log('video feed key', key);\n\n return (\n <FWVideoFeed\n key={key}\n {...this.props}\n enablePictureInPicture={undefined}\n videoFeedConfiguration={videoFeedConfiguration}\n videoPlayerConfiguration={videoPlayerConfiguration}\n ref={this._nativeComponentRef}\n onVideoFeedLoadFinished={this._onVideoFeedLoadFinished}\n onVideoFeedEmpty={this._onVideoFeedEmpty}\n onVideoFeedDidStartPictureInPicture={\n this._onVideoFeedDidStartPictureInPicture\n }\n onVideoFeedDidStopPictureInPicture={\n this._onVideoFeedDidStopPictureInPicture\n }\n onVideoFeedGetFeedId={this._onVideoFeedGetFeedId}\n mode={mode ?? 'row'}\n />\n );\n }\n\n private _generateDynamicContentParametersString(): string {\n const { dynamicContentParameters } = this.props;\n if (!dynamicContentParameters) {\n return '';\n }\n\n let resultString = '';\n const sortedKeyList = Object.keys(dynamicContentParameters).sort();\n for (const key of sortedKeyList) {\n const value = dynamicContentParameters[key];\n const valueString = value.join(',');\n if (resultString.length > 0) {\n resultString += '_';\n }\n\n resultString += `${key}:${valueString}`;\n }\n\n return resultString;\n }\n\n private _generateVastAttributesString(): string | undefined {\n const { adConfiguration } = this.props;\n const vastAttributes = adConfiguration?.vastAttributes;\n if (!vastAttributes) {\n return '';\n }\n\n let resultString = '';\n for (const attribute of vastAttributes) {\n if (resultString.length > 0) {\n resultString += '_';\n }\n resultString += `${attribute.name}:${attribute.value}`;\n }\n\n return resultString;\n }\n\n private _generateButtonInfoString(buttonInfo?: ButtonInfo): string {\n return `imageName:${buttonInfo?.imageName}_systemImageName:${buttonInfo?.systemImageName}_tintColor:${buttonInfo?.tintColor}`;\n }\n\n private _getVideoFeedConfiguration(): VideoFeedConfiguration | undefined {\n const { videoFeedConfiguration } = this.props;\n if (!videoFeedConfiguration) {\n return videoFeedConfiguration;\n }\n\n let resultVideoFeedConfiguration = videoFeedConfiguration;\n\n if (\n resultVideoFeedConfiguration.gridColumns &&\n Math.floor(resultVideoFeedConfiguration.gridColumns) !==\n resultVideoFeedConfiguration.gridColumns\n ) {\n const gridColumns = Math.floor(resultVideoFeedConfiguration.gridColumns);\n resultVideoFeedConfiguration = {\n ...resultVideoFeedConfiguration,\n gridColumns,\n };\n }\n\n if (\n resultVideoFeedConfiguration.title &&\n resultVideoFeedConfiguration.title.numberOfLines &&\n Math.floor(resultVideoFeedConfiguration.title.numberOfLines) !==\n resultVideoFeedConfiguration.title.numberOfLines\n ) {\n const numberOfLines = Math.floor(\n resultVideoFeedConfiguration.title.numberOfLines\n );\n resultVideoFeedConfiguration = {\n ...resultVideoFeedConfiguration,\n title: {\n ...resultVideoFeedConfiguration.title,\n numberOfLines,\n },\n };\n }\n\n return resultVideoFeedConfiguration;\n }\n\n private _getVideoPlayerConfiguration():\n | VideoPlayerNativeConfiguration\n | undefined {\n const { videoPlayerConfiguration, enablePictureInPicture } = this.props;\n\n let resultVideoPlayerConfiguration:\n | VideoPlayerNativeConfiguration\n | undefined = videoPlayerConfiguration;\n if (typeof enablePictureInPicture === 'boolean') {\n if (!resultVideoPlayerConfiguration) {\n resultVideoPlayerConfiguration = {};\n }\n resultVideoPlayerConfiguration = {\n ...resultVideoPlayerConfiguration,\n enablePictureInPicture,\n };\n }\n\n return resultVideoPlayerConfiguration;\n }\n}\n\nexport default VideoFeed;\n"]}
|
package/lib/module/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import StoryBlock from './components/StoryBlock';
|
|
2
|
-
import VideoFeed from './components/VideoFeed';
|
|
3
|
-
import FireworkSDK from './FireworkSDK';
|
|
4
1
|
import FWNavigator from './FWNavigator';
|
|
2
|
+
import FireworkSDK from './FireworkSDK';
|
|
5
3
|
import LiveStream from './LiveStream';
|
|
4
|
+
import VideoShopping from './VideoShopping';
|
|
5
|
+
import StoryBlock from './components/StoryBlock';
|
|
6
|
+
import VideoFeed from './components/VideoFeed';
|
|
6
7
|
import LiveStreamChatEventName from './models/LiveStreamChatEventName';
|
|
7
8
|
import LiveStreamEventName from './models/LiveStreamEventName';
|
|
8
9
|
import VideoPlaybackEventName from './models/VideoPlaybackEventName';
|
|
9
10
|
import VideoFeedUtil from './utils/VideoFeedUtil';
|
|
10
|
-
import VideoShopping from './VideoShopping';
|
|
11
11
|
export default FireworkSDK;
|
|
12
|
-
export {
|
|
12
|
+
export { FWNavigator, FireworkSDK, LiveStream, LiveStreamChatEventName, LiveStreamEventName, StoryBlock, VideoFeed, VideoFeedUtil, VideoPlaybackEventName, VideoShopping };
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"names":["
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":["FWNavigator","FireworkSDK","LiveStream","VideoShopping","StoryBlock","VideoFeed","LiveStreamChatEventName","LiveStreamEventName","VideoPlaybackEventName","VideoFeedUtil"],"mappings":"AAAA,OAAOA,WAAP,MAAwB,eAAxB;AAOA,OAAOC,WAAP,MAAwB,eAAxB;AAKA,OAAOC,UAAP,MAAuB,cAAvB;AAQA,OAAOC,aAAP,MAA0B,iBAA1B;AAKA,OAAOC,UAAP,MAAuB,yBAAvB;AAEA,OAAOC,SAAP,MAAsB,wBAAtB;AAgCA,OAAOC,uBAAP,MAAoC,kCAApC;AAEA,OAAOC,mBAAP,MAAgC,8BAAhC;AAsCA,OAAOC,sBAAP,MAAmC,iCAAnC;AAeA,OAAOC,aAAP,MAA0B,uBAA1B;AAEA,eAAeR,WAAf;AAEA,SAiBED,WAjBF,EAmBEC,WAnBF,EA6BEC,UA7BF,EA+BEI,uBA/BF,EAkCEC,mBAlCF,EA6DEH,UA7DF,EAoEEC,SApEF,EA8EEI,aA9EF,EAmFED,sBAnFF,EA+FEL,aA/FF","sourcesContent":["import FWNavigator from './FWNavigator';\nimport type {\n CustomCTAClickCallback,\n SDKInitCallback,\n VideoFeedClickCallback,\n VideoPlaybackCallback,\n} from './FireworkSDK';\nimport FireworkSDK from './FireworkSDK';\nimport type {\n onLiveStreamChatEventCallback,\n onLiveStreamEventCallback,\n} from './LiveStream';\nimport LiveStream from './LiveStream';\nimport type {\n CustomClickCartIconCallback,\n CustomClickLinkButtonCallback,\n CustomTapProductCardCallback,\n ShoppingCTACallback,\n UpdateProductDetailsCallback,\n} from './VideoShopping';\nimport VideoShopping from './VideoShopping';\nimport 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 AdBadgeConfiguration from './models/AdBadgeConfiguration';\nimport type { AdBadgeTextType } from './models/AdBadgeConfiguration';\nimport type AdConfiguration from './models/AdConfiguration';\nimport type { VastAttribute } from './models/AdConfiguration';\nimport type AndroidFontInfo from './models/AndroidFontInfo';\nimport type ButtonInfo from './models/ButtonInfo';\nimport type CountdownTimerConfiguration from './models/CountdownTimerConfiguration';\nimport type { CountdownTimerAppearanceMode } from './models/CountdownTimerConfiguration';\nimport type FWError from './models/FWError';\nimport type {\n CustomCTAClickEvent,\n CustomClickCartIconEvent,\n CustomClickLinkButtonEvent,\n CustomTapProductCardEvent,\n LiveStreamChatEvent,\n LiveStreamEvent,\n PlayerHandler,\n SDKInitEvent,\n ShoppingCTAEvent,\n UpdateProductDetailsEvent,\n VideoFeedClickEvent,\n VideoPlaybackEvent,\n} from './models/FWEvents';\nimport type FeedItemDetails from './models/FeedItemDetails';\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 ProductCardCTAButtonStyle,\n ProductCardCTAButtonText,\n ProductCardConfiguration,\n ProductCardIconConfiguration,\n ProductCardLabelConfiguration,\n ProductCardPriceConfiguration,\n ProductCardPriceLabelAxis,\n ProductCardTheme,\n ShoppingCTAButtonConfiguration,\n ShoppingCTAButtonText,\n} from './models/ProductInfoViewConfiguration';\nimport type ProductUnit from './models/ProductUnit';\nimport type { ProductPrice, ProductUnitOption } from './models/ProductUnit';\nimport type PushRNContainerParams from './models/PushRNContainerParams';\nimport type { RNAppProps } from './models/PushRNContainerParams';\nimport type SDKInitOptions from './models/SDKInitOptions';\nimport type { VideoLaunchBehavior } from './models/SDKInitOptions';\nimport type ShoppingCTAResult from './models/ShoppingCTAResult';\nimport type { StoryBlockConfiguration } from './models/StoryBlockConfiguration';\nimport type { StoryBlockSource } from './models/StoryBlockSource';\nimport type TrackPurchaseParameters from './models/TrackPurchaseParameters';\nimport type VideoFeedConfiguration from './models/VideoFeedConfiguration';\nimport type {\n VideoFeedPadding,\n VideoFeedPlayIconConfiguration,\n VideoFeedTitleConfiguration,\n VideoFeedTitlePosition,\n} from './models/VideoFeedConfiguration';\nimport type { VideoFeedSource } from './models/VideoFeedSource';\nimport type VideoPlaybackDetails from './models/VideoPlaybackDetails';\nimport type { VideoPlayerSize } from './models/VideoPlaybackDetails';\nimport VideoPlaybackEventName from './models/VideoPlaybackEventName';\nimport type VideoPlayerButtonConfiguration from './models/VideoPlayerButtonConfiguration';\nimport type {\n VideoPlayerCTADelay,\n VideoPlayerCTADelayType,\n} from './models/VideoPlayerCTADelay';\nimport type { VideoPlayerCTAStyle } from './models/VideoPlayerCTAStyle';\nimport type { VideoPlayerCTAWidth } from './models/VideoPlayerCTAWidth';\nimport type { VideoPlayerCompleteAction } from './models/VideoPlayerCompleteAction';\nimport type VideoPlayerConfiguration from './models/VideoPlayerConfiguration';\nimport type {\n VideoPlayerLogoConfiguration,\n VideoPlayerLogoOption,\n} from './models/VideoPlayerLogoConfiguration';\nimport type { VideoPlayerStyle } from './models/VideoPlayerStyle';\nimport VideoFeedUtil from './utils/VideoFeedUtil';\n\nexport default FireworkSDK;\n\nexport {\n AdBadgeConfiguration,\n AdBadgeTextType,\n AdConfiguration,\n AndroidFontInfo,\n ButtonInfo,\n CountdownTimerAppearanceMode,\n CountdownTimerConfiguration,\n CustomCTAClickCallback,\n CustomCTAClickEvent,\n CustomClickCartIconCallback,\n CustomClickCartIconEvent,\n CustomClickLinkButtonCallback,\n CustomClickLinkButtonEvent,\n CustomTapProductCardCallback,\n CustomTapProductCardEvent,\n FWError,\n FWNavigator,\n FeedItemDetails,\n FireworkSDK,\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 OpenVideoPlayerConfiguration,\n PlayerHandler,\n Product,\n ProductCardCTAButtonStyle,\n ProductCardCTAButtonText,\n ProductCardConfiguration,\n ProductCardIconConfiguration,\n ProductCardLabelConfiguration,\n ProductCardPriceConfiguration,\n ProductCardPriceLabelAxis,\n ProductCardTheme,\n ProductInfoViewConfiguration,\n ProductPrice,\n ProductUnit,\n ProductUnitOption,\n PushRNContainerParams,\n RNAppProps,\n SDKInitCallback,\n SDKInitEvent,\n SDKInitOptions,\n ShoppingCTAButtonConfiguration,\n ShoppingCTAButtonText,\n ShoppingCTACallback,\n ShoppingCTAEvent,\n ShoppingCTAResult,\n StoryBlock,\n StoryBlockConfiguration,\n StoryBlockSource,\n TrackPurchaseParameters,\n UpdateProductDetailsCallback,\n UpdateProductDetailsEvent,\n VastAttribute,\n VideoFeed,\n VideoFeedClickCallback,\n VideoFeedClickEvent,\n VideoFeedConfiguration,\n VideoFeedMode,\n VideoFeedPadding,\n VideoFeedPlayIconConfiguration,\n VideoFeedSource,\n VideoFeedTitleConfiguration,\n VideoFeedTitlePosition,\n VideoFeedUtil,\n VideoLaunchBehavior,\n VideoPlaybackCallback,\n VideoPlaybackDetails,\n VideoPlaybackEvent,\n VideoPlaybackEventName,\n VideoPlayerButtonConfiguration,\n VideoPlayerCTADelay,\n VideoPlayerCTADelayType,\n VideoPlayerCTAStyle,\n VideoPlayerCTAWidth,\n VideoPlayerCompleteAction,\n VideoPlayerConfiguration,\n VideoPlayerLogoConfiguration,\n VideoPlayerLogoOption,\n VideoPlayerSize,\n VideoPlayerStyle,\n VideoShopping,\n onLiveStreamChatEventCallback,\n onLiveStreamEventCallback,\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
|
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import StoryBlock from './components/StoryBlock';
|
|
3
|
-
import type { IVideoFeedProps, VideoFeedMode } from './components/VideoFeed';
|
|
4
|
-
import VideoFeed from './components/VideoFeed';
|
|
1
|
+
import FWNavigator from './FWNavigator';
|
|
5
2
|
import type { CustomCTAClickCallback, SDKInitCallback, VideoFeedClickCallback, VideoPlaybackCallback } from './FireworkSDK';
|
|
6
3
|
import FireworkSDK from './FireworkSDK';
|
|
7
|
-
import FWNavigator from './FWNavigator';
|
|
8
4
|
import type { onLiveStreamChatEventCallback, onLiveStreamEventCallback } from './LiveStream';
|
|
9
5
|
import LiveStream from './LiveStream';
|
|
6
|
+
import type { CustomClickCartIconCallback, CustomClickLinkButtonCallback, CustomTapProductCardCallback, ShoppingCTACallback, UpdateProductDetailsCallback } from './VideoShopping';
|
|
7
|
+
import VideoShopping from './VideoShopping';
|
|
8
|
+
import type { IStoryBlockMethods, IStoryBlockProps } from './components/StoryBlock';
|
|
9
|
+
import StoryBlock from './components/StoryBlock';
|
|
10
|
+
import type { IVideoFeedProps, VideoFeedMode } from './components/VideoFeed';
|
|
11
|
+
import VideoFeed from './components/VideoFeed';
|
|
10
12
|
import type AdBadgeConfiguration from './models/AdBadgeConfiguration';
|
|
11
13
|
import type { AdBadgeTextType } from './models/AdBadgeConfiguration';
|
|
12
14
|
import type AdConfiguration from './models/AdConfiguration';
|
|
13
15
|
import type { VastAttribute } from './models/AdConfiguration';
|
|
14
16
|
import type AndroidFontInfo from './models/AndroidFontInfo';
|
|
15
17
|
import type ButtonInfo from './models/ButtonInfo';
|
|
16
|
-
import type
|
|
18
|
+
import type CountdownTimerConfiguration from './models/CountdownTimerConfiguration';
|
|
19
|
+
import type { CountdownTimerAppearanceMode } from './models/CountdownTimerConfiguration';
|
|
17
20
|
import type FWError from './models/FWError';
|
|
18
|
-
import type { CustomClickCartIconEvent, CustomClickLinkButtonEvent,
|
|
21
|
+
import type { CustomCTAClickEvent, CustomClickCartIconEvent, CustomClickLinkButtonEvent, CustomTapProductCardEvent, LiveStreamChatEvent, LiveStreamEvent, PlayerHandler, SDKInitEvent, ShoppingCTAEvent, UpdateProductDetailsEvent, VideoFeedClickEvent, VideoPlaybackEvent } from './models/FWEvents';
|
|
22
|
+
import type FeedItemDetails from './models/FeedItemDetails';
|
|
19
23
|
import type GradientDrawable from './models/GradientDrawable';
|
|
20
24
|
import type { GradientDrawableOrientation } from './models/GradientDrawable';
|
|
21
25
|
import type IOSFontInfo from './models/IOSFontInfo';
|
|
@@ -27,7 +31,7 @@ import type LiveStreamMessageDetails from './models/LiveStreamMessageDetails';
|
|
|
27
31
|
import type OpenVideoPlayerConfiguration from './models/OpenVideoPlayerConfiguration';
|
|
28
32
|
import type Product from './models/Product';
|
|
29
33
|
import type ProductInfoViewConfiguration from './models/ProductInfoViewConfiguration';
|
|
30
|
-
import type { LinkButtonConfiguration,
|
|
34
|
+
import type { LinkButtonConfiguration, ProductCardCTAButtonStyle, ProductCardCTAButtonText, ProductCardConfiguration, ProductCardIconConfiguration, ProductCardLabelConfiguration, ProductCardPriceConfiguration, ProductCardPriceLabelAxis, ProductCardTheme, ShoppingCTAButtonConfiguration, ShoppingCTAButtonText } from './models/ProductInfoViewConfiguration';
|
|
31
35
|
import type ProductUnit from './models/ProductUnit';
|
|
32
36
|
import type { ProductPrice, ProductUnitOption } from './models/ProductUnit';
|
|
33
37
|
import type PushRNContainerParams from './models/PushRNContainerParams';
|
|
@@ -45,15 +49,13 @@ import type VideoPlaybackDetails from './models/VideoPlaybackDetails';
|
|
|
45
49
|
import type { VideoPlayerSize } from './models/VideoPlaybackDetails';
|
|
46
50
|
import VideoPlaybackEventName from './models/VideoPlaybackEventName';
|
|
47
51
|
import type VideoPlayerButtonConfiguration from './models/VideoPlayerButtonConfiguration';
|
|
48
|
-
import type { VideoPlayerCompleteAction } from './models/VideoPlayerCompleteAction';
|
|
49
|
-
import type VideoPlayerConfiguration from './models/VideoPlayerConfiguration';
|
|
50
52
|
import type { VideoPlayerCTADelay, VideoPlayerCTADelayType } from './models/VideoPlayerCTADelay';
|
|
51
53
|
import type { VideoPlayerCTAStyle } from './models/VideoPlayerCTAStyle';
|
|
52
54
|
import type { VideoPlayerCTAWidth } from './models/VideoPlayerCTAWidth';
|
|
55
|
+
import type { VideoPlayerCompleteAction } from './models/VideoPlayerCompleteAction';
|
|
56
|
+
import type VideoPlayerConfiguration from './models/VideoPlayerConfiguration';
|
|
53
57
|
import type { VideoPlayerLogoConfiguration, VideoPlayerLogoOption } from './models/VideoPlayerLogoConfiguration';
|
|
54
58
|
import type { VideoPlayerStyle } from './models/VideoPlayerStyle';
|
|
55
59
|
import VideoFeedUtil from './utils/VideoFeedUtil';
|
|
56
|
-
import type { CustomClickCartIconCallback, CustomClickLinkButtonCallback, CustomTapProductCardCallback, ShoppingCTACallback, UpdateProductDetailsCallback } from './VideoShopping';
|
|
57
|
-
import VideoShopping from './VideoShopping';
|
|
58
60
|
export default FireworkSDK;
|
|
59
|
-
export { AdBadgeConfiguration, AdBadgeTextType, AdConfiguration, AndroidFontInfo, ButtonInfo, CustomClickCartIconCallback, CustomClickCartIconEvent, CustomClickLinkButtonCallback, CustomClickLinkButtonEvent,
|
|
61
|
+
export { AdBadgeConfiguration, AdBadgeTextType, AdConfiguration, AndroidFontInfo, ButtonInfo, CountdownTimerAppearanceMode, CountdownTimerConfiguration, CustomCTAClickCallback, CustomCTAClickEvent, CustomClickCartIconCallback, CustomClickCartIconEvent, CustomClickLinkButtonCallback, CustomClickLinkButtonEvent, CustomTapProductCardCallback, CustomTapProductCardEvent, FWError, FWNavigator, FeedItemDetails, FireworkSDK, GradientDrawable, GradientDrawableOrientation, IOSFontInfo, IOSSystemFontStyle, IOSSystemFontWeight, IStoryBlockMethods, IStoryBlockProps, IVideoFeedProps, LinkButtonConfiguration, LiveStream, LiveStreamChatEvent, LiveStreamChatEventName, LiveStreamEvent, LiveStreamEventDetails, LiveStreamEventName, LiveStreamMessageDetails, OpenVideoPlayerConfiguration, PlayerHandler, Product, ProductCardCTAButtonStyle, ProductCardCTAButtonText, ProductCardConfiguration, ProductCardIconConfiguration, ProductCardLabelConfiguration, ProductCardPriceConfiguration, ProductCardPriceLabelAxis, ProductCardTheme, ProductInfoViewConfiguration, ProductPrice, ProductUnit, ProductUnitOption, PushRNContainerParams, RNAppProps, SDKInitCallback, SDKInitEvent, SDKInitOptions, ShoppingCTAButtonConfiguration, ShoppingCTAButtonText, ShoppingCTACallback, ShoppingCTAEvent, ShoppingCTAResult, StoryBlock, StoryBlockConfiguration, StoryBlockSource, TrackPurchaseParameters, UpdateProductDetailsCallback, UpdateProductDetailsEvent, VastAttribute, VideoFeed, VideoFeedClickCallback, VideoFeedClickEvent, VideoFeedConfiguration, VideoFeedMode, VideoFeedPadding, VideoFeedPlayIconConfiguration, VideoFeedSource, VideoFeedTitleConfiguration, VideoFeedTitlePosition, VideoFeedUtil, VideoLaunchBehavior, VideoPlaybackCallback, VideoPlaybackDetails, VideoPlaybackEvent, VideoPlaybackEventName, VideoPlayerButtonConfiguration, VideoPlayerCTADelay, VideoPlayerCTADelayType, VideoPlayerCTAStyle, VideoPlayerCTAWidth, VideoPlayerCompleteAction, VideoPlayerConfiguration, VideoPlayerLogoConfiguration, VideoPlayerLogoOption, VideoPlayerSize, VideoPlayerStyle, VideoShopping, onLiveStreamChatEventCallback, onLiveStreamEventCallback, };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type CountdownTimerAppearanceMode = 'light' | 'dark';
|
|
2
|
+
export default interface CountdownTimerConfiguration {
|
|
3
|
+
/**
|
|
4
|
+
* Specifies if the countdown timer should be hidden.
|
|
5
|
+
*/
|
|
6
|
+
isHidden?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Specifies the appearance of the countdown timer.
|
|
9
|
+
* Only supported on iOS.
|
|
10
|
+
*/
|
|
11
|
+
appearance?: CountdownTimerAppearanceMode;
|
|
12
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type CountdownTimerConfiguration from './CountdownTimerConfiguration';
|
|
1
2
|
import type { ReplayBadgeConfiguration } from './ReplayBadgeConfiguration';
|
|
2
3
|
import type VideoPlayerButtonConfiguration from './VideoPlayerButtonConfiguration';
|
|
3
4
|
import type { VideoPlayerCTADelay } from './VideoPlayerCTADelay';
|
|
@@ -80,4 +81,10 @@ export interface StoryBlockConfiguration {
|
|
|
80
81
|
* Only supported on iOS.
|
|
81
82
|
*/
|
|
82
83
|
replayBadgeConfiguration?: ReplayBadgeConfiguration;
|
|
84
|
+
/**
|
|
85
|
+
* Specifies countdown timer configuration.
|
|
86
|
+
* On iOS, the property applies to full-screen and compact story block.
|
|
87
|
+
* On Android, the property only applies to compact story block.
|
|
88
|
+
*/
|
|
89
|
+
countdownTimerConfiguration?: CountdownTimerConfiguration;
|
|
83
90
|
}
|
|
@@ -6,6 +6,7 @@ import type { VideoPlayerCompleteAction } from './VideoPlayerCompleteAction';
|
|
|
6
6
|
import type { VideoPlayerStyle } from './VideoPlayerStyle';
|
|
7
7
|
import type { VideoPlayerLogoConfiguration } from './VideoPlayerLogoConfiguration';
|
|
8
8
|
import type { ReplayBadgeConfiguration } from './ReplayBadgeConfiguration';
|
|
9
|
+
import type CountdownTimerConfiguration from './CountdownTimerConfiguration';
|
|
9
10
|
export default interface VideoPlayerConfiguration {
|
|
10
11
|
/**
|
|
11
12
|
* Sets the proportion of the video player to its container.
|
|
@@ -78,4 +79,9 @@ export default interface VideoPlayerConfiguration {
|
|
|
78
79
|
* Only supported on iOS.
|
|
79
80
|
*/
|
|
80
81
|
replayBadgeConfiguration?: ReplayBadgeConfiguration;
|
|
82
|
+
/**
|
|
83
|
+
* Specifies countdown timer configuration.
|
|
84
|
+
* Only supported on iOS.
|
|
85
|
+
*/
|
|
86
|
+
countdownTimerConfiguration?: CountdownTimerConfiguration;
|
|
81
87
|
}
|
package/package.json
CHANGED
|
@@ -375,6 +375,9 @@ const StoryBlock: ForwardRefRenderFunction<
|
|
|
375
375
|
const replayBadgeConfigurationJsonKey = gennerateJsonKey(
|
|
376
376
|
storyBlockConfiguration?.replayBadgeConfiguration
|
|
377
377
|
);
|
|
378
|
+
const countdownTimerConfigurationJsonKey = gennerateJsonKey(
|
|
379
|
+
storyBlockConfiguration?.countdownTimerConfiguration
|
|
380
|
+
);
|
|
378
381
|
|
|
379
382
|
let key = `gShareBaseURL:${gShareBaseURL}`;
|
|
380
383
|
if (Platform.OS === 'ios') {
|
|
@@ -439,6 +442,7 @@ const StoryBlock: ForwardRefRenderFunction<
|
|
|
439
442
|
key += `_vastAttributes:${vastAttributesString}`;
|
|
440
443
|
key += `_productInfoViewConfiguration:${productInfoViewConfigurationJsonKey}`;
|
|
441
444
|
key += `_replayBadgeConfiguration:${replayBadgeConfigurationJsonKey}`;
|
|
445
|
+
key += `_countdownTimerConfiguration:${countdownTimerConfigurationJsonKey}`;
|
|
442
446
|
|
|
443
447
|
return key;
|
|
444
448
|
};
|
|
@@ -421,6 +421,9 @@ class VideoFeed extends React.Component<IVideoFeedProps, IVideoFeedState> {
|
|
|
421
421
|
const videoPlayerLogoConfigurationJsonKey = gennerateJsonKey(
|
|
422
422
|
videoPlayerConfiguration?.videoPlayerLogoConfiguration
|
|
423
423
|
);
|
|
424
|
+
const countdownTimerConfigurationJsonKey = gennerateJsonKey(
|
|
425
|
+
videoPlayerConfiguration?.countdownTimerConfiguration
|
|
426
|
+
);
|
|
424
427
|
const showVideoDetailTitle = videoPlayerConfiguration?.showVideoDetailTitle;
|
|
425
428
|
const requiresAds = adConfiguration?.requiresAds;
|
|
426
429
|
const adsFetchTimeout = adConfiguration?.adsFetchTimeout;
|
|
@@ -510,6 +513,7 @@ class VideoFeed extends React.Component<IVideoFeedProps, IVideoFeedState> {
|
|
|
510
513
|
buttonConfiguration?.pauseButton
|
|
511
514
|
)}`;
|
|
512
515
|
key += `_videoPlayerLogoConfiguration:${videoPlayerLogoConfigurationJsonKey}`;
|
|
516
|
+
key += `_countdownTimerConfiguration:${countdownTimerConfigurationJsonKey}`;
|
|
513
517
|
key += `_showVideoDetailTitle:${showVideoDetailTitle}`;
|
|
514
518
|
}
|
|
515
519
|
|
package/src/index.ts
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
IStoryBlockMethods,
|
|
3
|
-
IStoryBlockProps,
|
|
4
|
-
} from './components/StoryBlock';
|
|
5
|
-
import StoryBlock from './components/StoryBlock';
|
|
6
|
-
import type { IVideoFeedProps, VideoFeedMode } from './components/VideoFeed';
|
|
7
|
-
import VideoFeed from './components/VideoFeed';
|
|
1
|
+
import FWNavigator from './FWNavigator';
|
|
8
2
|
import type {
|
|
9
3
|
CustomCTAClickCallback,
|
|
10
4
|
SDKInitCallback,
|
|
@@ -12,24 +6,39 @@ import type {
|
|
|
12
6
|
VideoPlaybackCallback,
|
|
13
7
|
} from './FireworkSDK';
|
|
14
8
|
import FireworkSDK from './FireworkSDK';
|
|
15
|
-
import FWNavigator from './FWNavigator';
|
|
16
9
|
import type {
|
|
17
10
|
onLiveStreamChatEventCallback,
|
|
18
11
|
onLiveStreamEventCallback,
|
|
19
12
|
} from './LiveStream';
|
|
20
13
|
import LiveStream from './LiveStream';
|
|
14
|
+
import type {
|
|
15
|
+
CustomClickCartIconCallback,
|
|
16
|
+
CustomClickLinkButtonCallback,
|
|
17
|
+
CustomTapProductCardCallback,
|
|
18
|
+
ShoppingCTACallback,
|
|
19
|
+
UpdateProductDetailsCallback,
|
|
20
|
+
} from './VideoShopping';
|
|
21
|
+
import VideoShopping from './VideoShopping';
|
|
22
|
+
import type {
|
|
23
|
+
IStoryBlockMethods,
|
|
24
|
+
IStoryBlockProps,
|
|
25
|
+
} from './components/StoryBlock';
|
|
26
|
+
import StoryBlock from './components/StoryBlock';
|
|
27
|
+
import type { IVideoFeedProps, VideoFeedMode } from './components/VideoFeed';
|
|
28
|
+
import VideoFeed from './components/VideoFeed';
|
|
21
29
|
import type AdBadgeConfiguration from './models/AdBadgeConfiguration';
|
|
22
30
|
import type { AdBadgeTextType } from './models/AdBadgeConfiguration';
|
|
23
31
|
import type AdConfiguration from './models/AdConfiguration';
|
|
24
32
|
import type { VastAttribute } from './models/AdConfiguration';
|
|
25
33
|
import type AndroidFontInfo from './models/AndroidFontInfo';
|
|
26
34
|
import type ButtonInfo from './models/ButtonInfo';
|
|
27
|
-
import type
|
|
35
|
+
import type CountdownTimerConfiguration from './models/CountdownTimerConfiguration';
|
|
36
|
+
import type { CountdownTimerAppearanceMode } from './models/CountdownTimerConfiguration';
|
|
28
37
|
import type FWError from './models/FWError';
|
|
29
38
|
import type {
|
|
39
|
+
CustomCTAClickEvent,
|
|
30
40
|
CustomClickCartIconEvent,
|
|
31
41
|
CustomClickLinkButtonEvent,
|
|
32
|
-
CustomCTAClickEvent,
|
|
33
42
|
CustomTapProductCardEvent,
|
|
34
43
|
LiveStreamChatEvent,
|
|
35
44
|
LiveStreamEvent,
|
|
@@ -40,6 +49,7 @@ import type {
|
|
|
40
49
|
VideoFeedClickEvent,
|
|
41
50
|
VideoPlaybackEvent,
|
|
42
51
|
} from './models/FWEvents';
|
|
52
|
+
import type FeedItemDetails from './models/FeedItemDetails';
|
|
43
53
|
import type GradientDrawable from './models/GradientDrawable';
|
|
44
54
|
import type { GradientDrawableOrientation } from './models/GradientDrawable';
|
|
45
55
|
import type IOSFontInfo from './models/IOSFontInfo';
|
|
@@ -56,9 +66,9 @@ import type Product from './models/Product';
|
|
|
56
66
|
import type ProductInfoViewConfiguration from './models/ProductInfoViewConfiguration';
|
|
57
67
|
import type {
|
|
58
68
|
LinkButtonConfiguration,
|
|
59
|
-
ProductCardConfiguration,
|
|
60
69
|
ProductCardCTAButtonStyle,
|
|
61
70
|
ProductCardCTAButtonText,
|
|
71
|
+
ProductCardConfiguration,
|
|
62
72
|
ProductCardIconConfiguration,
|
|
63
73
|
ProductCardLabelConfiguration,
|
|
64
74
|
ProductCardPriceConfiguration,
|
|
@@ -89,28 +99,20 @@ import type VideoPlaybackDetails from './models/VideoPlaybackDetails';
|
|
|
89
99
|
import type { VideoPlayerSize } from './models/VideoPlaybackDetails';
|
|
90
100
|
import VideoPlaybackEventName from './models/VideoPlaybackEventName';
|
|
91
101
|
import type VideoPlayerButtonConfiguration from './models/VideoPlayerButtonConfiguration';
|
|
92
|
-
import type { VideoPlayerCompleteAction } from './models/VideoPlayerCompleteAction';
|
|
93
|
-
import type VideoPlayerConfiguration from './models/VideoPlayerConfiguration';
|
|
94
102
|
import type {
|
|
95
103
|
VideoPlayerCTADelay,
|
|
96
104
|
VideoPlayerCTADelayType,
|
|
97
105
|
} from './models/VideoPlayerCTADelay';
|
|
98
106
|
import type { VideoPlayerCTAStyle } from './models/VideoPlayerCTAStyle';
|
|
99
107
|
import type { VideoPlayerCTAWidth } from './models/VideoPlayerCTAWidth';
|
|
108
|
+
import type { VideoPlayerCompleteAction } from './models/VideoPlayerCompleteAction';
|
|
109
|
+
import type VideoPlayerConfiguration from './models/VideoPlayerConfiguration';
|
|
100
110
|
import type {
|
|
101
111
|
VideoPlayerLogoConfiguration,
|
|
102
112
|
VideoPlayerLogoOption,
|
|
103
113
|
} from './models/VideoPlayerLogoConfiguration';
|
|
104
114
|
import type { VideoPlayerStyle } from './models/VideoPlayerStyle';
|
|
105
115
|
import VideoFeedUtil from './utils/VideoFeedUtil';
|
|
106
|
-
import type {
|
|
107
|
-
CustomClickCartIconCallback,
|
|
108
|
-
CustomClickLinkButtonCallback,
|
|
109
|
-
CustomTapProductCardCallback,
|
|
110
|
-
ShoppingCTACallback,
|
|
111
|
-
UpdateProductDetailsCallback,
|
|
112
|
-
} from './VideoShopping';
|
|
113
|
-
import VideoShopping from './VideoShopping';
|
|
114
116
|
|
|
115
117
|
export default FireworkSDK;
|
|
116
118
|
|
|
@@ -120,18 +122,20 @@ export {
|
|
|
120
122
|
AdConfiguration,
|
|
121
123
|
AndroidFontInfo,
|
|
122
124
|
ButtonInfo,
|
|
125
|
+
CountdownTimerAppearanceMode,
|
|
126
|
+
CountdownTimerConfiguration,
|
|
127
|
+
CustomCTAClickCallback,
|
|
128
|
+
CustomCTAClickEvent,
|
|
123
129
|
CustomClickCartIconCallback,
|
|
124
130
|
CustomClickCartIconEvent,
|
|
125
131
|
CustomClickLinkButtonCallback,
|
|
126
132
|
CustomClickLinkButtonEvent,
|
|
127
|
-
CustomCTAClickCallback,
|
|
128
|
-
CustomCTAClickEvent,
|
|
129
133
|
CustomTapProductCardCallback,
|
|
130
134
|
CustomTapProductCardEvent,
|
|
131
|
-
FeedItemDetails,
|
|
132
|
-
FireworkSDK,
|
|
133
135
|
FWError,
|
|
134
136
|
FWNavigator,
|
|
137
|
+
FeedItemDetails,
|
|
138
|
+
FireworkSDK,
|
|
135
139
|
GradientDrawable,
|
|
136
140
|
GradientDrawableOrientation,
|
|
137
141
|
IOSFontInfo,
|
|
@@ -148,14 +152,12 @@ export {
|
|
|
148
152
|
LiveStreamEventDetails,
|
|
149
153
|
LiveStreamEventName,
|
|
150
154
|
LiveStreamMessageDetails,
|
|
151
|
-
onLiveStreamChatEventCallback,
|
|
152
|
-
onLiveStreamEventCallback,
|
|
153
155
|
OpenVideoPlayerConfiguration,
|
|
154
156
|
PlayerHandler,
|
|
155
157
|
Product,
|
|
156
|
-
ProductCardConfiguration,
|
|
157
158
|
ProductCardCTAButtonStyle,
|
|
158
159
|
ProductCardCTAButtonText,
|
|
160
|
+
ProductCardConfiguration,
|
|
159
161
|
ProductCardIconConfiguration,
|
|
160
162
|
ProductCardLabelConfiguration,
|
|
161
163
|
ProductCardPriceConfiguration,
|
|
@@ -199,15 +201,17 @@ export {
|
|
|
199
201
|
VideoPlaybackEvent,
|
|
200
202
|
VideoPlaybackEventName,
|
|
201
203
|
VideoPlayerButtonConfiguration,
|
|
202
|
-
VideoPlayerCompleteAction,
|
|
203
|
-
VideoPlayerConfiguration,
|
|
204
204
|
VideoPlayerCTADelay,
|
|
205
205
|
VideoPlayerCTADelayType,
|
|
206
206
|
VideoPlayerCTAStyle,
|
|
207
207
|
VideoPlayerCTAWidth,
|
|
208
|
+
VideoPlayerCompleteAction,
|
|
209
|
+
VideoPlayerConfiguration,
|
|
208
210
|
VideoPlayerLogoConfiguration,
|
|
209
211
|
VideoPlayerLogoOption,
|
|
210
212
|
VideoPlayerSize,
|
|
211
213
|
VideoPlayerStyle,
|
|
212
214
|
VideoShopping,
|
|
215
|
+
onLiveStreamChatEventCallback,
|
|
216
|
+
onLiveStreamEventCallback,
|
|
213
217
|
};
|