react-native-firework-sdk 1.0.4 → 1.1.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/LICENSE +202 -0
- package/README.md +2 -40
- package/android/build.gradle +6 -3
- package/android/gradle.properties +2 -1
- package/android/proguard-rules.pro +22 -0
- package/android/publish.gradle +4 -3
- package/android/settings.gradle +1 -0
- package/android/src/main/AndroidManifest.xml +5 -2
- package/android/src/main/java/com/fireworksdk/bridge/components/videofeed/FWVideoFeed.kt +226 -0
- package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge}/constants/FWCommandConstant.kt +1 -1
- package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge}/constants/FWVideoPlayerConstant.kt +13 -1
- package/android/src/main/java/com/fireworksdk/bridge/models/FWAdBadgeConfigModel.kt +9 -0
- package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge}/models/FWEventName.kt +10 -1
- package/android/src/main/java/com/fireworksdk/bridge/models/FWLiveStreamEventDetailsModel.kt +9 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWLiveStreamMessageDetailsModel.kt +11 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedConfigModel.kt +28 -0
- package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge}/models/FWVideoFeedItemDetailsModel.kt +2 -1
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedModel.kt +7 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedPropsModel.kt +18 -0
- package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge}/models/FWVideoFeedSource.kt +2 -1
- package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge}/models/FWVideoFeedTitlePosition.kt +1 -1
- package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge}/models/FWVideoPlaybackDetails.kt +1 -1
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerConfigModel.kt +23 -0
- package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge}/models/FWVideoShoppingProduct.kt +1 -1
- package/android/src/main/java/com/fireworksdk/bridge/models/WeakProperty.kt +19 -0
- package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge/reactnative}/FireworkSDKPackage.kt +10 -5
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/manager/FWVideoFeedManager.kt +175 -0
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/models/FWLiveStreamInterface.kt +5 -0
- package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge/reactnative}/models/FWVideoShoppingInterface.kt +3 -2
- package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge/reactnative}/models/FireworkSDKInterface.kt +4 -2
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FWLiveStreamModule.kt +88 -0
- package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge/reactnative}/module/FWVideoShoppingModule.kt +53 -39
- package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge/reactnative}/module/FireworkSDKModule.kt +23 -22
- package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge/reactnative}/pages/FWVideoShoppingCartActivity.kt +4 -4
- package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge/reactnative}/utils/FWEventUtils.kt +61 -7
- package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge}/utils/FWJsonUtils.kt +29 -1
- package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge}/utils/FWLogUtils.kt +2 -2
- package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge}/utils/FWUrlUtils.kt +1 -1
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWVideoPlayerUtils.kt +94 -0
- package/android/src/main/res/layout/fw_bridge_fragment_playlistfeed.xml +18 -0
- package/android/src/main/res/layout/{fwrn_fragment_shoppingcart.xml → fw_bridge_fragment_shoppingcart.xml} +1 -1
- package/android/src/main/res/layout/{fwrn_fragment_videofeed.xml → fw_bridge_fragment_videofeed.xml} +2 -1
- package/android/src/main/res/values/colors.xml +4 -0
- package/ios/{Component → Components}/VideoFeed.swift +60 -3
- package/ios/{Component → Components}/VideoFeedConfiguration.swift +2 -0
- package/ios/{Component → Components}/VideoFeedManager.m +2 -0
- package/ios/{Component → Components}/VideoFeedManager.swift +0 -0
- package/ios/{Component → Components}/VideoPlayerConfiguration.swift +7 -0
- package/ios/Models/{FireworkJsEvent.swift → NativeToRN/FireworkEventName.swift} +20 -0
- package/ios/Models/{FireworkSDK+JsModel.swift → NativeToRN/FireworkSDK+Json.swift} +33 -3
- package/ios/Models/{RCTConvert+FireworkSDKModule.swift → RNToNative/RCTConvert+FireworkSDKModule.swift} +20 -0
- package/ios/Models/{RCTConvert+Shopping.swift → RNToNative/RCTConvert+Shopping.swift} +15 -0
- package/ios/Models/{RCTConvert+VideoFeed.swift → RNToNative/RCTConvert+VideoFeed.swift} +2 -1
- package/ios/Modules/FireworkSDKModule/AdBadgeConfiguration.swift +18 -0
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule+CTA.swift +1 -1
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule+EventTracking.swift +10 -14
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule.m +2 -1
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule.swift +16 -4
- package/ios/Modules/LiveStream/LiveStreamModule.m +14 -0
- package/ios/Modules/LiveStream/LiveStreamModule.swift +43 -0
- package/ios/Modules/Shopping/ShoppingModule.m +1 -1
- package/ios/Modules/Shopping/ShoppingModule.swift +10 -9
- package/lib/commonjs/FireworkSDK.js +61 -38
- package/lib/commonjs/FireworkSDK.js.map +1 -1
- package/lib/commonjs/LiveStream.js +60 -0
- package/lib/commonjs/LiveStream.js.map +1 -0
- package/lib/commonjs/VideoShopping.js +20 -18
- package/lib/commonjs/VideoShopping.js.map +1 -1
- package/lib/commonjs/components/VideoFeed.js +47 -2
- package/lib/commonjs/components/VideoFeed.js.map +1 -1
- package/lib/commonjs/index.js +24 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/AdBadgeConfiguration.js +2 -0
- package/lib/commonjs/models/{ADConfig.js.map → AdBadgeConfiguration.js.map} +0 -0
- package/lib/commonjs/models/AdConfig.js +2 -0
- package/lib/{module/models/ADConfig.js.map → commonjs/models/AdConfig.js.map} +0 -0
- package/lib/commonjs/models/FWEventName.js +24 -0
- package/lib/commonjs/models/FWEventName.js.map +1 -0
- package/lib/commonjs/models/FWEvents.js +0 -14
- package/lib/commonjs/models/FWEvents.js.map +1 -1
- package/lib/commonjs/models/LiveStreamChatEventName.js +15 -0
- package/lib/commonjs/models/LiveStreamChatEventName.js.map +1 -0
- package/lib/commonjs/models/LiveStreamEventDetails.js +2 -0
- package/lib/commonjs/models/LiveStreamEventDetails.js.map +1 -0
- package/lib/commonjs/models/LiveStreamEventName.js +17 -0
- package/lib/commonjs/models/LiveStreamEventName.js.map +1 -0
- package/lib/commonjs/models/LiveStreamMessageDetails.js +2 -0
- package/lib/commonjs/models/LiveStreamMessageDetails.js.map +1 -0
- package/lib/commonjs/models/VideoFeedSource.js +6 -0
- package/lib/commonjs/models/VideoFeedSource.js.map +1 -0
- package/lib/commonjs/models/VideoPlaybackEventName.js.map +1 -1
- package/lib/commonjs/modules/FireworkSDKModule.js +3 -1
- package/lib/commonjs/modules/FireworkSDKModule.js.map +1 -1
- package/lib/commonjs/modules/LiveStreamModule.js +22 -0
- package/lib/commonjs/modules/LiveStreamModule.js.map +1 -0
- package/lib/commonjs/modules/ShoppingModule.js +3 -1
- package/lib/commonjs/modules/ShoppingModule.js.map +1 -1
- package/lib/module/FireworkSDK.js +50 -34
- package/lib/module/FireworkSDK.js.map +1 -1
- package/lib/module/LiveStream.js +51 -0
- package/lib/module/LiveStream.js.map +1 -0
- package/lib/module/VideoShopping.js +14 -13
- package/lib/module/VideoShopping.js.map +1 -1
- package/lib/module/components/VideoFeed.js +42 -3
- package/lib/module/components/VideoFeed.js.map +1 -1
- package/lib/module/index.js +4 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/AdBadgeConfiguration.js +2 -0
- package/lib/module/models/AdBadgeConfiguration.js.map +1 -0
- package/lib/module/models/AdConfig.js +2 -0
- package/lib/module/models/AdConfig.js.map +1 -0
- package/lib/module/models/FWEventName.js +17 -0
- package/lib/module/models/FWEventName.js.map +1 -0
- package/lib/module/models/FWEvents.js +1 -12
- package/lib/module/models/FWEvents.js.map +1 -1
- package/lib/module/models/LiveStreamChatEventName.js +8 -0
- package/lib/module/models/LiveStreamChatEventName.js.map +1 -0
- package/lib/module/models/LiveStreamEventDetails.js +2 -0
- package/lib/module/models/LiveStreamEventDetails.js.map +1 -0
- package/lib/module/models/LiveStreamEventName.js +10 -0
- package/lib/module/models/LiveStreamEventName.js.map +1 -0
- package/lib/module/models/LiveStreamMessageDetails.js +2 -0
- package/lib/module/models/LiveStreamMessageDetails.js.map +1 -0
- package/lib/module/models/VideoFeedSource.js +2 -0
- package/lib/module/models/VideoFeedSource.js.map +1 -0
- package/lib/module/models/VideoPlaybackEventName.js.map +1 -1
- package/lib/module/modules/FireworkSDKModule.js +3 -0
- package/lib/module/modules/FireworkSDKModule.js.map +1 -1
- package/lib/module/modules/LiveStreamModule.js +12 -0
- package/lib/module/modules/LiveStreamModule.js.map +1 -0
- package/lib/module/modules/ShoppingModule.js +3 -1
- package/lib/module/modules/ShoppingModule.js.map +1 -1
- package/lib/typescript/FireworkSDK.d.ts +26 -24
- package/lib/typescript/LiveStream.d.ts +21 -0
- package/lib/typescript/VideoShopping.d.ts +6 -6
- package/lib/typescript/components/VideoFeed.d.ts +11 -4
- package/lib/typescript/index.d.ts +15 -6
- package/lib/typescript/models/AdBadgeConfiguration.d.ts +15 -0
- package/lib/typescript/models/{ADConfig.d.ts → AdConfig.d.ts} +1 -1
- package/lib/typescript/models/FWEventName.d.ts +14 -0
- package/lib/typescript/models/FWEvents.d.ts +15 -12
- package/lib/typescript/models/FeedItemDetails.d.ts +11 -4
- package/lib/typescript/models/LiveStreamChatEventName.d.ts +7 -0
- package/lib/typescript/models/LiveStreamEventDetails.d.ts +3 -0
- package/lib/typescript/models/LiveStreamEventName.d.ts +15 -0
- package/lib/typescript/models/LiveStreamMessageDetails.d.ts +14 -0
- package/lib/typescript/models/VideoFeedConfiguration.d.ts +7 -3
- package/lib/typescript/models/VideoFeedSource.d.ts +2 -0
- package/lib/typescript/models/VideoPlaybackDetails.d.ts +1 -2
- package/lib/typescript/models/VideoPlaybackEventName.d.ts +1 -1
- package/lib/typescript/models/VideoPlayerConfiguration.d.ts +13 -0
- package/lib/typescript/modules/FireworkSDKModule.d.ts +8 -4
- package/lib/typescript/modules/LiveStreamModule.d.ts +8 -0
- package/lib/typescript/modules/ShoppingModule.d.ts +4 -2
- package/package.json +3 -4
- package/react-native-firework-sdk.podspec +3 -1
- package/src/FireworkSDK.ts +49 -33
- package/src/LiveStream.ts +51 -0
- package/src/VideoShopping.ts +15 -13
- package/src/components/VideoFeed.tsx +69 -7
- package/src/index.tsx +32 -15
- package/src/models/AdBadgeConfiguration.ts +16 -0
- package/src/models/{ADConfig.ts → AdConfig.ts} +1 -1
- package/src/models/FWEventName.ts +14 -0
- package/src/models/FWEvents.ts +17 -13
- package/src/models/FeedItemDetails.ts +12 -4
- package/src/models/LiveStreamChatEventName.ts +8 -0
- package/src/models/LiveStreamEventDetails.ts +4 -0
- package/src/models/LiveStreamEventName.ts +16 -0
- package/src/models/LiveStreamMessageDetails.ts +14 -0
- package/src/models/VideoFeedConfiguration.ts +7 -3
- package/src/models/VideoFeedSource.ts +2 -0
- package/src/models/VideoPlaybackDetails.ts +1 -3
- package/src/models/VideoPlaybackEventName.ts +1 -1
- package/src/models/VideoPlayerConfiguration.ts +14 -0
- package/src/modules/FireworkSDKModule.ts +10 -4
- package/src/modules/LiveStreamModule.ts +26 -0
- package/src/modules/ShoppingModule.ts +14 -7
- package/android/src/main/java/com/reactnativefireworksdk/components/videofeed/FWVideoFeed.kt +0 -124
- package/android/src/main/java/com/reactnativefireworksdk/manager/FWVideoFeedManager.kt +0 -88
- package/android/src/main/java/com/reactnativefireworksdk/models/FWVideoFeedConfigModel.kt +0 -27
- package/android/src/main/java/com/reactnativefireworksdk/models/FWVideoFeedMode.kt +0 -7
- package/android/src/main/java/com/reactnativefireworksdk/models/FWVideoPlayerConfigModel.kt +0 -20
- package/android/src/main/java/com/reactnativefireworksdk/utils/FWVideoPlayerUtils.kt +0 -18
- package/lib/commonjs/models/ADConfig.js +0 -2
- package/lib/module/models/ADConfig.js +0 -2
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
(function (FWEventName) {
|
|
4
|
-
FWEventName["SDKInit"] = "fw:sdk-init";
|
|
5
|
-
FWEventName["CustomCTAClick"] = "fw:custom-cta-click";
|
|
6
|
-
FWEventName["VideoPlayback"] = "fw:video-playback";
|
|
7
|
-
FWEventName["VideoFeedClick"] = "fw:video-feed-click";
|
|
8
|
-
FWEventName["AddToCart"] = "fw:shopping:add-to-cart";
|
|
9
|
-
FWEventName["ClickCartIcon"] = "fw:shopping:click-cart-icon";
|
|
10
|
-
FWEventName["UpdateProductDetails"] = "fw:shopping:update-product-details";
|
|
11
|
-
FWEventName["WillDisplayProduct"] = "fw:shopping:will-display-product";
|
|
12
|
-
})(FWEventName || (FWEventName = {}));
|
|
1
|
+
export {};
|
|
13
2
|
//# sourceMappingURL=FWEvents.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var LiveStreamChatEventName;
|
|
2
|
+
|
|
3
|
+
(function (LiveStreamChatEventName) {
|
|
4
|
+
LiveStreamChatEventName["userSendChat"] = "fw:livestream:user-send-chat";
|
|
5
|
+
})(LiveStreamChatEventName || (LiveStreamChatEventName = {}));
|
|
6
|
+
|
|
7
|
+
export default LiveStreamChatEventName;
|
|
8
|
+
//# sourceMappingURL=LiveStreamChatEventName.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["LiveStreamChatEventName.ts"],"names":["LiveStreamChatEventName"],"mappings":"IAAKA,uB;;WAAAA,uB;AAAAA,EAAAA,uB;GAAAA,uB,KAAAA,uB;;AAOL,eAAeA,uBAAf","sourcesContent":["enum LiveStreamChatEventName {\n /**\n * Called when a user sends messages to an active live stream.\n */\n userSendChat = 'fw:livestream:user-send-chat',\n}\n\nexport default LiveStreamChatEventName;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var LiveStreamEventName;
|
|
2
|
+
|
|
3
|
+
(function (LiveStreamEventName) {
|
|
4
|
+
LiveStreamEventName["userDidjoin"] = "fw:livestream:user-join";
|
|
5
|
+
LiveStreamEventName["userDidLeave"] = "fw:livestream:user-leave";
|
|
6
|
+
LiveStreamEventName["userSendLike"] = "fw:livestream:user-send-like";
|
|
7
|
+
})(LiveStreamEventName || (LiveStreamEventName = {}));
|
|
8
|
+
|
|
9
|
+
export default LiveStreamEventName;
|
|
10
|
+
//# sourceMappingURL=LiveStreamEventName.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["LiveStreamEventName.ts"],"names":["LiveStreamEventName"],"mappings":"IAAKA,mB;;WAAAA,mB;AAAAA,EAAAA,mB;AAAAA,EAAAA,mB;AAAAA,EAAAA,mB;GAAAA,mB,KAAAA,mB;;AAeL,eAAeA,mBAAf","sourcesContent":["enum LiveStreamEventName {\n /**\n * Called when a user joins an active live stream.\n */\n userDidjoin = 'fw:livestream:user-join',\n /**\n * Called when the user leaves an active live stream.\n */\n userDidLeave = 'fw:livestream:user-leave',\n /**\n * Called when a user sends a like to an active live stream.\n */\n userSendLike = 'fw:livestream:user-send-like',\n}\n\nexport default LiveStreamEventName;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["VideoPlaybackEventName.ts"],"names":["VideoPlaybackEventName"],"mappings":"IAAKA,sB;;WAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;GAAAA,sB,KAAAA,sB;;AAuCL,eAAeA,sBAAf","sourcesContent":["enum VideoPlaybackEventName {\n /**\n * When video is shown to the user.\n */\n Impression = 'fw:video:impression',\n /**\n * Video started.\n */\n Start = 'fw:video:start',\n /**\n * Video reached 25%.\n */\n FirstQuartile = 'fw:video:first-quartile',\n /**\n * Video reached 50%.\n */\n Midpoint = 'fw:video:midpoint',\n /**\n * Video reached 75%.\n */\n ThirdQuartile = 'fw:video:third-quartile',\n /**\n * Video reached 100%.\n */\n Complete = 'fw:video:complete',\n /**\n * When ad video finishes playing
|
|
1
|
+
{"version":3,"sources":["VideoPlaybackEventName.ts"],"names":["VideoPlaybackEventName"],"mappings":"IAAKA,sB;;WAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;GAAAA,sB,KAAAA,sB;;AAuCL,eAAeA,sBAAf","sourcesContent":["enum VideoPlaybackEventName {\n /**\n * When video is shown to the user.\n */\n Impression = 'fw:video:impression',\n /**\n * Video started.\n */\n Start = 'fw:video:start',\n /**\n * Video reached 25%.\n */\n FirstQuartile = 'fw:video:first-quartile',\n /**\n * Video reached 50%.\n */\n Midpoint = 'fw:video:midpoint',\n /**\n * Video reached 75%.\n */\n ThirdQuartile = 'fw:video:third-quartile',\n /**\n * Video reached 100%.\n */\n Complete = 'fw:video:complete',\n /**\n * When ad video finishes playing.\n */\n AdEnd = 'fw:video:ad-end',\n /**\n * When a visitor clicks on CTA button (if available).\n */\n ClickCTA = 'fw:video:click-cta',\n /**\n * When user clicks on \"Share\" button.\n */\n ClickShare = 'fw:video:click-share',\n}\n\nexport default VideoPlaybackEventName;\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { NativeEventEmitter } from 'react-native';
|
|
1
2
|
import { NativeModules } from 'react-native';
|
|
2
3
|
import { LINKING_ERROR } from '../constants/FWErrorMessage';
|
|
3
4
|
const FireworkSDKModule = NativeModules.FireworkSDK ? NativeModules.FireworkSDK : new Proxy({}, {
|
|
@@ -6,5 +7,7 @@ const FireworkSDKModule = NativeModules.FireworkSDK ? NativeModules.FireworkSDK
|
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
});
|
|
10
|
+
const FireworkSDKModuleEventEmitter = new NativeEventEmitter(FireworkSDKModule);
|
|
11
|
+
export { FireworkSDKModuleEventEmitter };
|
|
9
12
|
export default FireworkSDKModule;
|
|
10
13
|
//# sourceMappingURL=FireworkSDKModule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["FireworkSDKModule.ts"],"names":["NativeModules","LINKING_ERROR","FireworkSDKModule","FireworkSDK","Proxy","get","Error"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["FireworkSDKModule.ts"],"names":["NativeEventEmitter","NativeModules","LINKING_ERROR","FireworkSDKModule","FireworkSDK","Proxy","get","Error","FireworkSDKModuleEventEmitter"],"mappings":"AAAA,SAASA,kBAAT,QAAiD,cAAjD;AACA,SAASC,aAAT,QAA8B,cAA9B;AAGA,SAASC,aAAT,QAA8B,6BAA9B;AAIA,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;AAoBA,MAAMM,6BAA6B,GAAG,IAAIR,kBAAJ,CAAuBG,iBAAvB,CAAtC;AACA,SACEK,6BADF;AAGA,eAAeL,iBAAf","sourcesContent":["import { NativeEventEmitter, NativeModule } from 'react-native';\nimport { NativeModules } from 'react-native';\nimport type AdBadgeConfiguration from 'src/models/AdBadgeConfiguration';\n\nimport { LINKING_ERROR } from '../constants/FWErrorMessage';\nimport type AdConfig from '../models/AdConfig';\nimport type VideoPlayerConfiguration from '../models/VideoPlayerConfiguration';\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(userId?: string, adConfig?: AdConfig): void;\n openVideoPlayer(url: string, config?: VideoPlayerConfiguration): void;\n setCustomCTAClickEnabled(enabled: boolean): void;\n setShareBaseURL(url?: string): Promise<any>;\n setVideoPlaybackEventEnabled(enabled: boolean): void;\n setAdBadgeConfiguration(config?: AdBadgeConfiguration): Promise<any>;\n}\n\nconst FireworkSDKModuleEventEmitter = new NativeEventEmitter(FireworkSDKModule);\nexport {\n FireworkSDKModuleEventEmitter,\n}\nexport default FireworkSDKModule as IFireworkSDKModule;\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { NativeEventEmitter, NativeModules } from 'react-native';
|
|
2
|
+
import { LINKING_ERROR } from '../constants/FWErrorMessage';
|
|
3
|
+
const LiveStreamModule = NativeModules.LiveStreamModule ? NativeModules.LiveStreamModule : new Proxy({}, {
|
|
4
|
+
get() {
|
|
5
|
+
throw new Error(LINKING_ERROR);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
});
|
|
9
|
+
const LiveStreamModuleEventEmitter = new NativeEventEmitter(LiveStreamModule);
|
|
10
|
+
export { LiveStreamModuleEventEmitter };
|
|
11
|
+
export default LiveStreamModule;
|
|
12
|
+
//# sourceMappingURL=LiveStreamModule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["LiveStreamModule.ts"],"names":["NativeEventEmitter","NativeModules","LINKING_ERROR","LiveStreamModule","Proxy","get","Error","LiveStreamModuleEventEmitter"],"mappings":"AAAA,SACEA,kBADF,EAGEC,aAHF,QAIO,cAJP;AAMA,SAASC,aAAT,QAA8B,6BAA9B;AAEA,MAAMC,gBAAgB,GAAGF,aAAa,CAACE,gBAAd,GACrBF,aAAa,CAACE,gBADO,GAErB,IAAIC,KAAJ,CACE,EADF,EAEE;AACEC,EAAAA,GAAG,GAAG;AACJ,UAAM,IAAIC,KAAJ,CAAUJ,aAAV,CAAN;AACD;;AAHH,CAFF,CAFJ;AAcA,MAAMK,4BAA4B,GAAG,IAAIP,kBAAJ,CAAuBG,gBAAvB,CAArC;AACA,SAASI,4BAAT;AAEA,eAAeJ,gBAAf","sourcesContent":["import {\n NativeEventEmitter,\n NativeModule,\n NativeModules,\n} from 'react-native';\n\nimport { LINKING_ERROR } from '../constants/FWErrorMessage';\n\nconst LiveStreamModule = NativeModules.LiveStreamModule\n ? NativeModules.LiveStreamModule\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\ninterface ILiveStreamModule extends NativeModule {\n init(): void;\n}\nconst LiveStreamModuleEventEmitter = new NativeEventEmitter(LiveStreamModule);\nexport { LiveStreamModuleEventEmitter };\n\nexport default LiveStreamModule as ILiveStreamModule;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NativeModules } from 'react-native';
|
|
1
|
+
import { NativeEventEmitter, NativeModules } from 'react-native';
|
|
2
2
|
import { LINKING_ERROR } from '../constants/FWErrorMessage';
|
|
3
3
|
const ShoppingModule = NativeModules.ShoppingModule ? NativeModules.ShoppingModule : new Proxy({}, {
|
|
4
4
|
get() {
|
|
@@ -6,5 +6,7 @@ const ShoppingModule = NativeModules.ShoppingModule ? NativeModules.ShoppingModu
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
});
|
|
9
|
+
const ShoppingModuleEventEmitter = new NativeEventEmitter(ShoppingModule);
|
|
10
|
+
export { ShoppingModuleEventEmitter };
|
|
9
11
|
export default ShoppingModule;
|
|
10
12
|
//# sourceMappingURL=ShoppingModule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ShoppingModule.ts"],"names":["NativeModules","LINKING_ERROR","ShoppingModule","Proxy","get","Error"],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"sources":["ShoppingModule.ts"],"names":["NativeEventEmitter","NativeModules","LINKING_ERROR","ShoppingModule","Proxy","get","Error","ShoppingModuleEventEmitter"],"mappings":"AAAA,SAASA,kBAAT,EAA2CC,aAA3C,QAAgE,cAAhE;AAGA,SAASC,aAAT,QAA8B,6BAA9B;AAEA,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;AA6BA,MAAMK,0BAA0B,GAAG,IAAIP,kBAAJ,CAAuBG,cAAvB,CAAnC;AACA,SAASI,0BAAT;AAEA,eAAeJ,cAAf","sourcesContent":["import { NativeEventEmitter, NativeModule, NativeModules } from 'react-native';\nimport type Product from '../models/Product';\nimport type ProductInfoViewConfiguration from '../models/ProductInfoViewConfiguration';\nimport { LINKING_ERROR } from '../constants/FWErrorMessage';\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(): void;\n updateVideoProducts(products: Product[], callbackId: number | string): void;\n updateProductViewConfig(\n config: ProductInfoViewConfiguration,\n callbackId: number | string\n ): void;\n updateAddToCartStatus(\n res: string,\n tips: string,\n callbackId: number | string\n ): void;\n jumpToCartPage(callbackId: number | string): void;\n exitCartPage(): void;\n setCartIconVisible(visible: boolean): void;\n setCartItemCount(count: number): void;\n}\n\nconst ShoppingModuleEventEmitter = new NativeEventEmitter(ShoppingModule);\nexport { ShoppingModuleEventEmitter };\n\nexport default ShoppingModule as IShoppingModule;\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type
|
|
3
|
-
import
|
|
1
|
+
import LiveStream from './LiveStream';
|
|
2
|
+
import type AdBadgeConfiguration from './models/AdBadgeConfiguration';
|
|
3
|
+
import type AdConfig from './models/AdConfig';
|
|
4
|
+
import type { CustomCTAClickEvent, SDKInitEvent, VideoFeedClickEvent, VideoPlaybackEvent } from './models/FWEvents';
|
|
4
5
|
import type VideoPlayerConfiguration from './models/VideoPlayerConfiguration';
|
|
5
6
|
import VideoShopping from './VideoShopping';
|
|
6
7
|
export declare type SDKInitCallback = (event: SDKInitEvent) => void;
|
|
@@ -12,46 +13,47 @@ export declare type VideoFeedClickCallback = (event: VideoFeedClickEvent) => voi
|
|
|
12
13
|
*/
|
|
13
14
|
declare class FireworkSDK {
|
|
14
15
|
private static _instance?;
|
|
15
|
-
private _onCustomCTAClick;
|
|
16
|
-
private _onVideoPlayback?;
|
|
17
16
|
/**
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
onVideoFeedClick?: VideoFeedClickCallback;
|
|
21
|
-
private _shareBaseURL;
|
|
22
|
-
/**
|
|
23
|
-
* SDK initialization callback.
|
|
17
|
+
* The callback of SDK initialization.
|
|
24
18
|
*/
|
|
25
19
|
onSDKInit?: SDKInitCallback;
|
|
26
20
|
/**
|
|
27
|
-
*
|
|
21
|
+
* the callback of clicking Video Feed.
|
|
28
22
|
*/
|
|
29
|
-
|
|
23
|
+
onVideoFeedClick?: VideoFeedClickCallback;
|
|
30
24
|
/**
|
|
31
|
-
*
|
|
25
|
+
* The callback of clicking custom CTA.
|
|
32
26
|
*/
|
|
27
|
+
get onCustomCTAClick(): CustomCTAClickCallback | undefined;
|
|
33
28
|
set onCustomCTAClick(value: CustomCTAClickCallback | undefined);
|
|
29
|
+
private _onCustomCTAClick;
|
|
34
30
|
/**
|
|
35
|
-
*
|
|
31
|
+
* The callback of video playback.
|
|
36
32
|
*/
|
|
37
33
|
get onVideoPlayback(): VideoPlaybackCallback | undefined;
|
|
38
|
-
/**
|
|
39
|
-
* Set Video Playback callback.
|
|
40
|
-
*/
|
|
41
34
|
set onVideoPlayback(value: VideoPlaybackCallback | undefined);
|
|
35
|
+
private _onVideoPlayback?;
|
|
42
36
|
/**
|
|
43
|
-
*
|
|
37
|
+
* The share base URL of videos.
|
|
44
38
|
*/
|
|
45
39
|
get shareBaseURL(): string | undefined;
|
|
40
|
+
set shareBaseURL(value: string | undefined);
|
|
41
|
+
private _shareBaseURL;
|
|
46
42
|
/**
|
|
47
|
-
*
|
|
43
|
+
* The configuration for ad badges.
|
|
48
44
|
*/
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
get adBadgeConfiguration(): AdBadgeConfiguration | undefined;
|
|
46
|
+
set adBadgeConfiguration(value: AdBadgeConfiguration | undefined);
|
|
47
|
+
private _adBadgeConfiguration?;
|
|
48
|
+
private get eventEmitter();
|
|
51
49
|
/**
|
|
52
50
|
* Get VideoShopping object.
|
|
53
51
|
*/
|
|
54
52
|
get shopping(): VideoShopping;
|
|
53
|
+
/**
|
|
54
|
+
* Get LiveStream object.
|
|
55
|
+
*/
|
|
56
|
+
get liveStream(): LiveStream;
|
|
55
57
|
/**
|
|
56
58
|
* Get global single instance of FireworkSDK class.
|
|
57
59
|
* @returns FireworkSDK
|
|
@@ -61,9 +63,9 @@ declare class FireworkSDK {
|
|
|
61
63
|
/**
|
|
62
64
|
* Initializes Firework SDK.
|
|
63
65
|
* @param {string?} userId An id to uniquely identify device or user.
|
|
64
|
-
* @param {
|
|
66
|
+
* @param {AdConfig?} adConfig Configuration of Ad.
|
|
65
67
|
*/
|
|
66
|
-
init(userId?: string, adConfig?:
|
|
68
|
+
init(userId?: string, adConfig?: AdConfig): void;
|
|
67
69
|
/**
|
|
68
70
|
* Open Video URL.
|
|
69
71
|
* @param {string} url
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { LiveStreamChatEvent, LiveStreamEvent } from "./models/FWEvents";
|
|
2
|
+
export declare type onLiveStreamEventCallback = (event: LiveStreamEvent) => void;
|
|
3
|
+
export declare type onLiveStreamChatEventCallback = (event: LiveStreamChatEvent) => void;
|
|
4
|
+
/**
|
|
5
|
+
* The entry class of live stream.
|
|
6
|
+
*/
|
|
7
|
+
declare class LiveStream {
|
|
8
|
+
private static _instance?;
|
|
9
|
+
/**
|
|
10
|
+
* The callback of live stream event.
|
|
11
|
+
*/
|
|
12
|
+
onLiveStreamEvent?: onLiveStreamEventCallback;
|
|
13
|
+
/**
|
|
14
|
+
* The callback of live stream chat event.
|
|
15
|
+
*/
|
|
16
|
+
onLiveStreamChatEvent?: onLiveStreamChatEventCallback;
|
|
17
|
+
private get eventEmitter();
|
|
18
|
+
static getInstance(): LiveStream;
|
|
19
|
+
private constructor();
|
|
20
|
+
}
|
|
21
|
+
export default LiveStream;
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type AddToCartResult from './models/AddToCartResult';
|
|
3
|
-
import { AddToCartEvent, UpdateProductDetailsEvent, WillDisplayProductEvent } from './models/FWEvents';
|
|
3
|
+
import type { AddToCartEvent, UpdateProductDetailsEvent, WillDisplayProductEvent } from './models/FWEvents';
|
|
4
4
|
import type Product from './models/Product';
|
|
5
5
|
import type ProductInfoViewConfiguration from './models/ProductInfoViewConfiguration';
|
|
6
6
|
export declare type AddToCartCallback = (event: AddToCartEvent) => Promise<AddToCartResult | undefined | null>;
|
|
7
7
|
export declare type ClickCartIconCallback = () => Promise<React.ReactNode | undefined | null>;
|
|
8
|
-
export declare type UpdateProductDetailsCallback = (event: UpdateProductDetailsEvent) => Promise<Product | undefined | null>;
|
|
8
|
+
export declare type UpdateProductDetailsCallback = (event: UpdateProductDetailsEvent) => Promise<Product[] | undefined | null>;
|
|
9
9
|
export declare type WillDisplayProductCallback = (event: WillDisplayProductEvent) => Promise<ProductInfoViewConfiguration | undefined | null>;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* The entry class of video shopping.
|
|
12
12
|
*/
|
|
13
13
|
declare class VideoShopping {
|
|
14
14
|
private static _instance?;
|
|
15
|
-
private _cartIconVisible;
|
|
16
15
|
/**
|
|
17
16
|
* This callback is triggered when the user clicks the "Add to cart" button.
|
|
18
17
|
*
|
|
@@ -28,7 +27,7 @@ declare class VideoShopping {
|
|
|
28
27
|
/**
|
|
29
28
|
* This callback is triggered when the video will be shown.
|
|
30
29
|
*
|
|
31
|
-
* The host app can return a Product
|
|
30
|
+
* The host app can return a Product list to update the latest product information.
|
|
32
31
|
*/
|
|
33
32
|
onUpdateProductDetails?: UpdateProductDetailsCallback;
|
|
34
33
|
/**
|
|
@@ -42,8 +41,9 @@ declare class VideoShopping {
|
|
|
42
41
|
*/
|
|
43
42
|
get cartIconVisible(): boolean;
|
|
44
43
|
set cartIconVisible(value: boolean);
|
|
44
|
+
private _cartIconVisible;
|
|
45
45
|
currentCartPage?: React.ReactNode;
|
|
46
|
-
private eventEmitter;
|
|
46
|
+
private get eventEmitter();
|
|
47
47
|
static getInstance(): VideoShopping;
|
|
48
48
|
private constructor();
|
|
49
49
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
-
import type VideoPlayerConfiguration from '../models/VideoPlayerConfiguration';
|
|
4
|
-
import type VideoFeedConfiguration from '../models/VideoFeedConfiguration';
|
|
2
|
+
import { EmitterSubscription, StyleProp, ViewStyle } from 'react-native';
|
|
5
3
|
import type FWError from '../models/FWError';
|
|
6
|
-
|
|
4
|
+
import type VideoFeedConfiguration from '../models/VideoFeedConfiguration';
|
|
5
|
+
import type VideoFeedSource from '../models/VideoFeedSource';
|
|
6
|
+
import type VideoPlayerConfiguration from '../models/VideoPlayerConfiguration';
|
|
7
7
|
export declare type VideoFeedMode = 'row' | 'column' | 'grid';
|
|
8
8
|
export interface IVideoFeedProps {
|
|
9
9
|
/**
|
|
@@ -22,6 +22,10 @@ export interface IVideoFeedProps {
|
|
|
22
22
|
* Playlist Id for selected content. Please note channel name is necessary. Required when the source is set as playlist.
|
|
23
23
|
*/
|
|
24
24
|
playlist?: string;
|
|
25
|
+
/**
|
|
26
|
+
* PlaylistGroup Id for selected content. Required when the source is set as playlistGroup.
|
|
27
|
+
*/
|
|
28
|
+
playlistGroup?: string;
|
|
25
29
|
/**
|
|
26
30
|
* One of three available display modes. Defaults to row.
|
|
27
31
|
*/
|
|
@@ -44,10 +48,13 @@ export default class VideoFeed extends React.Component<IVideoFeedProps> {
|
|
|
44
48
|
mode: string;
|
|
45
49
|
};
|
|
46
50
|
nativeComponentRef: React.RefObject<any>;
|
|
51
|
+
subscriptions: EmitterSubscription[];
|
|
47
52
|
/**
|
|
48
53
|
* Force refreshing the video feed.
|
|
49
54
|
*/
|
|
50
55
|
refresh: () => void;
|
|
51
56
|
private _onVideoFeedLoadFinished;
|
|
57
|
+
componentDidMount(): void;
|
|
58
|
+
componentWillUnmount(): void;
|
|
52
59
|
render(): JSX.Element;
|
|
53
60
|
}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
import type { IVideoFeedProps, VideoFeedMode
|
|
1
|
+
import type { IVideoFeedProps, VideoFeedMode } from './components/VideoFeed';
|
|
2
2
|
import VideoFeed from './components/VideoFeed';
|
|
3
3
|
import type { CustomCTAClickCallback, SDKInitCallback, VideoFeedClickCallback, VideoPlaybackCallback } from './FireworkSDK';
|
|
4
4
|
import FireworkSDK from './FireworkSDK';
|
|
5
|
-
import type
|
|
5
|
+
import type { onLiveStreamChatEventCallback, onLiveStreamEventCallback } from './LiveStream';
|
|
6
|
+
import LiveStream from './LiveStream';
|
|
7
|
+
import type AdBadgeConfiguration from './models/AdBadgeConfiguration';
|
|
8
|
+
import type { AdBadgeTextType } from './models/AdBadgeConfiguration';
|
|
9
|
+
import type AdConfig from './models/AdConfig';
|
|
6
10
|
import type AddToCartResult from './models/AddToCartResult';
|
|
7
11
|
import type FeedItemDetails from './models/FeedItemDetails';
|
|
8
12
|
import type FWError from './models/FWError';
|
|
9
|
-
import type { AddToCartEvent, CustomCTAClickEvent, SDKInitEvent, UpdateProductDetailsEvent, VideoPlaybackEvent, WillDisplayProductEvent } from './models/FWEvents';
|
|
13
|
+
import type { AddToCartEvent, CustomCTAClickEvent, LiveStreamChatEvent, LiveStreamEvent, SDKInitEvent, UpdateProductDetailsEvent, VideoPlaybackEvent, WillDisplayProductEvent } from './models/FWEvents';
|
|
14
|
+
import type LiveStreamEventDetails from './models/LiveStreamEventDetails';
|
|
15
|
+
import LiveStreamEventName from './models/LiveStreamEventName';
|
|
16
|
+
import type LiveStreamMessageDetails from './models/LiveStreamMessageDetails';
|
|
17
|
+
import LiveStreamChatEventName from './models/LiveStreamChatEventName';
|
|
10
18
|
import type Product from './models/Product';
|
|
11
19
|
import type ProductInfoViewConfiguration from './models/ProductInfoViewConfiguration';
|
|
12
20
|
import type { AddToCartButtonConfiguration } from './models/ProductInfoViewConfiguration';
|
|
@@ -14,12 +22,13 @@ import type ProductUnit from './models/ProductUnit';
|
|
|
14
22
|
import type { ProductPrice } from './models/ProductUnit';
|
|
15
23
|
import type VideoFeedConfiguration from './models/VideoFeedConfiguration';
|
|
16
24
|
import type { VideoFeedPlayIconConfiguration, VideoFeedTitleConfiguration, VideoFeedTitlePosition } from './models/VideoFeedConfiguration';
|
|
25
|
+
import type VideoFeedSource from './models/VideoFeedSource';
|
|
17
26
|
import type VideoPlaybackDetails from './models/VideoPlaybackDetails';
|
|
18
|
-
import type {
|
|
27
|
+
import type { VideoPlayerSize } from './models/VideoPlaybackDetails';
|
|
19
28
|
import VideoPlaybackEventName from './models/VideoPlaybackEventName';
|
|
20
29
|
import type VideoPlayerConfiguration from './models/VideoPlayerConfiguration';
|
|
21
|
-
import type { VideoPlayerCompleteAction, VideoPlayerCTAStyle, VideoPlayerStyle } from './models/VideoPlayerConfiguration';
|
|
30
|
+
import type { VideoLaunchBehavior, VideoPlayerCompleteAction, VideoPlayerCTAStyle, VideoPlayerStyle } from './models/VideoPlayerConfiguration';
|
|
22
31
|
import type { AddToCartCallback, ClickCartIconCallback, UpdateProductDetailsCallback, WillDisplayProductCallback } from './VideoShopping';
|
|
23
32
|
import VideoShopping from './VideoShopping';
|
|
24
33
|
export default FireworkSDK;
|
|
25
|
-
export {
|
|
34
|
+
export { AdBadgeConfiguration, AdBadgeTextType, AdConfig, AddToCartButtonConfiguration, AddToCartCallback, AddToCartEvent, AddToCartResult, ClickCartIconCallback, CustomCTAClickCallback, CustomCTAClickEvent, FeedItemDetails, FWError, IVideoFeedProps, LiveStream, LiveStreamChatEvent, LiveStreamEvent, LiveStreamEventDetails, LiveStreamEventName, LiveStreamMessageDetails, LiveStreamChatEventName, onLiveStreamChatEventCallback, onLiveStreamEventCallback, Product, ProductInfoViewConfiguration, ProductPrice, ProductUnit, SDKInitCallback, SDKInitEvent, UpdateProductDetailsCallback, UpdateProductDetailsEvent, VideoFeed, VideoFeedClickCallback, VideoFeedConfiguration, VideoFeedMode, VideoFeedPlayIconConfiguration, VideoFeedSource, VideoFeedTitleConfiguration, VideoFeedTitlePosition, VideoLaunchBehavior, VideoPlaybackCallback, VideoPlaybackDetails, VideoPlaybackEvent, VideoPlaybackEventName, VideoPlayerCompleteAction, VideoPlayerConfiguration, VideoPlayerCTAStyle, VideoPlayerSize, VideoPlayerStyle, VideoShopping, WillDisplayProductCallback, WillDisplayProductEvent, };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare type AdBadgeTextType = 'ad' | 'sponsored';
|
|
2
|
+
export default interface AdBadgeConfiguration {
|
|
3
|
+
/**
|
|
4
|
+
* The text type of the ad badge.
|
|
5
|
+
*/
|
|
6
|
+
badgeTextType?: AdBadgeTextType;
|
|
7
|
+
/**
|
|
8
|
+
* The background color of the ad badge. Only supported on iOS.
|
|
9
|
+
*/
|
|
10
|
+
backgroundColor?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The color of the ad badge text. Only supported on iOS.
|
|
13
|
+
*/
|
|
14
|
+
textColor?: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum FWEventName {
|
|
2
|
+
SDKInit = "fw:sdk-init",
|
|
3
|
+
CustomCTAClick = "fw:custom-cta-click",
|
|
4
|
+
VideoPlayback = "fw:video-playback",
|
|
5
|
+
VideoFeedClick = "fw:video-feed-click",
|
|
6
|
+
AddToCart = "fw:shopping:add-to-cart",
|
|
7
|
+
ClickCartIcon = "fw:shopping:click-cart-icon",
|
|
8
|
+
UpdateProductDetails = "fw:shopping:update-product-details",
|
|
9
|
+
WillDisplayProduct = "fw:shopping:will-display-product",
|
|
10
|
+
onLiveStreamEvent = "fw:livestream",
|
|
11
|
+
onLiveStreamChatEvent = "fw:livestream-chat",
|
|
12
|
+
ShareBaseURLUpdated = "fw:share-base-url-updated",
|
|
13
|
+
AdBadgeConfigurationUpdated = "fw:ad-badge-configuration-updated"
|
|
14
|
+
}
|
|
@@ -2,16 +2,10 @@ import type VideoPlaybackDetails from './VideoPlaybackDetails';
|
|
|
2
2
|
import type FWError from './FWError';
|
|
3
3
|
import type VideoPlaybackEventName from './VideoPlaybackEventName';
|
|
4
4
|
import type FeedItemDetails from './FeedItemDetails';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
VideoFeedClick = "fw:video-feed-click",
|
|
10
|
-
AddToCart = "fw:shopping:add-to-cart",
|
|
11
|
-
ClickCartIcon = "fw:shopping:click-cart-icon",
|
|
12
|
-
UpdateProductDetails = "fw:shopping:update-product-details",
|
|
13
|
-
WillDisplayProduct = "fw:shopping:will-display-product"
|
|
14
|
-
}
|
|
5
|
+
import type LiveStreamMessageDetails from './LiveStreamMessageDetails';
|
|
6
|
+
import type LiveStreamChatEventName from './LiveStreamChatEventName';
|
|
7
|
+
import type LiveStreamEventDetails from './LiveStreamEventDetails';
|
|
8
|
+
import type LiveStreamEventName from './LiveStreamEventName';
|
|
15
9
|
export interface SDKInitEvent {
|
|
16
10
|
/**
|
|
17
11
|
* If error equals undefined/null, it means the initialization is successful.
|
|
@@ -43,9 +37,9 @@ export interface AddToCartEvent {
|
|
|
43
37
|
}
|
|
44
38
|
export interface UpdateProductDetailsEvent {
|
|
45
39
|
/**
|
|
46
|
-
* A unique identifier of the
|
|
40
|
+
* A unique identifier list of the products.
|
|
47
41
|
*/
|
|
48
|
-
|
|
42
|
+
productIds: string[];
|
|
49
43
|
}
|
|
50
44
|
export interface WillDisplayProductEvent {
|
|
51
45
|
/**
|
|
@@ -53,3 +47,12 @@ export interface WillDisplayProductEvent {
|
|
|
53
47
|
*/
|
|
54
48
|
videoId: string;
|
|
55
49
|
}
|
|
50
|
+
export interface LiveStreamEvent {
|
|
51
|
+
eventName: LiveStreamEventName;
|
|
52
|
+
info: LiveStreamEventDetails;
|
|
53
|
+
}
|
|
54
|
+
export interface LiveStreamChatEvent {
|
|
55
|
+
eventName: LiveStreamChatEventName;
|
|
56
|
+
message: LiveStreamMessageDetails;
|
|
57
|
+
liveStream: LiveStreamEventDetails;
|
|
58
|
+
}
|
|
@@ -1,14 +1,21 @@
|
|
|
1
|
+
import type VideoFeedSource from '../models/VideoFeedSource';
|
|
1
2
|
export default interface FeedItemDetails {
|
|
2
3
|
/**
|
|
3
|
-
* The index of the thumbnail tapped in the
|
|
4
|
+
* The index of the thumbnail tapped in the feed.
|
|
4
5
|
*/
|
|
5
6
|
index: number;
|
|
6
7
|
/**
|
|
7
|
-
*
|
|
8
|
+
* The unique id of the thumbnail.
|
|
9
|
+
* If the source is `playlistGroup` this value will represent the playlist's id; otherwise this value is the id of the selected video.
|
|
8
10
|
*/
|
|
9
|
-
|
|
11
|
+
id: string;
|
|
10
12
|
/**
|
|
11
|
-
* The total duration of the video
|
|
13
|
+
* The total duration of the video.
|
|
14
|
+
* If the source is `playlistGroup` this value will always be 0; otherwise this value is the duration of the selected video.
|
|
12
15
|
*/
|
|
13
16
|
duration: number;
|
|
17
|
+
/**
|
|
18
|
+
* The content source of the feed.
|
|
19
|
+
*/
|
|
20
|
+
source: VideoFeedSource;
|
|
14
21
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare enum LiveStreamEventName {
|
|
2
|
+
/**
|
|
3
|
+
* Called when a user joins an active live stream.
|
|
4
|
+
*/
|
|
5
|
+
userDidjoin = "fw:livestream:user-join",
|
|
6
|
+
/**
|
|
7
|
+
* Called when the user leaves an active live stream.
|
|
8
|
+
*/
|
|
9
|
+
userDidLeave = "fw:livestream:user-leave",
|
|
10
|
+
/**
|
|
11
|
+
* Called when a user sends a like to an active live stream.
|
|
12
|
+
*/
|
|
13
|
+
userSendLike = "fw:livestream:user-send-like"
|
|
14
|
+
}
|
|
15
|
+
export default LiveStreamEventName;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export default interface LiveStreamMessageDetails {
|
|
2
|
+
/**
|
|
3
|
+
* A unique identifier of the message.
|
|
4
|
+
*/
|
|
5
|
+
messageId: string;
|
|
6
|
+
/**
|
|
7
|
+
* The username of the user.
|
|
8
|
+
*/
|
|
9
|
+
username?: string | null;
|
|
10
|
+
/**
|
|
11
|
+
* The text of the message.
|
|
12
|
+
*/
|
|
13
|
+
text?: string | null;
|
|
14
|
+
}
|
|
@@ -10,11 +10,11 @@ export interface VideoFeedPlayIconConfiguration {
|
|
|
10
10
|
export declare type VideoFeedTitlePosition = 'stacked' | 'nested';
|
|
11
11
|
export default interface VideoFeedConfiguration {
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Background color of video feed.
|
|
14
14
|
*/
|
|
15
15
|
backgroundColor?: string;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Corner radius of video feed. Only supported on iOS.
|
|
18
18
|
*/
|
|
19
19
|
cornerRadius?: number;
|
|
20
20
|
/**
|
|
@@ -22,11 +22,15 @@ export default interface VideoFeedConfiguration {
|
|
|
22
22
|
*/
|
|
23
23
|
title?: VideoFeedTitleConfiguration;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Title position of video feed.
|
|
26
26
|
*/
|
|
27
27
|
titlePosition?: VideoFeedTitlePosition;
|
|
28
28
|
/**
|
|
29
29
|
* Configuration of video feed play icon. Only supported on iOS.
|
|
30
30
|
*/
|
|
31
31
|
playIcon?: VideoFeedPlayIconConfiguration;
|
|
32
|
+
/**
|
|
33
|
+
* Indicates if the video feed shows ad badge.
|
|
34
|
+
*/
|
|
35
|
+
showAdBadge?: boolean;
|
|
32
36
|
}
|
|
@@ -2,7 +2,6 @@ export interface VideoPlayerSize {
|
|
|
2
2
|
width: number;
|
|
3
3
|
height: number;
|
|
4
4
|
}
|
|
5
|
-
export declare type VideoBadge = 'ad' | 'demo' | 'featured';
|
|
6
5
|
export default interface VideoPlaybackDetails {
|
|
7
6
|
/**
|
|
8
7
|
* A unique identifier of the video.
|
|
@@ -19,7 +18,7 @@ export default interface VideoPlaybackDetails {
|
|
|
19
18
|
/**
|
|
20
19
|
* Video badge type.
|
|
21
20
|
*/
|
|
22
|
-
badge?:
|
|
21
|
+
badge?: string | null;
|
|
23
22
|
/**
|
|
24
23
|
* The size of the player.
|
|
25
24
|
*/
|