react-native-firework-sdk 2.7.1 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/FireworkVideoUI.xcframework/Info.plist +5 -5
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/FireworkVideoUI +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Info.plist +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64_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/_CodeSignature/CodeResources +1 -1
- package/ios/Components/StoryBlock.swift +86 -6
- package/ios/Components/StoryBlockConfiguration.swift +1 -0
- package/ios/Components/StoryBlockManager.m +4 -0
- package/ios/Components/VideoFeed.swift +90 -13
- package/ios/Components/VideoFeedManager.m +4 -0
- package/ios/Components/VideoPlayerConfiguration.swift +1 -0
- package/ios/Components/VideoPlayerLogoConfiguration.swift +18 -0
- package/ios/FireworkVideoUI/Podfile +1 -1
- package/ios/FireworkVideoUI/Podfile.lock +4 -4
- package/ios/Modules/FWNavigatorModule/FWNavigatorModule.swift +71 -8
- package/ios/Modules/FWNavigatorModule/FWRNPresentContainerViewController.swift +30 -0
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule+CTA.swift +23 -2
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule.m +2 -0
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule.swift +3 -0
- package/ios/Modules/Shopping/ProductInfoViewConfiguration.swift +41 -8
- package/ios/Modules/Shopping/ShoppingModule.m +2 -0
- package/ios/Modules/Shopping/ShoppingModule.swift +163 -2
- package/lib/commonjs/FireworkSDK.js +16 -0
- package/lib/commonjs/FireworkSDK.js.map +1 -1
- package/lib/commonjs/VideoShopping.js +21 -1
- package/lib/commonjs/VideoShopping.js.map +1 -1
- package/lib/commonjs/components/StoryBlock.js +71 -0
- package/lib/commonjs/components/StoryBlock.js.map +1 -1
- package/lib/commonjs/components/VideoFeed.js +76 -1
- package/lib/commonjs/components/VideoFeed.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/VideoPlayerLogoConfiguration.js +2 -0
- package/lib/commonjs/models/VideoPlayerLogoConfiguration.js.map +1 -0
- package/lib/commonjs/modules/FireworkSDKModule.js.map +1 -1
- package/lib/commonjs/modules/ShoppingModule.js.map +1 -1
- package/lib/module/FireworkSDK.js +15 -0
- package/lib/module/FireworkSDK.js.map +1 -1
- package/lib/module/VideoShopping.js +22 -1
- package/lib/module/VideoShopping.js.map +1 -1
- package/lib/module/components/StoryBlock.js +69 -0
- package/lib/module/components/StoryBlock.js.map +1 -1
- package/lib/module/components/VideoFeed.js +74 -1
- package/lib/module/components/VideoFeed.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/VideoPlayerLogoConfiguration.js +2 -0
- package/lib/module/models/VideoPlayerLogoConfiguration.js.map +1 -0
- package/lib/module/modules/FireworkSDKModule.js.map +1 -1
- package/lib/module/modules/ShoppingModule.js.map +1 -1
- package/lib/typescript/components/StoryBlock.d.ts +12 -1
- package/lib/typescript/components/VideoFeed.d.ts +12 -1
- package/lib/typescript/index.d.ts +3 -2
- package/lib/typescript/models/FWEvents.d.ts +21 -0
- package/lib/typescript/models/ProductInfoViewConfiguration.d.ts +110 -5
- package/lib/typescript/models/StoryBlockConfiguration.d.ts +7 -0
- package/lib/typescript/models/VideoPlayerConfiguration.d.ts +7 -0
- package/lib/typescript/models/VideoPlayerLogoConfiguration.d.ts +15 -0
- package/lib/typescript/modules/FireworkSDKModule.d.ts +2 -0
- package/lib/typescript/modules/ShoppingModule.d.ts +2 -0
- package/package.json +1 -1
- package/react-native-firework-sdk.podspec +1 -1
- package/src/FireworkSDK.ts +16 -0
- package/src/VideoShopping.ts +18 -1
- package/src/components/StoryBlock.tsx +92 -3
- package/src/components/VideoFeed.tsx +93 -2
- package/src/index.ts +14 -0
- package/src/models/FWEvents.ts +24 -0
- package/src/models/ProductInfoViewConfiguration.ts +114 -5
- package/src/models/StoryBlockConfiguration.ts +7 -0
- package/src/models/VideoPlayerConfiguration.ts +7 -0
- package/src/models/VideoPlayerLogoConfiguration.ts +23 -0
- package/src/modules/FireworkSDKModule.ts +2 -0
- package/src/modules/ShoppingModule.ts +2 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["VideoFeed.tsx"],"names":["React","findNodeHandle","Platform","UIManager","FireworkSDK","FWEventName","FireworkSDKModuleEventEmitter","FWGlobalState","FWLoggerUtil","FWVideoFeed","NativeComponentName","VideoFeed","Component","constructor","props","createRef","log","JSON","stringify","nativeNodeHandle","_nativeComponentRef","current","commandId","getViewManagerConfig","Commands","refresh","OS","toString","dispatchViewManagerCommand","event","nativeEvent","onVideoFeedLoadFinished","name","reason","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","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,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAEEC,cAFF,EAIEC,QAJF,EAMEC,SANF,QAQO,cARP;AAUA,OAAOC,WAAP,MAAwB,gBAAxB;AAGA,SAASC,WAAT,QAA4B,uBAA5B;AAIA,SAASC,6BAAT,QAA8C,8BAA9C;AACA,OAAOC,aAAP,MAA0B,wBAA1B;AACA,OAAOC,YAAP,MAAyB,uBAAzB;AACA,OAAOC,WAAP,MAAwB,eAAxB;AAgFA,MAAMC,mBAAmB,GAAG,aAA5B;AAEA;AACA;AACA;;AACA,MAAMC,SAAN,SAAwBX,KAAK,CAACY,SAA9B,CAA0E;AACxE;AACF;AACA;AASEC,EAAAA,WAAW,CAACC,KAAD,EAAyB;AAClC,UAAMA,KAAN;;AADkC,8DAJNd,KAAK,CAACe,SAAN,EAIM;;AAAA,4CAFY,EAEZ;;AAAA,qCAOnB,MAAM;AACrBP,MAAAA,YAAY,CAACQ,GAAb,CAAkB,qBAAoBC,IAAI,CAACC,SAAL,CAAe,KAAKJ,KAApB,CAA2B,EAAjE;AAEA,YAAMK,gBAAgB,GAAGlB,cAAc,CAAC,KAAKmB,mBAAL,CAAyBC,OAA1B,CAAvC;AAEA,UAAIC,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AAOD;;AAED,WAAOH,4BAAP;AACD;;AAEOnC,EAAAA,4BAA4B,GAEtB;AACZ,UAAM;AAAED,MAAAA,wBAAF;AAA4B1B,MAAAA;AAA5B,QAAuD,KAAKnE,KAAlE;AAEA,QAAIqI,8BAES,GAAGxC,wBAFhB;;AAGA,QAAI,OAAO1B,sBAAP,KAAkC,SAAtC,EAAiD;AAC/C,UAAI,CAACkE,8BAAL,EAAqC;AACnCA,QAAAA,8BAA8B,GAAG,EAAjC;AACD;;AACDA,MAAAA,8BAA8B,GAAG,EAC/B,GAAGA,8BAD4B;AAE/BlE,QAAAA;AAF+B,OAAjC;AAID;;AAED,WAAOkE,8BAAP;AACD;;AAlYuE;;gBAApExI,S,kBAIkB;AACpBqE,EAAAA,IAAI,EAAE;AADc,C;;AAiYxB,eAAerE,SAAf","sourcesContent":["import React from 'react';\n\nimport {\n EmitterSubscription,\n findNodeHandle,\n NativeSyntheticEvent,\n Platform,\n StyleProp,\n UIManager,\n ViewStyle,\n} from 'react-native';\n\nimport FireworkSDK from '../FireworkSDK';\nimport type AdConfiguration from '../models/AdConfiguration';\nimport type FWError from '../models/FWError';\nimport { FWEventName } from '../models/FWEventName';\nimport type VideoFeedConfiguration from '../models/VideoFeedConfiguration';\nimport type { VideoFeedSource } from '../models/VideoFeedSource';\nimport type VideoPlayerConfiguration from '../models/VideoPlayerConfiguration';\nimport { FireworkSDKModuleEventEmitter } from '../modules/FireworkSDKModule';\nimport FWGlobalState from '../utils/FWGlobalState';\nimport FWLoggerUtil from '../utils/FWLoggerUtil';\nimport FWVideoFeed from './FWVideoFeed';\nimport type VideoPlayerNativeConfiguration from '../models/VideoPlayerNativeConfiguration';\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. 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 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\n const requiresAds = adConfiguration?.requiresAds;\n const adsFetchTimeout = adConfiguration?.adsFetchTimeout;\n const vastAttributesString = this._generateVastAttributesString();\n\n let key = `gShareBaseURL:${gShareBaseURL}`;\n if (Platform.OS === 'ios') {\n key += `_appLanguage:${appLanguage}`;\n }\n key += `_videoLaunchBehavior:${videoLaunchBehavior}`;\n key += `_adBadgeTextType:${adBadgeTextType}`;\n key += `_backgroundColorOfAdBadge:${backgroundColorOfAdBadge}`;\n key += `_textColorOfAdBadge:${textColorOfAdBadge}`;\n if (Platform.OS === 'android') {\n key += `_androidFontIsCustomOfAdBadge${androidFontIsCustomOfAdBadge}`;\n key += `_androidFontTypefaceNameOfAdBadge${androidFontTypefaceNameOfAdBadge}`;\n }\n\n key += `_source:${source}`;\n key += `_channel:${channel}`;\n key += `_playlist:${playlist}`;\n key += `_playlistGroup:${playlistGroup}`;\n key += `_dynamicContentParameters:${dynamicContentParametersString}`;\n key += `_hashtagFilterExpression:${hashtagFilterExpression}`;\n key += `_productIds:${productIds?.join(',')}`;\n key += `_contentId:${contentId}`;\n key += `_mode:${mode}`;\n key += `_enablePictureInPicture:${enablePictureInPicture}`;\n\n key += `_titleHidden:${titleHidden}`;\n if (Platform.OS === 'android') {\n key += `_cornerRadius:${cornerRadius}`;\n key += `_titleTextColor:${titleTextColor}`;\n key += `_titleFontSize:${titleFontSize}`;\n key += `_titleAndroidFontInfo.isCustom:${titleAndroidFontInfo?.isCustom}`;\n key += `_titleAndroidFontInfo.typefaceName:${titleAndroidFontInfo?.typefaceName}`;\n key += `_titleGradientDrawable.orientation:${titleGradientDrawable?.orientation}`;\n key += `_titleGradientDrawable.colors:${titleGradientDrawable?.colors?.join(\n ','\n )}`;\n key += `_playIconHidden:${playIconHidden}`;\n key += `_playIconWidth:${playIconWidth}`;\n key += `_showAdBadge:${showAdBadge}`;\n }\n\n key += `_titlePosition:${titlePosition}`;\n 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
|
+
{"version":3,"sources":["VideoFeed.tsx"],"names":["React","findNodeHandle","Platform","UIManager","FireworkSDK","FWEventName","FireworkSDKModuleEventEmitter","FWGlobalState","FWLoggerUtil","FWVideoFeed","NativeComponentName","VideoFeed","Component","constructor","props","createRef","log","JSON","stringify","nativeNodeHandle","_nativeComponentRef","current","commandId","getViewManagerConfig","Commands","refresh","OS","toString","dispatchViewManagerCommand","event","nativeEvent","onVideoFeedLoadFinished","name","reason","onVideoFeedDidStartPictureInPicture","onVideoFeedDidStopPictureInPicture","state","sdkInitCalled","getInstance","componentDidMount","sdkInitCalledPromise","then","setState","subscriptionOfShareBaseURLUpdated","addListener","ShareBaseURLUpdated","_subscriptions","push","subscriptionOfAdBadgeConfigurationUpdated","AdBadgeConfigurationUpdated","subscriptionOfVideoLaunchBehaviorUpdated","VideoLaunchBehaviorUpdated","subscriptionOfAppLanguageUpdated","AppLanguageUpdated","componentWillUnmount","forEach","value","remove","render","gShareBaseURL","shareBaseURL","appLanguage","videoLaunchBehavior","adBadgeConfiguration","adBadgeTextType","badgeTextType","backgroundColorOfAdBadge","backgroundColor","textColorOfAdBadge","textColor","androidFontIsCustomOfAdBadge","androidFontInfo","isCustom","androidFontTypefaceNameOfAdBadge","typefaceName","source","channel","playlist","playlistGroup","hashtagFilterExpression","productIds","contentId","mode","enablePictureInPicture","adConfiguration","dynamicContentParametersString","_generateDynamicContentParametersString","videoFeedConfiguration","_getVideoFeedConfiguration","cornerRadius","toFixed","titleHidden","title","hidden","titleTextColor","titleFontSize","fontSize","titleAndroidFontInfo","titleGradientDrawable","gradientDrawable","titlePosition","playIconHidden","playIcon","playIconWidth","iconWidth","showAdBadge","enableAutoplay","gridColumns","itemSpacing","videoPlayerConfiguration","_getVideoPlayerConfiguration","playerStyle","videoCompleteAction","showShareButton","showPlaybackButton","showMuteButton","showBranding","ctaDelayType","ctaDelay","type","ctaDelayValue","ctaHighlightDelayType","ctaHighlightDelay","ctaHighlightDelayValue","ctaWidth","buttonConfiguration","showVideoDetailTitle","requiresAds","adsFetchTimeout","vastAttributesString","_generateVastAttributesString","key","join","orientation","colors","_generateButtonInfoString","videoDetailButton","closeButton","muteButton","unmuteButton","playButton","pauseButton","undefined","_onVideoFeedLoadFinished","_onVideoFeedDidStartPictureInPicture","_onVideoFeedDidStopPictureInPicture","dynamicContentParameters","resultString","sortedKeyList","Object","keys","sort","valueString","length","vastAttributes","attribute","buttonInfo","imageName","systemImageName","tintColor","resultVideoFeedConfiguration","Math","floor","numberOfLines","resultVideoPlayerConfiguration"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB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,C;;AAmdxB,eAAevE,SAAf","sourcesContent":["import React from 'react';\n\nimport {\n EmitterSubscription,\n findNodeHandle,\n NativeSyntheticEvent,\n Platform,\n StyleProp,\n UIManager,\n ViewStyle,\n} from 'react-native';\n\nimport FireworkSDK from '../FireworkSDK';\nimport type AdConfiguration from '../models/AdConfiguration';\nimport type FWError from '../models/FWError';\nimport { FWEventName } from '../models/FWEventName';\nimport type VideoFeedConfiguration from '../models/VideoFeedConfiguration';\nimport type { VideoFeedSource } from '../models/VideoFeedSource';\nimport type VideoPlayerConfiguration from '../models/VideoPlayerConfiguration';\nimport { FireworkSDKModuleEventEmitter } from '../modules/FireworkSDKModule';\nimport FWGlobalState from '../utils/FWGlobalState';\nimport FWLoggerUtil from '../utils/FWLoggerUtil';\nimport FWVideoFeed from './FWVideoFeed';\nimport type VideoPlayerNativeConfiguration from '../models/VideoPlayerNativeConfiguration';\nimport type ButtonInfo from '../models/ButtonInfo';\n\nexport type VideoFeedMode = 'row' | 'column' | 'grid';\n\n/**\n * The props of VideoFeed component.\n */\nexport interface IVideoFeedProps {\n /**\n * Standard React Native View Style.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * One of five available video feed sources.The playlistGroup is only supported on iOS.\n * Defaults to discover.\n */\n source: VideoFeedSource;\n /**\n * Channel id of the feed. Required when the source is set as channel or playlist or dynamicContent.\n */\n channel?: string;\n /**\n * Playlist id of the feed. Please note channel id is necessary. Required when the source is set as playlist.\n */\n playlist?: string;\n /**\n * PlaylistGroup id of the feed. Required when the source is set as playlistGroup. Only supported on iOS.\n */\n playlistGroup?: string;\n /**\n * The dynamic content parameters of the feed. Required when the source is set as dynamicContent.\n */\n dynamicContentParameters?: { [key: string]: string[] };\n /**\n * Hashtag filter expression is an s-expression used to provide feeds filtered by hashtags with specified criteria.\n * Queries are specified with boolean predicates on what hashtags are there on the video.\n * For instance, (and sport food) (or sport food) (and sport (or food comedy)) sport are all valid expressions.\n * Non-UTF-8 characters are not allowed. If using boolean predicates, the expression needs to be wrapped with parenthesis.\n * Required when the source is set as hashtagPlaylist.\n */\n hashtagFilterExpression?: string;\n /**\n * Product ids used to generate the sku feed\n */\n productIds?: string[];\n /**\n * The video or live stream id. Only supported on iOS.\n */\n contentId?: string;\n /**\n * One of three available display modes. Defaults to row.\n */\n mode?: VideoFeedMode;\n /**\n * Specifies if Picture in Picture is enabled.\n */\n enablePictureInPicture?: boolean;\n /**\n * Configuration of the feed.\n */\n videoFeedConfiguration?: VideoFeedConfiguration;\n /**\n * Configuration of the player.\n */\n videoPlayerConfiguration?: VideoPlayerConfiguration;\n /**\n * Ad configuration of the feed. Only supported on iOS.\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 * Start Picture in Picture callback. Only supported on iOS.\n */\n onVideoFeedDidStartPictureInPicture?: (error?: FWError) => void;\n /**\n * Stop Picture in Picture callback. Only supported on iOS.\n */\n onVideoFeedDidStopPictureInPicture?: (error?: FWError) => void;\n}\n\ninterface IVideoFeedState {\n sdkInitCalled: boolean;\n}\n\nconst NativeComponentName = 'FWVideoFeed';\n\n/**\n * VideoFeed component.\n */\nclass VideoFeed extends React.Component<IVideoFeedProps, IVideoFeedState> {\n /**\n * @ignore\n */\n static defaultProps = {\n mode: 'row',\n };\n\n private _nativeComponentRef = React.createRef<any>();\n\n private _subscriptions: EmitterSubscription[] = [];\n\n 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 private _onVideoFeedDidStartPictureInPicture = (\n event: NativeSyntheticEvent<any>\n ) => {\n FWLoggerUtil.log(\n `VideoFeed _onVideoFeedDidStartPictureInPicture ${JSON.stringify(\n event.nativeEvent\n )}`\n );\n const { onVideoFeedDidStartPictureInPicture } = this.props;\n\n const { name, reason } = event.nativeEvent;\n\n if (onVideoFeedDidStartPictureInPicture) {\n if (name) {\n if (reason) {\n onVideoFeedDidStartPictureInPicture({ name, reason });\n } else {\n onVideoFeedDidStartPictureInPicture({ name });\n }\n } else {\n onVideoFeedDidStartPictureInPicture();\n }\n }\n };\n\n private _onVideoFeedDidStopPictureInPicture = (\n event: NativeSyntheticEvent<any>\n ) => {\n FWLoggerUtil.log(\n `VideoFeed _onVideoFeedDidStopPictureInPicture ${JSON.stringify(\n event.nativeEvent\n )}`\n );\n const { onVideoFeedDidStopPictureInPicture } = this.props;\n\n const { name, reason } = event.nativeEvent;\n\n if (onVideoFeedDidStopPictureInPicture) {\n if (name) {\n if (reason) {\n onVideoFeedDidStopPictureInPicture({ name, reason });\n } else {\n onVideoFeedDidStopPictureInPicture({ name });\n }\n } else {\n onVideoFeedDidStopPictureInPicture();\n }\n }\n };\n\n /**\n * @ignore\n */\n componentDidMount() {\n FWLoggerUtil.log(\n `VideoFeed componentDidMount ${JSON.stringify(this.props)}`\n );\n\n if (!this.state.sdkInitCalled) {\n FWGlobalState.getInstance().sdkInitCalledPromise.then(() => {\n this.setState({ sdkInitCalled: true });\n });\n }\n\n const subscriptionOfShareBaseURLUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.ShareBaseURLUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.ShareBaseURLUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfShareBaseURLUpdated);\n\n const subscriptionOfAdBadgeConfigurationUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.AdBadgeConfigurationUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.AdBadgeConfigurationUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfAdBadgeConfigurationUpdated);\n\n const subscriptionOfVideoLaunchBehaviorUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.VideoLaunchBehaviorUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.VideoLaunchBehaviorUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfVideoLaunchBehaviorUpdated);\n\n 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 contentId,\n mode,\n enablePictureInPicture,\n adConfiguration,\n } = this.props;\n const dynamicContentParametersString =\n this._generateDynamicContentParametersString();\n\n const videoFeedConfiguration = this._getVideoFeedConfiguration();\n const cornerRadius = videoFeedConfiguration?.cornerRadius?.toFixed(5);\n\n const titleHidden = videoFeedConfiguration?.title?.hidden?.toString();\n const titleTextColor = videoFeedConfiguration?.title?.textColor;\n const titleFontSize = videoFeedConfiguration?.title?.fontSize?.toFixed(5);\n const titleAndroidFontInfo = videoFeedConfiguration?.title?.androidFontInfo;\n const titleGradientDrawable =\n videoFeedConfiguration?.title?.gradientDrawable;\n const titlePosition = videoFeedConfiguration?.titlePosition;\n const playIconHidden = videoFeedConfiguration?.playIcon?.hidden;\n const playIconWidth =\n videoFeedConfiguration?.playIcon?.iconWidth?.toFixed(5);\n const showAdBadge = videoFeedConfiguration?.showAdBadge?.toString();\n const enableAutoplay = videoFeedConfiguration?.enableAutoplay;\n const gridColumns = videoFeedConfiguration?.gridColumns?.toFixed(5);\n const itemSpacing = videoFeedConfiguration?.itemSpacing?.toFixed(5);\n\n const videoPlayerConfiguration = this._getVideoPlayerConfiguration();\n const playerStyle = videoPlayerConfiguration?.playerStyle;\n const videoCompleteAction = videoPlayerConfiguration?.videoCompleteAction;\n const showShareButton = videoPlayerConfiguration?.showShareButton;\n const showPlaybackButton = videoPlayerConfiguration?.showPlaybackButton;\n const showMuteButton = videoPlayerConfiguration?.showMuteButton;\n const showBranding = videoPlayerConfiguration?.showBranding;\n const ctaDelayType = videoPlayerConfiguration?.ctaDelay?.type;\n const ctaDelayValue = videoPlayerConfiguration?.ctaDelay?.value?.toFixed(5);\n const ctaHighlightDelayType =\n videoPlayerConfiguration?.ctaHighlightDelay?.type;\n const ctaHighlightDelayValue =\n videoPlayerConfiguration?.ctaHighlightDelay?.value?.toFixed(5);\n const shareBaseURL = videoPlayerConfiguration?.shareBaseURL;\n const ctaWidth = videoPlayerConfiguration?.ctaWidth;\n const buttonConfiguration = videoPlayerConfiguration?.buttonConfiguration;\n const showVideoDetailTitle = videoPlayerConfiguration?.showVideoDetailTitle;\n const requiresAds = adConfiguration?.requiresAds;\n const adsFetchTimeout = adConfiguration?.adsFetchTimeout;\n const vastAttributesString = this._generateVastAttributesString();\n\n let key = `gShareBaseURL:${gShareBaseURL}`;\n if (Platform.OS === 'ios') {\n key += `_appLanguage:${appLanguage}`;\n }\n key += `_videoLaunchBehavior:${videoLaunchBehavior}`;\n key += `_adBadgeTextType:${adBadgeTextType}`;\n key += `_backgroundColorOfAdBadge:${backgroundColorOfAdBadge}`;\n key += `_textColorOfAdBadge:${textColorOfAdBadge}`;\n if (Platform.OS === 'android') {\n key += `_androidFontIsCustomOfAdBadge${androidFontIsCustomOfAdBadge}`;\n key += `_androidFontTypefaceNameOfAdBadge${androidFontTypefaceNameOfAdBadge}`;\n }\n\n key += `_source:${source}`;\n key += `_channel:${channel}`;\n key += `_playlist:${playlist}`;\n key += `_playlistGroup:${playlistGroup}`;\n key += `_dynamicContentParameters:${dynamicContentParametersString}`;\n key += `_hashtagFilterExpression:${hashtagFilterExpression}`;\n key += `_productIds:${productIds?.join(',')}`;\n key += `_contentId:${contentId}`;\n key += `_mode:${mode}`;\n key += `_enablePictureInPicture:${enablePictureInPicture}`;\n\n key += `_titleHidden:${titleHidden}`;\n if (Platform.OS === 'android') {\n key += `_cornerRadius:${cornerRadius}`;\n key += `_titleTextColor:${titleTextColor}`;\n key += `_titleFontSize:${titleFontSize}`;\n key += `_titleAndroidFontInfo.isCustom:${titleAndroidFontInfo?.isCustom}`;\n key += `_titleAndroidFontInfo.typefaceName:${titleAndroidFontInfo?.typefaceName}`;\n key += `_titleGradientDrawable.orientation:${titleGradientDrawable?.orientation}`;\n key += `_titleGradientDrawable.colors:${titleGradientDrawable?.colors?.join(\n ','\n )}`;\n key += `_playIconHidden:${playIconHidden}`;\n key += `_playIconWidth:${playIconWidth}`;\n key += `_showAdBadge:${showAdBadge}`;\n }\n\n key += `_titlePosition:${titlePosition}`;\n 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 key += `_buttonConfiguration.videoDetailButton:${this._generateButtonInfoString(\n buttonConfiguration?.videoDetailButton\n )}`;\n key += `_buttonConfiguration.closeButton:${this._generateButtonInfoString(\n buttonConfiguration?.closeButton\n )}`;\n key += `_buttonConfiguration.muteButton:${this._generateButtonInfoString(\n buttonConfiguration?.muteButton\n )}`;\n key += `_buttonConfiguration.unmuteButton:${this._generateButtonInfoString(\n buttonConfiguration?.unmuteButton\n )}`;\n key += `_buttonConfiguration.playButton:${this._generateButtonInfoString(\n buttonConfiguration?.playButton\n )}`;\n key += `_buttonConfiguration.pauseButton:${this._generateButtonInfoString(\n buttonConfiguration?.pauseButton\n )}`;\n key += `_showVideoDetailTitle:${showVideoDetailTitle}`;\n }\n // key += `_videoPlayerLogoConfiguration.option:${videoPlayerLogoConfigurationOption}`;\n // key += `_videoPlayerLogoConfiguration.encodeId:${videoPlayerLogoConfigurationEncodeId}`;\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 onVideoFeedDidStartPictureInPicture={\n this._onVideoFeedDidStartPictureInPicture\n }\n onVideoFeedDidStopPictureInPicture={\n this._onVideoFeedDidStopPictureInPicture\n }\n mode={mode ?? 'row'}\n />\n );\n }\n\n private _generateDynamicContentParametersString(): string {\n const { dynamicContentParameters } = this.props;\n if (!dynamicContentParameters) {\n return '';\n }\n\n let resultString = '';\n const sortedKeyList = Object.keys(dynamicContentParameters).sort();\n for (const key of sortedKeyList) {\n const value = dynamicContentParameters[key];\n const valueString = value.join(',');\n if (resultString.length > 0) {\n resultString += '_';\n }\n\n resultString += `${key}:${valueString}`;\n }\n\n return resultString;\n }\n\n private _generateVastAttributesString(): string | undefined {\n const { adConfiguration } = this.props;\n const vastAttributes = adConfiguration?.vastAttributes;\n if (!vastAttributes) {\n return '';\n }\n\n let resultString = '';\n for (const attribute of vastAttributes) {\n if (resultString.length > 0) {\n resultString += '_';\n }\n resultString += `${attribute.name}:${attribute.value}`;\n }\n\n return resultString;\n }\n\n private _generateButtonInfoString(buttonInfo?: ButtonInfo): string {\n return `imageName:${buttonInfo?.imageName}_systemImageName:${buttonInfo?.systemImageName}_tintColor:${buttonInfo?.tintColor}`;\n }\n\n private _getVideoFeedConfiguration(): VideoFeedConfiguration | undefined {\n const { videoFeedConfiguration } = this.props;\n if (!videoFeedConfiguration) {\n return videoFeedConfiguration;\n }\n\n let resultVideoFeedConfiguration = videoFeedConfiguration;\n\n if (\n resultVideoFeedConfiguration.gridColumns &&\n Math.floor(resultVideoFeedConfiguration.gridColumns) !==\n resultVideoFeedConfiguration.gridColumns\n ) {\n const gridColumns = Math.floor(resultVideoFeedConfiguration.gridColumns);\n resultVideoFeedConfiguration = {\n ...resultVideoFeedConfiguration,\n gridColumns,\n };\n }\n\n if (\n resultVideoFeedConfiguration.title &&\n resultVideoFeedConfiguration.title.numberOfLines &&\n Math.floor(resultVideoFeedConfiguration.title.numberOfLines) !==\n resultVideoFeedConfiguration.title.numberOfLines\n ) {\n const numberOfLines = Math.floor(\n resultVideoFeedConfiguration.title.numberOfLines\n );\n resultVideoFeedConfiguration = {\n ...resultVideoFeedConfiguration,\n title: {\n ...resultVideoFeedConfiguration.title,\n numberOfLines,\n },\n };\n }\n\n return resultVideoFeedConfiguration;\n }\n\n private _getVideoPlayerConfiguration():\n | VideoPlayerNativeConfiguration\n | undefined {\n const { videoPlayerConfiguration, enablePictureInPicture } = this.props;\n\n let resultVideoPlayerConfiguration:\n | VideoPlayerNativeConfiguration\n | undefined = videoPlayerConfiguration;\n if (typeof enablePictureInPicture === 'boolean') {\n if (!resultVideoPlayerConfiguration) {\n resultVideoPlayerConfiguration = {};\n }\n resultVideoPlayerConfiguration = {\n ...resultVideoPlayerConfiguration,\n enablePictureInPicture,\n };\n }\n\n return resultVideoPlayerConfiguration;\n }\n}\n\nexport default VideoFeed;\n"]}
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"names":["StoryBlock","VideoFeed","FireworkSDK","FWNavigator","LiveStream","LiveStreamChatEventName","LiveStreamEventName","VideoPlaybackEventName","VideoShopping"],"mappings":"AAIA,OAAOA,UAAP,MAAuB,yBAAvB;AAEA,OAAOC,SAAP,MAAsB,wBAAtB;AAOA,OAAOC,WAAP,MAAwB,eAAxB;AACA,OAAOC,WAAP,MAAwB,eAAxB;AAKA,OAAOC,UAAP,MAAuB,cAAvB;AA4BA,OAAOC,uBAAP,MAAoC,kCAApC;AAEA,OAAOC,mBAAP,MAAgC,8BAAhC;
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":["StoryBlock","VideoFeed","FireworkSDK","FWNavigator","LiveStream","LiveStreamChatEventName","LiveStreamEventName","VideoPlaybackEventName","VideoShopping"],"mappings":"AAIA,OAAOA,UAAP,MAAuB,yBAAvB;AAEA,OAAOC,SAAP,MAAsB,wBAAtB;AAOA,OAAOC,WAAP,MAAwB,eAAxB;AACA,OAAOC,WAAP,MAAwB,eAAxB;AAKA,OAAOC,UAAP,MAAuB,cAAvB;AA4BA,OAAOC,uBAAP,MAAoC,kCAApC;AAEA,OAAOC,mBAAP,MAAgC,8BAAhC;AAsCA,OAAOC,sBAAP,MAAmC,iCAAnC;AAsBA,OAAOC,aAAP,MAA0B,iBAA1B;AAEA,eAAeN,WAAf;AAEA,SAcEA,WAdF,EAgBEC,WAhBF,EA0BEC,UA1BF,EA4BEC,uBA5BF,EA+BEC,mBA/BF,EA2DEN,UA3DF,EAkEEC,SAlEF,EAgFEM,sBAhFF,EA4FEC,aA5FF","sourcesContent":["import type {\n IStoryBlockMethods,\n IStoryBlockProps,\n} from './components/StoryBlock';\nimport StoryBlock from './components/StoryBlock';\nimport type { IVideoFeedProps, VideoFeedMode } from './components/VideoFeed';\nimport VideoFeed from './components/VideoFeed';\nimport type {\n CustomCTAClickCallback,\n SDKInitCallback,\n VideoFeedClickCallback,\n VideoPlaybackCallback,\n} from './FireworkSDK';\nimport FireworkSDK from './FireworkSDK';\nimport FWNavigator from './FWNavigator';\nimport type {\n onLiveStreamChatEventCallback,\n onLiveStreamEventCallback,\n} from './LiveStream';\nimport LiveStream from './LiveStream';\nimport type AdBadgeConfiguration from './models/AdBadgeConfiguration';\nimport type { AdBadgeTextType } from './models/AdBadgeConfiguration';\nimport type AdConfiguration from './models/AdConfiguration';\nimport type { VastAttribute } from './models/AdConfiguration';\nimport type AndroidFontInfo from './models/AndroidFontInfo';\nimport type ButtonInfo from './models/ButtonInfo';\nimport type FeedItemDetails from './models/FeedItemDetails';\nimport type FWError from './models/FWError';\nimport type {\n CustomClickLinkButtonEvent,\n CustomCTAClickEvent,\n CustomTapProductCardEvent,\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 ProductCardConfiguration,\n ProductCardCTAButtonStyle,\n ProductCardCTAButtonText,\n ProductCardIconConfiguration,\n ProductCardLabelConfiguration,\n ProductCardPriceConfiguration,\n ProductCardPriceLabelAxis,\n ProductCardTheme,\n ShoppingCTAButtonConfiguration,\n ShoppingCTAButtonText,\n} from './models/ProductInfoViewConfiguration';\nimport type ProductUnit from './models/ProductUnit';\nimport type { ProductPrice, ProductUnitOption } from './models/ProductUnit';\nimport type PushRNContainerParams from './models/PushRNContainerParams';\nimport type { RNAppProps } from './models/PushRNContainerParams';\nimport type SDKInitOptions from './models/SDKInitOptions';\nimport type { VideoLaunchBehavior } from './models/SDKInitOptions';\nimport type ShoppingCTAResult from './models/ShoppingCTAResult';\nimport type { StoryBlockConfiguration } from './models/StoryBlockConfiguration';\nimport type { StoryBlockSource } from './models/StoryBlockSource';\nimport type TrackPurchaseParameters from './models/TrackPurchaseParameters';\nimport type VideoFeedConfiguration from './models/VideoFeedConfiguration';\nimport type {\n VideoFeedPadding,\n VideoFeedPlayIconConfiguration,\n VideoFeedTitleConfiguration,\n VideoFeedTitlePosition,\n} from './models/VideoFeedConfiguration';\nimport type { VideoFeedSource } from './models/VideoFeedSource';\nimport type VideoPlaybackDetails from './models/VideoPlaybackDetails';\nimport type { VideoPlayerSize } from './models/VideoPlaybackDetails';\nimport VideoPlaybackEventName from './models/VideoPlaybackEventName';\nimport type VideoPlayerButtonConfiguration from './models/VideoPlayerButtonConfiguration';\nimport type { VideoPlayerCompleteAction } from './models/VideoPlayerCompleteAction';\nimport type VideoPlayerConfiguration from './models/VideoPlayerConfiguration';\nimport type {\n VideoPlayerCTADelay,\n VideoPlayerCTADelayType,\n} from './models/VideoPlayerCTADelay';\nimport type { VideoPlayerCTAStyle } from './models/VideoPlayerCTAStyle';\nimport type { VideoPlayerCTAWidth } from './models/VideoPlayerCTAWidth';\nimport type {\n VideoPlayerLogoConfiguration,\n VideoPlayerLogoOption,\n} from './models/VideoPlayerLogoConfiguration';\nimport type { VideoPlayerStyle } from './models/VideoPlayerStyle';\nimport type {\n CustomClickCartIconCallback,\n CustomClickLinkButtonCallback,\n CustomTapProductCardCallback,\n ShoppingCTACallback,\n UpdateProductDetailsCallback,\n} from './VideoShopping';\nimport VideoShopping from './VideoShopping';\n\nexport default FireworkSDK;\n\nexport {\n AdBadgeConfiguration,\n AdBadgeTextType,\n AdConfiguration,\n AndroidFontInfo,\n ButtonInfo,\n CustomClickCartIconCallback,\n CustomClickLinkButtonCallback,\n CustomClickLinkButtonEvent,\n CustomCTAClickCallback,\n CustomCTAClickEvent,\n CustomTapProductCardCallback,\n CustomTapProductCardEvent,\n FeedItemDetails,\n FireworkSDK,\n FWError,\n FWNavigator,\n GradientDrawable,\n GradientDrawableOrientation,\n IOSFontInfo,\n IOSSystemFontStyle,\n IOSSystemFontWeight,\n IStoryBlockMethods,\n IStoryBlockProps,\n IVideoFeedProps,\n LinkButtonConfiguration,\n LiveStream,\n LiveStreamChatEvent,\n LiveStreamChatEventName,\n LiveStreamEvent,\n LiveStreamEventDetails,\n LiveStreamEventName,\n LiveStreamMessageDetails,\n onLiveStreamChatEventCallback,\n onLiveStreamEventCallback,\n OpenVideoPlayerConfiguration,\n Product,\n ProductCardConfiguration,\n ProductCardCTAButtonStyle,\n ProductCardCTAButtonText,\n ProductCardIconConfiguration,\n ProductCardLabelConfiguration,\n ProductCardPriceConfiguration,\n ProductCardPriceLabelAxis,\n ProductCardTheme,\n ProductInfoViewConfiguration,\n ProductPrice,\n ProductUnit,\n ProductUnitOption,\n PushRNContainerParams,\n RNAppProps,\n SDKInitCallback,\n SDKInitEvent,\n SDKInitOptions,\n ShoppingCTAButtonConfiguration,\n ShoppingCTAButtonText,\n ShoppingCTACallback,\n ShoppingCTAEvent,\n ShoppingCTAResult,\n StoryBlock,\n StoryBlockConfiguration,\n StoryBlockSource,\n TrackPurchaseParameters,\n UpdateProductDetailsCallback,\n UpdateProductDetailsEvent,\n VastAttribute,\n VideoFeed,\n VideoFeedClickCallback,\n VideoFeedClickEvent,\n VideoFeedConfiguration,\n VideoFeedMode,\n VideoFeedPadding,\n VideoFeedPlayIconConfiguration,\n VideoFeedSource,\n VideoFeedTitleConfiguration,\n VideoFeedTitlePosition,\n VideoLaunchBehavior,\n VideoPlaybackCallback,\n VideoPlaybackDetails,\n VideoPlaybackEvent,\n VideoPlaybackEventName,\n VideoPlayerButtonConfiguration,\n VideoPlayerCompleteAction,\n VideoPlayerConfiguration,\n VideoPlayerCTADelay,\n VideoPlayerCTADelayType,\n VideoPlayerCTAStyle,\n VideoPlayerCTAWidth,\n VideoPlayerLogoConfiguration,\n VideoPlayerLogoOption,\n VideoPlayerSize,\n VideoPlayerStyle,\n VideoShopping,\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["FireworkSDKModule.ts"],"names":["NativeEventEmitter","NativeModules","LINKING_ERROR","FireworkSDKModule","FireworkSDK","Proxy","get","Error","FireworkSDKModuleEventEmitter"],"mappings":"AAAA,SAASA,kBAAT,EAA2CC,aAA3C,QAAgE,cAAhE;AAEA,SAASC,aAAT,QAA8B,6BAA9B;AAMA,MAAMC,iBAAiB,GAAGF,aAAa,CAACG,WAAd,GACtBH,aAAa,CAACG,WADQ,GAEtB,IAAIC,KAAJ,CACE,EADF,EAEE;AACEC,EAAAA,GAAG,GAAG;AACJ,UAAM,IAAIC,KAAJ,CAAUL,aAAV,CAAN;AACD;;AAHH,CAFF,CAFJ;
|
|
1
|
+
{"version":3,"sources":["FireworkSDKModule.ts"],"names":["NativeEventEmitter","NativeModules","LINKING_ERROR","FireworkSDKModule","FireworkSDK","Proxy","get","Error","FireworkSDKModuleEventEmitter"],"mappings":"AAAA,SAASA,kBAAT,EAA2CC,aAA3C,QAAgE,cAAhE;AAEA,SAASC,aAAT,QAA8B,6BAA9B;AAMA,MAAMC,iBAAiB,GAAGF,aAAa,CAACG,WAAd,GACtBH,aAAa,CAACG,WADQ,GAEtB,IAAIC,KAAJ,CACE,EADF,EAEE;AACEC,EAAAA,GAAG,GAAG;AACJ,UAAM,IAAIC,KAAJ,CAAUL,aAAV,CAAN;AACD;;AAHH,CAFF,CAFJ;AAyBA,MAAMM,6BAA6B,GAAG,IAAIR,kBAAJ,CAAuBG,iBAAvB,CAAtC;AACA,SAASK,6BAAT;AACA,eAAeL,iBAAf","sourcesContent":["import { NativeEventEmitter, NativeModule, NativeModules } from 'react-native';\n\nimport { LINKING_ERROR } from '../constants/FWErrorMessage';\nimport type AdBadgeConfiguration from '../models/AdBadgeConfiguration';\nimport type SDKInitOptions from '../models/SDKInitOptions';\nimport type TrackPurchaseParameters from '../models/TrackPurchaseParameters';\nimport type VideoPlayerNativeConfiguration from '../models/VideoPlayerNativeConfiguration';\n\nconst FireworkSDKModule = NativeModules.FireworkSDK\n ? NativeModules.FireworkSDK\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\ninterface IFireworkSDKModule extends NativeModule {\n init(options?: SDKInitOptions): Promise<any>;\n openVideoPlayer(url: string, config?: VideoPlayerNativeConfiguration): void;\n setVideoFeedClickCallbackEnabled(enabled: boolean): void; // Only supported on iOS\n setCustomCTAClickEnabled(enabled: boolean): void;\n setShareBaseURL(url?: string): Promise<any>;\n setVideoPlaybackEventEnabled(enabled: boolean): void;\n setAdBadgeConfiguration(config?: AdBadgeConfiguration): Promise<any>;\n trackPurchase(parameters: TrackPurchaseParameters): void;\n changeAppLanguage(language?: string | null): Promise<boolean>;\n pausePlayer(callbackId: number | string): void; // Only supported on iOS\n resumePlayer(callbackId: number | string): void; // Only supported on iOS\n}\n\nconst FireworkSDKModuleEventEmitter = new NativeEventEmitter(FireworkSDKModule);\nexport { FireworkSDKModuleEventEmitter };\nexport default FireworkSDKModule as IFireworkSDKModule;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ShoppingModule.ts"],"names":["NativeEventEmitter","NativeModules","LINKING_ERROR","ShoppingModule","Proxy","get","Error","ShoppingModuleEventEmitter"],"mappings":"AAAA,SAASA,kBAAT,EAA2CC,aAA3C,QAAgE,cAAhE;AAEA,SAASC,aAAT,QAA8B,6BAA9B;AAKA,MAAMC,cAAc,GAAGF,aAAa,CAACE,cAAd,GACnBF,aAAa,CAACE,cADK,GAEnB,IAAIC,KAAJ,CACE,EADF,EAEE;AACEC,EAAAA,GAAG,GAAG;AACJ,UAAM,IAAIC,KAAJ,CAAUJ,aAAV,CAAN;AACD;;AAHH,CAFF,CAFJ;
|
|
1
|
+
{"version":3,"sources":["ShoppingModule.ts"],"names":["NativeEventEmitter","NativeModules","LINKING_ERROR","ShoppingModule","Proxy","get","Error","ShoppingModuleEventEmitter"],"mappings":"AAAA,SAASA,kBAAT,EAA2CC,aAA3C,QAAgE,cAAhE;AAEA,SAASC,aAAT,QAA8B,6BAA9B;AAKA,MAAMC,cAAc,GAAGF,aAAa,CAACE,cAAd,GACnBF,aAAa,CAACE,cADK,GAEnB,IAAIC,KAAJ,CACE,EADF,EAEE;AACEC,EAAAA,GAAG,GAAG;AACJ,UAAM,IAAIC,KAAJ,CAAUJ,aAAV,CAAN;AACD;;AAHH,CAFF,CAFJ;AA4BA,MAAMK,0BAA0B,GAAG,IAAIP,kBAAJ,CAAuBG,cAAvB,CAAnC;AACA,SAASI,0BAAT;AAEA,eAAeJ,cAAf","sourcesContent":["import { NativeEventEmitter, NativeModule, NativeModules } from 'react-native';\n\nimport { LINKING_ERROR } from '../constants/FWErrorMessage';\nimport type Product from '../models/Product';\nimport type ProductInfoViewConfiguration from '../models/ProductInfoViewConfiguration';\nimport type ShoppingCTAResult from '../models/ShoppingCTAResult';\n\nconst ShoppingModule = NativeModules.ShoppingModule\n ? NativeModules.ShoppingModule\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\ninterface IShoppingModule extends NativeModule {\n init(): Promise<any>;\n updateVideoProducts(products: Product[], callbackId: number | string): void;\n updateShoppingCTAResult(\n result: ShoppingCTAResult,\n callbackId: number | string\n ): void;\n setCartIconVisible(visible: boolean): void;\n setCartItemCount(count: number): void;\n clearCallbackId(callbackId: number | string, eventName: string): void; // Only supported on iOS\n setProductInfoViewConfiguration(config: ProductInfoViewConfiguration): void;\n setCustomClickLinkButtonEnabled(enabled: boolean): Promise<any>;\n setCustomTapProductCardEnabled(enabled: boolean): Promise<any>; // Only supported on iOS\n pausePlayer(callbackId: number | string): void; // Only supported on iOS\n resumePlayer(callbackId: number | string): void; // Only supported on iOS\n}\n\nconst ShoppingModuleEventEmitter = new NativeEventEmitter(ShoppingModule);\nexport { ShoppingModuleEventEmitter };\n\nexport default ShoppingModule as IShoppingModule;\n"]}
|
|
@@ -52,7 +52,7 @@ export interface IStoryBlockProps {
|
|
|
52
52
|
*/
|
|
53
53
|
productIds?: string[];
|
|
54
54
|
/**
|
|
55
|
-
* The video or live stream id.
|
|
55
|
+
* The video or live stream id.
|
|
56
56
|
*/
|
|
57
57
|
contentId?: string;
|
|
58
58
|
/**
|
|
@@ -67,11 +67,22 @@ export interface IStoryBlockProps {
|
|
|
67
67
|
* Ad configuration of the feed. Only supported on iOS.
|
|
68
68
|
*/
|
|
69
69
|
adConfiguration?: AdConfiguration;
|
|
70
|
+
/**
|
|
71
|
+
* The configuration of the story block.
|
|
72
|
+
*/
|
|
70
73
|
storyBlockConfiguration?: StoryBlockConfiguration;
|
|
71
74
|
/**
|
|
72
75
|
* The feed loading result callback. It means loading successfully when error equals to undefined.
|
|
73
76
|
*/
|
|
74
77
|
onStoryBlockLoadFinished?: (error?: FWError) => void;
|
|
78
|
+
/**
|
|
79
|
+
* Start Picture in Picture callback. Only supported on iOS.
|
|
80
|
+
*/
|
|
81
|
+
onStoryBlockDidStartPictureInPicture?: (error?: FWError) => void;
|
|
82
|
+
/**
|
|
83
|
+
* Stop Picture in Picture callback. Only supported on iOS.
|
|
84
|
+
*/
|
|
85
|
+
onStoryBlockDidStopPictureInPicture?: (error?: FWError) => void;
|
|
75
86
|
}
|
|
76
87
|
declare const _default: React.ForwardRefExoticComponent<IStoryBlockProps & React.RefAttributes<IStoryBlockMethods>>;
|
|
77
88
|
export default _default;
|
|
@@ -74,9 +74,17 @@ export interface IVideoFeedProps {
|
|
|
74
74
|
*/
|
|
75
75
|
adConfiguration?: AdConfiguration;
|
|
76
76
|
/**
|
|
77
|
-
* The feed loading result callback. It means loading successfully when error equals to undefined.
|
|
77
|
+
* The feed loading result callback. It means loading successfully when error equals to undefined.
|
|
78
78
|
*/
|
|
79
79
|
onVideoFeedLoadFinished?: (error?: FWError) => void;
|
|
80
|
+
/**
|
|
81
|
+
* Start Picture in Picture callback. Only supported on iOS.
|
|
82
|
+
*/
|
|
83
|
+
onVideoFeedDidStartPictureInPicture?: (error?: FWError) => void;
|
|
84
|
+
/**
|
|
85
|
+
* Stop Picture in Picture callback. Only supported on iOS.
|
|
86
|
+
*/
|
|
87
|
+
onVideoFeedDidStopPictureInPicture?: (error?: FWError) => void;
|
|
80
88
|
}
|
|
81
89
|
interface IVideoFeedState {
|
|
82
90
|
sdkInitCalled: boolean;
|
|
@@ -96,6 +104,8 @@ declare class VideoFeed extends React.Component<IVideoFeedProps, IVideoFeedState
|
|
|
96
104
|
constructor(props: IVideoFeedProps);
|
|
97
105
|
refresh: () => void;
|
|
98
106
|
private _onVideoFeedLoadFinished;
|
|
107
|
+
private _onVideoFeedDidStartPictureInPicture;
|
|
108
|
+
private _onVideoFeedDidStopPictureInPicture;
|
|
99
109
|
/**
|
|
100
110
|
* @ignore
|
|
101
111
|
*/
|
|
@@ -110,6 +120,7 @@ declare class VideoFeed extends React.Component<IVideoFeedProps, IVideoFeedState
|
|
|
110
120
|
render(): JSX.Element | null;
|
|
111
121
|
private _generateDynamicContentParametersString;
|
|
112
122
|
private _generateVastAttributesString;
|
|
123
|
+
private _generateButtonInfoString;
|
|
113
124
|
private _getVideoFeedConfiguration;
|
|
114
125
|
private _getVideoPlayerConfiguration;
|
|
115
126
|
}
|
|
@@ -27,7 +27,7 @@ import type LiveStreamMessageDetails from './models/LiveStreamMessageDetails';
|
|
|
27
27
|
import type OpenVideoPlayerConfiguration from './models/OpenVideoPlayerConfiguration';
|
|
28
28
|
import type Product from './models/Product';
|
|
29
29
|
import type ProductInfoViewConfiguration from './models/ProductInfoViewConfiguration';
|
|
30
|
-
import type { LinkButtonConfiguration, ProductCardConfiguration, ProductCardCTAButtonText, ProductCardPriceConfiguration, ProductCardTheme, ShoppingCTAButtonConfiguration, ShoppingCTAButtonText } from './models/ProductInfoViewConfiguration';
|
|
30
|
+
import type { LinkButtonConfiguration, ProductCardConfiguration, ProductCardCTAButtonStyle, ProductCardCTAButtonText, ProductCardIconConfiguration, ProductCardLabelConfiguration, ProductCardPriceConfiguration, ProductCardPriceLabelAxis, ProductCardTheme, ShoppingCTAButtonConfiguration, ShoppingCTAButtonText } from './models/ProductInfoViewConfiguration';
|
|
31
31
|
import type ProductUnit from './models/ProductUnit';
|
|
32
32
|
import type { ProductPrice, ProductUnitOption } from './models/ProductUnit';
|
|
33
33
|
import type PushRNContainerParams from './models/PushRNContainerParams';
|
|
@@ -50,8 +50,9 @@ import type VideoPlayerConfiguration from './models/VideoPlayerConfiguration';
|
|
|
50
50
|
import type { VideoPlayerCTADelay, VideoPlayerCTADelayType } from './models/VideoPlayerCTADelay';
|
|
51
51
|
import type { VideoPlayerCTAStyle } from './models/VideoPlayerCTAStyle';
|
|
52
52
|
import type { VideoPlayerCTAWidth } from './models/VideoPlayerCTAWidth';
|
|
53
|
+
import type { VideoPlayerLogoConfiguration, VideoPlayerLogoOption } from './models/VideoPlayerLogoConfiguration';
|
|
53
54
|
import type { VideoPlayerStyle } from './models/VideoPlayerStyle';
|
|
54
55
|
import type { CustomClickCartIconCallback, CustomClickLinkButtonCallback, CustomTapProductCardCallback, ShoppingCTACallback, UpdateProductDetailsCallback } from './VideoShopping';
|
|
55
56
|
import VideoShopping from './VideoShopping';
|
|
56
57
|
export default FireworkSDK;
|
|
57
|
-
export { AdBadgeConfiguration, AdBadgeTextType, AdConfiguration, AndroidFontInfo, ButtonInfo, CustomClickCartIconCallback, CustomClickLinkButtonCallback, CustomClickLinkButtonEvent, CustomCTAClickCallback, CustomCTAClickEvent, CustomTapProductCardCallback, CustomTapProductCardEvent, FeedItemDetails, FireworkSDK, FWError, FWNavigator, GradientDrawable, GradientDrawableOrientation, IOSFontInfo, IOSSystemFontStyle, IOSSystemFontWeight, IStoryBlockMethods, IStoryBlockProps, IVideoFeedProps, LinkButtonConfiguration, LiveStream, LiveStreamChatEvent, LiveStreamChatEventName, LiveStreamEvent, LiveStreamEventDetails, LiveStreamEventName, LiveStreamMessageDetails, onLiveStreamChatEventCallback, onLiveStreamEventCallback, OpenVideoPlayerConfiguration, Product, ProductCardConfiguration, ProductCardCTAButtonText, ProductCardPriceConfiguration, 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, VideoLaunchBehavior, VideoPlaybackCallback, VideoPlaybackDetails, VideoPlaybackEvent, VideoPlaybackEventName, VideoPlayerButtonConfiguration, VideoPlayerCompleteAction, VideoPlayerConfiguration, VideoPlayerCTADelay, VideoPlayerCTADelayType, VideoPlayerCTAStyle, VideoPlayerCTAWidth, VideoPlayerSize, VideoPlayerStyle, VideoShopping, };
|
|
58
|
+
export { AdBadgeConfiguration, AdBadgeTextType, AdConfiguration, AndroidFontInfo, ButtonInfo, CustomClickCartIconCallback, CustomClickLinkButtonCallback, CustomClickLinkButtonEvent, CustomCTAClickCallback, CustomCTAClickEvent, CustomTapProductCardCallback, CustomTapProductCardEvent, FeedItemDetails, FireworkSDK, FWError, FWNavigator, GradientDrawable, GradientDrawableOrientation, IOSFontInfo, IOSSystemFontStyle, IOSSystemFontWeight, IStoryBlockMethods, IStoryBlockProps, IVideoFeedProps, LinkButtonConfiguration, LiveStream, LiveStreamChatEvent, LiveStreamChatEventName, LiveStreamEvent, LiveStreamEventDetails, LiveStreamEventName, LiveStreamMessageDetails, onLiveStreamChatEventCallback, onLiveStreamEventCallback, OpenVideoPlayerConfiguration, Product, ProductCardConfiguration, ProductCardCTAButtonStyle, ProductCardCTAButtonText, ProductCardIconConfiguration, ProductCardLabelConfiguration, ProductCardPriceConfiguration, ProductCardPriceLabelAxis, ProductCardTheme, ProductInfoViewConfiguration, ProductPrice, ProductUnit, ProductUnitOption, PushRNContainerParams, RNAppProps, SDKInitCallback, SDKInitEvent, SDKInitOptions, ShoppingCTAButtonConfiguration, ShoppingCTAButtonText, ShoppingCTACallback, ShoppingCTAEvent, ShoppingCTAResult, StoryBlock, StoryBlockConfiguration, StoryBlockSource, TrackPurchaseParameters, UpdateProductDetailsCallback, UpdateProductDetailsEvent, VastAttribute, VideoFeed, VideoFeedClickCallback, VideoFeedClickEvent, VideoFeedConfiguration, VideoFeedMode, VideoFeedPadding, VideoFeedPlayIconConfiguration, VideoFeedSource, VideoFeedTitleConfiguration, VideoFeedTitlePosition, VideoLaunchBehavior, VideoPlaybackCallback, VideoPlaybackDetails, VideoPlaybackEvent, VideoPlaybackEventName, VideoPlayerButtonConfiguration, VideoPlayerCompleteAction, VideoPlayerConfiguration, VideoPlayerCTADelay, VideoPlayerCTADelayType, VideoPlayerCTAStyle, VideoPlayerCTAWidth, VideoPlayerLogoConfiguration, VideoPlayerLogoOption, VideoPlayerSize, VideoPlayerStyle, VideoShopping, };
|
|
@@ -12,11 +12,28 @@ export interface SDKInitEvent {
|
|
|
12
12
|
*/
|
|
13
13
|
error?: FWError | null;
|
|
14
14
|
}
|
|
15
|
+
export interface PlayerHandler {
|
|
16
|
+
/**
|
|
17
|
+
* Pause the video playback associated with this CTA.
|
|
18
|
+
* Only supported on iOS
|
|
19
|
+
*/
|
|
20
|
+
pause: () => void;
|
|
21
|
+
/**
|
|
22
|
+
* Resume the video playback associated with this CTA.
|
|
23
|
+
* Only supported on iOS
|
|
24
|
+
*/
|
|
25
|
+
resume: () => void;
|
|
26
|
+
}
|
|
15
27
|
export interface CustomCTAClickEvent {
|
|
16
28
|
/**
|
|
17
29
|
* Action URL that is associated with this CTA
|
|
18
30
|
*/
|
|
19
31
|
url: string;
|
|
32
|
+
/**
|
|
33
|
+
* The video playback pause/resume handler for the video.
|
|
34
|
+
* Only supported on iOS
|
|
35
|
+
*/
|
|
36
|
+
playerHandler?: PlayerHandler;
|
|
20
37
|
}
|
|
21
38
|
export interface VideoPlaybackEvent {
|
|
22
39
|
eventName: VideoPlaybackEventName;
|
|
@@ -76,6 +93,10 @@ export interface CustomTapProductCardEvent {
|
|
|
76
93
|
* the video playback details that the product unit belongs to.
|
|
77
94
|
*/
|
|
78
95
|
video: VideoPlaybackDetails;
|
|
96
|
+
/**
|
|
97
|
+
* The video playback pause/resume handler for the video.
|
|
98
|
+
*/
|
|
99
|
+
playerHandler?: PlayerHandler;
|
|
79
100
|
}
|
|
80
101
|
export interface LiveStreamEvent {
|
|
81
102
|
eventName: LiveStreamEventName;
|
|
@@ -29,13 +29,84 @@ export interface LinkButtonConfiguration {
|
|
|
29
29
|
export type ProductCardCTAButtonText = 'shopNow' | 'buyNow';
|
|
30
30
|
export type ProductCardTheme = 'dark' | 'light';
|
|
31
31
|
export interface ProductCardPriceConfiguration {
|
|
32
|
+
/**
|
|
33
|
+
* Hide the price label or not.
|
|
34
|
+
* @deprecated This property has no effect on iOS.
|
|
35
|
+
*/
|
|
32
36
|
isHidden?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* The axis of price label.
|
|
39
|
+
* Default to 'horizontal'.
|
|
40
|
+
* Only supported on iOS.
|
|
41
|
+
*/
|
|
42
|
+
axis?: ProductCardPriceLabelAxis;
|
|
43
|
+
/**
|
|
44
|
+
* The label configuration of price.
|
|
45
|
+
* Only supported on iOS.
|
|
46
|
+
*/
|
|
47
|
+
priceLabel?: ProductCardLabelConfiguration;
|
|
48
|
+
/**
|
|
49
|
+
* The label configuration of original price.
|
|
50
|
+
* Only supported on iOS.
|
|
51
|
+
*/
|
|
52
|
+
originalPriceLabel?: ProductCardLabelConfiguration;
|
|
53
|
+
/**
|
|
54
|
+
* The default display order is [priceLabel, originalPriceLabel]. When the value is `true`, the order is reversed.
|
|
55
|
+
* Only supported on iOS.
|
|
56
|
+
*/
|
|
57
|
+
isPriceFirst?: boolean;
|
|
33
58
|
}
|
|
34
|
-
export
|
|
59
|
+
export type ProductCardPriceLabelAxis = 'horizontal' | 'vertical';
|
|
60
|
+
export interface ProductCardLabelConfiguration {
|
|
35
61
|
/**
|
|
36
|
-
* The text of
|
|
62
|
+
* The text color of label.
|
|
63
|
+
* Only supported on iOS.
|
|
37
64
|
*/
|
|
38
|
-
|
|
65
|
+
textColor?: string;
|
|
66
|
+
/**
|
|
67
|
+
* The font size of label.
|
|
68
|
+
* Only supported on iOS.
|
|
69
|
+
*/
|
|
70
|
+
fontSize?: number;
|
|
71
|
+
/**
|
|
72
|
+
* Number of lines to show.
|
|
73
|
+
* Only supported on iOS.
|
|
74
|
+
* Default to 1.
|
|
75
|
+
*/
|
|
76
|
+
numberOfLines?: number;
|
|
77
|
+
/**
|
|
78
|
+
* The iOS font info.
|
|
79
|
+
* The property is ignored when fontSize is not set.
|
|
80
|
+
* Only supported on iOS.
|
|
81
|
+
*/
|
|
82
|
+
iOSFontInfo?: IOSFontInfo;
|
|
83
|
+
}
|
|
84
|
+
export interface ProductCardCTAButtonStyle {
|
|
85
|
+
/**
|
|
86
|
+
* The text color of CTA button.
|
|
87
|
+
* Only supported on iOS.
|
|
88
|
+
*/
|
|
89
|
+
textColor?: string;
|
|
90
|
+
/**
|
|
91
|
+
* The font size of CTA button.
|
|
92
|
+
* Only supported on iOS.
|
|
93
|
+
*/
|
|
94
|
+
fontSize?: number;
|
|
95
|
+
/**
|
|
96
|
+
* The iOS font info.
|
|
97
|
+
* The property is ignored when fontSize is not set.
|
|
98
|
+
* Only supported on iOS.
|
|
99
|
+
*/
|
|
100
|
+
iOSFontInfo?: IOSFontInfo;
|
|
101
|
+
}
|
|
102
|
+
export interface ProductCardIconConfiguration {
|
|
103
|
+
/**
|
|
104
|
+
* The corner radius of icon.
|
|
105
|
+
* Only supported on iOS.
|
|
106
|
+
*/
|
|
107
|
+
cornerRadius?: number;
|
|
108
|
+
}
|
|
109
|
+
export interface ProductCardConfiguration {
|
|
39
110
|
/**
|
|
40
111
|
* The theme of product card.
|
|
41
112
|
*/
|
|
@@ -44,14 +115,48 @@ export interface ProductCardConfiguration {
|
|
|
44
115
|
* The corner radius of product card.
|
|
45
116
|
*/
|
|
46
117
|
cornerRadius?: number;
|
|
118
|
+
/**
|
|
119
|
+
* CTA button is hidden or not.
|
|
120
|
+
*/
|
|
121
|
+
isCtaButtonHidden?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* The text of shopping CTA button.
|
|
124
|
+
*/
|
|
125
|
+
ctaButtonText?: ProductCardCTAButtonText;
|
|
126
|
+
/**
|
|
127
|
+
* The cta button style of product card.
|
|
128
|
+
* Only supported on iOS.
|
|
129
|
+
*/
|
|
130
|
+
ctaButtonStyle?: ProductCardCTAButtonStyle;
|
|
47
131
|
/**
|
|
48
132
|
* Price is hidden or not.
|
|
49
133
|
*/
|
|
50
134
|
priceConfiguration?: ProductCardPriceConfiguration;
|
|
51
135
|
/**
|
|
52
|
-
*
|
|
136
|
+
* The width of product card.
|
|
137
|
+
* Only supported on iOS.
|
|
53
138
|
*/
|
|
54
|
-
|
|
139
|
+
width?: number;
|
|
140
|
+
/**
|
|
141
|
+
* The height of product card.
|
|
142
|
+
* Only supported on iOS.
|
|
143
|
+
*/
|
|
144
|
+
height?: number;
|
|
145
|
+
/**
|
|
146
|
+
* The background color of product card.
|
|
147
|
+
* Only supported on iOS.
|
|
148
|
+
*/
|
|
149
|
+
backgroundColor?: string;
|
|
150
|
+
/**
|
|
151
|
+
* The icon configuration of product card.
|
|
152
|
+
* Only supported on iOS.
|
|
153
|
+
*/
|
|
154
|
+
iconConfiguration?: ProductCardIconConfiguration;
|
|
155
|
+
/**
|
|
156
|
+
* The label configuration of product card.
|
|
157
|
+
* Only supported on iOS.
|
|
158
|
+
*/
|
|
159
|
+
nameLabel?: ProductCardLabelConfiguration;
|
|
55
160
|
}
|
|
56
161
|
export default interface ProductInfoViewConfiguration {
|
|
57
162
|
/**
|
|
@@ -3,6 +3,7 @@ import type { VideoPlayerCTADelay } from './VideoPlayerCTADelay';
|
|
|
3
3
|
import type { VideoPlayerCTAStyle } from './VideoPlayerCTAStyle';
|
|
4
4
|
import type { VideoPlayerCTAWidth } from './VideoPlayerCTAWidth';
|
|
5
5
|
import type { VideoPlayerCompleteAction } from './VideoPlayerCompleteAction';
|
|
6
|
+
import type { VideoPlayerLogoConfiguration } from './VideoPlayerLogoConfiguration';
|
|
6
7
|
import type { VideoPlayerStyle } from './VideoPlayerStyle';
|
|
7
8
|
export interface StoryBlockConfiguration {
|
|
8
9
|
/**
|
|
@@ -70,4 +71,10 @@ export interface StoryBlockConfiguration {
|
|
|
70
71
|
* Only supported on ios.
|
|
71
72
|
*/
|
|
72
73
|
showVideoDetailTitle?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Specifies the logo configuration
|
|
76
|
+
* Defaults to { option: 'disabled' }
|
|
77
|
+
* Only supported on iOS.
|
|
78
|
+
*/
|
|
79
|
+
videoPlayerLogoConfiguration?: VideoPlayerLogoConfiguration;
|
|
73
80
|
}
|
|
@@ -4,6 +4,7 @@ import type { VideoPlayerCTAStyle } from './VideoPlayerCTAStyle';
|
|
|
4
4
|
import type { VideoPlayerCTAWidth } from './VideoPlayerCTAWidth';
|
|
5
5
|
import type { VideoPlayerCompleteAction } from './VideoPlayerCompleteAction';
|
|
6
6
|
import type { VideoPlayerStyle } from './VideoPlayerStyle';
|
|
7
|
+
import type { VideoPlayerLogoConfiguration } from './VideoPlayerLogoConfiguration';
|
|
7
8
|
export default interface VideoPlayerConfiguration {
|
|
8
9
|
/**
|
|
9
10
|
* Sets the proportion of the video player to its container.
|
|
@@ -68,4 +69,10 @@ export default interface VideoPlayerConfiguration {
|
|
|
68
69
|
* Only supported on iOS.
|
|
69
70
|
*/
|
|
70
71
|
showVideoDetailTitle?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Specifies the logo configuration
|
|
74
|
+
* Defaults to { option: 'disabled' }
|
|
75
|
+
* Only supported on iOS.
|
|
76
|
+
*/
|
|
77
|
+
videoPlayerLogoConfiguration?: VideoPlayerLogoConfiguration;
|
|
71
78
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface VideoPlayerLogoConfiguration {
|
|
2
|
+
/**
|
|
3
|
+
* Specifies the logo type.
|
|
4
|
+
* Defaults to 'disabled'.
|
|
5
|
+
* Only supported on iOS.
|
|
6
|
+
*/
|
|
7
|
+
option: VideoPlayerLogoOption;
|
|
8
|
+
/**
|
|
9
|
+
* Specifies the logo encoding id.
|
|
10
|
+
* Required when option is 'creator' or 'channelAggregator'.
|
|
11
|
+
* Only supported on iOS.
|
|
12
|
+
*/
|
|
13
|
+
encodedId?: string;
|
|
14
|
+
}
|
|
15
|
+
export type VideoPlayerLogoOption = 'disabled' | 'creator' | 'channelAggregator';
|
|
@@ -13,6 +13,8 @@ interface IFireworkSDKModule extends NativeModule {
|
|
|
13
13
|
setAdBadgeConfiguration(config?: AdBadgeConfiguration): Promise<any>;
|
|
14
14
|
trackPurchase(parameters: TrackPurchaseParameters): void;
|
|
15
15
|
changeAppLanguage(language?: string | null): Promise<boolean>;
|
|
16
|
+
pausePlayer(callbackId: number | string): void;
|
|
17
|
+
resumePlayer(callbackId: number | string): void;
|
|
16
18
|
}
|
|
17
19
|
declare const FireworkSDKModuleEventEmitter: NativeEventEmitter;
|
|
18
20
|
export { FireworkSDKModuleEventEmitter };
|
|
@@ -12,6 +12,8 @@ interface IShoppingModule extends NativeModule {
|
|
|
12
12
|
setProductInfoViewConfiguration(config: ProductInfoViewConfiguration): void;
|
|
13
13
|
setCustomClickLinkButtonEnabled(enabled: boolean): Promise<any>;
|
|
14
14
|
setCustomTapProductCardEnabled(enabled: boolean): Promise<any>;
|
|
15
|
+
pausePlayer(callbackId: number | string): void;
|
|
16
|
+
resumePlayer(callbackId: number | string): void;
|
|
15
17
|
}
|
|
16
18
|
declare const ShoppingModuleEventEmitter: NativeEventEmitter;
|
|
17
19
|
export { ShoppingModuleEventEmitter };
|
package/package.json
CHANGED